Post Grub

All Gurus once were Newbies
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. Please stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions prefer the other forums within the support section.
Before you post please read this

Post Grub

Postby RobbieGrey on Thu Jun 21, 2007 1:00 pm

Ive had to boot with the cd as I seem to have lost my Grub.
when I try to boot from the hard drive I just get 01 01 01 01 filling the screen.
is there any "simple" way to restore the grub to mbr (it must be a simple way please).
User avatar
RobbieGrey
Level 1
Level 1
 
Posts: 30
Joined: Wed Jun 13, 2007 6:43 am

Linux Mint is funded by ads and donations.
 

Postby scorp123 on Thu Jun 21, 2007 1:19 pm

Are your Linux partitions still intact? e.g. you get their icons on your live desktop?
User avatar
scorp123
Level 8
Level 8
 
Posts: 2287
Joined: Sat Dec 02, 2006 4:19 pm
Location: Switzerland

Postby RobbieGrey on Thu Jun 21, 2007 1:33 pm

scorp123 wrote:Are your Linux partitions still intact? e.g. you get their icons on your live desktop?


If I start up the computer with the live cd then go to Computer then the harddrive everything is still there For example the home directory and everything I've downloaded is still there ,mint just dosnt start when I start up the computer , it doesnt even come up with the words grub 1.5.
I hope I'm explaining it properly .
User avatar
RobbieGrey
Level 1
Level 1
 
Posts: 30
Joined: Wed Jun 13, 2007 6:43 am

Postby scorp123 on Thu Jun 21, 2007 1:58 pm

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:
User avatar
scorp123
Level 8
Level 8
 
Posts: 2287
Joined: Sat Dec 02, 2006 4:19 pm
Location: Switzerland

Postby RobbieGrey on Thu Jun 21, 2007 4:06 pm

scorp123 wrote: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:


Thank-you the Super Grub did the trick !
It appears that what I had done was load another distro on a 2nd hard drive, then I had removed it ,but it had installed something called lilo ? and this had messed things up.
User avatar
RobbieGrey
Level 1
Level 1
 
Posts: 30
Joined: Wed Jun 13, 2007 6:43 am

Postby scorp123 on Thu Jun 21, 2007 4:39 pm

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? :?
User avatar
scorp123
Level 8
Level 8
 
Posts: 2287
Joined: Sat Dec 02, 2006 4:19 pm
Location: Switzerland

Postby RobbieGrey on Fri Jun 22, 2007 4:05 am

scorp123 wrote:
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? :?


It was "Zenwalker" !
User avatar
RobbieGrey
Level 1
Level 1
 
Posts: 30
Joined: Wed Jun 13, 2007 6:43 am

Postby KrazyPenguin on Fri Jun 22, 2007 10:44 am

scorp123 wrote: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:


An easier way is to have an option on the livecd:

"Reinstall Grub"

Like some of the other distros have.

(Hint Hint Hint) ;-)

I hope Ubuntu adds this feature in Gutsy
:D
KrazyPenguin
Level 1
Level 1
 
Posts: 46
Joined: Thu Jun 14, 2007 9:59 pm

Postby Husse on Sat Jun 23, 2007 5:03 pm

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.
Image
Don't fix it if it ain't broken, don't break it if you can't fix it
Husse
Level 21
Level 21
 
Posts: 19703
Joined: Sun Feb 11, 2007 7:22 am
Location: Near Borås Sweden

Linux Mint is funded by ads and donations.
 

Return to Newbie Questions

Who is online

Users browsing this forum: Google Adsense [Bot] and 37 guests