LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices



Reply
 
Search this Thread
Old 06-19-2002, 06:26 PM   #1
wincen
LQ Newbie
 
Registered: Jun 2002
Posts: 28

Rep: Reputation: 15
Does lilo/grub have to be in the MBR?


I was wondering, does lilo have to be installed to the master boot record to boot linux? What about grub? How do other operating systems boot without having a boot loader in the master boot record?

I'm just wondering because the MBR doesn't seem like a safe place to put the boot loader. If something happens to it, and you don't have a boot disk (for whatever reason) your are kinda of screwed.
 
Old 06-19-2002, 09:51 PM   #2
trickykid
Guru
 
Registered: Jan 2001
Posts: 24,133

Rep: Reputation: 199Reputation: 199
No you have several options. Some opt to install the boot loader in the first sector of the / partition.

You can also create a boot disk to boot into Linux instead of installing a boot loader on the actual hard drive.

But even in most cases, even if you don't have a boot diskette, you can always use the cdrom you have that you installed from, most have a rescue option, or you can usually specify your / directory to boot to from the boot: after booting to the cd.

Like my Slack box once got corrupted or something, I didn't have a boot disk so I used the slack cd.

At bootup and at the boot prompt I did something like this to boot up my system:

boot: Linux root=/dev/hda3
 
Old 06-19-2002, 09:55 PM   #3
LinuzRulz
Member
 
Registered: Jan 2002
Location: Confederate States of America
Distribution: Mandrake 9.0
Posts: 197

Rep: Reputation: 31
I have had a lot of success with putting lilo/grub in the first of the partition and using system commander to boot to my different OS's.
 
Old 06-19-2002, 10:04 PM   #4
MrPolite
Member
 
Registered: Jun 2002
Location: Middle of nowhere
Posts: 109

Rep: Reputation: 15
eeeh! dont put it on MBR, it will overwrite system commander. I did it once accidentally and I didnt have the recovery disks, so I reinstalled everything again
 
Old 06-19-2002, 10:08 PM   #5
LinuzRulz
Member
 
Registered: Jan 2002
Location: Confederate States of America
Distribution: Mandrake 9.0
Posts: 197

Rep: Reputation: 31
Excuse me , I mistyped. I meant to put lilo'grub on the first sector of the /partition
 
Old 06-19-2002, 10:14 PM   #6
trickykid
Guru
 
Registered: Jan 2001
Posts: 24,133

Rep: Reputation: 199Reputation: 199
Nah, nothing wrong with putting Lilo on the MBR if your going to use Grub or Lilo to boot from. I always install mine to MBR and never have any problems, well, maybe once or twice, usually caused by myself.
 
Old 06-20-2002, 02:35 AM   #7
wincen
LQ Newbie
 
Registered: Jun 2002
Posts: 28

Original Poster
Rep: Reputation: 15
How do you install lilo on the first sector of the / partition? Is it possible to do this after you've installed linux or must this be done before the installtion begins?
 
Old 06-20-2002, 05:17 AM   #8
linuxcool
LQ Addict
 
Registered: Jun 2001
Posts: 1,183

Rep: Reputation: 47
wincen, you can install lilo in the first sector of a partition when you install linux.

If you have already installed linux and put lilo in the mbr, you can edit the /etc/lilo.conf file. Look for this line boot= and change it to point to the partition where you want lilo to be installed and then run /sbin/lilo. Also, you'll have to restore the mbr by either running msdos's fdisk /mbr command or from linux /sbin/lilo -u /dev/hd??. Replace the two ?? with the correct hard drive info.

Last edited by linuxcool; 06-20-2002 at 05:21 AM.
 
Old 06-20-2002, 08:08 AM   #9
dorward
Member
 
Registered: Sep 2001
Distribution: Gentoo
Posts: 760

Rep: Reputation: 31
Quote:
How do other operating systems boot without having a boot loader in the master boot record?
They don't - they install their own boot loader there. That is why you have to rerun lilo or grub if you install Windows after Linux, the Windows boot loader gets written over it. Just because it doesn't give you options doesn't mean there is no boot loader.
 
Old 06-20-2002, 08:32 AM   #10
jglen490
Member
 
Registered: Apr 2002
Location: The next brick house on the right.
Distribution: Kubuntu 8.04
Posts: 668

Rep: Reputation: 31
Quote:
I'm just wondering because the MBR doesn't seem like a safe place to put the boot loader.
Actually, it's the only place to put SOME bootloader, as far as the BIOS is concerned. If you have a bootloader other than Lilo or Grub (i.e., NT, system commander, etc.), then its executable code is in the Master Boot Record -- that's why it's known as the Master Boot Record. If you have some third party boot loader that's Linux-aware, then that's probably all you need, otherwise it will need to access a Linux boot loader to get the Linux kernel loaded.

In most cases, if you are multi-booting with Linux, all you need is either Lilo or Grub, and my personal choice is Grub .
 
  


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


Similar Threads
Thread Thread Starter Forum Replies Last Post
grub and lilo on MBR with Windows xp blotch Linux - General 6 11-18-2005 10:57 PM
Floppy Booting without Lilo or Grub MBR crazihouse Linux - Newbie 4 02-24-2005 02:12 AM
grub/lilo conflicts in mbr bandofmercy Linux - Newbie 5 09-26-2004 12:54 AM
lilo / grub in MBR? neilcpp Slackware 4 03-28-2004 11:26 AM
restore mbr (in lilo and grub) abs Slackware 5 02-07-2004 03:39 PM


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

Main Menu
Advertisement
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