grub-devel
[Top][All Lists]
Advanced

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

i386/pc/chainloader.c fails with syntax like chainloader (hd1, msdos1)+1


From: Michael Chang
Subject: i386/pc/chainloader.c fails with syntax like chainloader (hd1, msdos1)+1
Date: Fri, 21 Jun 2013 17:23:46 +0800

Hi,

The i386/pc/chainloader.c hangs when attempting to chainload other
disk's boot sector (or mbr) with a syntax like this. Say if current
environment setting root=hd0,msdos2.

  $ chainloader (hd1,msdos1)+1

However doing it this way always works.

  $ set root=hd1,msdos1
  $ chainloader +1

I suppose the first syntax is valid as it should override $root [1]
thus two cases should have identical result. But looking into the
chainloader source it seems that the $root is always used to obtain
the boot drive number and partition table. So there's a discrepancy if
root is not set to the chainloader device which is explicitly
specified in file.

The attached file fixes the problem for me, I'd like to contribute if
you think this is a problem or how to improve the patch.

[1] http://www.gnu.org/software/grub/manual/grub.html#root
[2] http://www.gnu.org/software/grub/manual/grub.html#chainloader

Thanks,
Michael

Attachment: chainloader-drive-number.patch
Description: Text Data


reply via email to

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