bug-grub
[Top][All Lists]
Advanced

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

problems installing grub (into a file)


From: Padraig
Subject: problems installing grub (into a file)
Date: Fri, 18 Apr 2003 13:03:54 +0100
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.3b) Gecko/20030210

Hi, I'm installing grub into a
virtual disk which is a file on disk
structured like:

| MBR | stage1.5 | hd0,0 (grub files here) | hd0,1 |

And the grub install is like:

losetup /dev/loop0 vd.img
echo "
device (hd0) /dev/loop0
geometry (hd0) 245 16 32
root (hd0,0)
setup (hd0)
quit" | grub --batch

This mostly works, but I've the following issues.

1. When I set the geometry above I get:

   drive 0x80: C/H/S = 245/16/32 ...
    Partition num: 0,  Filesystem type is ext2fs, partition type 0x83
    Partition num: 1,  Filesystem type unknown, partition type 0x83

   My question is, why is the filesystem on partition 1 not recognized
   (even though it's not needed for my config)

2. The setup command mostly works except for the install
   command at the end which is:

install /grub/stage1 (hd0) (hd0)1+16 p (hd0,0)/grub/stage2 /grub/grub.conf

   And fails with "Error 22: No such partition"
   I traced through the source a little and noticed that
   the fail backtrace is like:

   install_func
    open_partition
     real_open_partition
      next_partition
       err=ERR_NO_PART

   Now if I mount the filesystem where stage2 is installed
   and pass --stage2=/mnt/point/grub/stage2 to the setup
   command above then it suceeeds.

   Note also that this subset of the "setup commands" succeed:

    embed /grub/e2fs_stage1_5 (hd0)
    install /grub/stage1 (hd0) (hd0)1+16

   So my question is why can grub not find the stage2 when the
   filesystem isn't mounted?

thanks,
Pádraig.





reply via email to

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