qemu Starting a 2004 FreeBSD in a VM - can't load kernel

It doesn't load manually either, like load /kernel + boot but instead it goes to this "bad path" situation? Really weird, like the kernel doesn't understand the initial / tree...

The kernel doesn't get loaded in the first place.

But the boot code might be unable to read the filesystem.
 
Hmmm, the 5.1 install CD wants the kernel to be in /boot/kernel/kernel, which my old tarfile does not have. I have /kernel. Maybe my install was even older?

QEMU hangs after the beastie logo when booting the install CD. Encountering a lot of resistance here...
 
Hmmm, the 5.1 install CD wants the kernel to be in /boot/kernel/kernel, which my old tarfile does not have. I have /kernel. Maybe my install was even older?
Yep. Hopefully 4.9?
The new kernel will be copied to the root directory as /kernel and the old kernel will be moved to /kernel.old.
Vs.
The new kernel will be copied to the /boot/kernel directory as /boot/kernel/kernel and the old kernel will be moved to /boot/kernel.old/kernel.
 
Fetched some random 5.1 ISO image and did:
Code:
qemu-img create -f qcow2 test.qcow2 10G
qemu-system-x86_64 -m 2048 -hda test.qcow2 -cdrom 5.1-RELEASE-amd64-miniinst.iso
and booted it straight to installer ( 10.1.0 on osx ).

Oh.

I was using -nographics. With graphics on it loads the kernel. My apologies.

However, it bombs out as follow. Also on a Mac's qemu.

install.png


Code:
qemu-system-x86_64 \
  -cdrom 5.1-RELEASE-amd64-miniinst.iso

qemu-system-x86_64 -m 2048 \
  -cdrom 5.1-RELEASE-amd64-miniinst.iso
 
sysinstall failed to install the base system, saying the /dev/ entry for the root filesystem does not exist.

However, it partitioned the drive and installed the bootloader. I'm unpacking my tarfile now after newfsing in a md mapped file.
 
Grrr, same result. kernel isn't loaded. `ls` output is a bit different.

Code:
Hit [Enter] to boot immediately, or any other key for command p 
Booting [kernel]...                
can't load 'kernel' 
can't load 'kernel.old' 
 
Type '?' for a list of commands, 'help' for more detailed help. 
ok ls ? 
open '?' failed: no such file or directory 
ok ls 
open '/' failed: no such file or directory 
ok boot /boot/kernel/kernel 
can't find '/boot/kernel/kernel' 
ok boot /kernel 
can't find '/kernel'

Re-trying with a FreeBSD-4.9 ISO now.
 
dont eat an elefant, too big. Try to find out where it goes wrong. First loader , then boot0 , boot1 , boot2 , mount of / & starting init.
seems loader cant find /boot/kernel. So its the beginning. I'm not a specialist here , can you choose MBR,UEFI. Do you have a screen with ? , there normally it can list partitions , the you put something like "boot thispartition".
 
sysinstall failed to install the base system, saying the /dev/ entry for the root filesystem does not exist.
I went through the basic install (triggered my mbr/bsdlabel ptsd) and got it running just fine.

Code:
# uname -a
FreeBSD  5.1-RELEASE FreeBSD 5.1-RELEASE #0: Sat Jun  7 09:22:34 GMT 2003     root@hammer.corp.yahoo.com:/usr/obj/usr/src/sys/GENERIC  amd64
#

Ran it with qemu-system-x86_64 -hda test.qcow2 -serial stdio.
 
It works. Thank you everybody, especially Martin.

The final obstacle was a QEMU issue that has been nagging me forever. The window it opens when you don't use -nographics doesn't work for remote displays (probably using SDL for something). But in this case the kernel load doesn't continue displaying with -nographics, which took me a while to figure out. So I have to copy the whole thing to the machine I am sitting in front of.
 
But in this case the kernel load doesn't continue displaying with -nographics, which took me a while to figure out.
As -nographic sets the console to stdio you need to have serial console enabled to see it. On FreeBSD that means console=comconsole in /boot/loader.conf. Not sure if multicons was supported in those early versions.

If you have qemu compiled with curses I find the option -display curses very handy.
 
Back
Top