[Top][All Lists]

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

Re: Again: 'error: no such disk'

From: Jordan Uggla
Subject: Re: Again: 'error: no such disk'
Date: Sun, 4 Dec 2011 23:01:13 -0800

On Sun, Dec 4, 2011 at 9:22 PM, Neal Murphy <address@hidden> wrote:
> On Sunday 04 December 2011 23:31:31 Jordan Uggla wrote:
>> On Mon, Nov 28, 2011 at 9:21 PM, Neal Murphy <address@hidden>
> wrote:
>> > 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

"IIRC" is not very useful when you're asking for support. I don't want
to spend my time trying to debug a problem only to find out that you
remembered something incorrectly. Please run "grub-install /dev/hda"
(without --debug), save the exact output, try booting again, and
report success or failure.

> 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.

Grub2 is very versatile and reliable. Chances are if you're trying to
"work around" a problem you're doing something wrong.

>> 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

I think what might be confusing you is that when no --boot-directory
option is specified, it defaults to "/boot/". So "grub-install
/dev/hda" is identical to "grub-install --boot-directory=/boot/
/dev/hda". If you want grub-install to install grub's modules in
/mnt/boot/grub/ then you would use --boot-directory=/mnt/boot. You
almost certainly do not want to use grub-mkimage and grub-setup

Jordan Uggla (Jordan_U on

reply via email to

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