#!/usr/bin/env bash # Vasile needs root privileges and a proper kernel to run kernelconfig checkroot makeisox64 () { # create live iso layout mkdir -p "$isostagingdirx64" mkdir -p "$isobootdirx64" mkdir -p "$isoefibootdirx64" mkdir -p "$isosupersquashdirx64" # mount && copy our core stage 4 image mount -t squashfs "$chrootx64" "$isostagingx64" rsync -aHAXr --progress "$isostagingdirx64/" "$isosyncdirx64/" # copy our kernel cp -avx ""$isosyncdirx64"/boot/"$isokernelnamex64"" ""$isorootdirx64"/boot/vmlinuz" cp -avx ""$isosyncdirx64"/boot/"$isoramfsname"" ""$isorootdirx64"/boot/initrd" sha256sum ""$isorootdirx64"/boot/vmlinuz" | tee ""$isorootdirx64"/boot/vmlinuz.sha256" sha256sum ""$isorootdirx64"/boot/initrd" | tee ""$isorootdirx64"/boot/initrd.sha256" # configure portage && give up control for package / desktop environment installation isostartx64 isooverlaysx64 isobuildsystemx64 isochrootx64 isostopx64 # squash live environment mksquashfs "$isosyncdirx64" ""$isosyncdirx64".img" -b 1048576 -comp xz -Xdict-size 100% sha256sum ""$isosyncdirx64".img" | tee ""$isosyncdirx64".img.sha256" } bootcorex64 () { # configure live bootloader git clone https://gitlab.com/rogentos/boot-core.git "$bootcorepath" cp -avx "$bootcorefiles" "$isorootdirx64" } cleanupisox64 () { rm -rf "$isosyncdirx64" rm -rf "$bootcorepath" umount "$isostagingdirx64" } main () { chrootchecksumx64 makeisox64 bootcorex64 cleanupisox64 } main