]>
Commit | Line | Data |
---|---|---|
814f760b TG |
1 | # grow the root partition |
2 | sgdisk -n 0:0 | |
3 | ||
7c94d3fa TG |
4 | # grow root filesystem |
5 | lsblk | |
6 | resize2fs /dev/nvme0n1pX | |
7 | ||
cd51dc6c TG |
8 | # Ethernet |
9 | ip l s | |
10 | dhclient <device> | |
11 | ||
708a0d2b TG |
12 | # Wifi |
13 | rmmod brcmfmac | |
14 | rmmod brcmutil | |
15 | mount /dev/sda1 /mnt | |
16 | tar -C /lib/firmware/ -xf /mnt/linux-firmware.tar | |
17 | umount /mnt | |
18 | modprobe brcmfmac | |
19fe2e56 | 19 | vim /etc/wpa_supplicant/wpa_supplicant.conf |
da7dd4b8 | 20 | wpa_supplicant -i wlan0 -c /etc/wpa_supplicant/wpa_supplicant.conf |
708a0d2b TG |
21 | dhclient wlan0 |
22 | ||
708a0d2b TG |
23 | # Time |
24 | ntpdate pool.ntp.org | |
25 | date --set 2022-01-25 | |
26 | date --set 14:21 | |
7a54df2e | 27 | |
5e01b9d1 TG |
28 | # Configure timezone |
29 | dpkg-reconfigure tzdata | |
30 | ||
7a54df2e | 31 | # Fix grub |
a340a66a TG |
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 | |
7a54df2e | 36 | update-grub |
60b74f9d TG |
37 | # Set removable media to yes and nvram to no to make later grub updates work |
38 | dpkg-reconfigure grub-efi-arm64 | |
39 | ||
7a54df2e TG |
40 | See also: https://github.com/AsahiLinux/docs/wiki/U-Boot |
41 | ||
7a54df2e | 42 | # xorg |
c45f72fa TG |
43 | |
44 | # Keyboard use capslock as additional ctrl | |
1c4cc0fc | 45 | cat > /etc/X11/xorg.conf.d/00-keyboard.conf <<'EOF' |
7a54df2e TG |
46 | Section "InputClass" |
47 | Identifier "system-keyboard" | |
48 | MatchIsKeyboard "on" | |
49 | Option "XkbLayout" "us" | |
50 | Option "XkbModel" "pc105" | |
51 | Option "XkbVariant" "de_se_fi" | |
52 | Option "XkbOptions" "ctrl:nocaps" | |
53 | EndSection | |
1c4cc0fc TG |
54 | EOF |
55 | ||
c45f72fa | 56 | # Swap command and option (windows and alt like on a pc keyboard) |
34ce98d9 | 57 | echo 1 > /sys/module/hid_apple/parameters/swap_opt_cmd |
c45f72fa TG |
58 | |
59 | # Configure the touchpad | |
1c4cc0fc | 60 | cat > /etc/X11/xorg.conf.d/30-input.conf <<'EOF' |
7a54df2e TG |
61 | Section "InputClass" |
62 | Identifier "libinput touchpad catchall" | |
63 | MatchIsTouchpad "on" | |
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" | |
77 | Driver "libinput" | |
78 | EndSection | |
1c4cc0fc | 79 | EOF |
cd51dc6c TG |
80 | |
81 | # Create a user | |
7c94d3fa TG |
82 | useradd -m -c 'firstname lastname' -s /bin/bash username |
83 | passwd username | |
84 | ||
85 | # Lightweight desktop | |
86 | apt-get install lightdm blackbox xterm firefox-esr | |
cd51dc6c TG |
87 | |
88 | # Install gnome | |
89 | apt-get install gnome | |
90 | /etc/init.d/gdm3 start | |
91 | ||
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 | |
94 | dpkg -i k.deb | |
95 | ||
5fe4d912 TG |
96 | # asahi does not handle sleep well at the moment |
97 | sudo systemctl mask sleep.target suspend.target hibernate.target hybrid-sleep.target | |
98 | ||
cd51dc6c TG |
99 | - You can also use the live system to install Debian on the m1, the rough outline is: |
100 | ||
101 | - Create two paritions: | |
102 | ||
103 | - One 1 GB vfat | |
104 | - Rest with ext4 | |
105 | ||
106 | - Use debootstrap to bootstrap debian | |
107 | ||
7c94d3fa TG |
108 | - Install the kernel |
109 | ||
cd51dc6c TG |
110 | - Install grub |
111 | ||
112 | - reboot | |
83966e16 TG |
113 | |
114 | Repack live | |
115 | =========== | |
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: | |
118 | ||
119 | apt update | |
120 | apt-get install -y cpio pigz | |
121 | rm /etc/rc.local | |
122 | # remove '#' before allow-hotplug | |
123 | vi /etc/network/interfaces | |
124 | mount /dev/sda1 /mnt | |
125 | mv /mnt/initrd.gz /mnt/initrd.old | |
126 | cd / | |
127 | find . -xdev | cpio --quiet -H newc -o | pigz -9 > /mnt/initrd.gz | |
128 | umount /mnt |