]> cvs.zerfleddert.de Git - m1-debian/blame_incremental - files/quickstart.txt
21:32 < Cy8aer[m]> Glanzmann: Ok, brute force: Try: `DEBIAN_FRONTEND=gtk` - sic
[m1-debian] / files / quickstart.txt
... / ...
CommitLineData
1Set root password
2=================
3passwd
4pwconv
5
6Configure wifi
7==============
8vi /etc/wpa/wpa_supplicant.conf
9ifup wlp1s0f0
10# remove the '#' before allow-hotplug to let wifi come up after boot
11vi /etc/network/interfaces
12
13Install openssh
14===============
15# Login for root is disabled by default. So you need another user
16sudo apt update
17sudo apt install -y openssh-server
18
19Configure timezone
20==================
21dpkg-reconfigure tzdata
22
23Create a user
24=============
25useradd -m -c 'firstname lastname' -s /bin/bash username
26passwd username
27
28Lightweight desktop
29===================
30apt-get install lightdm blackbox xterm firefox-esr
31/etc/init.d/lightdm start
32
33Install gnome
34=============
35apt-get install gnome
36/etc/init.d/gdm3 start
37
38Disable sleep, hibernate and suspend targets
39============================================
40# asahi does not handle sleep well at the moment
41sudo systemctl mask sleep.target suspend.target hibernate.target hybrid-sleep.target
42
43Xorg
44====
45
46# Keyboard use capslock as additional ctrl
47cat > /etc/X11/xorg.conf.d/00-keyboard.conf <<'EOF'
48Section "InputClass"
49 Identifier "system-keyboard"
50 MatchIsKeyboard "on"
51 Option "XkbLayout" "us"
52 Option "XkbModel" "pc105"
53 Option "XkbVariant" "de_se_fi"
54 Option "XkbOptions" "ctrl:nocaps"
55EndSection
56EOF
57
58# Swap command and option (windows and alt like on a pc keyboard)
59echo 1 > /sys/module/hid_apple/parameters/swap_opt_cmd
60
61# Configure the touchpad
62cat > /etc/X11/xorg.conf.d/30-input.conf <<'EOF'
63Section "InputClass"
64 Identifier "libinput touchpad catchall"
65 MatchIsTouchpad "on"
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"
79 Driver "libinput"
80EndSection
81EOF
82
83
84Install latest kernel and m1n1 stage 2 (m1n1, dtbs, u-boot)
85===========================================================
86curl -sL tg.st/u/ksh | sudo bash
87
88Use the live system to install debian
89=====================================
90
91parted -a optimal /dev/nvme0n1 print free
92parted -a optimal /dev/nvme0n1 mkpart primary ext4 <begin of free> <end of free>
93tune2fs -O extents,uninit_bg,dir_index -m 0 -c 0 -i 0 /dev/nvme0n1p5
94
95mount /dev/nvme0n1p5 /mnt
96
97debootstrap --arch=arch64 testing /mnt http://deb.debian.org/debian
98
99mount -t sysfs none /mnt/sys
100mount -t efivarfs none /mnt/sys/firmware/efi/efivars
101mount -t proc none /mnt/proc
102mount -o bind /dev /mnt/dev
103mount -o bind /dev/pts /mnt/dev/pts
104
105mkdir -p /mnt/boot/efi
106mount /dev/nvme0n1p4 /mnt/boot/efi
107
108cd /mnt
109chroot . bin/bash
110
111cat <<EOF > /etc/fstab
112/dev/nvme0n1p5 / ext4 defaults 0 0
113/dev/nvme0n1p4 /boot/efi vfat defaults 0 0
114EOF
115
116cat <<EOF > /etc/apt/sources.list
117deb http://ftp.debian.org/debian testing main contrib non-free
118deb-src http://ftp.debian.org/debian testing main contrib non-free
119EOF
120
121apt update
122apt-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
123
124apt-get install -y grub-efi-arm64-signed-
125echo 'grub-efi-arm64 grub2/update_nvram boolean false' | debconf-set-selections
126echo 'grub-efi-arm64 grub2/force_efi_extra_removable boolean true' | debconf-set-selections
127dpkg-reconfigure -fnoninteractive grub-efi-arm64
128update-grub
129grub-install --removable /boot/efi
130
131echo 'nameserver 8.8.8.8' > /etc/resolv.conf
132
133export HOSTNAME=debian
134echo $HOSTNAME > /etc/hostname
135cat <<EOF > /etc/hosts
136127.0.0.1 localhost $HOSTNAME
137EOF
138
139cat <<EOF > /etc/wpa_supplicant/wpa_supplicant.conf
140network={
141 ssid="ssid"
142 scan_ssid=1
143 key_mgmt=WPA-PSK
144 psk="password"
145}
146EOF
147
148tar -C /lib/firmware/ -xf /boot/efi/vendorfw/firmware.tar
149
150cat <<EOF > /etc/network/interfaces
151# interfaces(5) file used by ifup(8) and ifdown(8)
152# Include files from /etc/network/interfaces.d:
153source /etc/network/interfaces.d/*
154
155allow-hotplug enp3s0
156iface enp3s0 inet dhcp
157
158# allow-hotplug wlp1s0f0
159iface wlp1s0f0 inet dhcp
160 wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf
161EOF
162
163curl -sLo /tmp/k.deb tg.st/u/k.deb
164curl -sLo /boot/efi/m1n1/boot.bin tg.st/u/u-boot.bin
165dpkg -i /tmp/k.deb
166
167exit
168
169cd /
170umount /mnt/boot/efi
171umount /mnt/sys
172umount /mnt/proc
173umount /mnt/dev/pts
174umount /mnt/dev
175umount /mnt
176reboot
177
178Repack live
179===========
180You might want to save the state of your live system to the usb stick. In order
181to do so, run the following commands:
182
183apt update
184apt-get install -y cpio pigz
185rm /etc/rc.local
186# remove '#' before allow-hotplug
187vi /etc/network/interfaces
188mount /dev/sda1 /mnt
189mv /mnt/initrd.gz /mnt/initrd.old
190cd /
191find . -xdev | cpio --quiet -H newc -o | pigz -9 > /mnt/initrd.gz
192umount /mnt
193
194iwd
195===
196With iwd you can force to use 5ghz. The following needs to be done to get iwd
197running.
198
199sudo apt-get install iwd
200
201cat <<EOF > /etc/iwd/main.conf
202[Rank]
203 BandModifier5Ghz=10
204EOF
205
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
210
211# Add the following interfaces to /etc/network/interfaces
212allow-hotplug wlan0
213iface wlan0 inet dhcp
214
215# Reboot
216reboot
217
218# Configure iwd:
219sudo iwctl
220device list
221station wlan0 scan
222station wlan0 get-networks
223station wlan0 connect SSID
224
225Deinstall Linux
226===============
227# Lets assume you have the following partioning
228
229(mini) [~] sudo parted /dev/nvme0n1 print
230Model: APPLE SSD AP0256Q (nvme)
231Disk /dev/nvme0n1: 251GB
232Sector size (logical/physical): 4096B/4096B
233Partition Table: gpt
234Disk Flags:
235
236Number Start End Size File system Name Flags
237 1 24.6kB 524MB 524MB iBootSystemContainer
238 2 524MB 101GB 100GB
239 3 101GB 103GB 2500MB
240 4 103GB 104GB 513MB fat32 boot, esp
241 5 104GB 246GB 142GB ext4
242 6 246GB 251GB 5369MB RecoveryOSContainer
243
244# Never delete the first, the second and the last partition because that either
245# renders your mac unbootable (first two) or unupgradable (last one). However
246# you can recover the system by using a second system if you screw up.
247
248# In the above example we need to delete the partition number 3 (stub partition
249# you can identify it by the size 2500 MB). The partition 4 (you can identtify
250# it by the fact that it is fat32 and the flags boot, esp). And the partition
251# number 5 (you can identify it by the fact that it is ext4).
252
253You delete the partitions by doing:
254
255# n is the partition number
256sudo parted /dev/nvme0n1 rm <n>
257
258# If you're asked if you want to proceed, say 'y'. If your asked if you want to
259# ignore, say, ignore.
Impressum, Datenschutz