updates nov 16th.

This commit is contained in:
Matt Knoop
2025-11-16 20:49:44 -07:00
parent 248948f9f9
commit 704fa1b0aa
4 changed files with 28 additions and 3 deletions

10
build_filesystem.sh Executable file
View File

@@ -0,0 +1,10 @@
#!/bin/bash
set -e
cd "$(dirname "$0")"
dir=$(dirname "$0")
echo $dir
podman run --rm -d --name ubuntu ubuntu:latest /bin/bash -c "while true; do sleep 1; done"
podman export -o ./ubuntu.tar ubuntu
echo 'exported.'
podman stop ubuntu

View File

@@ -12,4 +12,5 @@ echo "CONFIG_EFI=y" >> ./.config
echo "CONFIG_SYSFB=y" >> ./.config
echo "CONFIG_FB=y" >> ./.config
echo "CONFIG_FRAMEBUFFER_CONSOLE=y" >> ./.config
/usr/bin/make olddefconfig
/usr/bin/make -j ${cores}

View File

@@ -1,4 +1,8 @@
#!/bin/bash
if [ "$(id -u)" -ne 0 ]; then
echo "switching from $(id -un) to root"
exec sudo "$0" "$@"
fi
set -e
cd "$(dirname "$0")"
dir=$(dirname "$0")
@@ -35,7 +39,8 @@ mkdir -p $dir/mnt/
mkdir -p $dir/mnt/{efi,sys,grub}
mount -t vfat /dev/mapper/${disk_efi} $dir/mnt/efi
mount -t ext4 /dev/mapper/${disk_sys} $dir/mnt/sys
tar -xvf ./ubuntu.tar --directory ./mnt/sys/
rm ./ubuntu.tar
#--grub-mkdevicemap=$dir/mnt/device.map
#echo "(hd0) /dev/${disk_grub}" > $dir/mnt/device.map
#--efi-directory=$dir/mnt/efi --boot-directory=$dir/mnt/grub --root-directory=$dir/mnt/sys
@@ -57,6 +62,10 @@ cp $dir/initramfs.cpio.gz $dir/mnt/efi/EFI/patronage/
cp $dir/grub.cfg $dir/mnt/efi/EFI/patronage/
#cp $dir/grub.cfg $dir/mnt/sys/boot/grub/
cp $dir/grub.cfg $dir/mnt/efi/EFI/BOOT/
sync
#exit
if mountpoint -q "$dir/mnt/efi"; then

View File

@@ -1,8 +1,13 @@
#!/bin/busybox sh
/bin/busybox mount -t devtmpfs devtmpfs /dev
/bin/busybox mount -t proc none /proc
/bin/busybox mount -t proc proc /proc
/bin/busybox mount -t sysfs none /sys
/bin/busybox mount -t sysfs none /run
/bin/busybox mkdir -p /newroot
/bin/busybox mount /dev/sda2 /newroot
#/bin/busybox ln -s "/lib/modules/" "/lib/modules/$(uname -r)"
#depmod -a
#/bin/busybox modprobe nbd max_part=2
exec /bin/busybox sh
exec switch_root /newroot /bin/bash
#exec /bin/busybox sh