#! /bin/sh . ./settings00.sh # # Build ZFS from scratch requirements # apt-get install build-essential autoconf libtool gawk alien fakeroot gdebi linux-headers-amd64 apt-get install zlib1g-dev uuid-dev libattr1-dev libblkid-dev libselinux-dev libudev-dev libssl-dev parted lsscsi wget ksh gdebi apt-get install python3 python3-dev python3-setuptools python3-cffi # # debootstrap and iso-image requirements # apt-get install \ debootstrap xorriso live-build syslinux isolinux squashfs-tools genisoimage memtest86+ \ rsync rm -f $STRAPBALL rm -rf $STRAPROOT mkdir -p $STRAPROOT mkdir -p $STRAPROOT/var/tmp chmod 1777 $STRAPROOT/var/tmp debootstrap --arch=amd64 --variant=buildd \ --include=sysfsutils,net-tools,ifupdown,isc-dhcp-client,vim,openssh-server,locales,rsync,sharutils,psmisc,htop,iftop,patch,less \ --components main,contrib,non-free bullseye $STRAPROOT echo $MYHOSTNAME > $STRAPROOT/etc/hostname mkdir -p $STRAPROOT/etc/network echo "auto lo" >> $STRAPROOT/etc/network/interfaces echo "iface lo inet loopback" >> $STRAPROOT/etc/network/interfaces echo "#auto enp6s0" >> $STRAPROOT/etc/network/interfaces echo "#allow-hotplug enp6s0" >> $STRAPROOT/etc/network/interfaces echo "#iface enp6s0 inet dhcp" >> $STRAPROOT/etc/network/interfaces echo "deb http://deb.debian.org/debian bullseye main contrib non-free" > $STRAPROOT/etc/apt/sources.list echo "deb-src http://deb.debian.org/debian bullseye main contrib non-free" >> $STRAPROOT/etc/apt/sources.list echo "" >> $STRAPROOT/etc/apt/sources.list echo "deb http://deb.debian.org/debian/ bullseye-updates main non-free contrib" >> $STRAPROOT/etc/apt/sources.list echo "deb-src http://deb.debian.org/debian/ bullseye-updates main non-free contrib" >> $STRAPROOT/etc/apt/sources.list echo "" >> $STRAPROOT/etc/apt/sources.list echo "deb http://security.debian.org/debian-security bullseye-security main contrib" >> $STRAPROOT/etc/apt/sources.list echo "deb-src http://security.debian.org/debian-security bullseye-security main contrib" >> $STRAPROOT/etc/apt/sources.list echo "" >> $STRAPROOT/etc/apt/sources.list # echo "deb http://deb.debian.org/debian/ bullseye-backports main non-free contrib" >> $STRAPROOT/etc/apt/sources.list # echo "deb-src http://deb.debian.org/debian/ bullseye-backports main non-free contrib" >> $STRAPROOT/etc/apt/sources.list # echo "" >> $STRAPROOT/etc/apt/sources.list mount --rbind /dev $STRAPROOT/dev mount --rbind /proc $STRAPROOT/proc mount --rbind /sys $STRAPROOT/sys mount --make-rslave $STRAPROOT/dev mount --make-rslave $STRAPROOT/proc mount --make-rslave $STRAPROOT/sys echo echo "Later we will unmount this via" echo umount -R $STRAPROOT/dev echo umount -R $STRAPROOT/proc echo umount -R $STRAPROOT/sys echo "cat /proc/mounts | awk '{print \$2}' | grep "^$STRAPROOT" | sort -r | xargs umount" mkdir -p $STRAPROOT/root/debian-zfs-live cp -a ../* $STRAPROOT/root/debian-zfs-live mkdir -p $STRAPROOT/root/debian if [ -e ../../debian/packages ] ; then cp -a ../../debian/packages $STRAPROOT/root/debian/ fi mkdir -p $STRAPROOT/root/.ssh cp -a /home/$IMPORTUSERNAME/.ssh/authorized_keys $STRAPROOT/root/.ssh/ cp -a /home/$IMPORTUSERNAME/.vimrc $STRAPROOT/root/ cp -a /home/$IMPORTUSERNAME/.exrc $STRAPROOT/root/ echo RUN: chroot $STRAPROOT /bin/bash --login echo then: cd /root/debian-zfs-live/scripts echo to continue the process with debootstrap02.sh etc