Ok, I know you've seen alot of these posts, and I have read them all, but what I've understood it has to do with the OS you're on. And most people I've seen, have the problem on their Debian, and users who use Ubuntu doesn't have this problem. So, I'm following the
Meaty Skeleton Guide where at the end, you create an iso file.
At the end, you have a folder, which contains the kernel and grub cfg:
Code: Select all
isodir/boot/grub/grub.cfg
isodir/boot/kirdos.kernel
The isodir is the folder, and everything inside should turn into the iso file. You can see that I use my own os name (
kirdos.kernel), I have double triple quadruple checked and there shouldn't be any
myos left in the project. If it was, I wouldn't have a
kirdos.kernel which I now have. the grub.cfg content is:
Code: Select all
menuentry "kirdos" {
multiboot /boot/kirdos.kernel
}
This is generated from iso.sh:
Code: Select all
#!/bin/sh
set -e
. ./build.sh
mkdir -p isodir
mkdir -p isodir/boot
mkdir -p isodir/boot/grub
cp sysroot/boot/kirdos.kernel isodir/boot/kirdos.kernel
cat > isodir/boot/grub/grub.cfg << EOF
menuentry "kirdos" {
multiboot /boot/kirdos.kernel
}
EOF
grub-mkrescue -o kirdos.iso isodir
I know that it the build works, because I have .o files which gets turned into kirdos.kernel (in sysroot/boot/). I then run qemu.sh:
Code: Select all
#!/bin/sh
set -e
. ./iso.sh
qemu-system-$(./target-triplet-to-arch.sh $HOST) -cdrom kirdos.iso
This one displays that it can't find kirdos.iso. I then try to run iso.sh (source above) again which then, ofcourse fails. What I then did, was to manually run
grub-mkrescue -o kirdos.iso isodir, and see if it even generated an iso file, which it did not. So I started googling, appearently it doesn't work when it doesn't have a boot/grub directory accessible. I'm not sure though if it meant isodir/boot/grub or if it meant the boot/grub on my actual system. What I also saw is that almost everyone has the problem on Debian, and that most (not all) had it working when they switched to Ubuntu. I have ubuntu, and yes, it's not working. In my case, I do not want to switch from Ubuntu (I have
Ubuntu 14.04 LTS) so there must be a way to work around this. I know I could start qemu with just the kernel as input, but then when I add other files (like user made programs), I can't access them because I just run just the kernel and not the actual iso (I know that you propably shouldn't use the ISO file as permanent boot but let's say this is not the final state).
So, how can I fix this? I do not want to switch OS (from Ubuntu), and I wont do it. And I don't want a way where I have to do it manually (like where I can't use the iso.sh script).