[Top][All Lists]

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

Re: Again: 'error: no such disk'

From: Neal Murphy
Subject: Re: Again: 'error: no such disk'
Date: Mon, 5 Dec 2011 00:22:50 -0500
User-agent: KMail/1.13.5 (Linux/2.6.32-5-686-bigmem; KDE/4.4.5; i686; ; )

On Sunday 04 December 2011 23:31:31 Jordan Uggla wrote:
> On Mon, Nov 28, 2011 at 9:21 PM, Neal Murphy <address@hidden> 
> > But for the life of me, I *cannot* get grub2 to install on the hard
> > drive. No matter what I try (grub-install, do it manually, use separate
> > /boot partition, include /boot in the linux root FS), grub always yields
> > "error: no such disk", and 'ls' after that always yields "" (blank,
> > nothing). Grub2 simply refuses to install properly to the hard drive.
> > 
> > I can usually boot the ISO/flash, go to the grub command line, mutter the
> > relevant incantations, and boot the hard disk. I was even able, once, to
> > tell grub to use the grub.cfg on the hard drive and boot using the
> > target's menu.
> > 
> > It's close. I just cannot get grub to install properly to the hard drive.
> > What am I doing wrong? How can I debug it, trace what's really
> > happening, what's not right? What do I need to provide that you can look
> > over and say, 'Here, doofus, yer doin' *this* when you should be doin'
> > *that*."? What do I need to verify?
> What is the exact grub-install command you are running? Do you see any
> error messages from grub-install?

IIRC, it was 'grub-install --debug /dev/hda'. There are no error messages. The 
output is quite to debian squeeze's output. It was generating a block list, 
though; the sectors appeared to start at 2048. It was including biosdisk, ext2 
and part_gpt, as I think I should expect for a BIOS system. 

The nature of the bios_grub partition finally became apparent (after partition 
1's EXT3 starting getting corrupted) and I added partition 5 (bios_grub) at 
1Mib-2Mib and shifted partitions 1-4 by 2MiB. Now it looked like it was 
installing correctly including laying core.img down at the start of partition 
5. But still no joy. I rebuilt grub2, removing most options from configure. No 
joy. I tried v1.98. No joy. I tried including gobs of modules. No joy. No 
matter what I tried, grub would boot, complain 'no such disk' or some such (ls 
would always display no drives). There's no difference between KVM or iron.

> No. Grub does not assume that the first partition starts anywhere but
> where the partition table says it does. It does assume that the BIOS
> Boot Partition [1] is in the same location at boot as it was when
> grub-install was run, because there's no reliable way to avoid making
> such an assumption.

OK. 'Twas just a thought. What else could cause grub2 to find no drives on 
boot? To reiterate, the same compiled code made for a bootable ISO and--I 
think--a bootable MBR flash drive (I finally realized it was picking up the 
build host's grub2).

[Truth be told, I'd rather hand-build a static grub.cfg and use grub-probe, 
grub-mkimage and grub-setup directly because grub-install has the nasty habit 
of installing somewhere other than where I told it to. It's fine for an 
ordinary GNU/Linux distrib that might have a single boot partition, but it's 
annoying when installing 64-bit debian to a second drive and it overwrites the 
32-bit grub2 on the first drive, or when I'm converting the install ISO of my 
project to a bootable flash and it overwrites the host's installed grub. But 
even using those utilities directly didn't work. Grub2 just doesn't want to 
work with a GPT-partitioned drive on a BIOS system. In my case.]

Because I have to move forward, I've reverted to grub-legacy, applying 
Fedora's large patch. That'll let me use a single boot loader for the 
installer (either ISO or flash) and the runtime (hoping; I'm just getting to 
reverting that bit of code in the installer).

However, if you can come up with places to look and things to try, I'll be 
happy to keep a build tree handy. It should "Just Work" but, so far, I've had 
as much success as Mighty Casey in Mudville.


reply via email to

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