LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Password
Debian This forum is for the discussion of Debian Linux.

Notices


Reply
  Search this Thread
Old 12-04-2011, 06:53 PM   #16
Hungry ghost
Senior Member
 
Registered: Dec 2004
Posts: 1,222

Rep: Reputation: 667Reputation: 667Reputation: 667Reputation: 667Reputation: 667Reputation: 667

Quote:
Originally Posted by widget View Post
It appears that you have a mixed up MBR thinking that you are using grub-legacy while attempting to use the menu from grub-pc.
That's the impression I have, as well.

Anyway, try the following, not sure if it will work, but it won't harm. Boot a live cd, -it has to be a new one that uses grub2-, and execute the these commands logged in as root:

Code:
mkdir /mnt/debian
mount /dev/sda6 /mnt/debian
grub-install --root-directory=/mnt/debian --recheck /dev/sda
(More info about how to reinstall grub2 here). I will keep investigating about this issue, too.

Regards.
 
Old 12-04-2011, 07:11 PM   #17
widget
Senior Member
 
Registered: Oct 2008
Location: S.E. Montana
Distribution: Debian Testing, Stable, Sid and Manjaro, Mageia 3, LMDE
Posts: 2,628

Rep: Reputation: 497Reputation: 497Reputation: 497Reputation: 497Reputation: 497
I have been studying and find the this very confusing.

One problem is that I have never seen the boot info script come up with errors.

How about trying it again but use this link to get the script. It may be the same, I did not check the one you used but the authors ask that folks be directed to this page.
http://bootinfoscript.sourceforge.net/

One problem is that you have grub-legacy installed on an OS using a kernel that was put out long after support for grub-legacy ended. I do not think this is the direct cause of your troubles but when you get back into that install I would install grub-pc on it.

It could be that the lack of info from that install was due to the boot info script errors. Lets try it again and see if it works better with the link above.
 
Old 12-04-2011, 07:17 PM   #18
sdfi
Member
 
Registered: Oct 2011
Distribution: debian
Posts: 107

Original Poster
Rep: Reputation: Disabled
How can i tell if the version of grub on the liveCD is grub2 or grub-legacy? is it 'grub -v' or something?? [liveCD is puppy4, i'd rather not burn another CD if i don't have to]
 
Old 12-04-2011, 07:25 PM   #19
widget
Senior Member
 
Registered: Oct 2008
Location: S.E. Montana
Distribution: Debian Testing, Stable, Sid and Manjaro, Mageia 3, LMDE
Posts: 2,628

Rep: Reputation: 497Reputation: 497Reputation: 497Reputation: 497Reputation: 497
Code:
grub-install -v
is what you are looking for.

There is no need to burn a new CD if it is grub-legacy.

You need to check the repo for grub-pc. If it is there all you do is, as root;
apt-get purge grub grub-common

and then

apt-get install grub-pc grub-common

That will put the correct command knowledge on your ram, will in no way effect the CD itself. When you reboot it will be gone.

CD/DVD RW is your friend. That or a usb stick (I know nothing about them as I do not have one but they seem to be the cats meow).
 
Old 12-04-2011, 07:32 PM   #20
sdfi
Member
 
Registered: Oct 2011
Distribution: debian
Posts: 107

Original Poster
Rep: Reputation: Disabled
Right.. so both voyage's version and puppy 4's version of grub was 0.97.. ie legacy. [sidenote: it really would have been nice for the debian installer to have figured this out.. also WTF is up with seemingly no WPA support??]

I have no wifi with the LiveCD so i'll go try plugging in and see what i can do..

[its 2011, you should really get yourself a USB drive! ]
 
Old 12-04-2011, 07:49 PM   #21
widget
Senior Member
 
Registered: Oct 2008
Location: S.E. Montana
Distribution: Debian Testing, Stable, Sid and Manjaro, Mageia 3, LMDE
Posts: 2,628

Rep: Reputation: 497Reputation: 497Reputation: 497Reputation: 497Reputation: 497
Quote:
Originally Posted by sdfi View Post
Right.. so both voyage's version and puppy 4's version of grub was 0.97.. ie legacy. [sidenote: it really would have been nice for the debian installer to have figured this out.. also WTF is up with seemingly no WPA support??]

I have no wifi with the LiveCD so i'll go try plugging in and see what i can do..

[its 2011, you should really get yourself a USB drive! ]
I have a usb drive. Dual 320GB WB SATA2 pc type internal drives in an external enclosure.

You are right though, I really should have one of the sticks. Next time I am in some damned town that sells them at a decent price I will get one. Here (population 500) they are do much for me.
 
Old 12-04-2011, 07:54 PM   #22
sdfi
Member
 
Registered: Oct 2011
Distribution: debian
Posts: 107

Original Poster
Rep: Reputation: Disabled
Go on to ebay, i guarantee you'd get a low-ish capacity one for <$2, sent to your door! ..unless you're not a fan of ebay.

ANYWAY; i've ran the grub2 install command, and it has come back at me
Code:
The following command line was extrated from /etc/default/grub or the 'kopt' peram in GRUB Leg's menu.1st Please verify that it is correct and modify it if necessary.
L Command line:
[blank]
just hit OK? [edit: DONE]

Last edited by sdfi; 12-04-2011 at 08:06 PM.
 
Old 12-04-2011, 08:21 PM   #23
sdfi
Member
 
Registered: Oct 2011
Distribution: debian
Posts: 107

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by odiseo77 View Post
try the following
Code:
mkdir /mnt/debian
mount /dev/sda6 /mnt/debian
grub-install --root-directory=/mnt/debian --recheck /dev/sda
Done, no change. NB: /dev/hda5 (no idea why it went from s to h.. i never got that-- but 6 is the swap partition and it wouldn't let me use that. Also, it complained about post mbr gap again.
 
Old 12-05-2011, 01:06 AM   #24
widget
Senior Member
 
Registered: Oct 2008
Location: S.E. Montana
Distribution: Debian Testing, Stable, Sid and Manjaro, Mageia 3, LMDE
Posts: 2,628

Rep: Reputation: 497Reputation: 497Reputation: 497Reputation: 497Reputation: 497
Quote:
Originally Posted by sdfi View Post
Done, no change. NB: /dev/hda5 (no idea why it went from s to h.. i never got that-- but 6 is the swap partition and it wouldn't let me use that. Also, it complained about post mbr gap again.
Sorry for the delay. Had to go to the bar. Yes that does sound weird. This town is the county seat. Biggest town in the county. 500 population. Wife is off tonight but is one of the main bartenders. What does this have to do with me? Would take to long to explain.

Grub-pc has no menu.list. Does not exist. Will never be found.

Does have a /boot/grub/grub.cfg that serves a similar role. It is not editable, not true. Makes no sense to edit it as it is over written every time "update-grub is run.

Do you know how to do a full chroot to your system, preferably the Squeeze install?

The reason I ask is that I have no idea how to deal with Voyage. It is using an obsolete version of grub (one I dearly loved) but will not deal with modern OS's well).

What needs done is to remove grub-pc and grub-commmon from that install. This is not because it is bad. It is to make sure that everything knows it is there. Then it needs to be reinstalled.

As root;
Code:
ap-get install grub-pc grub-common
This will give you the conditions like a new install of Debian Squeeze. Hopefully it works this time.
 
Old 12-05-2011, 12:39 PM   #25
sdfi
Member
 
Registered: Oct 2011
Distribution: debian
Posts: 107

Original Poster
Rep: Reputation: Disabled
urgh this is driving me mad.
I chrooted into debain (like below)
Code:
mkdir /debian
mount /dev/hda5 /debian
chroot /debian
I uninstalled grub with 'apt purge grub grub-common'.
The damn thing was asking for my debian CD for sources, but the CD drive would not open. I changed the sources to use online... and 'apt-get install grub-pc grub-common' returns 'unable to locate package grub-pc', same for grub-common! (although apt-get update works fine)!. urgh. I have figured how to force the CD drive open (there is no eject command found) and now of course i've deleted the line with the CD repo on it and i don't know how to add it back in!

Last edited by sdfi; 12-05-2011 at 12:41 PM.
 
Old 12-05-2011, 03:39 PM   #26
62chevy
Member
 
Registered: Mar 2002
Location: West (By God) Virginia
Distribution: Debian Squeeze - Sid
Posts: 281

Rep: Reputation: 45
Quote:
Originally Posted by sdfi View Post
urgh this is driving me mad.
I chrooted into debain (like below)
Code:
mkdir /debian
mount /dev/hda5 /debian
chroot /debian
I uninstalled grub with 'apt purge grub grub-common'.
The damn thing was asking for my debian CD for sources, but the CD drive would not open. I changed the sources to use online... and 'apt-get install grub-pc grub-common' returns 'unable to locate package grub-pc', same for grub-common! (although apt-get update works fine)!. urgh. I have figured how to force the CD drive open (there is no eject command found) and now of course i've deleted the line with the CD repo on it and i don't know how to add it back in!

I think the easiest thing to do is use the Debian installer to install grub again.

Boot the CD or USB stick the use the Advance options>Rescue mode enter your keyboard hostname and other info then select the partition your Debian is on then 'Reinstall the Grub Boot Loader '. That should do every thing for you. When done select reboot and you should be in your new Debian install.

It may or may not detect your other Linux install but it should see Window$ XP just fine.
 
Old 12-05-2011, 03:40 PM   #27
Hungry ghost
Senior Member
 
Registered: Dec 2004
Posts: 1,222

Rep: Reputation: 667Reputation: 667Reputation: 667Reputation: 667Reputation: 667Reputation: 667
Well, what I would do to get away of this situation fast would be to download supergrub and a) dd it to a floppy or b) install it into a usb stick. If you have a floppy drive, you can try downloading it from here, then simply execute:

Code:
dd if=/path/to/super_grub_disk_hybrid-1.98s1.iso of=/dev/fd0
(Then boot it and select to display the installed OSs).

For b), check this: http://www.supergrubdisk.org/wiki/SGD_Howto_make

I tried the first method and it let me boot Debian from the floppy drive (yes, I still have one ).

The idea is that you can boot Debian and then try to reinstall grub from there.

EDIT: You can also try the suggestion by 62chevy above and see if it works for you.

Cheers.

Last edited by Hungry ghost; 12-05-2011 at 03:47 PM.
 
Old 12-05-2011, 04:47 PM   #28
widget
Senior Member
 
Registered: Oct 2008
Location: S.E. Montana
Distribution: Debian Testing, Stable, Sid and Manjaro, Mageia 3, LMDE
Posts: 2,628

Rep: Reputation: 497Reputation: 497Reputation: 497Reputation: 497Reputation: 497
I think using the installation disk is the way to go.

Assuming that gets the job done, you had better be checking your /etc/apt/sources.list. Sounds like there could be a problem there.
 
Old 12-07-2011, 05:31 PM   #29
sdfi
Member
 
Registered: Oct 2011
Distribution: debian
Posts: 107

Original Poster
Rep: Reputation: Disabled
There is no 'Reinstall the Grub Boot Loader' option under Advance options>Rescue mode on the install CD. The options are 'execute a shell in [root fs location]' 'execute a shell in installer location', change root fs, and reboot.

widget; like i said, i removed the CD from sources.list. (It has the normal online sources, and they 'hit' fine when running apt-get update.) How do i put the install CD back in sources.list?
 
Old 12-08-2011, 11:34 AM   #30
widget
Senior Member
 
Registered: Oct 2008
Location: S.E. Montana
Distribution: Debian Testing, Stable, Sid and Manjaro, Mageia 3, LMDE
Posts: 2,628

Rep: Reputation: 497Reputation: 497Reputation: 497Reputation: 497Reputation: 497
I don't know how you removed it. If you deleted the lines they need put back in.

If you commented them out (easier to do and restore) just uncomment them.

As it was a default install this may not work but you could try chrooting in again and trying;
Code:
apt-get install --reinstall grub-pc grub-common
if the .debs are in your cache that should work. I am pretty sure they are not.

I use this script when chrooting. It works for partitions that are labeled which at least your Debian partition seems to be.
Code:
#!/bin/sh

echo "Debian"

mkdir /mnt/debian-root
mount /dev/sda5 /mnt/debian-root/
mount -o bind /proc /mnt/debian-root/proc
mount -o bind /dev /mnt/debian-root/dev
mount -o bind /dev/pts /mnt/debian-root/dev/pts
mount -o bind /sys /mnt/debian-root/sys
cp /etc/resolv.conf /mnt/debian-root/etc/resolve.conf
chroot /mnt/debian-root /bin/bash
this should give you full access. I believe this will work as is for you but if not check for typos and change the "sda" to "hda". I think that the "sda" will work.

Just copy this to the desktop of your Live Session, check the permission to make sure it is set to be executed as a program and double click on it. At least with the gnome terminal this will give you some options, just click on the one to run the bugger from terminal.

Run;
Code:
apt-get update
to make sure you have a good connection. Assuming that is good install the 2 packages.

This should install that grub on the MBR. This should get you into your Debian install.

Any further work to get grub working right should be done from there as it is more effective than doing it remotely.
 
  


Reply

Tags
grub, install, mbr



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] cannot install grub (grub-probe says 'unknown fs' with ext4 and md raid) cusco Linux - Software 3 03-15-2011 01:58 AM
Grub - Does fedora automatically install a bootloader like grub? or... mitchell7man Linux - Software 10 05-09-2007 10:49 AM
Booting my new ubuntu install = "GRUB GRUB GRUB GRUB GRUB" etc. dissolved soul Ubuntu 2 01-13-2007 12:55 PM
Need to (re)install GRUB: fedora c4 rescue cd (and GRUB) unable to see the harddisk whencat Fedora 4 03-05-2006 02:01 PM
Grub 0.97 issues on slackware - grub-install is very slow, & updating menu.lst fails dieyouspammer Linux - Software 1 02-27-2006 01:06 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian

All times are GMT -5. The time now is 12:30 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration