LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices



Reply
 
Search this Thread
Old 03-14-2007, 05:11 PM   #1
ceeleelewis
LQ Newbie
 
Registered: Aug 2003
Distribution: RHT 8.0 & Mandrake 9.1
Posts: 10

Rep: Reputation: 0
Editing /boot/grub menu.lst OpenSUSE 10.2


Ok, without sounding like a complete idiot here. I'll try my best to be as descriptive as possible.
The scenario:
I needed to tune my kernel in order for Rosegarden to start so I did.
>>> modified kernel time to 1000MHz
The next thing I know, I tried to reboot the laptop to use the modified kernel and I got this error message:
>>>error 13 Invalid or unsupported executable format
Ok, no panic yet... I'll just insert the openSUSE disk, boot from there and go back to my orginal settings.
>>> that didn't work still got the same error.
Ok, so next step would be for me to again try the openSUSE disk and try to reinstall grub..
>>>error 21 Selected disk does not exist
Since I'm totally clueless on how to map the only drive I have.. (i'm assuming that takes place in the /boot/grub menu.lst file)
Now I'm totally confused at this point .. so I try to write generic boot code to the MBR. That didn't work ..
But now my menu.lst file looks like the following:

# Modified by YaST2. Last modification on Mon Mar 12 18:37:10 CDT 2007
default 0
timeout 8
##YaST - generic_mbr
gfxmenu (hd0,2)/message
##YaST - activate

###Don't change this comment - YaST2 identifier: Original name: linux###
title openSUSE 10.2
root (hd0,2)
kernel /vmlinuz root=/dev/hda2 vga=0x317 resume=/dev/hda1 splash=silent showopts
initrd /initrd

###Don't change this comment - YaST2 identifier: Original name: failsafe###
title Failsafe -- openSUSE 10.2
root (hd0,2)
kernel /vmlinuz root=/dev/hda2 vga=normal showopts ide=nodma apm=off acpi=off noresume edd=off 3
initrd /initrd

Should I try and use the chainloader +1 option at this point? Or just make the boot partition active with the make active command?

Any help towards the right direction would be crucial at this point. As I don't want to have re-install the OS because of my screw-up.

Thanks
 
Old 03-14-2007, 06:58 PM   #2
jay73
Guru
 
Registered: Nov 2006
Location: Belgium
Distribution: Ubuntu 11.04, Debian testing
Posts: 5,019

Rep: Reputation: 130Reputation: 130
The entry for openSuse doesn't look quite right, unless you have a separate boot partition.

root (hd 0,2) refers to the third partition (Grub counts from 0) but then the next line locates root in the second partition (root=/dev/hda2 = second partition as this counts from 1).
 
Old 03-14-2007, 10:15 PM   #3
bigrigdriver
LQ Addict
 
Registered: Jul 2002
Location: East Centra Illinois, USA
Distribution: Debian Squeeze
Posts: 5,793

Rep: Reputation: 312Reputation: 312Reputation: 312Reputation: 312
root (hd0,2)
kernel /vmlinuz root=/dev/hda2

If the root of the filesystem is indeed at (hd0,2) (grubspeak for /dev/hda3), then edit the kernel line to show root=/dev/hda3.

Since you don't show the partitions as they are listed in /etc/fstab, it's difficult to give you any better information.
 
Old 03-15-2007, 01:19 AM   #4
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Arch/XFCE
Posts: 17,802

Rep: Reputation: 728Reputation: 728Reputation: 728Reputation: 728Reputation: 728Reputation: 728Reputation: 728
More points:

You can't install a "generic" boot loader to the mbr. GRUB, at least, gets hard coded to point to its config file.

Making the boot partition active has no meaning in Linux. And, it also not relevant unless you put boot code there.

I think you simply need to install grub with the correct root--ie the partition where /boot/grub/menu.lst lives, and then get menu.lst corrected
 
Old 03-15-2007, 07:46 AM   #5
ceeleelewis
LQ Newbie
 
Registered: Aug 2003
Distribution: RHT 8.0 & Mandrake 9.1
Posts: 10

Original Poster
Rep: Reputation: 0
sorry bigrigdriver heres the info from /etc/fstab:

/dev/hda2 / ext3 acl,user_xattr 1 1
/dev/hda3 /boot ext3 acl,user_xattr 1 2
/dev/hda4 /home ext3 acl,user_xattr 1 2
/dev/hda1 swap swap defaults 0 0
proc /proc proc defaults 0 0
sysfs /sys sysfs noauto 0 0
usbfs /proc/bus/usb usbfs noauto 0 0
devpts /dev/pts devpts mode=0620,gid=5 0 0
 
Old 03-15-2007, 09:01 AM   #6
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Arch/XFCE
Posts: 17,802

Rep: Reputation: 728Reputation: 728Reputation: 728Reputation: 728Reputation: 728Reputation: 728Reputation: 728
Since / and /boot are in different partitions, the menu.lst entries have to be adjusted accordingly, thusly:

title Linux-whatever
root (hd0,2)
kernel <name> root=/dev/hda2 <otherstuff>

Note that <name> has no "/boot" in the path since /boot is the grub root partition----ie "root (hd0,2)" already has sent grub to /boot.

Another clarification: The first root tells grub where to find its files, the second one tells the kernel where to mount the filesystem---2 totally different things.....
 
Old 03-16-2007, 08:27 AM   #7
bigrigdriver
LQ Addict
 
Registered: Jul 2002
Location: East Centra Illinois, USA
Distribution: Debian Squeeze
Posts: 5,793

Rep: Reputation: 312Reputation: 312Reputation: 312Reputation: 312
With /boot in /dev/hda3 (hd0,2) and / (root) in /dev/hda2 (hd0,1), here is the adjustment to make to menu.lst.

change:
root (hd0,2)
kernel /vmlinuz root=/dev/hda2

to this:
root (hd0,1)
kernel (hd0,2)/vmlinuz root=/dev/hda2

which tells grub the partition where the rest of grub, and the compressed kernel image, are located, and where the root of the filesystem is located.
 
Old 03-16-2007, 10:05 AM   #8
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Arch/XFCE
Posts: 17,802

Rep: Reputation: 728Reputation: 728Reputation: 728Reputation: 728Reputation: 728Reputation: 728Reputation: 728
Ummm--I think mine is correct.

In the general form of a menu.lst entry:

root (hdX,Y) refers to the location of the kernel and the grub config files. Thus is has to point to /boot

kernel <name> root=/dev/hdX,Y (Here <name> is the path to the kernel, starting from the first root statement. If root (hdX,Y) is /boot, then <name> would simply be vmlinuzxxxxxx. The "root" statement after the kernel name tells the kernel where to mount the filesystem root (/) )

Also, specifying the grub root (1st line), and then putting it before the kernel name, is redundant
 
  


Reply


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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Grub Boot floppy / menu.lst problem uncle-c Linux - Newbie 4 02-26-2007 09:41 AM
Right way to edit /boot/grub/menu.lst ? eeried Linux - Software 2 02-07-2007 09:59 AM
Lost boot/grub/menu.lst MRDucks Linux - Newbie 12 12-17-2005 02:44 PM
need to access /boot/grub/menu.lst and /boot/grub/device.map neouto Linux - Newbie 8 09-04-2005 12:45 PM
anyone know how to edit the /boot/grub/menu.lst? plzz help earth.hero Linux - Newbie 17 03-26-2005 11:15 AM


All times are GMT -5. The time now is 03:51 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