Linux - GeneralThis 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
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.
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.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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.
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:
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
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.
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?
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.
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.
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 .
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.