help-grub
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Unable to boot .img file


From: Francesco Turco
Subject: Unable to boot .img file
Date: Mon, 07 Jun 2010 12:43:19 +0200
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.9) Gecko/20100423 Thunderbird/3.0.4

Hello,

I'm trying to boot a custom Linux system embedded into an .img file with grub2 under qemu, but I get the following error message:

Starting SeaBIOS (version 0.5.1-20100120_010601-rothera)
Booting from Hard Disk...
error: no such device 2efdc0e5-622a-4f80-ba01-41eaaf157b80.
grub rescue>

This is grub.cfg:

set timeout=10
set default=0

menuentry "Linux" {
        set root=(hd0,0)
        linux /boot/bzImage
}

This is what I did:

dd if=/dev/zero of=sysroot.img bs=1M count=512
losetup /dev/loop0 sysroot.img
fdisk /dev/loop0
losetup -o 32256 /dev/loop1 sysroot.img
mke2fs -t ext4 /dev/loop1
mount /dev/loop1 /mnt
(copied system files into /mnt)
grub-install --root-directory=/mnt /dev/loop0
umount /dev/loop1
losetup -d /dev/loop1
losetup -d /dev/loop0
qemu-system-x86_64 -hda sysroot.img

Where's the problem?

Thanks.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]