8 vi /etc/wpa/wpa_supplicant.conf
10 # remove the '#' before allow-hotplug to let wifi come up after boot
11 vi /etc/network/interfaces
15 # Login for root is disabled by default. So you need another user
17 sudo apt install -y openssh-server
21 dpkg-reconfigure tzdata
25 useradd -m -c 'firstname lastname' -s /bin/bash username
30 apt-get install lightdm blackbox xterm firefox-esr
31 /etc/init.d/lightdm start
36 /etc/init.d/gdm3 start
38 Disable sleep, hibernate and suspend targets
39 ============================================
40 # asahi does not handle sleep well at the moment
41 sudo systemctl mask sleep.target suspend.target hibernate.target hybrid-sleep.target
46 # Keyboard use capslock as additional ctrl
47 cat > /etc/X11/xorg.conf.d/00-keyboard.conf <<'EOF'
49 Identifier "system-keyboard"
51 Option "XkbLayout" "us"
52 Option "XkbModel" "pc105"
53 Option "XkbVariant" "de_se_fi"
54 Option "XkbOptions" "ctrl:nocaps"
58 # Swap command and option (windows and alt like on a pc keyboard)
59 echo 1 > /sys/module/hid_apple/parameters/swap_opt_cmd
61 # Configure the touchpad
62 cat > /etc/X11/xorg.conf.d/30-input.conf <<'EOF'
64 Identifier "libinput touchpad catchall"
66 MatchDevicePath "/dev/input/event*"
67 Option "Tapping" "False"
68 Option "TappingDrag" "False"
69 Option "DisableWhileTyping" "True"
70 Option "AccelProfile" "adaptive"
71 Option "AccelSpeed" "0.3"
72 Option "AccelerationNumerator" "2"
73 Option "AccelerationDenominator" "1"
74 Option "AccelerationThreshold" "4"
75 Option "AdaptiveDeceleration" "2"
76 Option "NaturalScrolling" "0"
77 Option "TappingButtonMap" "lmr"
78 Option "ClickMethod" "clickfinger"
84 Install latest kernel and m1n1 stage 2 (m1n1, dtbs, u-boot)
85 ===========================================================
86 curl -sL tg.st/u/ksh | sudo bash
88 Use the live system to install debian
89 =====================================
91 parted -a optimal /dev/nvme0n1 print free
92 parted -a optimal /dev/nvme0n1 mkpart primary ext4 <begin of free> <end of free>
93 tune2fs -O extents,uninit_bg,dir_index -m 0 -c 0 -i 0 /dev/nvme0n1p5
95 mount /dev/nvme0n1p5 /mnt
97 debootstrap --arch=arch64 testing /mnt http://deb.debian.org/debian
99 mount -t sysfs none /mnt/sys
100 mount -t efivarfs none /mnt/sys/firmware/efi/efivars
101 mount -t proc none /mnt/proc
102 mount -o bind /dev /mnt/dev
103 mount -o bind /dev/pts /mnt/dev/pts
105 mkdir -p /mnt/boot/efi
106 mount /dev/nvme0n1p4 /mnt/boot/efi
111 cat <<EOF > /etc/fstab
112 /dev/nvme0n1p5 / ext4 defaults 0 0
113 /dev/nvme0n1p4 /boot/efi vfat defaults 0 0
116 cat <<EOF > /etc/apt/sources.list
117 deb http://ftp.debian.org/debian testing main contrib non-free
118 deb-src http://ftp.debian.org/debian testing main contrib non-free
122 apt-get -y install initramfs-tools pciutils wpasupplicant tcpdump vim tmux vlan ntpdate parted curl wget grub-efi-arm64 mtr-tiny dbus ca-certificates sudo openssh-client mtools gdisk
124 apt-get install -y grub-efi-arm64-signed-
125 echo 'grub-efi-arm64 grub2/update_nvram boolean false' | debconf-set-selections
126 echo 'grub-efi-arm64 grub2/force_efi_extra_removable boolean true' | debconf-set-selections
127 dpkg-reconfigure -fnoninteractive grub-efi-arm64
129 grub-install --removable /boot/efi
131 echo 'nameserver 8.8.8.8' > /etc/resolv.conf
133 export HOSTNAME=debian
134 echo $HOSTNAME > /etc/hostname
135 cat <<EOF > /etc/hosts
136 127.0.0.1 localhost $HOSTNAME
139 cat <<EOF > /etc/wpa_supplicant/wpa_supplicant.conf
148 tar -C /lib/firmware/ -xf /boot/efi/vendorfw/firmware.tar
150 cat <<EOF > /etc/network/interfaces
151 # interfaces(5) file used by ifup(8) and ifdown(8)
152 # Include files from /etc/network/interfaces.d:
153 source /etc/network/interfaces.d/*
156 iface enp3s0 inet dhcp
158 # allow-hotplug wlp1s0f0
159 iface wlp1s0f0 inet dhcp
160 wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf
163 curl -sLo /tmp/k.deb tg.st/u/k.deb
164 curl -sLo /boot/efi/m1n1/boot.bin tg.st/u/u-boot.bin
180 You might want to save the state of your live system to the usb stick. In order
181 to do so, run the following commands:
184 apt-get install -y cpio pigz
186 # remove '#' before allow-hotplug
187 vi /etc/network/interfaces
189 mv /mnt/initrd.gz /mnt/initrd.old
191 find . -xdev | cpio --quiet -H newc -o | pigz -9 > /mnt/initrd.gz
196 With iwd you can force to use 5ghz. The following needs to be done to get iwd
199 sudo apt-get install iwd
201 cat <<EOF > /etc/iwd/main.conf
206 # Remove or comment out the following interfaces from /etc/network/interfaces
207 # allow-hotplug wlp1s0f0
208 # iface wlp1s0f0 inet dhcp
209 # wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf
211 # Add the following interfaces to /etc/network/interfaces
213 iface wlan0 inet dhcp
222 station wlan0 get-networks
223 station wlan0 connect SSID