Bootloader in Linux

Sureshot324

Diamond Member
Feb 4, 2003
3,370
0
71
I am currently dual booting Windows XP and Mandrake Linux 9.2. Everytime I boot the bootloader comes up and asks me which os i want to boot into. If I format my linux partition, will the boot loader disappear and will my system be exactly like it was before i installed linux? Is the bootloader stored on the Linux partition?
 

Cheetah8799

Diamond Member
Apr 12, 2001
4,508
0
76
bootloader is probably in your mbr, master boot record. Formatting the other partitions is probably ok, but you may need to re-configure or even install the boot loader depending on what you do in the future. If you install a different Linux distro, it may put on an updated or different boot loader as well.
 

matheusber

Senior member
Jun 12, 2001
380
5
81
Originally posted by: Cheetah8799
bootloader is probably in your mbr, master boot record. Formatting the other partitions is probably ok, but you may need to re-configure or even install the boot loader depending on what you do in the future. If you install a different Linux distro, it may put on an updated or different boot loader as well.

something i never knew was how to reinstall winnt bootloader ..

how can i do such thing ?
thanks

none
 

Nothinman

Elite Member
Sep 14, 2001
30,672
0
0
bootloader is probably in your mbr, master boot record. Formatting the other partitions is probably ok, but you may need to re-configure or even install the boot loader depending on what you do in the future.

Most Linux bootloaders rely on a file (lilo.conf for lilo or menu.lst for grub) to be accessable to tell it where the OSes are and how to display them, whiping the Linux partition will remove those files and break the bootloader.
 

Sureshot324

Diamond Member
Feb 4, 2003
3,370
0
71
Ok, so what exactly will happen if i simply nuke my linux partition? Also, what's the best way to get rid of one linux distro to install another on the same partition?
 

mee987

Senior member
Jan 23, 2002
773
0
0
Originally posted by: matheusber
Originally posted by: Cheetah8799
bootloader is probably in your mbr, master boot record. Formatting the other partitions is probably ok, but you may need to re-configure or even install the boot loader depending on what you do in the future. If you install a different Linux distro, it may put on an updated or different boot loader as well.

something i never knew was how to reinstall winnt bootloader ..

how can i do such thing ?
thanks

none
boot from your xp cd and go into rescue mode, then run fixmbr

at least i think thats what you do, ive never tried it
 

drag

Elite Member
Jul 4, 2002
8,708
0
0
To replace a linux distro with another you simply format and install the new distro. The new distro should autodetect the windows OS and set up a completely new bootloader over the old one.

If it doesn't autodetect and setup the windows boot option then you'll just have to edit the config and add it yourself. it's not realy a big deal.


If your worried about it just make sure that you have a rescue cdrom/floppy set up for the windows OS and make sure that it works before you nuke the old linux distro.
 

Sureshot324

Diamond Member
Feb 4, 2003
3,370
0
71
Originally posted by: drag
To replace a linux distro with another you simply format and install the new distro. The new distro should autodetect the windows OS and set up a completely new bootloader over the old one.

If it doesn't autodetect and setup the windows boot option then you'll just have to edit the config and add it yourself. it's not realy a big deal.


If your worried about it just make sure that you have a rescue cdrom/floppy set up for the windows OS and make sure that it works before you nuke the old linux distro.

Ok, thanks for the info.

Just out of curiosity though, where exactly is the boot loader stored? Surely all the graphics, etc. can't all fit in the master boot record. Finally, how do you edit the config of a boot loader?
 

drag

Elite Member
Jul 4, 2002
8,708
0
0
Originally posted by: Sureshot324
Ok, thanks for the info.

Just out of curiosity though, where exactly is the boot loader stored? Surely all the graphics, etc. can't all fit in the master boot record. Finally, how do you edit the config of a boot loader?

Your right about the graphics and stuff.

A master boot record is stored in the first sector of the harddrive. A sector is 512 bytes, the first 445 or so bytes is reserved for the boot record, 64 bytes contains the partition information, and there is 2bytes for a "signature" or something that is probably only used by dos stuff (I have no clue)

My picture I made to be displayed in the bootloader is 43k alone.

Nowadays the boot loader is more of a pointer.

For instance lilo (common linux bootloader for x86) runs it in stages, and it corrisponds to the LILO that is displayed has each letter that pops up as the different stages get loaded, so if it fails at LI then you know how far it got.

The first stage is stored in the MBR itself, it's job is to take the bios information provided and then read the second stage from the HD partition and load that into memory, and that (I think, don't take this a gospel fact or anything) does the memu display and loads the kernel when you select the item you want to boot.

Grub is much more sophisticated then lilo and can do nice things like trick the normal brain-dead windows installer into thinking that the partition arrangements are different then they realy are (like make it so that you can install win9x into a extended partition or whatnot.)


Grub is becoming more and more common. What I like is that grub has a rudementary command line interface so you can modify and create new boot entries on the fly during boot up. (good for getting around the occasional typo).

Grub's config is /boot/grub/menu.lst and/or /boot/grub/grub.conf and often has symbolic links to /etc/grub.conf. Different versions use different stuff, so everybody just has symbolic links to every config file just in case.

Lilo's config is /etc/lilo.conf.

After editing lilo you have to rerun the lilo command to make the changes stick, but grub the changes are automatic.

They use different syntaxs and setups, but they can be VERY simple. Most distros add a bunch of extra comments and options that can be safely deleted with no side effects. There are plenty of online docs and samples describing the details, so I won't go into it so much.
 

Sureshot324

Diamond Member
Feb 4, 2003
3,370
0
71
So, if i understand correctly, part of the boot loader is in the mbr, and another part is one of the os partitions (linux for grub and lilo, windows for windows bootloader)? What happens when you format that partition? Can you still boot into an os from another partition, or do you need to fix the mbr (using fixmbr)? Is there a such thing as a boot loader that will work no matter what OSes you put on your system?
 

Nothinman

Elite Member
Sep 14, 2001
30,672
0
0
What happens when you format that partition?

Depends on the bootloader. LILO will hang, grub will drop you to a command-line so you can still boot something by hand.

Is there a such thing as a boot loader that will work no matter what OSes you put on your system?

Not really. If you leave the basic DOS bootloader in the MBR it'll just boot the first active partition it finds and then you still need a bootloader in the bootrecord of that partition.
 
sale-70-410-exam    | Exam-200-125-pdf    | we-sale-70-410-exam    | hot-sale-70-410-exam    | Latest-exam-700-603-Dumps    | Dumps-98-363-exams-date    | Certs-200-125-date    | Dumps-300-075-exams-date    | hot-sale-book-C8010-726-book    | Hot-Sale-200-310-Exam    | Exam-Description-200-310-dumps?    | hot-sale-book-200-125-book    | Latest-Updated-300-209-Exam    | Dumps-210-260-exams-date    | Download-200-125-Exam-PDF    | Exam-Description-300-101-dumps    | Certs-300-101-date    | Hot-Sale-300-075-Exam    | Latest-exam-200-125-Dumps    | Exam-Description-200-125-dumps    | Latest-Updated-300-075-Exam    | hot-sale-book-210-260-book    | Dumps-200-901-exams-date    | Certs-200-901-date    | Latest-exam-1Z0-062-Dumps    | Hot-Sale-1Z0-062-Exam    | Certs-CSSLP-date    | 100%-Pass-70-383-Exams    | Latest-JN0-360-real-exam-questions    | 100%-Pass-4A0-100-Real-Exam-Questions    | Dumps-300-135-exams-date    | Passed-200-105-Tech-Exams    | Latest-Updated-200-310-Exam    | Download-300-070-Exam-PDF    | Hot-Sale-JN0-360-Exam    | 100%-Pass-JN0-360-Exams    | 100%-Pass-JN0-360-Real-Exam-Questions    | Dumps-JN0-360-exams-date    | Exam-Description-1Z0-876-dumps    | Latest-exam-1Z0-876-Dumps    | Dumps-HPE0-Y53-exams-date    | 2017-Latest-HPE0-Y53-Exam    | 100%-Pass-HPE0-Y53-Real-Exam-Questions    | Pass-4A0-100-Exam    | Latest-4A0-100-Questions    | Dumps-98-365-exams-date    | 2017-Latest-98-365-Exam    | 100%-Pass-VCS-254-Exams    | 2017-Latest-VCS-273-Exam    | Dumps-200-355-exams-date    | 2017-Latest-300-320-Exam    | Pass-300-101-Exam    | 100%-Pass-300-115-Exams    |
http://www.portvapes.co.uk/    | http://www.portvapes.co.uk/    |