Compare commits

..

3 Commits

Author SHA1 Message Date
BodgeMaster 8ea64ee1a4 notes to self: more todo 2023-06-28 13:03:55 +02:00
BodgeMaster d0d188bbd3 grub-config: add first default kernel boot parameters 2023-06-28 13:03:14 +02:00
BodgeMaster ec25fa5a79 dracut modules: add 90void-usb 2023-06-28 13:02:25 +02:00
6 changed files with 42 additions and 6 deletions

View File

@ -0,0 +1,3 @@
#!/bin/bash
mknod --mode=660 /dev/loop0 b 7 0

View File

@ -0,0 +1,18 @@
#!/usr/bin/env bash
check() {
return 0
}
depends() {
echo bash
}
install() {
inst_hook pre-udev 90 "$moddir/create-loop0.sh"
inst_hook pre-mount 92 "$moddir/squashfs-img.sh"
}
installkernel() {
instmods loop
}

View File

@ -0,0 +1 @@
#!/bin/bash

View File

@ -193,11 +193,21 @@ echo "UUID=$(blkid --output value --match-tag UUID $TARGET_PART_BIG) /container
echo '# Void USB dracut configuration echo '# Void USB dracut configuration
hostonly="no" hostonly="no"
omit_dracutmodules+=" nvdimm resume "
compress="xz" compress="xz"
add_dracutmodules+=" void-usb "
omit_dracutmodules+=" nvdimm resume "
add_fstab+=" /opt/void-usb/initramfs-fstab "' > /mnt/target/etc/dracut.conf.d/99-void-usb.conf add_fstab+=" /opt/void-usb/initramfs-fstab "' > /mnt/target/etc/dracut.conf.d/99-void-usb.conf
# TODO: add dracut modules #TODO: mount /container
mkdir -p /mnt/target/lib/dracut/modules.d/90void-usb
chmod 755 /mnt/target/lib/dracut/modules.d/90void-usb
wget --output-document=/mnt/target/lib/dracut/modules.d/90void-usb/module-setup.sh https://lostcave.ddnss.de/git/BodgeMaster/void-minecraft-usb/raw/branch/master/dracut-modules/90void-usb/module-setup.sh
chmod 744 /mnt/target/lib/dracut/modules.d/90void-usb/module-setup.sh
wget --output-document=/mnt/target/lib/dracut/modules.d/90void-usb/create-loop0.sh https://lostcave.ddnss.de/git/BodgeMaster/void-minecraft-usb/raw/branch/master/dracut-modules/90void-usb/create-loop0.sh
chmod 744 /mnt/target/lib/dracut/modules.d/90void-usb/create-loop0.sh
wget --output-document=/mnt/target/lib/dracut/modules.d/90void-usb/squashfs-img.sh https://lostcave.ddnss.de/git/BodgeMaster/void-minecraft-usb/raw/branch/master/dracut-modules/90void-usb/squashfs-img.sh
chmod 744 /mnt/target/lib/dracut/modules.d/90void-usb/squashfs-img.sh
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 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 chmod 744 /mnt/target/opt/void-usb/backup-fs

View File

@ -16,6 +16,8 @@ do not rely on the RTC
move /boot to /container instead of its own partition move /boot to /container instead of its own partition
look into UEFI specs and general availability of FAT16 support look into UEFI specs and general availability of FAT16 support
- if possible, shrink ESP and move GRUB to /container - if possible, shrink ESP and move GRUB to /container
add manufacturer where users select the target device
show user-firently status instead of scrolling output from all sorts of tools
musl downsides: musl downsides:
- no nvidia drivers - no nvidia drivers
@ -36,11 +38,13 @@ f2fs for home
boot setup + dracut configuration boot setup + dracut configuration
- root=/dev/loop0 ro - root=/dev/loop0 ro
- custom dracut modules - custom dracut module
- udev rule for /dev/loop0 - pre-udev script
- make loop0 appear
- pre-mount script - pre-mount script
- mount /container by UUID (possibly passed from a kernel command line parameter) - mount /container by UUID (possibly passed from a kernel command line parameter)
- losetup the squashfs img - losetup the squashfs img
- pre-pivot script?
- do we need one to move over the /container mount to real root? - do we need one to move over the /container mount to real root?
- overlayfs gets mounted from fstab - overlayfs gets mounted from fstab

View File

@ -4,7 +4,7 @@ OS_NAME="Void Linux USB"
GRUB_PREFIX="/boot/efi/LOADER/grub" GRUB_PREFIX="/boot/efi/LOADER/grub"
CFG_CUSTOM_BEFORE="custom_before.cfg" CFG_CUSTOM_BEFORE="custom_before.cfg"
CFG_CUSTOM_AFTER="custom_after.cfg" CFG_CUSTOM_AFTER="custom_after.cfg"
LINUX_CMDLINE="" LINUX_CMDLINE="root=/dev/loop0 ro"
DEFAULT_LINUX=/boot/vmlinu? DEFAULT_LINUX=/boot/vmlinu?
if [ ! -f "$DEFAULT_LINUX" ]; then if [ ! -f "$DEFAULT_LINUX" ]; then