get iso to boot into kernel + initramfs

Signed-off-by: Nico Schottelius <nico@wurzel.schottelius.org>
This commit is contained in:
Nico Schottelius 2015-05-13 09:24:55 +02:00
parent 59d81ddd4b
commit a1f003bd9c
5 changed files with 48 additions and 1 deletions

2
hacking/.gitignore vendored Normal file
View file

@ -0,0 +1,2 @@
iso/
*.iso

View file

@ -10,3 +10,9 @@
- binlist
- bootstrap of os
-> root permissions!
- uefi support
[9:15] wurzel:hacking% pacman -Ql syslinux | grep ldlin
syslinux /usr/lib/syslinux/bios/ldlinux.c32
syslinux /usr/lib/syslinux/efi32/ldlinux.e32
syslinux /usr/lib/syslinux/efi64/ldlinux.e64

29
hacking/add_kernel_isolinux.sh Executable file
View file

@ -0,0 +1,29 @@
#!/bin/sh
# FIXME: Write cdist type / explorer that finds
# package for a file, distro independent
if [ "$#" -ne 1 ]; then
echo "$0 dir-out"
exit 1
fi
dir=$1; shift
boot=$dir/boot
mkdir -p "$boot"
cp /boot/vmlinuz-linux \
/boot/initramfs-linux-fallback.img \
/usr/lib/syslinux/bios/isolinux.bin \
"$boot"
cp /usr/lib/syslinux/bios/ldlinux.c32 \
"$dir"
cat > "$dir/isolinux.cfg" << eof
default preos
label preos
title cdist PreOS
linux /boot/vmlinuz-linux
initrd /boot/initramfs-linux-fallback.img
eof

10
hacking/all.sh Executable file
View file

@ -0,0 +1,10 @@
#!/bin/sh
set -e
dir=./iso
iso=preos.iso
./filelist_from_package.sh | ./filelist_to_dir.sh "$dir"
./add_kernel_isolinux.sh "$dir"
./create_iso.sh "$dir" "$iso"

View file

@ -8,5 +8,5 @@ fi
iso=$1; shift
qemu-system-x86_64 -m 512 -boot order=cd \
-drive=$iso,media=cdrom
-drive file=$iso,media=cdrom