Let me answer my own question : it's kernel-related.

Grub2 loads a kernel and a RAMdisk within a disk image, but doesn't abstract 
the 
said disk image at all. You still have to supply FS drivers and proper 
configuration to the kernel, in order for him to run inside it.
I'm working on that.

Tarnyko

________________________________
De : Tarnyko Rasty <[email protected]>
À : [email protected]
Envoyé le : Jeu 24 mars 2011, 12h 46min 50s
Objet : [Grub2] Booting from disk image file -fails


Hi folks,

I'm trying to use Grub to boot a Linux system, stored in a raw disk image file.

I've got my file "debian60.img", which mounts fine using "losetup /dev/loopX 
debian60.img" and "mount -t ext3 /dev/loopX /mnt/XXX".
I've put it on a second NTFS-formatted partition and am using the following 
menuentry in "grub.cfg" :

menuentry 'Debian 6.0' {
insmod ext2
loopback loop (hd0,2)/debian60.img
root (loop)
linux (loop)/boot/vmlinuz-2.6.32-5-686 root=/dev/sda1 ro
initrd (loop)/boot/initrd.img-2.6.32-5-686
}

Actually it's a half-success, Grub detects the "partition-in-image" with 
"found: 
ext2", boots the kernel and detects the hardware, but when it comes to the 
kernel mounting "/dev/sda1" (to say, partition in image file) it fails with :

mount: mounting /dev/sda1 on /root failed: No such device

I've tried specifying my UUID instead of /dev/sdX, like in "root=UUID=abcdef- 
...." but then I get :

Gave up waiting for root device.


Is this Grub-related, or more kernel ? Can someone help me ? Thanks !
Tarnyko



      
_______________________________________________
Help-grub mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-grub

Reply via email to