D&C GLug - Home Page

[ Date Index ] [ Thread Index ] [ <= Previous by date / thread ] [ Next by date / thread => ]

Re: [LUG] Unable to Install Grub Fatal error

 

On 03/01/14 20:39, Richard Brown wrote:
> Hi Guys
> 
> Well the saga of the HP continues. Just to update everyone. Thankfully
> with Bad Apple's (what is his name?) help I worked out that the
> problem was the usb stick. I bought a new one, loaded Debian on and
> booted. 1 hour later I was ready to install Grub and then I had 3
> messages which I took a picture of and have uploaded. Here are the
> images:
> 
> <http://wild-woods.org.uk/blog/musings/grub-failure/>
> 
> The key message says unable to install Grub in dev/sda. This is a
> fatal error. The next message says, No boot loader has been installed.
> You will need to boot manually with the /vmlinux kernel on partition
> /dev/sdd1 and root=/dev/sdd1 passed as a kernel argument.
> 
> What the heck? Can anybody help please? Thanks
> 
> ---
> Richard Brown
> Youth Worker, Dad and Husband
> http://wild-woods.org.uk/
> 


Bad Apple is my name Chief! Or Mr Meowski, as you prefer. Most people on
the list probably know me by now as "the annoying one", which also works
fine.

Glad you found out about the stick - I had exactly the same issue
helping out an otherwise highly competent friend the other day. A couple
of bad sectors in the wrong place (i.e., the boot region) made the stick
subtly fail in hard to notice ways. Swapping it for another made the
problem go away.

You've just run into Debian's most annoying bug: if you install via USB,
it will mount the install stick as /dev/sda which it will then try and
install grub on near the end of the install. Brilliant.

The *best* way to fix this is to break out of the installer and grab a
shell and install grub manually before reboot. The *easiest* way to fix
this is to boot a live distro of any kind that has grub included:
reformatting your USB stick to Ubuntu/Mint/GRML or whatever you prefer
will do. Boot to the stage where you can grab a shell, and check where
your freshly installed but unbootable Debian system is:

sudo fdisk -l

Your OS disk is probably going to be /dev/sda, but check carefully. I
know the rest of your system is blank anyway, but all the same make sure
it's not on /dev/sdd or something instead. Once you know which disk it's
on, read this and follow the instructions:

http://howtoubuntu.org/how-to-repair-restore-reinstall-grub-2-with-a-ubuntu-live-cd

It seems like a pain in the arse, but it's quite simple really. You do
bind mounts on your OS, chroot and install grub. I don't know why Debian
still has this irritating bug of insisting on blindly installing grub to
/dev/sda and won't even give you the option of attempting to reinstall
grub on a different partition when it fails. Stupid stupid.

Say if you have any issues.

Regards

-- 
The Mailing List for the Devon & Cornwall LUG
http://mailman.dclug.org.uk/listinfo/list
FAQ: http://www.dcglug.org.uk/listfaq