Merge branch 'master' of https://github.com/Zawoor1/wmirescue
Conflicts: buster-amd64/bin/dist_iso
This commit is contained in:
commit
09af00aa66
@ -11,6 +11,7 @@ debootstrap --arch=amd64 --variant=minbase ${DEBIAN_CODENAME} ${TARGET} http://h
|
|||||||
cat << EOF > ${TARGET}/etc/apt/sources.list
|
cat << EOF > ${TARGET}/etc/apt/sources.list
|
||||||
deb http://httpredir.debian.org/debian ${DEBIAN_CODENAME} main contrib non-free
|
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://security.debian.org/ ${DEBIAN_CODENAME}/updates main contrib non-free
|
||||||
|
deb http://deb.debian.org/debian ${DEBIAN_CODENAME}-backports main contrib non-free
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
cat << EOF > ${TARGET}/etc/apt/apt.conf.d/80small
|
cat << EOF > ${TARGET}/etc/apt/apt.conf.d/80small
|
||||||
|
@ -6,8 +6,9 @@ OUTPUT=$3
|
|||||||
NOFIRMWARE=$4
|
NOFIRMWARE=$4
|
||||||
|
|
||||||
TEMP_DIR=$(mktemp -d)
|
TEMP_DIR=$(mktemp -d)
|
||||||
|
SCRIPTDIR="$(dirname "$(realpath "$0")")"
|
||||||
|
|
||||||
APPEND_FIRMWARE=",/rescue/firmware.img"
|
APPEND_FIRMWARE="/rescue/firmware.img"
|
||||||
FILENAME="wmirescue_$ARCH.iso"
|
FILENAME="wmirescue_$ARCH.iso"
|
||||||
|
|
||||||
mkdir -p $TEMP_DIR/boot/bios/i386-pc
|
mkdir -p $TEMP_DIR/boot/bios/i386-pc
|
||||||
@ -61,7 +62,7 @@ echo
|
|||||||
TEMP_DIR_GRUB=$(mktemp -d)
|
TEMP_DIR_GRUB=$(mktemp -d)
|
||||||
|
|
||||||
#BIOS
|
#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/
|
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
|
grub-mkimage -O i386-pc -p /boot/bios/ -o ${TEMP_DIR_GRUB}/core.img iso9660 biosdisk
|
||||||
@ -80,8 +81,12 @@ 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
|
cat /usr/lib/grub/i386-pc/boot.img ${TEMP_DIR_GRUB}/core.img > ${TEMP_DIR_GRUB}/embedded.img
|
||||||
|
|
||||||
#EFI
|
#EFI
|
||||||
|
<<<<<<< HEAD
|
||||||
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
|
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
|
||||||
|
>>>>>>> 16c2d0ce3e61968d692171cb0bf246026fc5258d
|
||||||
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) + 24576)) ${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
|
||||||
@ -105,12 +110,12 @@ set theme="/boot/theme.txt"
|
|||||||
|
|
||||||
menuentry "wmirescue-$ARCH" {
|
menuentry "wmirescue-$ARCH" {
|
||||||
linux /rescue/$ARCH/vmlinuz
|
linux /rescue/$ARCH/vmlinuz
|
||||||
initrd /rescue/$ARCH/initrd.img /rescue/firmware.img
|
initrd /rescue/$ARCH/initrd.img $APPEND_FIRMWARE
|
||||||
}
|
}
|
||||||
|
|
||||||
menuentry "wmirescue-$ARCH-serial" {
|
menuentry "wmirescue-$ARCH-serial" {
|
||||||
linux /rescue/$ARCH/vmlinuz console=ttyS0,115200n8
|
linux /rescue/$ARCH/vmlinuz console=ttyS0,115200n8
|
||||||
initrd /rescue/$ARCH/initrd.img /rescue/firmware.img
|
initrd /rescue/$ARCH/initrd.img $APPEND_FIRMWARE
|
||||||
}
|
}
|
||||||
|
|
||||||
menuentry "memtest" {
|
menuentry "memtest" {
|
||||||
@ -129,12 +134,12 @@ set theme="/boot/theme.txt"
|
|||||||
|
|
||||||
menuentry "wmirescue-$ARCH" {
|
menuentry "wmirescue-$ARCH" {
|
||||||
linux /rescue/$ARCH/vmlinuz
|
linux /rescue/$ARCH/vmlinuz
|
||||||
initrd /rescue/$ARCH/initrd.img /rescue/firmware.img
|
initrd /rescue/$ARCH/initrd.img $APPEND_FIRMWARE
|
||||||
}
|
}
|
||||||
|
|
||||||
menuentry "wmirescue-$ARCH-serial" {
|
menuentry "wmirescue-$ARCH-serial" {
|
||||||
linux /rescue/$ARCH/vmlinuz console=ttyS0,115200n8
|
linux /rescue/$ARCH/vmlinuz console=ttyS0,115200n8
|
||||||
initrd /rescue/$ARCH/initrd.img /rescue/firmware.img
|
initrd /rescue/$ARCH/initrd.img $APPEND_FIRMWARE
|
||||||
}
|
}
|
||||||
|
|
||||||
menuentry "memtest" {
|
menuentry "memtest" {
|
||||||
|
@ -2,9 +2,11 @@
|
|||||||
|
|
||||||
TARGET=$1
|
TARGET=$1
|
||||||
KERNEL_VERSION=$2
|
KERNEL_VERSION=$2
|
||||||
|
KERNEL_REPO=$3
|
||||||
LANG=C
|
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-misc-nonfree firmware-myricom firmware-netxen firmware-qlogic \
|
||||||
firmware-realtek"
|
firmware-realtek"
|
||||||
|
|
||||||
@ -16,8 +18,9 @@ EOF
|
|||||||
chmod a+x $TARGET/usr/sbin/policy-rc.d
|
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 --yes install busybox-static linux-image-${KERNEL_VERSION}
|
chroot ${TARGET} apt-get --yes install busybox-static
|
||||||
chroot ${TARGET} apt-get --yes install linux-headers-${KERNEL_VERSION}
|
chroot ${TARGET} apt-get --yes install -t ${KERNEL_REPO} linux-image-${KERNEL_VERSION} linux-headers-${KERNEL_VERSION}
|
||||||
chroot ${TARGET} apt-get --yes install zfs-dkms
|
chroot ${TARGET} apt-get --yes install -t ${KERNEL_REPO} zfs-dkms
|
||||||
chroot ${TARGET} apt-get --yes install ${FIRMWARES}
|
chroot ${TARGET} apt-get --yes install ${FIRMWARES1}
|
||||||
|
chroot ${TARGET} apt-get --yes install -t ${KERNEL_REPO} ${FIRMWARES2}
|
||||||
chroot ${TARGET} umount /proc
|
chroot ${TARGET} umount /proc
|
||||||
|
@ -6,7 +6,8 @@ LANG=C
|
|||||||
VERSION="$(date +%g.%m)"
|
VERSION="$(date +%g.%m)"
|
||||||
|
|
||||||
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 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 \
|
hddtemp hdparm ifenslave iproute2 iputils-ping less lsof lvm2 lzip mdadm \
|
||||||
mtr-tiny netcat-traditional net-tools ntfs-3g parted pciutils pixz procps \
|
mtr-tiny netcat-traditional net-tools ntfs-3g parted pciutils pixz procps \
|
||||||
psmisc rsync screen scrub smartmontools ssh strace sysstat tar tcpdump \
|
psmisc rsync screen scrub smartmontools ssh strace sysstat tar tcpdump \
|
||||||
|
@ -4,7 +4,8 @@ TARGET=$1
|
|||||||
VERSION=$(date +%g.%m)
|
VERSION=$(date +%g.%m)
|
||||||
OUTPUT=${TARGET}/output/${VERSION}
|
OUTPUT=${TARGET}/output/${VERSION}
|
||||||
DEBIAN_CODENAME='buster'
|
DEBIAN_CODENAME='buster'
|
||||||
KERNEL_VERSION='4.19.0-5-amd64'
|
KERNEL_VERSION='5.10.0-0.bpo.3-amd64'
|
||||||
|
KERNEL_REPO="buster-backports"
|
||||||
ARCH='amd64'
|
ARCH='amd64'
|
||||||
|
|
||||||
umask 022
|
umask 022
|
||||||
@ -14,26 +15,27 @@ if [ -z "${TARGET}" ]; then
|
|||||||
exit 255
|
exit 255
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
SCRIPTDIR="$(dirname "$(realpath "$0")")"
|
||||||
|
|
||||||
mkdir ${TARGET}
|
mkdir ${TARGET}
|
||||||
mkdir ${TARGET}/ramdisk
|
mkdir ${TARGET}/ramdisk
|
||||||
mkdir ${TARGET}/firmware
|
mkdir ${TARGET}/firmware
|
||||||
mkdir -p ${OUTPUT}/netboot/${ARCH}
|
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}/rootfs
|
||||||
cp -a ${TARGET}/basefs ${TARGET}/helperfs
|
cp -a ${TARGET}/basefs ${TARGET}/helperfs
|
||||||
|
|
||||||
./bin/helperfs_config ${TARGET}/helperfs ${KERNEL_VERSION}
|
${SCRIPTDIR}/bin/helperfs_config ${TARGET}/helperfs ${KERNEL_VERSION} ${KERNEL_REPO}
|
||||||
|
|
||||||
# ROOTFS
|
# ROOTFS
|
||||||
|
|
||||||
mkdir -p ${TARGET}/rootfs/lib/modules
|
mkdir -p ${TARGET}/rootfs/lib/modules
|
||||||
rsync -aS ${TARGET}/helperfs/lib/modules/ ${TARGET}/rootfs/lib/modules/
|
rsync -aS ${TARGET}/helperfs/lib/modules/ ${TARGET}/rootfs/lib/modules/
|
||||||
./bin/rootfs_config ${TARGET}/rootfs ${DEBIAN_CODENAME}
|
${SCRIPTDIR}/bin/rootfs_config ${TARGET}/rootfs ${DEBIAN_CODENAME}
|
||||||
./bin/rootfs_clear ${TARGET}/rootfs
|
${SCRIPTDIR}/bin/rootfs_clear ${TARGET}/rootfs
|
||||||
./bin/rootfs_mksquashfs ${TARGET}/rootfs ${TARGET}/ramdisk/rootfs.squash
|
${SCRIPTDIR}/bin/rootfs_mksquashfs ${TARGET}/rootfs ${TARGET}/ramdisk/rootfs.squash
|
||||||
|
|
||||||
# RAMDISK
|
# RAMDISK
|
||||||
|
|
||||||
@ -43,13 +45,13 @@ mkdir -p ${TARGET}/ramdisk/lib/modules
|
|||||||
mkdir -p ${TARGET}/ramdisk/proc
|
mkdir -p ${TARGET}/ramdisk/proc
|
||||||
mkdir -p ${TARGET}/ramdisk/sys
|
mkdir -p ${TARGET}/ramdisk/sys
|
||||||
cp ${TARGET}/helperfs/bin/busybox ${TARGET}/ramdisk/bin/busybox
|
cp ${TARGET}/helperfs/bin/busybox ${TARGET}/ramdisk/bin/busybox
|
||||||
./bin/ramdisk_modules ${TARGET}/ramdisk ${TARGET}/rootfs ${KERNEL_VERSION}
|
${SCRIPTDIR}/bin/ramdisk_modules ${TARGET}/ramdisk ${TARGET}/rootfs ${KERNEL_VERSION}
|
||||||
./bin/ramdisk_config ${TARGET}/ramdisk ${KERNEL_VERSION}
|
${SCRIPTDIR}/bin/ramdisk_config ${TARGET}/ramdisk ${KERNEL_VERSION}
|
||||||
./bin/ramdisk_make ${OUTPUT}/netboot/${ARCH}/initrd.img ${TARGET}/ramdisk
|
${SCRIPTDIR}/bin/ramdisk_make ${OUTPUT}/netboot/${ARCH}/initrd.img ${TARGET}/ramdisk
|
||||||
|
|
||||||
# FIRMWARE
|
# FIRMWARE
|
||||||
tar cf ${TARGET}/firmware/firmware.tar --owner=root --group=root -C ${TARGET}/helperfs ./lib/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
|
# KERNEL
|
||||||
|
|
||||||
@ -58,7 +60,7 @@ cp ${TARGET}/helperfs/boot/vmlinuz-${KERNEL_VERSION} ${OUTPUT}/netboot/${ARCH}/v
|
|||||||
|
|
||||||
# DIST
|
# DIST
|
||||||
tar cvf ${OUTPUT}/wmirescue_${ARCH}-netboot.tar -C ${OUTPUT}/netboot .
|
tar cvf ${OUTPUT}/wmirescue_${ARCH}-netboot.tar -C ${OUTPUT}/netboot .
|
||||||
./bin/dist_ipxe ${VERSION} ${OUTPUT}
|
${SCRIPTDIR}/bin/dist_ipxe ${VERSION} ${OUTPUT}
|
||||||
./bin/dist_ipxe ${VERSION} ${OUTPUT} --nofirmware
|
${SCRIPTDIR}/bin/dist_ipxe ${VERSION} ${OUTPUT} --nofirmware
|
||||||
./bin/dist_iso ${VERSION} ${ARCH} ${OUTPUT}
|
${SCRIPTDIR}/bin/dist_iso ${VERSION} ${ARCH} ${OUTPUT}
|
||||||
./bin/dist_iso ${VERSION} ${ARCH} ${OUTPUT} --nofirmware
|
${SCRIPTDIR}/bin/dist_iso ${VERSION} ${ARCH} ${OUTPUT} --nofirmware
|
||||||
|
Loading…
Reference in New Issue
Block a user