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
31 apt-get install lightdm blackbox xterm firefox-esr big-cursor
32 /etc/init.d/lightdm start
38 /etc/init.d/gdm3 start
40 Disable sleep, hibernate and suspend targets
41 ============================================
42 # asahi does not handle sleep well at the moment
43 sudo systemctl mask sleep.target suspend.target hibernate.target hybrid-sleep.target
48 # Keyboard use capslock as additional ctrl
49 cat > /etc/X11/xorg.conf.d/00-keyboard.conf <<'EOF'
51 Identifier "system-keyboard"
53 Option "XkbLayout" "us"
54 Option "XkbModel" "pc105"
55 Option "XkbVariant" "de_se_fi"
56 Option "XkbOptions" "ctrl:nocaps"
60 # Swap command and option (windows and alt like on a pc keyboard)
61 echo 1 > /sys/module/hid_apple/parameters/swap_opt_cmd
63 # Configure the touchpad
64 cat > /etc/X11/xorg.conf.d/30-input.conf <<'EOF'
66 Identifier "libinput touchpad catchall"
68 MatchDevicePath "/dev/input/event*"
69 Option "Tapping" "False"
70 Option "TappingDrag" "False"
71 Option "DisableWhileTyping" "True"
72 Option "AccelProfile" "adaptive"
73 Option "AccelSpeed" "0.3"
74 Option "AccelerationNumerator" "2"
75 Option "AccelerationDenominator" "1"
76 Option "AccelerationThreshold" "4"
77 Option "AdaptiveDeceleration" "2"
78 Option "NaturalScrolling" "0"
79 Option "TappingButtonMap" "lmr"
80 Option "ClickMethod" "clickfinger"
85 Install latest kernel and m1n1 stage 2 (m1n1, dtbs, u-boot)
86 ===========================================================
87 curl -sL tg.st/u/ksh | sudo bash
89 Use the live system to install debian
90 =====================================
92 parted -a optimal /dev/nvme0n1 print free
93 parted -a optimal /dev/nvme0n1 mkpart primary ext4 <begin of free> <end of free>
94 tune2fs -O extents,uninit_bg,dir_index -m 0 -c 0 -i 0 /dev/nvme0n1p5
96 mount /dev/nvme0n1p5 /mnt
98 debootstrap --arch=arm64 testing /mnt http://deb.debian.org/debian
100 mount -t sysfs none /mnt/sys
101 mount -t efivarfs none /mnt/sys/firmware/efi/efivars
102 mount -t proc none /mnt/proc
103 mount -o bind /dev /mnt/dev
104 mount -o bind /dev/pts /mnt/dev/pts
106 mkdir -p /mnt/boot/efi
107 mount /dev/nvme0n1p4 /mnt/boot/efi
112 cat <<EOF > /etc/fstab
113 /dev/nvme0n1p5 / ext4 defaults 0 0
114 /dev/nvme0n1p4 /boot/efi vfat defaults 0 0
117 cat <<EOF > /etc/apt/sources.list
118 deb http://deb.debian.org/debian testing main contrib non-free
119 deb-src http://deb.debian.org/debian testing main contrib non-free
123 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 firmware-linux cryptsetup
125 apt-get install -y grub-efi-arm64-signed-
126 echo 'grub-efi-arm64 grub2/update_nvram boolean false' | debconf-set-selections
127 echo 'grub-efi-arm64 grub2/force_efi_extra_removable boolean true' | debconf-set-selections
128 dpkg-reconfigure -fnoninteractive grub-efi-arm64
130 grub-install --removable /boot/efi
132 echo 'nameserver 8.8.8.8' > /etc/resolv.conf
134 export HOSTNAME=debian
135 echo $HOSTNAME > /etc/hostname
136 cat <<EOF > /etc/hosts
137 127.0.0.1 localhost $HOSTNAME
140 cat <<EOF > /etc/wpa_supplicant/wpa_supplicant.conf
151 tar -C /lib/firmware/ -xf /boot/efi/vendorfw/firmware.tar
153 cat <<EOF > /etc/network/interfaces
154 # interfaces(5) file used by ifup(8) and ifdown(8)
155 # Include files from /etc/network/interfaces.d:
156 source /etc/network/interfaces.d/*
159 iface enp3s0 inet dhcp
161 # allow-hotplug wlp1s0f0
162 iface wlp1s0f0 inet dhcp
163 wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf
166 curl -sLo /tmp/k.deb tg.st/u/k.deb
167 curl -sLo /boot/efi/m1n1/boot.bin tg.st/u/u-boot.bin
174 umount /mnt/sys/firmware/efi/efivars
184 You might want to save the state of your live system to the usb stick. In order
185 to do so, run the following commands:
188 apt-get install -y cpio pigz
190 # remove '#' before allow-hotplug
191 vi /etc/network/interfaces
193 mv /mnt/initrd.gz /mnt/initrd.old
195 find . -xdev | cpio --quiet -H newc -o | pigz -9 > /mnt/initrd.gz
200 With iwd you can force to use 5ghz. The following needs to be done to get iwd
204 sudo apt-get install iwd
206 cat <<EOF > /etc/iwd/main.conf
211 # Remove or comment out the following interfaces from /etc/network/interfaces
212 # allow-hotplug wlp1s0f0
213 # iface wlp1s0f0 inet dhcp
214 # wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf
216 # Add the following interfaces to /etc/network/interfaces
218 iface wlan0 inet dhcp
227 station wlan0 get-networks
228 station wlan0 connect SSID
232 # Lets assume you have the following partioning
234 (mini) [~] sudo parted /dev/nvme0n1 print
235 Model: APPLE SSD AP0256Q (nvme)
236 Disk /dev/nvme0n1: 251GB
237 Sector size (logical/physical): 4096B/4096B
241 Number Start End Size File system Name Flags
242 1 24.6kB 524MB 524MB iBootSystemContainer
245 4 103GB 104GB 513MB fat32 boot, esp
246 5 104GB 246GB 142GB ext4
247 6 246GB 251GB 5369MB RecoveryOSContainer
249 # Never delete the first, the second and the last partition because that either
250 # renders your mac unbootable (first two) or unupgradable (last one). However
251 # you can recover the system by using a second system if you screw up.
253 # In the above example we need to delete the partition number 3 (stub partition
254 # you can identify it by the size 2500 MB). The partition 4 (you can identtify
255 # it by the fact that it is fat32 and the flags boot, esp). And the partition
256 # number 5 (you can identify it by the fact that it is ext4).
258 You delete the partitions by doing:
260 # n is the partition number
261 sudo parted /dev/nvme0n1 rm <n>
263 # If you're asked if you want to proceed, say 'y'. If your asked if you want to
264 # ignore, say, ignore.
269 echo inhibit-charge > /sys/class/power_supply/macsmc-battery/charge_behaviour
272 echo auto > /sys/class/power_supply/macsmc-battery/charge_behaviour
275 echo force-discharge > /sys/class/power_supply/macsmc-battery/charge_behaviour
277 # Find out which device tree you're using
278 cat /proc/device-tree/compatible
281 https://g3la.de/hedgedoc/s/MIaCyVv1A#Bluetooth
283 # Set Firefox as default browser
284 xdg-mime default firefox-esr.desktop x-scheme-handler/https x-scheme-handler/http
286 Get it running with debian and crypto file system
287 =================================================
288 https://g3la.de/hedgedoc/buDIXGBuRzKMwUnYOpStuw#