Beta support for Debian Bookworm.

This commit is contained in:
Maciej Prill 2023-06-11 13:27:45 +02:00
parent ffa67a01f9
commit c58df53b97
12 changed files with 24 additions and 40 deletions

View File

@ -13,8 +13,10 @@ Scripts for Debian Buster were tested on Ubuntu 18.04.
Required packages: Required packages:
* debootstrap * debootstrap
* dosfstools * dosfstools
* squashfs-tools
* unzip
* grub-pc-bin * grub-pc-bin
* grub-efi-amd64-bin * grub-efi-amd64-bin
* rsync
* squashfs-tools
* unzip
* xorriso * xorriso
* zstd

0
bookworm-amd64/bin/basefs_init Normal file → Executable file
View File

0
bookworm-amd64/bin/dist_ipxe Normal file → Executable file
View File

22
bookworm-amd64/bin/dist_iso Normal file → Executable file
View File

@ -35,24 +35,12 @@ echo
TEMP_DIR_MEMTEST=$(mktemp -d) TEMP_DIR_MEMTEST=$(mktemp -d)
#BIOS wget -q https://memtest.org/download/v6.20/mt86plus_6.20.binaries.zip -P ${TEMP_DIR_MEMTEST}
wget -q http://www.memtest.org/download/5.01/memtest86+-5.01.zip -P ${TEMP_DIR_MEMTEST} unzip -q ${TEMP_DIR_MEMTEST}/mt86plus_6.20.binaries.zip -d ${TEMP_DIR_MEMTEST}
unzip -q ${TEMP_DIR_MEMTEST}/memtest86+-5.01.zip -d ${TEMP_DIR_MEMTEST} cp ${TEMP_DIR_MEMTEST}/memtest64.bin "$TEMP_DIR/memtest/memtest.bin"
cp ${TEMP_DIR_MEMTEST}/memtest86+-5.01.bin "$TEMP_DIR/memtest/memtest.bin" cp ${TEMP_DIR_MEMTEST}/memtest64.efi "$TEMP_DIR/memtest/memtest86.efi"
#EFI
mkdir ${TEMP_DIR_MEMTEST}/mountpoint
wget -q https://www.memtest86.com/downloads/memtest86-usb.zip -P ${TEMP_DIR_MEMTEST}
unzip -q ${TEMP_DIR_MEMTEST}/memtest86-usb.zip -d ${TEMP_DIR_MEMTEST}
losetup -o $((2048*512)) /dev/loop0 ${TEMP_DIR_MEMTEST}/memtest86-usb.img
mount /dev/loop0 ${TEMP_DIR_MEMTEST}/mountpoint
cp ${TEMP_DIR_MEMTEST}/mountpoint/EFI/BOOT/BOOTX64.efi "$TEMP_DIR/memtest/memtest86.efi"
umount ${TEMP_DIR_MEMTEST}/mountpoint
losetup -d /dev/loop0
rm -r "${TEMP_DIR_MEMTEST}" rm -r "${TEMP_DIR_MEMTEST}"
#GRUB #GRUB
echo echo
@ -83,7 +71,7 @@ cat /usr/lib/grub/i386-pc/boot.img ${TEMP_DIR_GRUB}/core.img > ${TEMP_DIR_GRUB}/
#EFI #EFI
cp /usr/share/grub/unicode.pf2 $TEMP_DIR/boot/efi/fonts/ cp /usr/share/grub/unicode.pf2 $TEMP_DIR/boot/efi/fonts/
grub-mkimage -C xz -O x86_64-efi -p /boot/efi/ -o "${TEMP_DIR_GRUB}/bootx64.efi" linux chain iso9660 normal all_video gfxterm gfxmenu png linuxefi grub-mkimage -C xz -O x86_64-efi -p /boot/efi/ -o "${TEMP_DIR_GRUB}/bootx64.efi" linux chain iso9660 normal all_video gfxterm gfxmenu png linuxefi
truncate -s $(($(stat --printf="%s" ${TEMP_DIR_GRUB}/bootx64.efi) + 24576)) ${TEMP_DIR_GRUB}/efi.img truncate -s $(($(stat --printf="%s" ${TEMP_DIR_GRUB}/bootx64.efi) + 32768)) ${TEMP_DIR_GRUB}/efi.img
mkfs.vfat ${TEMP_DIR_GRUB}/efi.img mkfs.vfat ${TEMP_DIR_GRUB}/efi.img
mkdir ${TEMP_DIR_GRUB}/mountpoint mkdir ${TEMP_DIR_GRUB}/mountpoint
mount ${TEMP_DIR_GRUB}/efi.img ${TEMP_DIR_GRUB}/mountpoint/ mount ${TEMP_DIR_GRUB}/efi.img ${TEMP_DIR_GRUB}/mountpoint/

7
bookworm-amd64/bin/helperfs_config Normal file → Executable file
View File

@ -18,13 +18,6 @@ FIRMWARES2="firmware-bnx2 firmware-bnx2x firmware-cavium \
firmware-misc-nonfree firmware-myricom firmware-netxen firmware-qlogic \ firmware-misc-nonfree firmware-myricom firmware-netxen firmware-qlogic \
firmware-realtek" firmware-realtek"
cat << EOF > $TARGET/usr/sbin/policy-rc.d
#!/bin/sh
#echo "All runlevel operations denied by policy" >&2
exit 101
EOF
chmod a+x $TARGET/usr/sbin/policy-rc.d
chroot ${TARGET} mount -t proc proc /proc chroot ${TARGET} mount -t proc proc /proc
chroot ${TARGET} apt-get $APT_PARAM --yes install busybox-static > $STDOUT chroot ${TARGET} apt-get $APT_PARAM --yes install busybox-static > $STDOUT
chroot ${TARGET} apt-get $APT_PARAM --yes install -t ${KERNEL_REPO} linux-image-${KERNEL_VERSION} linux-headers-${KERNEL_VERSION} > $STDOUT chroot ${TARGET} apt-get $APT_PARAM --yes install -t ${KERNEL_REPO} linux-image-${KERNEL_VERSION} linux-headers-${KERNEL_VERSION} > $STDOUT

0
bookworm-amd64/bin/ramdisk_config Normal file → Executable file
View File

3
bookworm-amd64/bin/ramdisk_make Normal file → Executable file
View File

@ -10,4 +10,5 @@ if [ ! -d "${RAMDISK}" ]; then
fi fi
echo "Generating initramfs..." echo "Generating initramfs..."
(cd ${RAMDISK}; find . | cpio -H newc -o | gzip -1) > ${TARGET} #(cd ${RAMDISK}; find . | cpio -H newc -o | gzip -1) > ${TARGET}
(cd ${RAMDISK}; find . | cpio -H newc -o | zstd -19 --check) > ${TARGET}

0
bookworm-amd64/bin/ramdisk_modules Normal file → Executable file
View File

0
bookworm-amd64/bin/rootfs_clear Normal file → Executable file
View File

24
bookworm-amd64/bin/rootfs_config Normal file → Executable file
View File

@ -12,30 +12,23 @@ if [ !$MKRESCUE_VERBOSE ]; then
STDOUT='/dev/null' STDOUT='/dev/null'
fi fi
# hddtemp
SOFTWARE="acl acpi-support-base attr bash-completion bind9-host binutils \ SOFTWARE="acl acpi-support-base attr bash-completion bind9-host binutils \
bridge-utils bsdmainutils ca-certificates debootstrap dialog \ bridge-utils bsdmainutils ca-certificates debootstrap dialog \
dmidecode dosfstools ethtool fdisk file gddrescue gdisk \ dmidecode dosfstools ethtool fdisk file gddrescue gdisk \
hddtemp hdparm ifenslave iproute2 iputils-ping less lsof lvm2 lzip mdadm \ hdparm ifenslave iproute2 iputils-ping less lsof lvm2 lzip mdadm \
mtr-tiny netcat-traditional net-tools ntfs-3g nvme-cli parted pciutils pixz procps \ mtr-tiny netcat-traditional net-tools ntfs-3g nvme-cli parted pciutils pixz procps \
psmisc rsync screen scrub smartmontools ssh strace sysstat tar tcpdump \ psmisc rsync screen scrub smartmontools ssh strace sysstat tar tcpdump \
telnet traceroute tree usbutils vim vlan wget xz-utils systemd systemd-sysv \ telnet traceroute tree usbutils vim vlan wget xz-utils systemd systemd-resolved systemd-sysv \
nfs-common ipxe grub-pc grub-efi-amd64-bin efibootmgr pv mtools xfsprogs \ nfs-common ipxe grub-pc grub-efi-amd64-bin efibootmgr pv mtools xfsprogs \
zfsutils-linux " zfsutils-linux zstd"
cat << EOF > ${TARGET}/usr/sbin/policy-rc.d
#!/bin/sh
#echo "All runlevel operations denied by policy" >&2
exit 101
EOF
chmod a+x $TARGET/usr/sbin/policy-rc.d
chroot ${TARGET} apt-get $APT_PARAM --yes install ${SOFTWARE} > $STDOUT chroot ${TARGET} apt-get $APT_PARAM --yes install ${SOFTWARE} > $STDOUT
chroot ${TARGET} systemctl enable systemd-networkd.service chroot ${TARGET} systemctl enable systemd-networkd.service
chroot ${TARGET} systemctl enable systemd-resolved.service chroot ${TARGET} systemctl enable systemd-resolved.service
chroot ${TARGET} systemctl enable acpid.service chroot ${TARGET} systemctl enable acpid.service
rm ${TARGET}/usr/sbin/policy-rc.d
echo "Etc/UTC" > ${TARGET}/etc/timezone echo "Etc/UTC" > ${TARGET}/etc/timezone
chroot ${TARGET} dpkg-reconfigure -f noninteractive tzdata chroot ${TARGET} dpkg-reconfigure -f noninteractive tzdata
@ -44,6 +37,7 @@ cat << EOF > ${TARGET}/etc/motd
WARNING: Authorized access only! WARNING: Authorized access only!
EOF EOF
cat << EOF > ${TARGET}/etc/issue cat << EOF > ${TARGET}/etc/issue
WMI Rescue Linux (based on Debian GNU/Linux ${DEBIAN_CODENAME^}) WMI Rescue Linux (based on Debian GNU/Linux ${DEBIAN_CODENAME^})
Version ${VERSION} AMD64 Version ${VERSION} AMD64
@ -67,11 +61,13 @@ cat << EOF > ${TARGET}/etc/systemd/resolved.conf
[Resolve] [Resolve]
DNS=8.8.8.8 8.8.4.4 2001:4860:4860::8888 2001:4860:4860::8844 DNS=8.8.8.8 8.8.4.4 2001:4860:4860::8888 2001:4860:4860::8844
EOF EOF
rm ${TARGET}/etc/resolv.conf rm ${TARGET}/etc/resolv.conf
ln -s /run/systemd/resolve/resolv.conf ${TARGET}/etc/resolv.conf ln -s /run/systemd/resolve/resolv.conf ${TARGET}/etc/resolv.conf
rm ${TARGET}/etc/systemd/system/network-online.target.wants/systemd-networkd-wait-online.service rm ${TARGET}/etc/systemd/system/network-online.target.wants/systemd-networkd-wait-online.service
#use old network device names #use old network device names
ln -s /dev/null ${TARGET}/etc/systemd/network/99-default.link ln -s /dev/null ${TARGET}/etc/systemd/network/99-default.link
cat << EOF > ${TARGET}/etc/systemd/system/ssh-session-cleanup.service cat << EOF > ${TARGET}/etc/systemd/system/ssh-session-cleanup.service
[Unit] [Unit]
Description=OpenBSD Secure Shell session cleanup Description=OpenBSD Secure Shell session cleanup
@ -87,15 +83,19 @@ Type=oneshot
[Install] [Install]
WantedBy=multi-user.target WantedBy=multi-user.target
EOF EOF
chroot ${TARGET} systemctl enable ssh-session-cleanup.service chroot ${TARGET} systemctl enable ssh-session-cleanup.service
cat << EOF > ${TARGET}/etc/screenrc cat << EOF > ${TARGET}/etc/screenrc
startup_message off startup_message off
defscrollback 5000 defscrollback 5000
EOF EOF
cat << EOF > ${TARGET}/etc/sysctl.d/60-panic.conf cat << EOF > ${TARGET}/etc/sysctl.d/60-panic.conf
kernel.panic = 5 kernel.panic = 5
kernel.panic_on_oops = 1 kernel.panic_on_oops = 1
EOF EOF
sed -i 's/" let g:skip_defaults_vim = 1/let g:skip_defaults_vim = 1/g' ${TARGET}/etc/vim/vimrc sed -i 's/" let g:skip_defaults_vim = 1/let g:skip_defaults_vim = 1/g' ${TARGET}/etc/vim/vimrc
rsync -avS ${TARGET}/etc/skel/ ${TARGET}/root/ rsync -avS ${TARGET}/etc/skel/ ${TARGET}/root/

0
bookworm-amd64/bin/rootfs_mksquashfs Normal file → Executable file
View File

2
bookworm-amd64/mkrescue Normal file → Executable file
View File

@ -1,7 +1,7 @@
#!/bin/sh #!/bin/sh
TARGET=$1 TARGET=$1
VERSION=$(date +%g.%m) VERSION=$(date +%g.%m)-deb12-beta1
OUTPUT=${TARGET}/output/${VERSION} OUTPUT=${TARGET}/output/${VERSION}
DEBIAN_CODENAME='bookworm' DEBIAN_CODENAME='bookworm'
KERNEL_VERSION='6.1.0-9-amd64' KERNEL_VERSION='6.1.0-9-amd64'