Right place to install Linux bootloader

Thread Tools Search this Thread
# 1  
Right place to install Linux bootloader

I installed ubuntu on a windows machine, but after restart the computer automatically booted windows without showing me boot option. I think I might have installed my ubuntu bootloader in the wrong partition. I previously have sda1,2,3,5 and 6. I partitioned sda6 into sda6, sda7 and sda8. I mounted / on sda6, swap on sda7, /home on sda8. When choosing where to install bootloader on the bottom, I selected sda6, instead of sda, where my windows bootloader is. I wonder if I should choose that disk? And now how can I repair it? I used a usb to install it. I can lunch ubuntu directly from my usb, so I tried grub-install /dev/sda on the usb lunched version but it displays: cp: cannot create regular file `/boot/grub/915resolution.mod': Permission denied. Don't know what to do.
Btw, in which disk is my ubuntu kernel installed? thanks a lot.
# 2  
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.

These 2 Users Gave Thanks to bakunin For This Post:
# 3  
oh, I see, and I used EasyBCD to re-install grub. It works. Thanks a lot.
# 4  
Grub broken

Hi, freedombird9!
Can you please post your procedure to reinstall your grub with EasyBCD? I met similar problem to boot my Ubuntu server (64bit) for my dual system. The other one is Win7 which can boot fine.
The problem with Ubuntu is it always boot into rescue mode and Googled out GRUB is broken. Tried liveCD and boot-repair, but not succeed. Thank you in advance!
# 5  
yeah, you need to install the EasyBCD in your Windows, and it will automatically install the new grub to your MBR, you only need to select the version, it's very easy and straight forward.

Previous Thread | Next Thread
Thread Tools Search this Thread
Search this Thread:
Advanced Search

Test Your Knowledge in Science: Computers
Difficulty: Medium
The very first recorded computer "bug" was a moth found inside a Harvard Mark II computer.
True or False?

9 More Discussions You Might Find Interesting

1. 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

2. 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

3. 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

4. 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

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. 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

7. 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

8. 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

9. 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

Featured Tech Videos