From 618772f2d38dc46a86af75f3c0c33d86302ed438 Mon Sep 17 00:00:00 2001 From: T Z Date: Fri, 28 Feb 2020 13:12:13 +0100 Subject: [PATCH 1/5] Added packages: dialog, ca-certificates. --- buster-amd64/bin/rootfs_config | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/buster-amd64/bin/rootfs_config b/buster-amd64/bin/rootfs_config index 1db45da..8aadbc6 100755 --- a/buster-amd64/bin/rootfs_config +++ b/buster-amd64/bin/rootfs_config @@ -6,7 +6,8 @@ LANG=C VERSION="$(date +%g.%m)" SOFTWARE="acl acpi-support-base attr bash-completion bind9-host binutils \ - bridge-utils bsdmainutils debootstrap dmidecode dosfstools ethtool file gddrescue gdisk \ + bridge-utils bsdmainutils ca-certificates debootstrap dialog \ + dmidecode dosfstools ethtool file gddrescue gdisk \ hddtemp hdparm ifenslave iproute2 iputils-ping less lsof lvm2 lzip mdadm \ mtr-tiny netcat-traditional net-tools ntfs-3g parted pciutils pixz procps \ psmisc rsync screen scrub smartmontools ssh strace sysstat tar tcpdump \ From 02e5c7c901e99fa4df8e12b3a061c272d46ee30f Mon Sep 17 00:00:00 2001 From: T Z Date: Fri, 28 Feb 2020 13:51:11 +0100 Subject: [PATCH 2/5] Fixed initrd args in -nofirmware.iso. --- buster-amd64/bin/dist_iso | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/buster-amd64/bin/dist_iso b/buster-amd64/bin/dist_iso index 1135f27..42ac0ef 100755 --- a/buster-amd64/bin/dist_iso +++ b/buster-amd64/bin/dist_iso @@ -7,7 +7,7 @@ NOFIRMWARE=$4 TEMP_DIR=$(mktemp -d) -APPEND_FIRMWARE=",/rescue/firmware.img" +APPEND_FIRMWARE="/rescue/firmware.img" FILENAME="wmirescue_$ARCH.iso" mkdir -p $TEMP_DIR/boot/bios/i386-pc @@ -104,12 +104,12 @@ set theme="/boot/theme.txt" menuentry "wmirescue-$ARCH" { linux /rescue/$ARCH/vmlinuz - initrd /rescue/$ARCH/initrd.img /rescue/firmware.img + initrd /rescue/$ARCH/initrd.img $APPEND_FIRMWARE } menuentry "wmirescue-$ARCH-serial" { linux /rescue/$ARCH/vmlinuz console=ttyS0,115200n8 - initrd /rescue/$ARCH/initrd.img /rescue/firmware.img + initrd /rescue/$ARCH/initrd.img $APPEND_FIRMWARE } menuentry "memtest" { @@ -128,12 +128,12 @@ set theme="/boot/theme.txt" menuentry "wmirescue-$ARCH" { linux /rescue/$ARCH/vmlinuz - initrd /rescue/$ARCH/initrd.img /rescue/firmware.img + initrd /rescue/$ARCH/initrd.img $APPEND_FIRMWARE } menuentry "wmirescue-$ARCH-serial" { linux /rescue/$ARCH/vmlinuz console=ttyS0,115200n8 - initrd /rescue/$ARCH/initrd.img /rescue/firmware.img + initrd /rescue/$ARCH/initrd.img $APPEND_FIRMWARE } menuentry "memtest" { From de8d469f2c6fcfc041142a4f5454f3f21569d72c Mon Sep 17 00:00:00 2001 From: T Z Date: Fri, 28 Feb 2020 14:02:15 +0100 Subject: [PATCH 3/5] Changed subsctipts paths. mkrescue should now work when called from outside it's directory. --- buster-amd64/bin/dist_iso | 3 ++- buster-amd64/mkrescue | 27 ++++++++++++++------------- 2 files changed, 16 insertions(+), 14 deletions(-) diff --git a/buster-amd64/bin/dist_iso b/buster-amd64/bin/dist_iso index 42ac0ef..d8221d0 100755 --- a/buster-amd64/bin/dist_iso +++ b/buster-amd64/bin/dist_iso @@ -6,6 +6,7 @@ OUTPUT=$3 NOFIRMWARE=$4 TEMP_DIR=$(mktemp -d) +SCRIPTDIR="$(dirname "$(realpath "$0")")" APPEND_FIRMWARE="/rescue/firmware.img" FILENAME="wmirescue_$ARCH.iso" @@ -61,7 +62,7 @@ echo TEMP_DIR_GRUB=$(mktemp -d) #BIOS -cp media/black.png $TEMP_DIR/boot/ +cp ${SCRIPTDIR}/../media/black.png $TEMP_DIR/boot/ cp /usr/share/grub/unicode.pf2 $TEMP_DIR/boot/bios/fonts/ grub-mkimage -O i386-pc -p /boot/bios/ -o ${TEMP_DIR_GRUB}/core.img iso9660 biosdisk diff --git a/buster-amd64/mkrescue b/buster-amd64/mkrescue index 14aba22..be3e9cd 100755 --- a/buster-amd64/mkrescue +++ b/buster-amd64/mkrescue @@ -14,26 +14,27 @@ if [ -z "${TARGET}" ]; then exit 255 fi +SCRIPTDIR="$(dirname "$(realpath "$0")")" mkdir ${TARGET} mkdir ${TARGET}/ramdisk mkdir ${TARGET}/firmware mkdir -p ${OUTPUT}/netboot/${ARCH} -./bin/basefs_init ${TARGET}/basefs ${DEBIAN_CODENAME} +${SCRIPTDIR}/bin/basefs_init ${TARGET}/basefs ${DEBIAN_CODENAME} cp -a ${TARGET}/basefs ${TARGET}/rootfs cp -a ${TARGET}/basefs ${TARGET}/helperfs -./bin/helperfs_config ${TARGET}/helperfs ${KERNEL_VERSION} +${SCRIPTDIR}/bin/helperfs_config ${TARGET}/helperfs ${KERNEL_VERSION} # ROOTFS mkdir -p ${TARGET}/rootfs/lib/modules rsync -aS ${TARGET}/helperfs/lib/modules/ ${TARGET}/rootfs/lib/modules/ -./bin/rootfs_config ${TARGET}/rootfs ${DEBIAN_CODENAME} -./bin/rootfs_clear ${TARGET}/rootfs -./bin/rootfs_mksquashfs ${TARGET}/rootfs ${TARGET}/ramdisk/rootfs.squash +${SCRIPTDIR}/bin/rootfs_config ${TARGET}/rootfs ${DEBIAN_CODENAME} +${SCRIPTDIR}/bin/rootfs_clear ${TARGET}/rootfs +${SCRIPTDIR}/bin/rootfs_mksquashfs ${TARGET}/rootfs ${TARGET}/ramdisk/rootfs.squash # RAMDISK @@ -43,13 +44,13 @@ mkdir -p ${TARGET}/ramdisk/lib/modules mkdir -p ${TARGET}/ramdisk/proc mkdir -p ${TARGET}/ramdisk/sys cp ${TARGET}/helperfs/bin/busybox ${TARGET}/ramdisk/bin/busybox -./bin/ramdisk_modules ${TARGET}/ramdisk ${TARGET}/rootfs ${KERNEL_VERSION} -./bin/ramdisk_config ${TARGET}/ramdisk ${KERNEL_VERSION} -./bin/ramdisk_make ${OUTPUT}/netboot/${ARCH}/initrd.img ${TARGET}/ramdisk +${SCRIPTDIR}/bin/ramdisk_modules ${TARGET}/ramdisk ${TARGET}/rootfs ${KERNEL_VERSION} +${SCRIPTDIR}/bin/ramdisk_config ${TARGET}/ramdisk ${KERNEL_VERSION} +${SCRIPTDIR}/bin/ramdisk_make ${OUTPUT}/netboot/${ARCH}/initrd.img ${TARGET}/ramdisk # FIRMWARE tar cf ${TARGET}/firmware/firmware.tar --owner=root --group=root -C ${TARGET}/helperfs ./lib/firmware -./bin/ramdisk_make ${OUTPUT}/netboot/firmware.img ${TARGET}/firmware +${SCRIPTDIR}/bin/ramdisk_make ${OUTPUT}/netboot/firmware.img ${TARGET}/firmware # KERNEL @@ -58,7 +59,7 @@ cp ${TARGET}/helperfs/boot/vmlinuz-${KERNEL_VERSION} ${OUTPUT}/netboot/${ARCH}/v # DIST tar cvf ${OUTPUT}/wmirescue_${ARCH}-netboot.tar -C ${OUTPUT}/netboot . -./bin/dist_ipxe ${VERSION} ${OUTPUT} -./bin/dist_ipxe ${VERSION} ${OUTPUT} --nofirmware -./bin/dist_iso ${VERSION} ${ARCH} ${OUTPUT} -./bin/dist_iso ${VERSION} ${ARCH} ${OUTPUT} --nofirmware +${SCRIPTDIR}/bin/dist_ipxe ${VERSION} ${OUTPUT} +${SCRIPTDIR}/bin/dist_ipxe ${VERSION} ${OUTPUT} --nofirmware +${SCRIPTDIR}/bin/dist_iso ${VERSION} ${ARCH} ${OUTPUT} +${SCRIPTDIR}/bin/dist_iso ${VERSION} ${ARCH} ${OUTPUT} --nofirmware From f7ec8578cdac3884072979cc6989da61f042b551 Mon Sep 17 00:00:00 2001 From: T Z Date: Fri, 28 Feb 2020 14:04:23 +0100 Subject: [PATCH 4/5] Changed kernel to 4.19.0-8. --- buster-amd64/mkrescue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/buster-amd64/mkrescue b/buster-amd64/mkrescue index be3e9cd..95b5941 100755 --- a/buster-amd64/mkrescue +++ b/buster-amd64/mkrescue @@ -4,7 +4,7 @@ TARGET=$1 VERSION=$(date +%g.%m) OUTPUT=${TARGET}/output/${VERSION} DEBIAN_CODENAME='buster' -KERNEL_VERSION='4.19.0-5-amd64' +KERNEL_VERSION='4.19.0-8-amd64' ARCH='amd64' umask 022 From 16c2d0ce3e61968d692171cb0bf246026fc5258d Mon Sep 17 00:00:00 2001 From: Tomasz Zaworski Date: Thu, 29 Jul 2021 12:42:53 +0200 Subject: [PATCH 5/5] Changed kernel to 5.10.0-0.bpo.3. --- buster-amd64/bin/basefs_init | 1 + buster-amd64/bin/dist_iso | 2 +- buster-amd64/bin/helperfs_config | 13 ++++++++----- buster-amd64/mkrescue | 5 +++-- 4 files changed, 13 insertions(+), 8 deletions(-) diff --git a/buster-amd64/bin/basefs_init b/buster-amd64/bin/basefs_init index 7f05a80..4eecc5e 100755 --- a/buster-amd64/bin/basefs_init +++ b/buster-amd64/bin/basefs_init @@ -11,6 +11,7 @@ debootstrap --arch=amd64 --variant=minbase ${DEBIAN_CODENAME} ${TARGET} http://h cat << EOF > ${TARGET}/etc/apt/sources.list deb http://httpredir.debian.org/debian ${DEBIAN_CODENAME} main contrib non-free deb http://security.debian.org/ ${DEBIAN_CODENAME}/updates main contrib non-free +deb http://deb.debian.org/debian ${DEBIAN_CODENAME}-backports main contrib non-free EOF cat << EOF > ${TARGET}/etc/apt/apt.conf.d/80small diff --git a/buster-amd64/bin/dist_iso b/buster-amd64/bin/dist_iso index d8221d0..0febe73 100755 --- a/buster-amd64/bin/dist_iso +++ b/buster-amd64/bin/dist_iso @@ -81,7 +81,7 @@ cat /usr/lib/grub/i386-pc/cdboot.img ${TEMP_DIR_GRUB}/core.img > $TEMP_DIR/boot/ cat /usr/lib/grub/i386-pc/boot.img ${TEMP_DIR_GRUB}/core.img > ${TEMP_DIR_GRUB}/embedded.img #EFI -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 +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 mkfs.vfat ${TEMP_DIR_GRUB}/efi.img mkdir ${TEMP_DIR_GRUB}/mountpoint diff --git a/buster-amd64/bin/helperfs_config b/buster-amd64/bin/helperfs_config index 5c78024..b1b2b88 100755 --- a/buster-amd64/bin/helperfs_config +++ b/buster-amd64/bin/helperfs_config @@ -2,9 +2,11 @@ TARGET=$1 KERNEL_VERSION=$2 +KERNEL_REPO=$3 LANG=C -FIRMWARES="firmware-bnx2 firmware-bnx2x firmware-cavium firmware-linux-free \ +FIRMWARES1="firmware-linux-free" +FIRMWARES2="firmware-bnx2 firmware-bnx2x firmware-cavium \ firmware-misc-nonfree firmware-myricom firmware-netxen firmware-qlogic \ firmware-realtek" @@ -16,8 +18,9 @@ EOF chmod a+x $TARGET/usr/sbin/policy-rc.d chroot ${TARGET} mount -t proc proc /proc -chroot ${TARGET} apt-get --yes install busybox-static linux-image-${KERNEL_VERSION} -chroot ${TARGET} apt-get --yes install linux-headers-${KERNEL_VERSION} -chroot ${TARGET} apt-get --yes install zfs-dkms -chroot ${TARGET} apt-get --yes install ${FIRMWARES} +chroot ${TARGET} apt-get --yes install busybox-static +chroot ${TARGET} apt-get --yes install -t ${KERNEL_REPO} linux-image-${KERNEL_VERSION} linux-headers-${KERNEL_VERSION} +chroot ${TARGET} apt-get --yes install -t ${KERNEL_REPO} zfs-dkms +chroot ${TARGET} apt-get --yes install ${FIRMWARES1} +chroot ${TARGET} apt-get --yes install -t ${KERNEL_REPO} ${FIRMWARES2} chroot ${TARGET} umount /proc diff --git a/buster-amd64/mkrescue b/buster-amd64/mkrescue index 95b5941..52dc391 100755 --- a/buster-amd64/mkrescue +++ b/buster-amd64/mkrescue @@ -4,7 +4,8 @@ TARGET=$1 VERSION=$(date +%g.%m) OUTPUT=${TARGET}/output/${VERSION} DEBIAN_CODENAME='buster' -KERNEL_VERSION='4.19.0-8-amd64' +KERNEL_VERSION='5.10.0-0.bpo.3-amd64' +KERNEL_REPO="buster-backports" ARCH='amd64' umask 022 @@ -26,7 +27,7 @@ ${SCRIPTDIR}/bin/basefs_init ${TARGET}/basefs ${DEBIAN_CODENAME} cp -a ${TARGET}/basefs ${TARGET}/rootfs cp -a ${TARGET}/basefs ${TARGET}/helperfs -${SCRIPTDIR}/bin/helperfs_config ${TARGET}/helperfs ${KERNEL_VERSION} +${SCRIPTDIR}/bin/helperfs_config ${TARGET}/helperfs ${KERNEL_VERSION} ${KERNEL_REPO} # ROOTFS