.
This commit is contained in:
@@ -2,4 +2,4 @@
|
||||
cd "$(dirname "$0")"
|
||||
cd ..
|
||||
disk="./outputs/boot_image.img"
|
||||
qemu-system-x86_64 -bios /usr/share/ovmf/OVMF.fd -drive format=raw,file=$disk -m 16G -smp 8 -vga virtio -usb -device usb-tablet --display gtk,gl=off --device virtio-gpu-pci -enable-kvm -machine type=pc-q35-3.1,accel=kvm,kernel_irqchip=on
|
||||
qemu-system-x86_64 -bios /usr/share/ovmf/OVMF.fd -drive format=raw,file=$disk -m 16G -smp 8 -vga none -usb -device usb-tablet --display gtk --device virtio-gpu-pci -enable-kvm -machine type=pc-q35-3.1,accel=kvm,kernel_irqchip=on
|
||||
|
||||
@@ -9,34 +9,32 @@ cd "$(dirname "$0")"
|
||||
DIR="$(dirname "$0")"
|
||||
cd ..
|
||||
echo $PWD
|
||||
if mountpoint -q "./outputs/chroot/proc/"; then
|
||||
umount -lf "./outputs/chroot/proc/"
|
||||
fi
|
||||
|
||||
rm -rf './outputs/root'
|
||||
if [ ! -d ./outputs/root/bin ]; then
|
||||
rm -rf './outputs/root'
|
||||
mkdir -p ./outputs/root/
|
||||
debootstrap noble ./outputs/root https://us.archive.ubuntu.com/ubuntu
|
||||
debootstrap questing ./outputs/root https://us.archive.ubuntu.com/ubuntu
|
||||
fi
|
||||
if mountpoint -q "./outputs/chroot/proc/"; then
|
||||
umount -lf "./outputs/chroot/proc/"
|
||||
fi
|
||||
rm -rf './outputs/chroot'
|
||||
mkdir -p ./outputs/chroot/
|
||||
rsync -av ./outputs/root/ ./outputs/chroot/
|
||||
mkdir -p ./outputs/chroot/proc
|
||||
|
||||
if mountpoint -q "./outputs/chroot/proc/"; then
|
||||
umount -lf "./outputs/chroot/proc/"
|
||||
if mountpoint -q "./outputs/root/proc/"; then
|
||||
umount -lf "./outputs/root/proc/"
|
||||
fi
|
||||
rsync -a ./outputs/root/ ./outputs/chroot/
|
||||
mkdir -p ./outputs/chroot/proc
|
||||
mount --bind /proc ./outputs/chroot/proc
|
||||
cp ./config/filesystem_chroot_install.sh ./outputs/chroot/filesystem_chroot_install.sh
|
||||
cp ./config/interfaces.network ./outputs/chroot/etc/systemd/network/10-all.network
|
||||
cp ./config/resolved.conf ./outputs/chroot/etc/systemd/resolved.conf
|
||||
chmod +x ./outputs/chroot/filesystem_chroot_install.sh
|
||||
chroot ./outputs/chroot /bin/bash -c "/filesystem_chroot_install.sh"
|
||||
cp ./config/interfaces.network ./outputs/chroot/etc/systemd/network/10-all.network
|
||||
cp ./config/resolved.conf ./outputs/chroot/etc/systemd/resolved.conf
|
||||
cd $DIR
|
||||
cd ..
|
||||
if mountpoint -q "./outputs/chroot/proc/"; then
|
||||
umount -lf "./outputs/chroot/proc/"
|
||||
umount -lf "./outputs/chroot/proc/"
|
||||
fi
|
||||
echo 'root filesystem created.'
|
||||
|
||||
|
||||
|
||||
@@ -47,7 +47,10 @@ echo "efi loop: ${disk_efi}"
|
||||
echo "sys loop: ${disk_sys}"
|
||||
grub-install -s --compress=gz --target=x86_64-efi --recheck --no-floppy --efi-directory=./outputs/efi --boot-directory=./outputs/efi --root-directory=./outputs/sys --bootloader-id=patronage /dev/$loop
|
||||
echo 'copying filesystem to mounted image..'
|
||||
sudo rsync -av './outputs/chroot/' './outputs/sys/'
|
||||
if mountpoint -q "./outputs/chroot/proc/"; then
|
||||
umount -lf "./outputs/chroot/proc/"
|
||||
fi
|
||||
rsync -a './outputs/chroot/' './outputs/sys/'
|
||||
#tar -xf ./patronagefs.tar --directory ./mnt/sys/
|
||||
echo 'copied..'
|
||||
echo 'copying boot files..'
|
||||
|
||||
@@ -12,4 +12,5 @@ cd ..
|
||||
echo $PWD
|
||||
cat ./config/build_containerfile | /usr/bin/podman build --volume /lib/modules:/lib/modules:z -f - -t patronagekernel:latest .
|
||||
nice -n 20 /usr/bin/podman run -it --volume /lib/modules:/lib/modules:z --volume ./dependencies/linux:/linux patronagekernel:latest
|
||||
mkdir -p ./outputs/
|
||||
cp ./dependencies/linux/arch/x86_64/boot/bzImage ./outputs/bzImage
|
||||
|
||||
Reference in New Issue
Block a user