How to change the boot loader?

Discussion regarding the installation and configuration of Linux distributions.

How to change the boot loader?

Postby fadain » Thu Jul 31, 2003 3:16 am

hello all,
while i was installing redhat i selected lilio(linux loader) as the boot loader and later came to now that this is the most ugliest thing i have ever seen on my moniter. Now i want to change the boot loader to GRUB. Any ideas?
Fadain.
fadain
Havaldaar
 
Posts: 100
Joined: Wed Aug 07, 2002 8:00 pm
Location: Multan, PK

Postby Faraz.Fazil » Thu Jul 31, 2003 1:53 pm

Why do u want to uninstall lilo?
Lilo is the best bootloader for newbies like you.GRUB is good too but it is recommended for advanced users.If u dont have any other problem other than ugliness, i strongly recommend u to retain the lilo as the bootloader.Otherwise you may just mess up ur system.

If u decide to uninstall lilo then do this:
=======================================================================
Before uninstalling lilo, make sure to make a bootable linux floppy disk, so that if anything goes wrong u will still be able to boot linux from that floppy.Creat the boot disk using the dd command or using a more easier method:

RedHat Linux comes with an excellent bootdisk creation software mkbootdisk. The simplest way to create a boot disk is to insert a floppy in your first floppy device (technically ``/dev/fd0'') and issue the following command as root user:

# mkbootdisk <kernel-version>

In RedHat 9.0 the kernal version is ``2.4.20-8''. So my command:

# mkbootdisk 2.4.20-8

If you have different version of RedHat, change directory to /boot and check the kernel version in the file ``vmlinuz-XXX'', where XXX is the required version number.

The command I issued:

# mkbootdisk 2.4.20-8

actually defaults to:

# mkbootdisk --device /dev/fd0 2.4.20-8


=======================================
Uninstalling lilo is the easiest.
Just boot from a bootable dos floppy or dcrom , and do a fdisk/mbr from command prompt.Lilo would be uninstalled from the mbr, and ur previous bootloader (windows bootloader will be restored)
After that only windows will load.To re-enable dual booting, you will have to install a bootloader like bootmagic from powerquest or install grub in linux. (bootmagic is installed through windows), while (lilo or grub is installed from linux.).(so if u plan to install grub, you will need to be able to boot to linux.For that before uninstalling lilo, you must have a boot disk to start linux)

To install grub:
===========
If GRUB was not installed during the Red Hat Linux installation process it can be installed afterward. Once installed, it automatically becomes the default boot loader.

Before installing GRUB, make sure to use the latest GRUB package available or use the GRUB package from the Red Hat Linux installation CD-ROMs. For instructions on installing packages, see the chapter titled Package Management with RPM in the Red Hat Linux Customization Guide.

Once the GRUB package is installed, open a root shell prompt and run the command /sbin/grub-install <location>, where <location> is the location that the GRUB Stage 1 boot loader should be installed.

The following command installs GRUB to the MBR of the master IDE device on the primary IDE bus: /sbin/grub-install /dev/hda

The next time the system boots, the GRUB graphical boot loader menu will appear before the kernel loads into memory.

The configuration file (/boot/grub/grub.conf), which is used to create the list of operating systems to boot in GRUB's menu interface, essentially allows the user to select a pre-set group of commands to execute

he following is a list useful commands:

boot ? Boots the operating system or chain loader that has been previously specified and loaded.

chainloader <file-name> ? Loads the specified file as a chain loader. To grab the file at the first sector of the specified partition, use +1 as the file's name.

displaymem ? Displays the current use of memory, based on information from the BIOS. This is useful to determine how much RAM a system has prior to booting it.

initrd <file-name> ? Enables users to specify an initial RAM disk to use when booting. An initrd is necessary when the kernel needs certain modules in order to boot properly, such as when the root partition is formated with the ext3 file system.

install <stage-1> <install-disk> <stage-2> p <config-file> ? Installs GRUB to the system MBR.

When using the install command the user must specify the following:

<stage-1> ? Signifies a device, partition, and file where the first boot loader image can be found, such as (hd0,0)/grub/stage1.

<install-disk> ? Specifies the disk where the stage 1 boot loader should be installed, such as (hd0).

<stage-2> ? Passes to the stage 1 boot loader the location of the stage 2 boot loader is located, such as (hd0,0)/grub/stage2.

p <config-file> ? This option tells the install command to look for the menu configuration file specified by <config-file>. An example of a valid path to the configuration file is (hd0,0)/grub/grub.conf.

kernel <kernel-file-name> <option-1> <option-N> ? Specifies the kernel file to load from GRUB's root file system when using direct loading to boot the operating system. Options can follow the kernel command and will be passed to the kernel when it is loaded.

For Red Hat Linux, an example kernel command looks like the following:

kernel /vmlinuz root=/dev/hda5

This line specifies that the vmlinuz file is loaded from GRUB's root file system, such as (hd0,0). An option is also passed to the kernel specifying that when loading the root file system for the Linux kernel, it should be on hda5, the fifth partition on the first IDE hard drive. Multiple options may be placed after this option, if needed.

root <device-and-partition> ? Configures GRUB's root partition to be a specific device and partition, such as (hd0,0), and mounts the partition so that files can be read.

rootnoverify <device-and-partition> ? Performs the same functions as the root command but does not mount the partition.

=====================================

As you may have already noticed, installing and operating grub is a pain in the neck for newbies like you.Lilo on the other hand is quite easier and recommended for newbies.Also as i said before, u can use 3rd party bootloaders like bootmagic which can be installed through windows.

If u have a problem with lilo, just post the problem here and we will help.But i dont recommend installing grub in place of lilo to newbies.
Faraz.Fazil
Major General
 
Posts: 1024
Joined: Thu Jul 04, 2002 5:31 pm
WLM: faraz7476@hotmail.com
Location: Karachi/Pakistan/Earth/Universe

Postby fadain » Thu Jul 31, 2003 4:20 pm

Thank you Faraz.
Installing/uninstalling bootloaders may be a bit annoying for some, but the way you explained everything, it was like 1-2-3!
I successfully installed GRUB.
Thanks again.
Regards,
Fadain.
fadain
Havaldaar
 
Posts: 100
Joined: Wed Aug 07, 2002 8:00 pm
Location: Multan, PK

How to change the boot Loader?

Postby mahin » Fri Aug 01, 2003 12:24 pm

Cool :!:

Now when are you posting this to PLUC Wiki :)
mahin
Major
 
Posts: 605
Joined: Wed Aug 07, 2002 8:00 pm
Website: http://www.linuxpakistan.net/wiki/index.php/LinuxPakistanKarachi
Location: Karachi

Re: How to change the boot Loader?

Postby Faraz.Fazil » Fri Aug 01, 2003 1:18 pm

Thanx mahin.
I will be making 2 new threads at wiki.One is about the distro issue that we talked about earlier and one is this one.

But, do users here at linuxpakistan really use the wiki to its full potential.I mean many users here are so unactive...more than 600 members out of 715 have 0 posts.do they really read the wiki?


mahin wrote:Cool :!:

Now when are you posting this to PLUC Wiki :)
Faraz.Fazil
Major General
 
Posts: 1024
Joined: Thu Jul 04, 2002 5:31 pm
WLM: faraz7476@hotmail.com
Location: Karachi/Pakistan/Earth/Universe

Postby Faraz.Fazil » Sat Aug 02, 2003 9:11 am

Thumbs Up!
Article posted at wiki.

Check here:
=======
http://www.linuxpakistan.net/wiki/index ... lling-Grub

Now if any user will search the wiki with keywords like lilo, grub etc, he will find the article in the knowledgebase.
Faraz.Fazil
Major General
 
Posts: 1024
Joined: Thu Jul 04, 2002 5:31 pm
WLM: faraz7476@hotmail.com
Location: Karachi/Pakistan/Earth/Universe

Re: How to change the boot Loader?

Postby mahin » Sat Aug 02, 2003 11:07 am

Faraz.Fazil wrote:Thanx mahin.
I will be making 2 new threads at wiki.One is about the distro issue that we talked about earlier and one is this one.

But, do users here at linuxpakistan really use the wiki to its full potential.I mean many users here are so unactive...more than 600 members out of 715 have 0 posts.do they really read the wiki?


Thanks! We do it because we wanted it in the first place :)

You are right about the numbers but this is quite normal , if we simply increase the total numbers then net active members will increase. One reason people are not visiting Wiki pages is that there is not much to help them solve their day to day problems, once content is there people will start visiting.

One more thing we have to inform people to visit Wiki but that we can do only when there is some content [ Chicken and Egg :)].

I just have to look at your contribution to reassure me things are moving ahead :) . People are coming because they get the help they need similarly they will start reading wiki once matter is there.

Thanks for all your help / fine work :).
mahin
Major
 
Posts: 605
Joined: Wed Aug 07, 2002 8:00 pm
Website: http://www.linuxpakistan.net/wiki/index.php/LinuxPakistanKarachi
Location: Karachi


Return to “%s” Installation

Who is online

Users browsing this forum: No registered users and 1 guest