Repository : ssh://git@diktynna/doc On branches: backup-redmine,main
commit 771ef99eb0437448e8e17d37f8a649cfa24a829a Author: Sven Eckelmann sven@narfation.org Date: Sat May 4 19:49:47 2024 +0000
doc: devtools/Kernel_hacking_Debian_image: switch to Debian bookworm
771ef99eb0437448e8e17d37f8a649cfa24a829a devtools/Kernel_hacking_Debian_image.textile | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-)
diff --git a/devtools/Kernel_hacking_Debian_image.textile b/devtools/Kernel_hacking_Debian_image.textile index 60059d78..c7403497 100644 --- a/devtools/Kernel_hacking_Debian_image.textile +++ b/devtools/Kernel_hacking_Debian_image.textile @@ -23,12 +23,11 @@ qemu-img create debian.img 8G sudo mkfs.ext4 -O '^has_journal' -F debian.img sudo mkdir debian sudo mount -o loop debian.img debian -sudo debootstrap bullseye debian +sudo debootstrap bookworm debian sudo systemd-nspawn -D debian apt update sudo systemd-nspawn -D debian apt install --no-install-recommends build-essential vim openssh-server less \ pkg-config libnl-3-dev libnl-genl-3-dev libcap-dev tcpdump rng-tools5 \ trace-cmd flex bison libelf-dev libdw-dev binutils-dev libunwind-dev libssl-dev libslang2-dev liblzma-dev libperl-dev -sudo systemd-nspawn -D debian apt remove rsyslog sudo systemd-nspawn -D debian systemctl enable fstrim.timer
sudo mkdir debian/root/.ssh/ @@ -39,8 +38,8 @@ sudo sh -c 'cat > debian/etc/fstab << EOF host /host 9p trans=virtio,version=9p2000.L,posixacl,msize=524288 0 0 EOF'
-sudo sh -c 'cat > debian/etc/rc.local << "EOF" -#!/bin/sh -e +sudo sh -c 'cat > debian/etc/boot.d/test-init << "EOF" +#!/bin/sh
MAC_PART="$(ip link show enp0s1 | awk "/ether/ {print $2}"| sed -e "s/.*://" -e "s/[\n\ ].*//"|awk "{print ("0x"$1)*1 }")" IP_PART="$(echo $MAC_PART|awk "{ print $1+50 }")" @@ -52,7 +51,7 @@ ip link set up dev lo [ ! -x /host/test-init.sh ] || /host/test-init.sh exit 0 EOF' -sudo chmod a+x debian/etc/rc.local +sudo chmod a+x debian/etc/boot.d/test-init
sudo sed -i 's/^root:[^:]*:/root::/' debian/etc/shadow