help-grub
[Top][All Lists]
Advanced

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

problem with grub2 install on flash image


From: Dmitriy Blinov
Subject: problem with grub2 install on flash image
Date: Tue, 23 Dec 2008 18:16:49 +0300
User-agent: Mozilla-Thunderbird 2.0.0.17 (X11/20081018)

I'm trying to create flash image with installed Debian system and grub2 bootloader.

The schema of my actions is about listed below.

1.  I create flash.img filled with zeroes

2.  $losetup /dev/loop0  /home/my/fflash.img
3.  create filesystem in the /dev/loop0
4.  $mount /dev/loop0 /home/my/dir
5.  then I create root file system in /home/my/dir



after that I try to install grub2  on the  mounted  pseudo-flash:
6.  grub-install --root-directory=/home/my/dir   /dev/loop0

this command returns error:
grub-probe: error: Cannot find a GRUB drive for /dev/loop0. Check your device.map


device.map  looks like:
(hd0)  /home/my/flash.img



In fact my problem is:
grub-probe -d /dev/sd* -t drive
always returns correct drive (e.g. (hd0,1)), but if we use Loop Device like /dev/loop0 we always get the error.

Is it possible to solve my problem?


P.S.
with old grub  0.95 my script works well
in old script grub installation looks like:

echo "(hd0) /home/my/flash.img" > $DEVICE_MAP
$TARGET/usr/sbin/grub --batch --device-map=$DEVICE_MAP  <<EOF
geometry (hd0) 993 16 63
root (hd0,0)
setup (hd0)
EOF















reply via email to

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