Compare commits

..

No commits in common. "8ea9f547ea279c51edde37396fcf894a76fe1d3c" and "2b4b7f4b1a4078fab22d1ce3bd7b4462c20a17db" have entirely different histories.

4 changed files with 4 additions and 75 deletions

View File

@ -55,7 +55,6 @@ The scripts will take it from there, asking you for information and downloading
- `install-stage1.sh`: sets up the base system and prepares for installation stage 2
- `install-stage2.sh`: continues setting up things after booting into the freshly installed base system
- `opt/grub-config`: the custom grub config generator to be installed in /opt/void-usb
- `opt/backup-fs`: helper script to regenerate the squashfs
- `procedure.txt`: notes to self, will disappear once finished
- `bootup.sh`: script that sets up the overlay
- `bashrc`: just a custom bashrc

View File

@ -185,14 +185,6 @@ echo "%wheel ALL=(ALL:ALL) ALL" > /mnt/target/etc/sudoers.d/wheel_as_sudo_group.
# TODO: add overlayfs scripts (bootup and shutdown)
mkdir -p /mnt/target/opt/void-usb
chmod 755 /mnt/target/opt/void-usb
wget --output-document=/mnt/target/opt/void-usb/backup-fs https://lostcave.ddnss.de/git/BodgeMaster/void-minecraft-usb/raw/branch/master/opt/backup-fs
chmod 744 /mnt/target/opt/void-usb/backup-fs
echo "
/opt/void-usb/backup-fs" >> /mnt/target/etc/rc.shutdown
echo "# See fstab(5).
# <device> <mount point> <fstype> <options> <dump> <pass>
@ -288,6 +280,8 @@ run_in_target grub-install --target=i386-pc --boot-directory=/boot/efi/LOADER --
run_in_target grub-install --target=i386-efi --boot-directory=/boot/efi/LOADER --efi-directory=/boot/efi --removable --no-nvram --modules="'$TARGET_PRELOAD_GRUB_MODULES'" "'/dev/$TARGET_DISK'"
run_in_target grub-install --target=x86_64-efi --boot-directory=/boot/efi/LOADER --efi-directory=/boot/efi --removable --no-nvram --modules="'$TARGET_PRELOAD_GRUB_MODULES'" "'/dev/$TARGET_DISK'"
mkdir -p /mnt/target/opt/void-usb
chmod 755 /mnt/target/opt/void-usb
wget --output-document=/mnt/target/opt/void-usb/grub-config https://lostcave.ddnss.de/git/BodgeMaster/void-minecraft-usb/raw/branch/master/opt/grub-config
chmod 744 /mnt/target/opt/void-usb/grub-config
@ -303,6 +297,4 @@ chmod 744 /mnt/target/etc/kernel.d/post-remove/99-void-usb
run_in_target xbps-reconfigure -fa
run_in_target /opt/void-usb/backup-fs
#

View File

@ -1,62 +0,0 @@
#!/usr/bin/env bash
function yesno {
unset DISCARD_ME
while [ -z "$DISCARD_ME" ]; do
read -p "[y/n] " -n1 DISCARD_ME
case "$DISCARD_ME" in
y)
return 0
;;
n)
return 1
;;
*)
echo " Please enter y for yes or n for no."
unset DISCARD_ME
;;
esac
done
}
# Overlay should still be mounted, right?
cat /proc/mounts
read -p "
press any key" -n1 DISCARD_ME
# And no services running?
ps aux | grep -vF "[kworker"
read -p "
press any key" -n1 DISCARD_ME
#TODO: remove above debugging sanity checks
#TODO: refuse to run if system is running
#TODO: add a way to tell the system whether to back up before shutting down
#TODO: colors
echo "Back up system changes to disk?
This only affects things outside the /home directory.
Backing up the system will take some time.
"
if yesno; then
echo "Backing up..."
#TODO: fiddle with squashfs parameters to find optimal settings
#TODO: What (if any) device nods need to be created? (man mksquashfs -> pseudo file)
mksquashfs / /container/new_squashfs.img -b 1M -comp xz -one-file-system -progress -noappend -e /var/cache/xbps
#TODO: check if enough disk space
# yes -> create new image next to old image
# no -> create new image in RAM
#TODO: figure out when appending to existing squashfs is a good idea
mv /container/new_squashfs.img /container/squashfs.img
else
echo ""
echo "Not backing up."
fi

View File

@ -79,9 +79,9 @@ fi
menuentry '$OS_NAME' {
echo 'Loading Linux...'
linux /$DEFAULT_LINUX
linux $DEFAULT_LINUX
echo 'Loading initial ramdisk...'
initrd /$DEFAULT_INITRAMFS
initrd $DEFAULT_INITRAMFS
}
submenu 'Choose kernel version...' {" > "$GRUB_PREFIX/grub.cfg"