View previous topic :: View next topic |
Author |
Message |
Wizumwalt Guru
Joined: 20 Aug 2006 Posts: 547
|
Posted: Fri Oct 15, 2010 1:02 am Post subject: kvm + initramfs, no such device or address |
|
|
I followed the gentoo wiki to build an initramfs ... http://en.gentoo-wiki.com/wiki/Initramfs#Basics
My initramfs script (/init) has the following line and other than I'm using /dev/sda3 instead of sda1 like in the wiki, the rest is the same. Though I also have separate partitions for /home, /usr, /var, /opt/ and /tmp that I don't have in there.
Code: |
mount -o ro /dev/sda3 /mnt/root
|
When I try to boot a guest OS in KVM with the -initrd option ...
Code: |
kvm -net nic,macaddr=52:54:00:12:34:56 -net tap,ifname=qtap0,script=no,downscript=no -kernel ./kernel-2.6.34-gentoo-r11 -initrd /opt/gentoo-i386-initramfs.cpio.gz -boot d -m 512
|
I get this error ...
Code: |
mount: mounting /dev/sda3 on /mnt/root failed: No such device or address
|
I copied all /dev/sda* from my host os into the initramfs /dev before archiving, just as shown in the wiki.
Anyone offer any advice here? |
|
Back to top |
|
|
richard.scott Veteran
Joined: 19 May 2003 Posts: 1497 Location: Oxfordshire, UK
|
Posted: Fri Oct 15, 2010 10:01 am Post subject: |
|
|
does the kernel your booting in kvm have the correct drivers compiled in to see your disks? |
|
Back to top |
|
|
cach0rr0 Bodhisattva
Joined: 13 Nov 2008 Posts: 4123 Location: Houston, Republic of Texas
|
Posted: Fri Oct 15, 2010 10:09 am Post subject: |
|
|
I'm...the furthest thing in the world from a KVM expert. So please take this as my "beginner's guess"
Every time i've started it up, I've specified a drive or file or partition something to that extent on the command-line. I don't see that anywhere in yours?
I was initially going to say "oh, it's /dev/vda*", but that's only with virtio driver
I'm either blind, ignorant, or right. One of those three _________________ Lost configuring your system?
dump lspci -n here | see Pappy's guide | Link Stash |
|
Back to top |
|
|
Wizumwalt Guru
Joined: 20 Aug 2006 Posts: 547
|
Posted: Fri Oct 15, 2010 3:33 pm Post subject: |
|
|
richard.scott wrote: | does the kernel your booting in kvm have the correct drivers compiled in to see your disks? |
Yeah, I can start kvm fine using a hard disk image and *.iso. But here all I'm trying to do is mount a partition from within the guest OS.
cach0rr0 wrote: |
Every time i've started it up, I've specified a drive or file or partition something to that extent on the command-line. I don't see that anywhere in yours?
|
Inside my /init file which is specified with the -initrd param (in / of the archive) is where I tell what partition to be mounted ro. That line would be the 'mount -o ro /dev/sda3 /mnt/root' above. |
|
Back to top |
|
|
frostschutz Advocate
Joined: 22 Feb 2005 Posts: 2977 Location: Germany
|
Posted: Sat Oct 16, 2010 9:49 am Post subject: |
|
|
I don't see where you specify any disk or drive in that kvm startup line... so my guess would be the guest OS does not have any drives. Am I wrong?
The initramfs guide has a dynamic device section, as well as a rescue shell, I suggest you use both to find out what you actually have there. |
|
Back to top |
|
|
cach0rr0 Bodhisattva
Joined: 13 Nov 2008 Posts: 4123 Location: Houston, Republic of Texas
|
Posted: Sat Oct 16, 2010 11:23 am Post subject: |
|
|
frostschutz wrote: | I don't see where you specify any disk or drive in that kvm startup line... so my guess would be the guest OS does not have any drives. Am I wrong?
The initramfs guide has a dynamic device section, as well as a rescue shell, I suggest you use both to find out what you actually have there. |
ok, so I'm not crazy then
i was looking like...where exactly is this drive supposed to be, if all he passes to kvm is a ramdisk, but no actual volume/disk/whatever _________________ Lost configuring your system?
dump lspci -n here | see Pappy's guide | Link Stash |
|
Back to top |
|
|
|