LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (http://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Lost boot/grub/menu.lst (http://www.linuxquestions.org/questions/linux-newbie-8/lost-boot-grub-menu-lst-390762/)

MRDucks 12-08-2005 11:37 PM

Lost boot/grub/menu.lst
 
I have had 3 distros and xp in my box using lilo to boot for awhile and had been editing the lilo.conf file to suit me.
I just Installed ubuntu and I let it install grub to boot as I've had issues with lilo Not wanting to boot some distros on other hd's?and I think I'm going to need more than 16 menu entries.
Grub found all of the distros in my box on install so I Had it write the mbr.Everything is booting fine but I want to edit the boot/grub/menu.lst but I cant seem to find it.
I know the mbr lives at the first 512b of the first hd.Is this where its at?XP is on hd(0,0)and ubuntu is on hd(1,8)by the way.Is the mbr within the first partition which would be xp in this case?
I used mandriva2006 find file util.to get to lilo.conf.I have tried to find it while using ubuntu also with no luck.

Thanks for any help.

FogSwimmer 12-09-2005 01:16 AM

Hi MRDucks,

as I understand your post you're looking for the location of the grup menu.lst file. Well, you gave it in your post already. It's at /boot/grub/menu.lst
You don't need to go looking in "the first 512b of the first hd". Just boot up Ubuntu (which is the Distro that wrote the MBR as I understand it) and then
$ sudo emacs /boot/grub/menu.lst
(optionally replacing emacs with another editor of your choice)

That should be it.

f

syg00 12-09-2005 01:43 AM

Have a look for grub.conf.

Emmanuel_uk 12-09-2005 02:07 AM

Mrducks, I cannot believe this is still nagging you.
Mount all your partitions (type mount to check they are all mounted).
Instal the package called locate (in mandriva)
as root type updatedb (this will take maybe 1 min)
then
locate menu.lst

it will tell you all the menu.lst on your system
(on all partitions, on all HDs)

saying that I think grub is on you hdb
and indeed in /boot/grub/menu.lst

Are you looking at the right distro / hard drive?

MRDucks 12-09-2005 08:05 PM

Quote:

Mrducks, I cannot believe this is still nagging you.
YOU cant believe it.I cant believe I'm so stupid that I would switch to grub when I am barely able to manipulate lilo.Anyway I did and I think I'll be better off in the long run.

Thanks syg00,ubuntu calls the file grub.conf.So I'm going to assume a few things:

1. Different distros name the same files different names.
2. The grub OR lilo config file that my box uses to boot is contained WITHIN whatever distro I had write to the mbr and not in the mbr itself.
3. Grub will boot any distro with either lilo or grub contained in that distro's root partition.
Please correct me if I'm wrong about any of the above.

What I'm doing by the way is keeping one distro "hidden" and bootable by floppy so when I get home from work and my kids have managed to crash everything in my box I still have something to work with.I guess I got lucky when I choose mandy 10.1 to hide as this was the distro that wrote lilo to the mbr previously.

I had found grub.conf file in ubuntu but since the first 10 pages I scrolled thru were "examples and instructions" I didnt notice the last 10 pages were my actual boot file. :rolleyes: sorry.

Thanks for the help

syg00 12-09-2005 08:38 PM

1. Different distros name the same files different names.
<A> Maybe, maybe not - each distro certainly has the option. Grub requires menu.lst; some distros patch grub to use grub.conf. These are the only ones I've seen. Generally they are symlinked for convenience - obviously not in your (i.e. Ubuntu's) case.
A better rule would be "Don't assume anything".

2. The grub OR lilo config file that my box uses to boot is contained WITHIN whatever distro I had write to the mbr and not in the mbr itself.
<A> Usually. It certainly isn't in the MBR - there is only 446 usable bytes available for loader code in the MBR.
The config file can be written anywhere, but generally would be on the installing system - especially if using an installer provided by the distro.

3. Grub will boot any distro with either lilo or grub contained in that distro's root partition.
<A> Chainloading is supported by both lilo and grub.
Another option is to directly address the kernel image in each install rather than using it's loader. I prefer to do this to save using multiple loaders - the choice is personal.

Quote:

I had found grub.conf file in ubuntu but since the first 10 pages I scrolled thru were "examples and instructions" I didnt notice the last 10 pages were my actual boot file. :rolleyes: sorry.
You'd do well to read all that guff - any changes you make have to be in the right spot. At the end if I recall correctly.

MRDucks 12-10-2005 09:34 AM

Quote:

You'd do well to read all that guff
Good idea.
Below is a part of my lst.In the instructions it says dont uncomment the entries,edit them to my needs.
Can I shift or flag the entries so I cant see them on boot.(I do not want to see all of the "linux-failsafe" and "linux-nonfb"entries)?Or can I just delete them?(I dont know what uncomment means).

When I install another distro that uses lilo by default I will skip the bootloader install and use [grub-install /dev/hd??]
When I add this to my grub.lst do I need to replicate the entries below starting with the #statements or can I just:

title My Linux in (hd0,?) where ? is partition No-1
root (hd0,?)
chainlader +1
As per saikee's instruction?or will either/both work?

Thanks for the help.
-------------------------------------------------------------------
title Ubuntu, kernel memtest86+
root (hd0,2)
kernel /boot/memtest86+.bin
savedefault
boot

### END DEBIAN AUTOMAGIC KERNELS LIST

# This is a divider, added to separate the menu items below from the Debian
# ones.
title Other operating systems:
root


# This entry automatically added by the Debian installer for an existing
# linux installation on /dev/hdb1.
title mandy06 (on /dev/hdb1)
root (hd1,0)
kernel /boot/vmlinuz root=/dev/hdb1 resume=/dev/hdb5 splash=silent
initrd /boot/initrd.img
savedefault
boot


# This entry automatically added by the Debian installer for an existing
# linux installation on /dev/hdb1.
title linux-nonfb (on /dev/hdb1)
root (hd1,0)
kernel /boot/vmlinuz root=/dev/hdb1 resume=/dev/hdb5
initrd /boot/initrd.img
savedefault
boot

syg00 12-11-2005 03:05 AM

O.K., just fired up my test Ubuntu install.
What I have done is not touch anything shipped in the menu.lst - yes, menu.lst - I have no grub.conf. Don't know what's the go with your install.
I just added the entries I wanted after the "### END DEBIAN AUTOMAGIC KERNELS LIST". Just start typing - doesn't seem to affect anything, although the last update I did (to Mickey-Mouse or whatever is now current) is seriously borked; broken packages everywhere.

If you want to proceed as saikee prefers, you still need to let each new distro install it's boot loader to root. Then you can simply chainload as you indicated.
(BTW to "uncomment" a line is merely to remove the hash/pound (#) character from column 1.)

MRDucks 12-11-2005 10:03 PM

Sure enough I installed kio-locate(mandriva) and it found /boot/grub/menu.lst.For some reason the silly file finder utility in ubuntu(which does not show the /dir/path)will only find grub bin. and grub.conf.
I've got the furry frog(?)4.70 ubuntu and not much actually works in it either.I'll not upgrade until I can get another distro to offer to have grub take over the boot chores.Hopefully vector,yoper,or slack 10.2 will as I have them burned and ready to go.Then my upgrade for ubuntu is to run to diskdrake and reclaim some valuable hd space ;)

I also borrowed a copy of linux unleashed and have devoured the first chapters about the boot process.I feel a lot more comfortable now that I can understand what I'm doing instead of just doing it.The book still has 2 unopened redhat 5.1 install disks with it.I know it was written in 1998.Hopefully the principles are still the same.

The chainload method worked great btw.I just added mandrake 10.1 successfully.

Thanks for the help.I have a LOT of reading to do. :)

Almost forgot.In mandriva 2006 each time I want to use the floppy drive I have to [umount /dev/fd0] or it reports the dev busy.Any thoughts on that?

Emmanuel_uk 12-16-2005 01:47 AM

>>>Almost forgot.In mandriva 2006 each time I want to use the floppy drive I have >>>to [umount /dev/fd0] or it reports the dev busy.Any thoughts on that?

Not normal. Maybe you do not have supermount enabled?
If you post the file /etc/fstab
somebody might be able to tell you why.

Ubuntu has improved a lot in 5.04 and 5.10 compared to 4.70.
So if you get a chance you could upgrade.

At this stage in your learning curve, maybe it is better you stay
with only with 1 or 2 distros.

MRDucks 12-16-2005 09:22 PM

Quote:

If you post the file /etc/fstab
somebody might be able to tell you why.
/dev/hda5 / ext3 defaults 1 1
/dev/hdc /mnt/cdrom auto umask=0022,user,iocharset=iso8859-1,codepage=850,noauto,ro,exec,users 0 0
none /mnt/floppy supermount dev=/dev/fd0,fs=ext2:vfat,--,umask=0022,iocharset=iso8859-1,sync,codepage=850 0 0
/dev/hda1 /mnt/windows ntfs umask=0022,nls=iso8859-1,ro 0 0
none /proc proc defaults 0 0
/dev/hda6 swap swap defaults 0 0

I have been reading about the fstab file.I dont think its telling my system /dev/fd0 is not mounted anymore after I use it.I also know why I should have let diskdrak write the partition info for a few other distros I have in my box to fstab.Mandriva2006 is on hda5.I see it in the file above.
Quote:

At this stage in your learning curve, maybe it is better you stay with only with 1 or 2 distros.
Mandriva2006 is my main distro I use for things I actually NEED to do with my box.I love it!Its the only one so far that hasnt choked on install with my HP1401 print/scan/copier(the cups killer) plugged in.
Thanks

MRDucks 12-17-2005 09:23 AM

My dev/fd0 is working correctly now.I did a few updates last night and added an external hd.I wasnt working on the floppy drive but something I did corrected the problem so all is well. :)

Thanks

Emmanuel_uk 12-17-2005 01:44 PM

Good to know your floppy is right now. Your fstab entry was correct...


All times are GMT -5. The time now is 03:17 PM.