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 |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
 |
GNU/Linux Basic Guide
This 255-page guide will provide you with the keys to understand the philosophy of free software, teach you how to use and handle it, and give you the tools required to move easily in the world of GNU/Linux. Many users and administrators will be taking their first steps with this GNU/Linux Basic guide and it will show you how to approach and solve the problems you encounter.
Click Here to receive this Complete Guide absolutely free. |
|
 |
03-14-2007, 04:11 PM
|
#1
|
|
LQ Newbie
Registered: Aug 2003
Distribution: RHT 8.0 & Mandrake 9.1
Posts: 10
Rep:
|
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
|
|
|
|
03-14-2007, 05:58 PM
|
#2
|
|
Guru
Registered: Nov 2006
Location: Belgium
Distribution: Ubuntu 11.04, Debian testing
Posts: 5,019
Rep: 
|
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).
|
|
|
|
03-14-2007, 09:15 PM
|
#3
|
|
LQ Addict
Registered: Jul 2002
Location: East Centra Illinois, USA
Distribution: Debian Squeeze
Posts: 5,570
|
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.
|
|
|
|
03-15-2007, 12:19 AM
|
#4
|
|
LQ Veteran
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Arch/XFCE
Posts: 17,797
|
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
|
|
|
|
03-15-2007, 06:46 AM
|
#5
|
|
LQ Newbie
Registered: Aug 2003
Distribution: RHT 8.0 & Mandrake 9.1
Posts: 10
Original Poster
Rep:
|
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
|
|
|
|
03-15-2007, 08:01 AM
|
#6
|
|
LQ Veteran
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Arch/XFCE
Posts: 17,797
|
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.....
|
|
|
|
03-16-2007, 07:27 AM
|
#7
|
|
LQ Addict
Registered: Jul 2002
Location: East Centra Illinois, USA
Distribution: Debian Squeeze
Posts: 5,570
|
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.
|
|
|
|
03-16-2007, 09:05 AM
|
#8
|
|
LQ Veteran
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Arch/XFCE
Posts: 17,797
|
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
|
|
|
|
| Thread Tools |
Search this Thread |
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -5. The time now is 12:13 AM.
|
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|