1 # grow the root partition
6 resize2fs /dev/nvme0n1pX
16 tar -C /lib/firmware/ -xf /mnt/linux-firmware.tar
19 vim /etc/wpa_supplicant/wpa_supplicant.conf
20 wpa_supplicant -i wlan0 -c /etc/wpa_supplicant/wpa_supplicant.conf
29 dpkg-reconfigure tzdata
32 # We deinstall grub-efi-arm64-signed- because it creates a file fbaa64.efi
33 # which makes u-boot hang.
34 apt-get install grub-efi grub-efi-arm64-signed-
35 grub-install --target=arm64-efi --efi-directory=/boot/efi --removable
37 # Set removable media to yes and nvram to no to make later grub updates work
38 dpkg-reconfigure grub-efi-arm64
40 See also: https://github.com/AsahiLinux/docs/wiki/U-Boot
44 # Keyboard use capslock as additional ctrl
45 cat > /etc/X11/xorg.conf.d/00-keyboard.conf <<'EOF'
47 Identifier "system-keyboard"
49 Option "XkbLayout" "us"
50 Option "XkbModel" "pc105"
51 Option "XkbVariant" "de_se_fi"
52 Option "XkbOptions" "ctrl:nocaps"
56 # Swap command and option (windows and alt like on a pc keyboard)
57 echo 1 > /sys/module/hid_apple/parameters/swap_opt_cmd
59 # Configure the touchpad
60 cat > /etc/X11/xorg.conf.d/30-input.conf <<'EOF'
62 Identifier "libinput touchpad catchall"
64 MatchDevicePath "/dev/input/event*"
65 Option "Tapping" "False"
66 Option "TappingDrag" "False"
67 Option "DisableWhileTyping" "True"
68 Option "AccelProfile" "adaptive"
69 Option "AccelSpeed" "0.3"
70 Option "AccelerationNumerator" "2"
71 Option "AccelerationDenominator" "1"
72 Option "AccelerationThreshold" "4"
73 Option "AdaptiveDeceleration" "2"
74 Option "NaturalScrolling" "0"
75 Option "TappingButtonMap" "lmr"
76 Option "ClickMethod" "clickfinger"
82 useradd -m -c 'firstname lastname' -s /bin/bash username
86 apt-get install lightdm blackbox xterm firefox-esr
90 /etc/init.d/gdm3 start
92 # If you need to install the kernel on a bootstrapped system or one that needs recovery
93 wget https://tg.st/u/k.deb
96 # asahi does not handle sleep well at the moment
97 sudo systemctl mask sleep.target suspend.target hibernate.target hybrid-sleep.target
99 - You can also use the live system to install Debian on the m1, the rough outline is:
101 - Create two paritions:
106 - Use debootstrap to bootstrap debian
116 You might want to save the state of your live system to the usb stick. In order
117 to do so, run the following commands:
120 apt-get install -y cpio pigz
122 # remove '#' before allow-hotplug
123 vi /etc/network/interfaces
125 mv /mnt/initrd.gz /mnt/initrd.old
127 find . -xdev | cpio --quiet -H newc -o | pigz -9 > /mnt/initrd.gz
132 With iwd you can force to use 5ghz. The following needs to be done to get iwd
135 sudo apt-get install iwd
137 cat <<EOF > /etc/iwd/main.conf
142 # Remove or comment out the following interfaces from /etc/network/interfaces
143 # allow-hotplug wlp1s0f0
144 # iface wlp1s0f0 inet dhcp
145 # wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf
147 # Add the following interfaces to /etc/network/interfaces
149 iface wlan0 inet dhcp
158 station wlan0 get-networks
159 station wlan0 connect SSID