• If you are citizen of an European Union member nation, you may not use this service unless you are at least 16 years old.

  • You already know Dokkio is an AI-powered assistant to organize & manage your digital files & messages. Very soon, Dokkio will support Outlook as well as One Drive. Check it out today!


Restore GRUB to a non-booting system

Page history last edited by Paul G. Taylor 15 years, 8 months ago

Restore GRUB to a non-booting system. A mini How-to


Monday September 17, 2007


Well I can report success of a kind with GRUB.



For the last couple of weeks I have been unable to boot anything off my hard drive, and have been surviving with a LiveCD Linux running - mainly PCLinuxOS - and last night all the stuff I have been reading about GRUB finally clicked into place and I was able to boot back into my original OS - Linspire 5.0.59 - which I am now using.



All I had to do was run GRUB in a Konsole window and do this : --


Open a Konsole window and type 'grub'


[code]paul@PAULS:~$ grub

Probing devices to guess BIOS drives. This may take a long time.




The Konsole window shows the above, temporarily, then it brings up GRUB in something like a CLI, like this : --




 [ Minimal BASH-like line editing is supported.  For the first word, TAB

   lists possible command completions.  Anywhere else TAB lists the possible

   completions of a device/filename. ]





I then typed in the 'find' command with the full path/file-name that I wish to locate. This tells me which partitions are bootable with GRUB.

Since I had my GRUB boot-floppy in the drive, it found that as the first option, then four partitions with Linux installations.



[code]grub> find /boot/grub/menu.lst










Then, since the installation I wished to run is hda6 or (hd0,5) in GRUB notation, I set this as the root partition. I typed : --




grub> root (hd0,5)

Filesystem type is reiserfs, partition type 0x83




Then I ran the GRUB setup, to write to the MBR on that drive.




grub> setup (hd0)

Checking if "/boot/grub/stage1" exists... yes

Checking if "/boot/grub/stage2" exists... yes

Checking if "/boot/grub/reiserfs_stage1_5" exists... yes

Running "embed /boot/grub/reiserfs_stage1_5 (hd0)"... 18 sectors are embedded



Running "install /boot/grub/stage1 (hd0) (hd0)1+18 p (hd0,5)/boot/grub/stage2

/boot/grub/menu.lst"... succeeded





To exit from GRUB, back into the normal Konsole window, type 'quit'. With this result : --


[code]paul@PAULS:~$ grub

Probing devices to guess BIOS drives. This may take a long time.





That is my Konsole session, now complete. The 'Probing devices to guess BIOS drives' did not take long at all. Just a few seconds.



I then rebooted and was able to choose this installation and run it.


Now all I have to do is edit the menu.lst with the info. for the other installations and I should be sweet.



Comments (0)

You don't have permission to comment on this page.