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

Re: Fixing a Grub Foul-up Solved!



David <bouncingcats@gmail.com> writes:
> Your lack of success is because the the command you used has designed
> behaviour to install the grub bootloader to the boot sector of
> /dev/sdd, and also install the grub files you listed into the current
> system /boot/grub (which was not on sdd at the time). That is the
> reason why you see those files on /dev/sda1, because it was the boot
> partition at the time you ran the command.

Aha!! that makes perfect sense now that I think a bit.
> 
> If you want a grub-install command that writes /boot/grub files
> somewhere onto /dev/sdd then you will first have to mount the desired
> target boot partiton of /dev/sdd on some mountpoint that you choose,
> and then run a command something like this:
>   sudo grub-install
> --boot-directory=/some/mountpoint/where/is/the/sdd/boot /dev/sdd

	I tried it and by Joe, it wrote to the correct drive so I
don't feel quite so paranoid about using grub.

	Interestingly, I goofed again and grub ended up in what
is the / directory instead of /boot/grub so it still didn't work
but I knew immediately that the new grub was working because
there was no error message about symbols not found, etc. 

	I mounted the drive back on the good system and simply
removed the grub from the top of the tree and then did the
grub-install command again but thihs time, I installed to
/mnt/boot.

	It wrote to /boot/grub as it should have and the system
came right up.

	There was a minor glitch when I powered the box up as the
keyboard reported a stuck condition and advised me to press F1 to
continue.  I thought this was a bit amusing since the keyboard
appeared to be malfunctioning but F1 did the trick and about a
tenth of a second later, I heard the beep that grub plays when
the kernel is about to fire off.

	In short, the faulty grub that made it onto the system
was all that was really wrong.

	Thanks to a lot of you, I appreciate grub more as this
has been quite a little mini course in what it does.

Martin


Reply to: