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

Re: grub: not found or no block device



On Fri, Jan 19, 2007 at 11:51:37PM +0100, Bernd Kloss wrote:
> Hello,
> 
> Etch installed on a computer with scsii-hd and transferred to a similar computer with ide-hd.
> Both: first partition primary/bootable and 1 extended partition with 1 logical drive: swap
> 
> device.map, menu.lst and fstab adapted: hda instead of sda
> 
> Booting with rescue-system, mounting /dev/hda1 on /mnt
> chroot /mnt
> grub-install /dev/hda(1)
> 
> hda(1) = hda or hda1 
> 
> =>
> /dev/hda(1) not found or no block device
> 
> Also tried:
> grub-install --recheck /dev/hda(1) => still the same 

okay, I just went through this nightmare (more details to follow in a
later post). Unfortunately, I didn't take good detailed notes on what
I did... but the best option is...

*outside* the chroot

grub-install /dev/hda 

will install the boot loader to the MBR

you could also use the grub shell

grub> root (hd0,0)
grub> setup (hd0)

might work.

in my recent adventure with this, the menu did not work properly and I
had to boot from the grub command line the first time in. Then I was
able to grub-install and update-grub and reboot to the usual grub menu.

other things to note that I have learned:

if you are booting with an initrd then you need to rebuild that
initrd.img file to that the kernel can find the root device. If you
are using an initrd that was built on a scsi system, then it will look
for sda1 to mount / after the initrd loads, but won't find it and the
kernel will panic. 

this has to been done from the chroot. you'll have to mount proc and
you may have to rig up a dev and sys as well, depending on your initrd
builder (mkinitrd, yaird, whatever). I just moved the current initrd
out of the way and built a new one inside the chroot. its a little
finicky and you may have to fix the ROOT= param or the MOUNTDEV param
in your initrd configuration. 

hth.

A

Attachment: signature.asc
Description: Digital signature


Reply to: