]> git.zerfleddert.de Git - m1-debian/blame - files/quickstart.txt
tell an easy way to grow the root partition
[m1-debian] / files / quickstart.txt
CommitLineData
814f760b
TG
1# grow the root partition
2sgdisk -n 0:0
3
7c94d3fa
TG
4# grow root filesystem
5lsblk
6resize2fs /dev/nvme0n1pX
7
cd51dc6c
TG
8# Ethernet
9ip l s
10dhclient <device>
11
708a0d2b
TG
12# Wifi
13rmmod brcmfmac
14rmmod brcmutil
15mount /dev/sda1 /mnt
16tar -C /lib/firmware/ -xf /mnt/linux-firmware.tar
17umount /mnt
18modprobe brcmfmac
19fe2e56 19vim /etc/wpa_supplicant/wpa_supplicant.conf
da7dd4b8 20wpa_supplicant -i wlan0 -c /etc/wpa_supplicant/wpa_supplicant.conf
708a0d2b
TG
21dhclient wlan0
22
708a0d2b
TG
23# Time
24ntpdate pool.ntp.org
25date --set 2022-01-25
26date --set 14:21
7a54df2e 27
5e01b9d1
TG
28# Configure timezone
29dpkg-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.
34apt-get install grub-efi grub-efi-arm64-signed-
35grub-install --target=arm64-efi --efi-directory=/boot/efi --removable
7a54df2e 36update-grub
60b74f9d
TG
37# Set removable media to yes and nvram to no to make later grub updates work
38dpkg-reconfigure grub-efi-arm64
39
7a54df2e
TG
40See also: https://github.com/AsahiLinux/docs/wiki/U-Boot
41
7a54df2e 42# xorg
c45f72fa
TG
43
44# Keyboard use capslock as additional ctrl
1c4cc0fc 45cat > /etc/X11/xorg.conf.d/00-keyboard.conf <<'EOF'
7a54df2e
TG
46Section "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"
53EndSection
1c4cc0fc
TG
54EOF
55
c45f72fa 56# Swap command and option (windows and alt like on a pc keyboard)
34ce98d9 57echo 1 > /sys/module/hid_apple/parameters/swap_opt_cmd
c45f72fa
TG
58
59# Configure the touchpad
1c4cc0fc 60cat > /etc/X11/xorg.conf.d/30-input.conf <<'EOF'
7a54df2e
TG
61Section "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"
78EndSection
1c4cc0fc 79EOF
cd51dc6c
TG
80
81# Create a user
7c94d3fa
TG
82useradd -m -c 'firstname lastname' -s /bin/bash username
83passwd username
84
85# Lightweight desktop
86apt-get install lightdm blackbox xterm firefox-esr
cd51dc6c
TG
87
88# Install gnome
89apt-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
93wget https://tg.st/u/k.deb
94dpkg -i k.deb
95
5fe4d912
TG
96# asahi does not handle sleep well at the moment
97sudo 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
114Repack live
115===========
116You might want to save the state of your live system to the usb stick. In order
117to do so, run the following commands:
118
119apt update
120apt-get install -y cpio pigz
121rm /etc/rc.local
122# remove '#' before allow-hotplug
123vi /etc/network/interfaces
124mount /dev/sda1 /mnt
125mv /mnt/initrd.gz /mnt/initrd.old
126cd /
127find . -xdev | cpio --quiet -H newc -o | pigz -9 > /mnt/initrd.gz
128umount /mnt
Impressum, Datenschutz