Post Grub

Quick to answer questions about finding your way around Linux Mint as a new user.
Forum rules
There are no such things as "stupid" questions. However if you think your question is a bit stupid, then this is the right place for you to post it. Stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions use the other forums in the support section.
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
scorp123
Level 8
Level 8
Posts: 2272
Joined: Sat Dec 02, 2006 4:19 pm
Location: Switzerland

Post by scorp123 »

Are your Linux partitions still intact? e.g. you get their icons on your live desktop?
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
scorp123
Level 8
Level 8
Posts: 2272
Joined: Sat Dec 02, 2006 4:19 pm
Location: Switzerland

Post by scorp123 »

How did you achieve that so that GRUB won't boot anymore?? :?

I guess the easiest way for you is to use something like the Super Grub Disk .... I don't know the link by heart, so Google is your friend. :wink:
scorp123
Level 8
Level 8
Posts: 2272
Joined: Sat Dec 02, 2006 4:19 pm
Location: Switzerland

Post by scorp123 »

RobbieGrey wrote: but it had installed something called lilo ? and this had messed things up.
LILO = Linux Loader ... that's another boot manager. Obviously you can't have LILO and GRUB both sitting on your harddisk's master boot record .... The sad thing here is that this other distro you installed should have noticed the presence of GRUB and warned you against installing LILO ... :? What distro was it? What did you try out? :?
Husse

Post by Husse »

You could also have repaired grub from the live CD following this tutorial I found somewhere and have used several times. At least I suppose it will fix things even if grub is so beaten as in your case.
Note that the sudo does not have a password on the live cd, just hit enter
The following should be edited a bit but Id on't have the time
Re-install Grub with Live CD,
This method is also the best method to use from a hard disk installed operating system.
It can be done from a grub floppy disk too, or from grub's Command Line Interface or just about anywhere there is already a grub installation present with the necessary Grub files.

You can use this to install Grub to anywhere too, it doesn't have to be only to the MBR of a first hard disk. Grub can be installed to any other hard disk, or to a usbdisk, or floppy disk this way.

The most common use for this operation is to fix your MBR after a Windows re-install has corrupted your MBR with the IPL for the Windows bootloader, so you can only boot Windows.

herman@red~:$ sudo grub

GNU GRUB version 0.97 (640K lower / 3072K upper memory)

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

grub>_
I typed 'sudo grub' and pressed 'Enter'.
In Ubuntu, it is important to use the 'sudo' preface to the 'grub' command. If not, you will get what appears to be a grub shell, but you won't be able to do very much with it. You will probably get some confusing error messages.

This is an example of one use of a grub shell. I know this is a Grub shell, because it has a grub prompt, like this, 'grub>_'

grub> find /boot/grub/stage1
(hd0,1)
(hd0,3)

Here, I typed 'find /boot/grub/stage1' because I want to find out which partitions in my computer have Grub installed in them, (just to remind me).
This gives me a clue as to exactly where the necessary Grub files may be located that I can install grub from.

grub> root (hd0,1)
Filesystem type is ext2fs, partition type 0x83

The 'root (hd0,1) will tell grub which operating system partition contains the grub I want to install from.
It has to be one of the ones listed by the 'find' command (above).

The Grub menu from the operating system's /boot/grub/menu.lst that I installed grub from is the one that will appear on boot up.
In other words, if (hd0,1) contians Ubuntu, and I install grub from (hd0,1), I'll get Ubuntu's Grub menu on boot up.
If (hd0,3) contians Kubuntu, and I install grub from (hd0,3), I'll get Kubuntu's Grub menu on boot up.

Grub should recognize the filesystem, and will reply with an output similar to the one shown above. If not, then check to make sure you didn't make a mistake.


grub> setup (hd0)
Checking if "/boot/grub/stage1" exists... yes
Checking if "/boot/grub/stage2" exists... yes
Checking if "/boot/grub/e2fs_stage1_5" exists... yes
Running "embed /boot/grub/e2fs_stage1_5 (hd0)"... 15 sectors are embedded.
succeeded
Running "install /boot/grub/stage1 d (hd0) (hd0)1+15 p (hd0,1)/boot/grub/stage
2 /boot/grub/menu.lst"... succeeded
Done.

The 'setup' command is the command that tells Grub exactly where to install Grub to.

Installing Grub to MBR:
'setup (hd0)' is the command to install Grub's stage1 to MBR.
Stage1_5 will also be installed to the 15 sectors following the MBR in the first track of the hard disk.

grub> quit
May not work - error 27 unknown command
Reset button or if in a gnome/KDE terminal probably just close it.
Locked

Return to “Beginner Questions”