booting a linux kernel from NFS
Hi,
I get this error, when I don't give qemu a 'hda':
A disk image must be given for 'hda' when booting a Linux kernel.
Why is that? Isn't it completely legal to start without a IDE drive? For example with:
qemu \
-kernel linux-test/bzImage-2.6.18 \
-append "root=/dev/nfs nfsroot=172.20.0.1:/testing_root \
ip=172.20.0.10::172.20.0.1:255.255.0.0:node1:eth0:off \
ide2=noprobe ide3=noprobe ide4=noprobe" \ -net nic,vlan=0,model=ne2k_isa \
-net tap,vlan=0,script=/etc/qemu-ifup -m 10
Regards
Markus
Quoted 3 lines · Markus Schiltknecht
Hi,
I get this error, when I don't give qemu a 'hda':
Use "/dev/zero". (Several people have suggested that qemu should default to /dev/zero when you give it a kernel but don't give it a hard drive, but last I checked it still wasn't doing that.)
Quoted 3 lines
A disk image must be given for 'hda' when booting a Linux kernel.
Why is that? Isn't it completely legal to start without a IDE drive?
Because the way -kernel works is to create a fake bootsector internally, present it to the bios as the start of hda, and tell the bios to boot from that. If you haven't got an hda, it gets confused. (It probably shouldn't, since it's not actually _using_ it, but it does.)
Note that if you mmap /dev/zero it counts as an anonymous mapping, so feeding in /dev/zero for hda works just fine here.
Rob
Signature · 2 lines
"Perfection is reached, not when there is no longer anything to add, but when there is no longer anything to take away." - Antoine de Saint-Exupery
Quoted 3 lines · Rob Landley
Because the way -kernel works is to create a fake bootsector internally, present it to the bios as the start of hda, and tell the bios to boot from that. If you haven't got an hda, it gets confused. (It probably shouldn't, since it's not actually _using_ it, but it does.)
Note that if you mmap
/dev/zeroit counts as an anonymous mapping, so feeding in/dev/zerofor hda works just fine here.
Thank you, that works. And it's always good to know how it works.
Regards
Markus