LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Reply
 
Search this Thread
Old 01-23-2009, 01:38 PM   #1
kyrand0047
LQ Newbie
 
Registered: Jan 2009
Posts: 6

Rep: Reputation: 0
altered partition table, Grub2 will not load, how-to chroot?


I have a multiple linux setup. it worked well, but after change of partition table grub2 will not load. (cannot read partition table) am trying to chroot back in to do an os-probe in order to update-grub.

original os: debian/lenny on sda11 (which was sda14 before partition table change... I feel like a right monkey)

currently running ubuntu 8.10 live cd. all is amd64.

the live cd does os-probe correctely (after grub2 install).

however, i am able to chroot into sda11 (which seems to mount okay - possibly ext2 instead of ex3) but i can't use os-prober: error message is "cannot find list of partitions!"

any help is apreciated!


my immediate thoughts are: could I just edit some config files so that sda14 is changed to sda11? or.... possibly that would be all that is required to get the system rebooting?
 
Old 01-23-2009, 02:06 PM   #2
ajlewis2
Member
 
Registered: Nov 2003
Distribution: Ubuntu
Posts: 217

Rep: Reputation: 46
You probably can boot using grub command line.
http://linuxbasics.org/tutorials/adv...b_command_line

Once you are booted into lenny, you can then you can run 'update-grub' from the command line and then 'grub-install'. That should rewrite a proper menu.lst and then install grub again into the mbr. Normally I would not reinstall it in the mbr, but since you have actually rewritten the partition table, it might be a good idea.
 
Old 01-23-2009, 02:15 PM   #3
kyrand0047
LQ Newbie
 
Registered: Jan 2009
Posts: 6

Original Poster
Rep: Reputation: 0
ahhh yes, if it was grub legacy....

I had a look at your link, an none of the commands seems to work. hence the tag grub_2_.

Actually i am thinking of some way of rewriting the mbr with grub legacy in order to boot the system. but as of yet i am unsure....

by-the-by the link was great, much that i didn't know about grub!

but if i'm completely off the mark (though the commands in the linked tutorial does not work on my

grub rescue>

from grub2) do tell me...

the only commands that are available in grub rescue are, according to its help:
boot
cat
dump
exit
help
insmod
ls
lsmod
rmmod
root
set
unset

other than that, no commands seems to be accepted

Last edited by kyrand0047; 01-23-2009 at 02:20 PM. Reason: update on grub rescue commands
 
Old 01-23-2009, 02:57 PM   #4
ajlewis2
Member
 
Registered: Nov 2003
Distribution: Ubuntu
Posts: 217

Rep: Reputation: 46
Quote:
Originally Posted by kyrand0047 View Post

however, i am able to chroot into sda11 (which seems to mount okay - possibly ext2 instead of ex3) but i can't use os-prober: error message is "cannot find list of partitions!"
Since you are able to chroot into sda11, then you could run the update-grub and grub-install from there.

I don't know os-prober. Is that found on your lenny install as well as the live cd? I ask, because you said you ran it while chroot on the lenny system.

You may also run into the problem of /etc/fstab in lenny having the wrong partition number listed for / and possibly other partitions if you have them mounted at boot. You'll want to edit that as well.

You may want to use a grub disk: http://www.supergrubdisk.org/index.php?pid=6 I have seen them in other places, but found this just now in google. That way I think you will have all the commands available.
 
Old 01-23-2009, 04:31 PM   #5
kyrand0047
LQ Newbie
 
Registered: Jan 2009
Posts: 6

Original Poster
Rep: Reputation: 0
I think, again, that there are important differences between grub legacy (0.96) and grub2 (1.96). your links provide nice info, but after trying them out there is no response.

am currently trying to install a new version of lenny on a spare partition to see if I can overwrite the mbr that way..

but to follow up: the relevant grub commands work on the live cd, however, I don't seem to be able to find the right directories to bind in order for the commands to work on sda11 -- I keep getting the reply "cannot read partitions"

_anyways_: am currently installing a new version of debian on sda8 in order to see if I can fix the problem from that angle. However, I am still very much interested in suggestions as to how I should get out of the, perhaps, badly described predicament
 
Old 01-23-2009, 04:43 PM   #6
ajlewis2
Member
 
Registered: Nov 2003
Distribution: Ubuntu
Posts: 217

Rep: Reputation: 46
I thought that if you make a grub disk from that site, it would be legacy grub and the commands would work to allow you to boot. I'm wondering why it would not. I do understand what you mean about not being able to use the commands on grub2. I have not used the grub commandline with grub2 as far as I know.

I have used a grub floppy to boot Linux on a system that would not load grub, however. But your idea of installing debian on another partition should fix it. Good idea.
 
Old 01-23-2009, 04:58 PM   #7
kyrand0047
LQ Newbie
 
Registered: Jan 2009
Posts: 6

Original Poster
Rep: Reputation: 0
thanks for your "emotional support",

I'm no grub-wiz but all I know is that the grub-commands that I listed are the only ones that I can use. AND, they don't seem to do the job, at least not according to your links (they always seem to use some grub(-legacy?) commands that doesn't work for me.

but as I said, and thanks for supporting the idea, installing lenny on another partition - I hope - will work.

keep you posted

still.... if anyone has a grub2 "grub rescue"-related idea, that's going to be very much appreciated since i am thinking to migrate to grub2 on a prety much permanent basis. (grub-invaders is just toooooo niiice lol)
 
Old 01-23-2009, 05:14 PM   #8
kyrand0047
LQ Newbie
 
Registered: Jan 2009
Posts: 6

Original Poster
Rep: Reputation: 0
big ouch!!!!

apperently did the mistake of installing grub2 via the lenny-installer. this ended up giving me the error: " you need to load the kernel first" on all the correctly detected drives/kernels. strange.... I'm giving up for the night.... But, will report back later (most likely after a re-install odf lenny on sda8 but this tim using grub-legay instead of grub2)

thanks for now ajlewis2....
 
Old 01-25-2009, 06:55 AM   #9
kyrand0047
LQ Newbie
 
Registered: Jan 2009
Posts: 6

Original Poster
Rep: Reputation: 0
Ok, have decided drastic measures.... although im able to boot most of my partitions, the partition table is giving me troubles. So, as the machine is not absolutely essential for me I am going to scrap it and start from scratch.

(if nothing, I have learned that messing about with logical partitions and their numbering can really screw things up )
 
Old 01-25-2009, 07:09 AM   #10
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 12,271

Rep: Reputation: 1028Reputation: 1028Reputation: 1028Reputation: 1028Reputation: 1028Reputation: 1028Reputation: 1028Reputation: 1028
Is grub2 now considered stable ?.
I haven't allowed it on any of my systems yet - must have a look at it on a stand-alone test system one day.
 
Old 01-25-2009, 09:01 AM   #11
ajlewis2
Member
 
Registered: Nov 2003
Distribution: Ubuntu
Posts: 217

Rep: Reputation: 46
Quote:
Originally Posted by kyrand0047 View Post
(if nothing, I have learned that messing about with logical partitions and their numbering can really screw things up )
You are not the first to find this out. I remember fondly my own first and last experience doing the same thing. :-) I'm glad you do not have a big data loss, etc.
 
Old 02-25-2011, 04:57 PM   #12
jwyllie83
LQ Newbie
 
Registered: Feb 2011
Posts: 1

Rep: Reputation: 0
Fixed

In case anyone stumbles on this and needs an answer, I figured out the problem.

This error message is in os-prober, called from update-grub. It triggers if /sys/block is missing, which it is if you forget to mount /sys in your chroot'd environment.

Type the following, outside of the chroot environment:

mount -o bind /sys /path/to/chroot/sys

and you're good to go.
 
  


Reply

Tags
grub2


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
"No partition table or unknown signature on partition table" 10.1 install madcow007 Slackware 4 02-09-2009 11:04 AM
openSolaris hosed the partition table. Why? Changing primary to secondary partition? JZL240I-U Solaris / OpenSolaris 9 10-16-2008 10:48 AM
need bigger swap partition but missing a valid partition table compused Linux - Hardware 3 07-02-2008 08:46 AM
Stuck at Grub2 prompt after deleting Linux partition of dual boot alcorta Linux - Software 3 07-08-2005 11:12 PM
Slack 10: S-ATA = "No partition table or unknown signature on partition table"? dissolved soul Slackware - Installation 11 08-05-2004 02:12 PM


All times are GMT -5. The time now is 01:15 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration