LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   Problem editing /boot/grub/menu.lst (https://www.linuxquestions.org/questions/linux-server-73/problem-editing-boot-grub-menu-lst-673569/)

baldur2630 10-01-2008 12:10 PM

Problem editing /boot/grub/menu.lst
 
Suse 10.x
Installed patches and system now boots to GRUB Error 15.

Computer has 3 SATA drives hd0 has a Windows 2000 partition and a SuSE Linux Partition

It's a simple fix - First line read root(hd0) instead of root(hd0,1)

I edit GRUB menu and change the offending line and when I press b, it boots perfectly.

How can one change /boot/grub/menu.lst to make this permanent?

If I look in /boot its EMPTY, I tried going in as Single User but the file doesn't exist.

If I try to edit the file with YaST, it complains no matter what I do that it can't save it.

Any ideas would be appreciated.

Pupthai 10-01-2008 10:57 PM

If you edit /boot/grub/menu.lst and it boots then its not empty. purhaps more then one /boot/ dir on system. find grub and make sure you drill to the right /boot/grub/menu.lst and edit as root from any text editor and save. In PClinuxOS with a set up like yours we just insert the livecd and use the reMBR command from the menu and it does it all even the chain loader for windeez. With several drives it may ask which one you want grub to be located on just select it. And you can reinstall grub from the commandline, but I forgot how the other way is so easy. but it starts with find grub and the you select the real one you want if more then one are presented. then start grub and enter stuff. I think if you google grub you can get that grub install step by step from the grub site, its only a few steps and easy.

Total-MAdMaN 10-02-2008 05:08 AM

Quote:

Originally Posted by baldur2630 (Post 3297222)
If I look in /boot its EMPTY, I tried going in as Single User but the file doesn't exist.

If, after following Pupthai's suggestion, you find that you're looking in the right place, it may be that /boot is on it's own partition and it's unmounted when it's not required.

Larry Webb 10-02-2008 05:10 AM

In YaST click 'System in left panel'.
Click 'Boot Loader' in right panel
Select 'Section Management' tab which should be the one that opens by default.
Select 'Other' button in lower right.
Select 'Edit Configuration Files'.
Select from drop down menu in top box '/boot/grub/menu.lst'.
Now you can edit and then choose OK button and it will probably ask you if you want to save your changes.

Larry Webb 10-02-2008 05:23 AM

Also you can open 'Terminal'
type 'su -' without the quote marks
password, enter your root password
and then type

kwrite /boot/grub/menu.lst

when the kwrite window opens edit and then do not forget to 'Save' and then exit.

monsm 10-02-2008 07:40 AM

Yes, in the terminal you can write: fdisk -l /dev/sda
that will list you partitions. You will then see if you have a separate boot partition or not.

First though, if your /boot directory is not empty, try to look for /boot/grub/grub.conf
Newer versions tend to use that as a config file now. The /boot/grub/menu.lst would normally be a link that points to the grub.conf file, but it is a chance your link file is missing, or pointing elsewhere.

Mons

Larry Webb 10-02-2008 07:57 AM

If I remember when you try to find /boot you will not find anything but if you do /boot/grub/menu.lst even when the directory is in conf it will find it. If he uses my second recommendation and it can not find the file he needs to do a repair or reinstall or rebuild his directories.

baldur2630 10-03-2008 01:23 AM

Even logged in as root and using filefinder or typing gedit /boot/grub/menu.lst produces nothing.

If I do an fdsk -l /dev/sda, I have 3 partitions the first is the Windows 2000 partition, then I have a second partition which is the /boot partition and the 3rd partition is the LVM partition.

So, it looks like the /boot is not available after booting.but even if I set it to single when I boot, I still can't edit it.

I tried YaST but it always says it has a problem and won't save anything. probably something to do with the Windows partition.

I can only access the Windows 2000 partition from sdb because the sdb drive is a dual boot windows XP and Windows 2000, but windows 2000 is on sda. Sounds crazy but this machine was a windows machine long time ago and short of trashing everything and re-installing everything from scratch, that's the way it is.

What I do is just swap the boot drive in the BIOS if I want to use Windows (this is a lab test machine guys)

Larry Webb 10-03-2008 04:43 AM

Can you boot Suse? Which version and desktop (kde or gnome) are you using if you can boot? We need to see your fdisk -l, not your description. What exactly happens when you boot, do you get an error or do you get a grub command (grub>)?

monsm 10-03-2008 05:36 AM

So, with your little Grub trick you can boot?

So the problem most likely is that the boot partition isn't mounted. To fix it just mount it manually (as root): "mount /dev/sda2 /boot". Then update the /boot/grub/menu.lst (or grub.conf). Also check that you have the correct mount points in /etc/fstab

Mons

Larry Webb 10-03-2008 12:12 PM

Quote:

Originally Posted by monsm (Post 3298875)
So, with your little Grub trick you can boot?

So the problem most likely is that the boot partition isn't mounted. To fix it just mount it manually (as root): "mount /dev/sda2 /boot". Then update the /boot/grub/menu.lst (or grub.conf). Also check that you have the correct mount points in /etc/fstab

Mons

That is the reason I wanted to see fdisk -l, he may have swapped hd boot order. Also he may be booting the Safe Suse kernel being he can not edit and save anything.


All times are GMT -5. The time now is 02:56 PM.