Skip to content

Commit 588c42b

Browse files
committed
docs: deb lb notes
1 parent 8dbea61 commit 588c42b

1 file changed

Lines changed: 119 additions & 4 deletions

File tree

Linux/Debian.md

Lines changed: 119 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,20 +46,135 @@ Both can be installed simultaneously.
4646

4747
## Goal: Run Debian 12 on a Lenovo ThinkPad X1 Carbon (12th gen)
4848

49-
### Debian 12 Stable Vanilla
49+
This laptop is too new to run Debian 12 vanilla in an acceptable way without modification.
50+
Some of the issues encountered:
5051

51-
An initial attempt ino
52+
* The kernel was not up to date enough, and `6.9` is needed (Intel docs suggest `6.10` is needed?)
53+
* Firmware to use the Wi-Fi 6E AX211 card was not present (and was asking for microcode files), so installing `firmware-iwlwifi` at version `20240709` was needed.
54+
https://www.intel.com/content/www/us/en/products/sku/204837/intel-wifi-6e-ax211-gig/specifications.html
55+
* No sound was available, as an update to `firmware-sof-signed` to `xxx` was needed.
5256

5357
https://forums.debian.net/viewtopic.php?t=158270
5458

55-
#### Intel WiFi Microcode
59+
Remember to install linux headers!
5660

57-
#### Sof-sound
61+
```
62+
sudo apt -t bookworm-backports install linux-headers-amd64
63+
```
64+
65+
#### Kernel (`linux-image-6.9.7+bpo-amd64`)
66+
67+
#### Intel WiFi Microcode (`firmware-iwlwifi_20240709-1`)
68+
69+
Maybe not needed if kernel update is provided?
70+
71+
#### Sof-sound (`firmware-sof-signed_`)
5872

5973
### Kernel Support
6074

6175
### Compiling an ISO image (Live Builds?)
6276

77+
Initial guide followed: https://ianlecorbeau.github.io/blog/debian-live-build.html
78+
79+
```sh
80+
#!/bin/sh
81+
lb config -d bookworm --backports true --debian-installer live \
82+
--debian-installer-distribution bookworm \
83+
--archive-areas "main contrib non-free non-free-firmware" \
84+
--debootstrap-options "--variant=minbase" \
85+
--linux-packages "linux-image-6.9.7+bpo"
86+
87+
# Define where to fetch the kernel from
88+
# https://live-team.pages.debian.net/live-manual/html/live-manual/customizing-package-installation.en.html#429
89+
echo "deb http://deb.debian.org/debian/ bookworm-backports main" > config/archives/bookworm-backports.list.chroot
90+
91+
# TODO:
92+
# Ensure that recommended packages we actually want to install are present
93+
# Not probably needed if apt-recommends is true
94+
# https://live-team.pages.debian.net/live-manual/html/live-manual/customizing-package-installation.en.html
95+
# echo "user-setup sudo" > config/package-lists/recommends.list.chroot
96+
97+
# Define packages to install
98+
cat <<EOF >> config/package-lists/pkgs.list.chroot
99+
firefox-esr
100+
firmware-iwlwifi
101+
firmware-sof-signed
102+
git
103+
iputils-ping
104+
network-manager
105+
network-manager-gnome
106+
vim
107+
xfce
108+
xfce-goodies
109+
yt-dlp
110+
EOF
111+
112+
# TODO:
113+
# Define the Pin-Priority of the packages we want.
114+
# We need this to ensure packages are installed with the correct version.
115+
# https://live-team.pages.debian.net/live-manual/html/live-manual/customizing-package-installation.en.html#389
116+
cat <<EOF >> TODO:
117+
EOF
118+
119+
# Compiling `tirdad` kernel module by merging in the single change from the upstream `0xsirus` remote that wasn't included in Kicksecure.
120+
# TODO: Need to set git config
121+
git clone --depth 1 https://github.com/Kicksecure/tirdad.git
122+
git remote add original https://github.com/0xsirus/tirdad.git
123+
git fetch original
124+
git merge original/master
125+
126+
# `xfce4` auto-configuration
127+
mdkir -p config/includes.chroot/etc/skel/.config/xfce4/xfconf/xfce-perchannel-xml/
128+
cat <<EOF >> config/includes.chroot/etc/skel/.config/xfce4/xfconf/xfce-perchannel-xml/xsettings.xml
129+
<?xml version="1.0" encoding="UTF-8"?>
130+
<channel name="xsettings" version="1.0">
131+
<property name="Gdk/WindowScalingFactor" type="int" value="2"/>
132+
</channel>
133+
EOF
134+
```
135+
136+
TODO: how to test?
137+
Answer: live boot USB? Guide about how to use KVM in live build manual
138+
139+
#### `tirdad` stuff
140+
I had to symlink in the linux-headers directory into `/lib/modules/$(uname -r)/build` as well?
141+
142+
```
143+
ln -sf /usr/lib/$(uname -r)/* /lib/modules/$(uname -r)/build
144+
```
145+
146+
Once built, install via:
147+
148+
```
149+
install -D -m 644 tirdad.ko /lib/modules/$(uname -r)/extra/tirdad.ko
150+
depmod -a $(uname -r)
151+
```
152+
153+
then verify the module exists:
154+
155+
```
156+
modprobe tirdad
157+
```
158+
159+
insmod tirdad gives a segmentation fault at `cet.c`
160+
161+
Maybe try setting ibt=off?
162+
163+
##### `xfce4` configuration
164+
165+
Configuring XFCE4 window appearance:
166+
167+
Copy files into `config/includes.chroot` into the right subdirectory from there.
168+
169+
TODO:
170+
171+
Try setting: `firmware=never live-installer/enable=false` as boot parameters
172+
https://wiki.debian.org/Firmware
173+
https://live-team.pages.debian.net/live-manual/html/live-manual/customizing-installer.en.html
174+
175+
TODO:
176+
Internet didn't seem to be working.
177+
63178
https://live-team.pages.debian.net/live-manual/html/live-manual/index.en.html
64179

65180
[1]: https://www.debian.org/intro/free

0 commit comments

Comments
 (0)