Sponsored Content
Top Forums UNIX for Dummies Questions & Answers Right place to install Linux bootloader Post 302867801 by bakunin on Friday 25th of October 2013 04:41:35 AM
Old 10-25-2013
OK, first a few words about the booting process of a PC. That will make it clearer, hopefully:

When a PC starts, the BIOS holds the first program to be loaded. It scans several busses (IDE-controllers, SCSI-controllers, ...) for prospective devices to boot from and creates a list. Then this is worked from top to bottom (though it is possible to exclude certain devices or rearrange list entries - this is a common option in BIOSes).

Every device found that way - usually disks, USB sticks, CD-ROM-drives, diskette drives and so on - is in turn scanned for a so-called "Master boot record". This is a certain disk block, which contains a boot-loader program - if the disk is bootable. If not, then this space is simply left free and the process tries the next device in its list and searches there for a MBR.

If such a boot-loader is found, it is loaded by the BIOS and started. The boot-loader is NOT an OS by itself, it just loads an OS. GRUB, the older lilo and some other boot-loaders work that way. Usually the boot-loader presents a selection of kernels to boot from and a list of root volumes (aka "partitions" to use as the root of the FS - to mount as "/" in case of Unix-systems, as "C:" in case of DOS/Windows-systems or as "[SYS]" in case of VMS-systems.

Once a kernel image and/or boot partition is selected the boot-loader program tries to pass control to an OS-bootstrap program located in certain parts of the selected partition (this is why you need to flag a partition "active" to boot from - this certain space is set apart) and starts that. This in turn loads the OS kernel and the rest is OS specific. Note, that the whole process up to the initialization of the OS kernel happens in the CPUs "real mode", even for protected mode/virtual mode OSes. They have to switch the CPU into their respective mode of operation themselves.

So, to answer your question: yes, you will have to install the boot loader (perhaps "GRUB", less likely "lilo") to the MBR ("/dev/sda", which signifies the disk, rather than "/dev/sdaX", which denotes a certain partition on that disk), otherwise it will not get executed automatically. You need to do that as root, not as normal user, because files involved in the boot process have mostly permissions set to be accessible only by root.

I hope this helps.

bakunin
These 2 Users Gave Thanks to bakunin For This Post:
 

9 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Is there a place like this for LINUX questions?

Is there some place like this unix.com for linux questions? a forum like area to ask questions? I love this site, i've learned a lot (use unix - solaris, and linux - redhat). Unfortunately redhat.com has gotten rid of their support forums, everything is in a list type format and I don't want to... (6 Replies)
Discussion started by: kymberm
6 Replies

2. Solaris

solaris 10 bootloader

Hi, I'm new to solaris and I have a question about installing solaris 10. Does solaris during install create a /boot partition? And if it does, is it possible to set the bootloader on this partition or will it always be on the MBR? greetz tony (4 Replies)
Discussion started by: topa
4 Replies

3. Red Hat

RedHat BootLoader

Hi, I have Windows XP and RedHat ES both. Last day I format windows due to problems in it, But now the BootLoader that used to come earlier is not coming. My system is directly booting Windows XP. How can I recover RedHat or what I need to do to get back the BootLoader. So that I can use both... (1 Reply)
Discussion started by: somnathbanerjee
1 Replies

4. UNIX for Advanced & Expert Users

Network Bootloader using Linux ...

Hello, I want to find out the best route for setting up a network bootloader where I can have a custom listing of programmable options. Some of the desired options include: Setting up a linux or windows system via the network Troubleshooting utilities (like Knoppix) load via the... (2 Replies)
Discussion started by: ckoeber
2 Replies

5. Solaris

What is the best way to copy data from place to another place?

Dear Gurus, I need you to advice or suggestion about the best solution to copy data around 200-300G from serverA(location A) to serverB(location B). Normally, I will share folder and then copy but it takes too long time(about 2 days). Do you have any suggestion or which way should be... (9 Replies)
Discussion started by: unitipon
9 Replies

6. Boot Loaders

Bootloader Resources

Here is a list of resources for Unix and GNU/Linux bootloaders: GRUB Legacy: The original GRand Unified Bootloader. Now known as GRUB Legacy. GRUB: The latest and greatest. More commonly known as GRUB2. BRUG: Brand-new Universal loadeR from GRUB. Based on GRUB. Adds features like new object... (0 Replies)
Discussion started by: fpmurphy
0 Replies

7. UNIX for Advanced & Expert Users

Linux column(1) from util-linux-ng for Solaris? Which *.pkg to install?

Hi On Linux systems there is a command called "column". column - columnate lists Synopsis column -tx] -c columns] -s sep] file ...] Description The column utility formats its input into multiple columns. Rows are filled before columns. Input is taken from file operands, or,... (3 Replies)
Discussion started by: slashdotweenie
3 Replies

8. UNIX for Dummies Questions & Answers

Unix vs linux in the job place and other questions

hello all, im new to this site...and look forward to corresponding with you all. i am a microsoft kid (sad) currently i work on small networks and repair computers for home and business. i want to better my skill set...but dont want to carry on down the MS route. Basically i want to... (12 Replies)
Discussion started by: j0n1n
12 Replies

9. Ubuntu

How do I re-install my bootloader?

I accidently altered my partition table. Somehow I wiped it out completely and changed the disk label. Before I rebooted I managed to rebuild it the way it originally was using the original structure and label however I need to re-install a new bootloader for the new MBR. I have Ubuntu 14.04TLS... (1 Reply)
Discussion started by: project722
1 Replies
installgrub(1M)                                                                                                                    installgrub(1M)

NAME
installgrub - install GRUB in a disk partition or a floppy SYNOPSIS
/sbin/installgrub [-fm] stage1 stage2 raw-device The installgrub command is an -only program. GRUB stands for GRand Unified Bootloader. installgrub installs GRUB stage 1 and stage 2 files on the boot area of a disk partition. If you specify the -m option, installgrub installs the stage 1 file on the master boot sector of the disk. The installgrub command accepts the following options: -f Suppresses interaction when overwriting the master boot sector. -m Installs GRUB stage1 on the master boot sector interactively. The installgrub command accepts the following operands: stage1 The name of the GRUB stage 1 file. stage2 The name of the GRUB stage 2 file. raw-device The name of the device onto which GRUB code is to be installed. It must be a character device that is readable and writable. For disk devices, specify the slice where the GRUB menu file is located. (For Solaris it is the root slice.) For a floppy disk, it is /dev/rdiskette. Example 1: Installing GRUB on a Hard Disk Slice The following command installs GRUB on a system where the root slice is c0d0s0: example# /sbin/installgrub /boot/grub/stage1 /boot/grub/stage2 /dev/rdsk/c0d0s0 Example 2: Installing GRUB on a Floppy The following command installs GRUB on a formatted floppy: example# mount -F pcfs /dev/diskette /mnt # mkdir -p /mnt/boot/grub # cp /boot/grub/* /mnt/boot/grub # umount /mnt # cd /boot/grub # /sbin/installgrub stage1 stage2 /dev/rdiskette /boot/grub Directory where GRUB files reside. See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Availability |SUNWcsu | +-----------------------------+-----------------------------+ |Interface Stability |Evolving | +-----------------------------+-----------------------------+ boot(1M), fdisk(1M), fmthard(1M), kernel(1M), attributes(5) Installing GRUB on the master boot sector (-m option) overrides any boot manager currently installed on the machine. The system will always boot the GRUB in the Solaris partition regardless of which fdisk partition is active. 24 May 2005 installgrub(1M)
All times are GMT -4. The time now is 04:31 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy