Beta support for Debian Bookworm.
This commit is contained in:
parent
ffa67a01f9
commit
c58df53b97
@ -13,8 +13,10 @@ Scripts for Debian Buster were tested on Ubuntu 18.04.
|
||||
Required packages:
|
||||
* debootstrap
|
||||
* dosfstools
|
||||
* squashfs-tools
|
||||
* unzip
|
||||
* grub-pc-bin
|
||||
* grub-efi-amd64-bin
|
||||
* rsync
|
||||
* squashfs-tools
|
||||
* unzip
|
||||
* xorriso
|
||||
* zstd
|
||||
|
0
bookworm-amd64/bin/basefs_init
Normal file → Executable file
0
bookworm-amd64/bin/basefs_init
Normal file → Executable file
0
bookworm-amd64/bin/dist_ipxe
Normal file → Executable file
0
bookworm-amd64/bin/dist_ipxe
Normal file → Executable file
22
bookworm-amd64/bin/dist_iso
Normal file → Executable file
22
bookworm-amd64/bin/dist_iso
Normal file → Executable file
@ -35,24 +35,12 @@ echo
|
||||
|
||||
TEMP_DIR_MEMTEST=$(mktemp -d)
|
||||
|
||||
#BIOS
|
||||
wget -q http://www.memtest.org/download/5.01/memtest86+-5.01.zip -P ${TEMP_DIR_MEMTEST}
|
||||
unzip -q ${TEMP_DIR_MEMTEST}/memtest86+-5.01.zip -d ${TEMP_DIR_MEMTEST}
|
||||
cp ${TEMP_DIR_MEMTEST}/memtest86+-5.01.bin "$TEMP_DIR/memtest/memtest.bin"
|
||||
|
||||
#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
|
||||
|
||||
wget -q https://memtest.org/download/v6.20/mt86plus_6.20.binaries.zip -P ${TEMP_DIR_MEMTEST}
|
||||
unzip -q ${TEMP_DIR_MEMTEST}/mt86plus_6.20.binaries.zip -d ${TEMP_DIR_MEMTEST}
|
||||
cp ${TEMP_DIR_MEMTEST}/memtest64.bin "$TEMP_DIR/memtest/memtest.bin"
|
||||
cp ${TEMP_DIR_MEMTEST}/memtest64.efi "$TEMP_DIR/memtest/memtest86.efi"
|
||||
rm -r "${TEMP_DIR_MEMTEST}"
|
||||
|
||||
|
||||
#GRUB
|
||||
|
||||
echo
|
||||
@ -83,7 +71,7 @@ cat /usr/lib/grub/i386-pc/boot.img ${TEMP_DIR_GRUB}/core.img > ${TEMP_DIR_GRUB}/
|
||||
#EFI
|
||||
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
|
||||
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
|
||||
mkdir ${TEMP_DIR_GRUB}/mountpoint
|
||||
mount ${TEMP_DIR_GRUB}/efi.img ${TEMP_DIR_GRUB}/mountpoint/
|
||||
|
7
bookworm-amd64/bin/helperfs_config
Normal file → Executable file
7
bookworm-amd64/bin/helperfs_config
Normal file → Executable file
@ -18,13 +18,6 @@ FIRMWARES2="firmware-bnx2 firmware-bnx2x firmware-cavium \
|
||||
firmware-misc-nonfree firmware-myricom firmware-netxen firmware-qlogic \
|
||||
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} 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
|
||||
|
0
bookworm-amd64/bin/ramdisk_config
Normal file → Executable file
0
bookworm-amd64/bin/ramdisk_config
Normal file → Executable file
3
bookworm-amd64/bin/ramdisk_make
Normal file → Executable file
3
bookworm-amd64/bin/ramdisk_make
Normal file → Executable file
@ -10,4 +10,5 @@ if [ ! -d "${RAMDISK}" ]; then
|
||||
fi
|
||||
|
||||
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
0
bookworm-amd64/bin/ramdisk_modules
Normal file → Executable file
0
bookworm-amd64/bin/rootfs_clear
Normal file → Executable file
0
bookworm-amd64/bin/rootfs_clear
Normal file → Executable file
24
bookworm-amd64/bin/rootfs_config
Normal file → Executable file
24
bookworm-amd64/bin/rootfs_config
Normal file → Executable file
@ -12,30 +12,23 @@ if [ !$MKRESCUE_VERBOSE ]; then
|
||||
STDOUT='/dev/null'
|
||||
fi
|
||||
|
||||
# hddtemp
|
||||
|
||||
SOFTWARE="acl acpi-support-base attr bash-completion bind9-host binutils \
|
||||
bridge-utils bsdmainutils ca-certificates debootstrap dialog \
|
||||
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 \
|
||||
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 \
|
||||
zfsutils-linux "
|
||||
|
||||
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
|
||||
zfsutils-linux zstd"
|
||||
|
||||
chroot ${TARGET} apt-get $APT_PARAM --yes install ${SOFTWARE} > $STDOUT
|
||||
chroot ${TARGET} systemctl enable systemd-networkd.service
|
||||
chroot ${TARGET} systemctl enable systemd-resolved.service
|
||||
chroot ${TARGET} systemctl enable acpid.service
|
||||
|
||||
rm ${TARGET}/usr/sbin/policy-rc.d
|
||||
|
||||
echo "Etc/UTC" > ${TARGET}/etc/timezone
|
||||
chroot ${TARGET} dpkg-reconfigure -f noninteractive tzdata
|
||||
|
||||
@ -44,6 +37,7 @@ cat << EOF > ${TARGET}/etc/motd
|
||||
WARNING: Authorized access only!
|
||||
|
||||
EOF
|
||||
|
||||
cat << EOF > ${TARGET}/etc/issue
|
||||
WMI Rescue Linux (based on Debian GNU/Linux ${DEBIAN_CODENAME^})
|
||||
Version ${VERSION} AMD64
|
||||
@ -67,11 +61,13 @@ cat << EOF > ${TARGET}/etc/systemd/resolved.conf
|
||||
[Resolve]
|
||||
DNS=8.8.8.8 8.8.4.4 2001:4860:4860::8888 2001:4860:4860::8844
|
||||
EOF
|
||||
|
||||
rm ${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
|
||||
#use old network device names
|
||||
ln -s /dev/null ${TARGET}/etc/systemd/network/99-default.link
|
||||
|
||||
cat << EOF > ${TARGET}/etc/systemd/system/ssh-session-cleanup.service
|
||||
[Unit]
|
||||
Description=OpenBSD Secure Shell session cleanup
|
||||
@ -87,15 +83,19 @@ Type=oneshot
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
EOF
|
||||
|
||||
chroot ${TARGET} systemctl enable ssh-session-cleanup.service
|
||||
|
||||
cat << EOF > ${TARGET}/etc/screenrc
|
||||
startup_message off
|
||||
defscrollback 5000
|
||||
EOF
|
||||
|
||||
cat << EOF > ${TARGET}/etc/sysctl.d/60-panic.conf
|
||||
kernel.panic = 5
|
||||
kernel.panic_on_oops = 1
|
||||
EOF
|
||||
|
||||
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/
|
||||
|
||||
|
0
bookworm-amd64/bin/rootfs_mksquashfs
Normal file → Executable file
0
bookworm-amd64/bin/rootfs_mksquashfs
Normal file → Executable file
2
bookworm-amd64/mkrescue
Normal file → Executable file
2
bookworm-amd64/mkrescue
Normal file → Executable file
@ -1,7 +1,7 @@
|
||||
#!/bin/sh
|
||||
|
||||
TARGET=$1
|
||||
VERSION=$(date +%g.%m)
|
||||
VERSION=$(date +%g.%m)-deb12-beta1
|
||||
OUTPUT=${TARGET}/output/${VERSION}
|
||||
DEBIAN_CODENAME='bookworm'
|
||||
KERNEL_VERSION='6.1.0-9-amd64'
|
||||
|
Loading…
Reference in New Issue
Block a user