Re: Grub2 installed with wrong boot commands
On Wed, Sep 08, 2010 at 05:45:00PM +0800, Jason Heeris wrote:
> On 8 September 2010 17:35, Colin Watson <email@example.com> wrote:
> > Something else is wrong then, because partition numbers start from 1 in
> > GRUB 2 - 0-based partition numbers no longer work. Is it possible that
> > there's a very old version of GRUB hanging around in a boot sector
> > somewhere?
> I'm pretty certain that there's not - AFAIK this was a pristine flash
> card. But that may have been my mistake, and (hd0, 1) would have
> worked. I logged into the freshly installed system and re-ran
> grub-mkdevicemap, grub-install /dev/sda and update-grub, which
> insmod part_msdos
> insmod ext2
> set root='(hd0,msdos1)'
> ...which works.
OK. Now, hd0 and hd1 names are not guaranteed to be consistent even
between different boots of the same device. The 'set root' command is
just supposed to be a last-ditch fallback. The thing that's actually
supposed to set root is a 'search' command later in grub.cfg, which
should be finding the root device by filesystem UUID. Can you look into
that? Did your original grub.cfg as installed contain an appropriate
search command? You should be able to run the search command by hand in
a rescue shell and see what it does.
> However, the "msdos" stuff worries me a bit. Now that I think about
> it, there could be another FAT16 formatted storage device attached
> somewhere (running FreeDOS).
"msdos" here refers to the partition table format in use, not to the
operating system. MS-DOS and FreeDOS share a partition table format.
> What's the easiest way to check what storage devices are available
> without mounting them?
You mean in GRUB? You can use the 'ls' command at the rescue shell.
Colin Watson [firstname.lastname@example.org]