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
GRUB-INSTALL(8) 					  System Administration Utilities					   GRUB-INSTALL(8)

NAME
grub-install - install GRUB to a device SYNOPSIS
grub-install [OPTION...] [OPTION] [INSTALL_DEVICE] DESCRIPTION
Install GRUB on your drive. --compress=no|xz|gz|lzo compress GRUB files [optional] -d, --directory=DIR use images and modules under DIR [default=/usr/lib/grub/<platform>] --fonts=FONTS install FONTS [default=unicode] --install-modules=MODULES install only MODULES and their dependencies [default=all] -k, --pubkey=FILE embed FILE as public key for signature checking --locale-directory=DIR use translations under DIR [default=/usr/share/locale] --locales=LOCALES install only LOCALES [default=all] --modules=MODULES pre-load specified modules MODULES --themes=THEMES install THEMES [default=starfield] -v, --verbose print verbose messages. --allow-floppy make the drive also bootable as floppy (default for fdX devices). May break on some BIOSes. --auto-nvram only update NVRAM variables if possible. This option is only available on EFI and IEEE1275 targets. --boot-directory=DIR install GRUB images under the directory DIR/grub instead of the boot/grub directory --bootloader-id=ID the ID of bootloader. This option is only available on EFI and Macs. --core-compress=xz|none|auto choose the compression to use for core image --disk-module=MODULE disk module to use (biosdisk or native). This option is only available on BIOS target. --efi-directory=DIR use DIR as the EFI System Partition root. --force install even if problems are detected --force-file-id use identifier file even if UUID is available --label-bgcolor=COLOR use COLOR for label background --label-color=COLOR use COLOR for label --label-font=FILE use FILE as font for label --macppc-directory=DIR use DIR for PPC MAC install. --no-bootsector do not install bootsector --no-extra-removable Do not install bootloader code to the removable media path. This option is only available on EFI. --no-nvram don't update the `boot-device'/`Boot*' NVRAM variables. This option is only available on EFI and IEEE1275 targets. --no-rs-codes Do not apply any reed-solomon codes when embedding core.img. This option is only available on x86 BIOS targets. --no-uefi-secure-boot do not install an image usable with UEFI Secure Boot, even if the system was currently started using it. This option is only avail- able on EFI. --product-version=STRING use STRING as product version --recheck delete device map if it already exists --removable the installation device is removable. This option is only available on EFI. -s, --skip-fs-probe do not probe for filesystems in DEVICE Usage: grub-install [OPTION...] [OPTION] [INSTALL_DEVICE] Install GRUB on your drive. --compress=no|xz|gz|lzo compress GRUB files [optional] -d, --directory=DIR use images and modules under DIR [default=/usr/lib/grub/<platform>] --fonts=FONTS install FONTS [default=unicode] --install-modules=MODULES install only MODULES and their dependencies [default=all] -k, --pubkey=FILE embed FILE as public key for signature checking --locale-directory=DIR use translations under DIR [default=/usr/share/locale] --locales=LOCALES install only LOCALES [default=all] --modules=MODULES pre-load specified modules MODULES --themes=THEMES install THEMES [default=starfield] -v, --verbose print verbose messages. --allow-floppy make the drive also bootable as floppy (default for fdX devices). May break on some BIOSes. --auto-nvram only update NVRAM variables if possible. This option is only available on EFI and IEEE1275 targets. --boot-directory=DIR install GRUB images under the directory DIR/grub instead of the boot/grub directory --bootloader-id=ID the ID of bootloader. This option is only available on EFI and Macs. --core-compress=xz|none|auto choose the compression to use for core image --disk-module=MODULE disk module to use (biosdisk or native). This option is only available on BIOS target. --efi-directory=DIR use DIR as the EFI System Partition root. --force install even if problems are detected --force-file-id use identifier file even if UUID is available --label-bgcolor=COLOR use COLOR for label background --label-color=COLOR use COLOR for label --label-font=FILE use FILE as font for label --macppc-directory=DIR use DIR for PPC MAC install. --no-bootsector do not install bootsector --no-extra-removable Do not install bootloader code to the removable media path. This option is only available on EFI. --no-nvram don't update the `boot-device'/`Boot*' NVRAM variables. This option is only available on EFI and IEEE1275 targets. --no-rs-codes Do not apply any reed-solomon codes when embedding core.img. This option is only available on x86 BIOS targets. --no-uefi-secure-boot do not install an image usable with UEFI Secure Boot, even if the system was currently started using it. This option is only avail- able on EFI. --product-version=STRING use STRING as product version --recheck delete device map if it already exists --removable the installation device is removable. This option is only available on EFI. -s, --skip-fs-probe do not probe for filesystems in DEVICE --target=TARGET install GRUB for TARGET platform [default=i386-pc]; available targets: arm-efi, arm-uboot, arm64-efi, i386-coreboot, i386-efi, i386-ieee1275, i386-multiboot, i386-pc, i386-qemu, i386-xen, ia64-efi, mips-arc, mips-qemu_mips, mipsel-arc, mipsel-loongson, mipsel-qemu_mips, powerpc-ieee1275, sparc64-ieee1275, x86_64-efi, x86_64-xen --uefi-secure-boot install an image usable with UEFI Secure Boot. This option is only available on EFI and if the grub-efi-amd64-signed package is installed. -?, --help give this help list --usage give a short usage message -V, --version print program version Mandatory or optional arguments to long options are also mandatory or optional for any corresponding short options. INSTALL_DEVICE must be system device filename. grub-install copies GRUB images into boot/grub. On some platforms, it may also install GRUB into the boot sector. REPORTING BUGS
Report bugs to <bug-grub@gnu.org>. SEE ALSO
grub-mkconfig(8), grub-mkimage(1), grub-mkrescue(1) The full documentation for grub-install is maintained as a Texinfo manual. If the info and grub-install programs are properly installed at your site, the command info grub-install should give you access to the complete manual. grub-install (GRUB) 2.02-2ubuntu8.3 July 2018 GRUB-INSTALL(8)
All times are GMT -4. The time now is 05:12 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy