This commit is contained in:
Marcus 2023-05-01 06:04:01 +02:00
parent 6b7de6660a
commit 9c6e5d2d15

View file

@ -38,6 +38,7 @@ check_requirements () {
} }
### stuff begins here ### stuff begins here
message "Checking build directory"
test -f build/chroot || mkdir -p build/chroot test -f build/chroot || mkdir -p build/chroot
###fakeroot -s build/fakechroot.save fakechroot debootstrap --variant=fakechroot bullseye build/chroot/ http://ftp.de.debian.org/debian ###fakeroot -s build/fakechroot.save fakechroot debootstrap --variant=fakechroot bullseye build/chroot/ http://ftp.de.debian.org/debian
@ -45,14 +46,17 @@ test -f build/chroot || mkdir -p build/chroot
### i have the problem, that fakechroot will not work atm. in ubuntu 22.04 i get libc6 version mismatch errors. so we run it direct as root. not my favorite, but works for now. ### i have the problem, that fakechroot will not work atm. in ubuntu 22.04 i get libc6 version mismatch errors. so we run it direct as root. not my favorite, but works for now.
message "running debootstrap"
sudo debootstrap bullseye build/chroot/ http://ftp.de.debian.org/debian || sudo debootstrap bullseye build/chroot/ http://ftp.de.debian.org/debian sudo debootstrap bullseye build/chroot/ http://ftp.de.debian.org/debian || sudo debootstrap bullseye build/chroot/ http://ftp.de.debian.org/debian
message "deploying install_base"
cat <<EOF > build/chroot/tmp/install_base.sh cat <<EOF > build/chroot/tmp/install_base.sh
#!/bin/bash #!/bin/bash
echo nanodesk > /etc/hostname echo nanodesk > /etc/hostname
DEBIAN_FRONTEND=noninteractive DEBIAN_FRONTEND=noninteractive
export DEBIAN_FRONTEND export DEBIAN_FRONTEND
apt install -y --no-install-recommends \\ apt install -y --no-install-recommends \\
linux-image-generic \\ live-boot \\
linux-image-amd64 \\
grub-pc \\ grub-pc \\
ifupdown \\ ifupdown \\
man \\ man \\
@ -89,10 +93,19 @@ echo "Europe/Berlin" > /etc/timezone && \\
locale-gen en_US.UTF-8 && \\ locale-gen en_US.UTF-8 && \\
update-locale LANG=en_US.UTF-8 update-locale LANG=en_US.UTF-8
EOF EOF
message "run install_base"
$CHROOTCMD /bin/bash /tmp/install_base.sh || error $CHROOTCMD /bin/bash /tmp/install_base.sh || error
### prepeare liveboot ### liveboot part, https://www.willhaley.com/blog/custom-debian-live-environment/
mkdir -p build/{staging/{EFI/BOOT,boot/grub/x86_64-efi,isolinux,live},tmp} message "checking liveboot directories"
for dir in $(echo build/{staging/{EFI/BOOT,boot/grub/x86_64-efi,isolinux,live},tmp})
do
message "check $dir"
test -d $dir || mkdir -p $dir
done
#mkdir -p build/{staging/{EFI/BOOT,boot/grub/x86_64-efi,isolinux,live},tmp}
test -f build/staging/live/filesystem.squashfs && sudo rm build/staging/live/filesystem.squashfs
sudo mksquashfs \ sudo mksquashfs \
build/chroot \ build/chroot \
build/staging/live/filesystem.squashfs \ build/staging/live/filesystem.squashfs \