LinuxQuestions.org
Review your favorite Linux distribution.
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 12-08-2005, 11:37 PM   #1
MRDucks
Member
 
Registered: Aug 2005
Location: Tennessee
Distribution: Mandriva 2006,Gentoo,Linspire
Posts: 86

Rep: Reputation: 15
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.
 
Old 12-09-2005, 01:16 AM   #2
FogSwimmer
Member
 
Registered: Sep 2003
Distribution: Kubuntu / debian / SuSE
Posts: 73

Rep: Reputation: 15
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
 
Old 12-09-2005, 01:43 AM   #3
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 12,268

Rep: Reputation: 1028Reputation: 1028Reputation: 1028Reputation: 1028Reputation: 1028Reputation: 1028Reputation: 1028Reputation: 1028
Have a look for grub.conf.
 
Old 12-09-2005, 02:07 AM   #4
Emmanuel_uk
Senior Member
 
Registered: Nov 2004
Distribution: Mandriva mostly, vector 5.1, tried many.Suse gone from HD because bad Novell/Zinblows agreement
Posts: 1,604

Rep: Reputation: 47
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?

Last edited by Emmanuel_uk; 12-09-2005 at 02:09 AM.
 
Old 12-09-2005, 08:05 PM   #5
MRDucks
Member
 
Registered: Aug 2005
Location: Tennessee
Distribution: Mandriva 2006,Gentoo,Linspire
Posts: 86

Original Poster
Rep: Reputation: 15
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. sorry.

Thanks for the help
 
Old 12-09-2005, 08:38 PM   #6
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 12,268

Rep: Reputation: 1028Reputation: 1028Reputation: 1028Reputation: 1028Reputation: 1028Reputation: 1028Reputation: 1028Reputation: 1028
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. 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.
 
Old 12-10-2005, 09:34 AM   #7
MRDucks
Member
 
Registered: Aug 2005
Location: Tennessee
Distribution: Mandriva 2006,Gentoo,Linspire
Posts: 86

Original Poster
Rep: Reputation: 15
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
 
Old 12-11-2005, 03:05 AM   #8
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 12,268

Rep: Reputation: 1028Reputation: 1028Reputation: 1028Reputation: 1028Reputation: 1028Reputation: 1028Reputation: 1028Reputation: 1028
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.)
 
Old 12-11-2005, 10:03 PM   #9
MRDucks
Member
 
Registered: Aug 2005
Location: Tennessee
Distribution: Mandriva 2006,Gentoo,Linspire
Posts: 86

Original Poster
Rep: Reputation: 15
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?

Last edited by MRDucks; 12-11-2005 at 10:10 PM.
 
Old 12-16-2005, 01:47 AM   #10
Emmanuel_uk
Senior Member
 
Registered: Nov 2004
Distribution: Mandriva mostly, vector 5.1, tried many.Suse gone from HD because bad Novell/Zinblows agreement
Posts: 1,604

Rep: Reputation: 47
>>>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.
 
Old 12-16-2005, 09:22 PM   #11
MRDucks
Member
 
Registered: Aug 2005
Location: Tennessee
Distribution: Mandriva 2006,Gentoo,Linspire
Posts: 86

Original Poster
Rep: Reputation: 15
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

Last edited by MRDucks; 12-16-2005 at 09:51 PM.
 
Old 12-17-2005, 09:23 AM   #12
MRDucks
Member
 
Registered: Aug 2005
Location: Tennessee
Distribution: Mandriva 2006,Gentoo,Linspire
Posts: 86

Original Poster
Rep: Reputation: 15
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
 
Old 12-17-2005, 01:44 PM   #13
Emmanuel_uk
Senior Member
 
Registered: Nov 2004
Distribution: Mandriva mostly, vector 5.1, tried many.Suse gone from HD because bad Novell/Zinblows agreement
Posts: 1,604

Rep: Reputation: 47
Good to know your floppy is right now. Your fstab entry was correct...
 
  


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
Right way to edit /boot/grub/menu.lst ? eeried Linux - Software 2 02-07-2007 08:59 AM
How to edit /boot/grub/menu.lst of the host satimis Linux From Scratch 1 09-25-2005 07:21 AM
need to access /boot/grub/menu.lst and /boot/grub/device.map neouto Linux - Newbie 8 09-04-2005 11:45 AM
/boot/grub/menu.lst gets re-written by apt-get..NOT COOL terrapin24h Ubuntu 2 07-04-2005 09:14 AM
anyone know how to edit the /boot/grub/menu.lst? plzz help earth.hero Linux - Newbie 17 03-26-2005 10:15 AM


All times are GMT -5. The time now is 01:05 PM.

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