You are not logged in.

#1 2011-10-26 08:25:08

tenlegger
Member
From: West Yorkshire, England
Registered: 2009-12-18
Posts: 39

Installing bootloader to a partition

In the past, I've always been able to install the bootloader to a partition very easily but, after deciding to grab the current Net Install image and do a fresh install (BIG MISTAKE), I find the option to install the bootloader to a partition is no longer there!? After reading posts in here, trawling the wiki and trying lots of "fixes", I've given up. Some guidance would be very much appreciated, thanks.

.\\artin

Last edited by tenlegger (2011-10-26 08:27:05)


Arch Linux x86_64 | KDE SC 4.7.2
AMD Athlon 64 X2 5000+ CPU | 4Gb RAM
nVidia 8500GT GPU

Offline

#2 2011-10-26 08:31:34

SoleSoul
Member
From: Israel
Registered: 2009-06-29
Posts: 319

Re: Installing bootloader to a partition

I don't know the new installer but in order to install grub to the boot sector of a partition all you have to do is run

grub-install /dev/sda1

instead of

grub-install /dev/sda

where sda is the physical disk and 1 is the number of the partition you want to install to.

Offline

#3 2011-10-26 08:39:31

tenlegger
Member
From: West Yorkshire, England
Registered: 2009-12-18
Posts: 39

Re: Installing bootloader to a partition

Many thanks for your swift response.

Currently, I have a new Arch installation but no bootloader installed as I don't want it in the MBR, so how do I install the bootloader if I can't boot into my new Arch installation.

.\\artin

Last edited by tenlegger (2011-10-26 08:43:58)


Arch Linux x86_64 | KDE SC 4.7.2
AMD Athlon 64 X2 5000+ CPU | 4Gb RAM
nVidia 8500GT GPU

Offline

#4 2011-10-26 08:44:41

SoleSoul
Member
From: Israel
Registered: 2009-06-29
Posts: 319

Re: Installing bootloader to a partition

You have some options.
You can install from the live cd like that: http://www.webtechquery.com/index.php/2 … m-live-cd/
or you can find a live media with grub on it, go to grub console and type

set root=(hda1,1) // <- change numbers to the correct ones
linux /boot/vmlinuz // <- write the real kenel file name
initrd /boot/kernel.img // <- write the real image name
boot

EDIT: This way you will boot to your new installation and then you can install from there with "sudo grub-install /dev/sda1"

Last edited by SoleSoul (2011-10-26 08:46:14)

Offline

#5 2011-10-26 08:47:03

thibdb13
Member
From: Mechelen - Belgium
Registered: 2005-10-11
Posts: 114

Re: Installing bootloader to a partition

tenlegger wrote:

Many thanks for your swift response.

Currently, I have a new Arch installation but no bootloader installed as I don't want it in the MBR, so how do I install the bootloader if I can't boot into my new Arch installation.

.\\artin

Boot with the install CD and then choose "Loading existing OS" (or something like that)

Offline

#6 2011-10-26 10:33:52

e-simon
Member
From: Federation Helvetica
Registered: 2011-10-25
Posts: 19

Re: Installing bootloader to a partition

You may always created a boot partition and install the bootloader there.
I used netinstall 64, once the partition is created it installs all bootfiles there, however, you MUST format that drive, else it will fail sad
Dont like that must, since i actualy wanted to have 1 boot partition for all distros.

However, hope this helps.


Laptop: Toshiba Satellite L670 | Ram: 3 GB | CPU: Intel Core Duo 2x1.87Ghz | Grafic: Intel Onboard i915 (Intel® Ironlake Mobile)
System OS': F15 (Gnome 3.2), F16 (LXDE), Ubuntu (Natty, Playstation), Arch 3 (XFCE), Debian 6 (LXDE)
sea Scripts: USB2boot, custom-shell, multimedia, and more

Offline

#7 2011-10-26 12:00:53

tenlegger
Member
From: West Yorkshire, England
Registered: 2009-12-18
Posts: 39

Re: Installing bootloader to a partition

Currently, I don't have a seperate boot partition and I only get the option to install the bootloader to either sda or sdb. Are you saying that if I were to create a seperate boot partition and then re-install Arch, the installer would then give me the option of installing the bootloader to the boot partition in addition to either sda or sdb.

.\\artin

Last edited by tenlegger (2011-10-26 12:01:26)


Arch Linux x86_64 | KDE SC 4.7.2
AMD Athlon 64 X2 5000+ CPU | 4Gb RAM
nVidia 8500GT GPU

Offline

#8 2011-10-26 15:57:32

e-simon
Member
From: Federation Helvetica
Registered: 2011-10-25
Posts: 19

Re: Installing bootloader to a partition

Sorry, i was wrong. That wont work.
Gues you have to use solesouls suggestion and manualy install the bootloader.
If you want to have your mbr restored afterwards, you might use this:

dd if=/dev/sda of=/home/tenlegger/mbr.bin bs=512 count=1

Not sure if it saves the partition table as well, but since you (hopefully) havnt changed it in between, it should work.


Laptop: Toshiba Satellite L670 | Ram: 3 GB | CPU: Intel Core Duo 2x1.87Ghz | Grafic: Intel Onboard i915 (Intel® Ironlake Mobile)
System OS': F15 (Gnome 3.2), F16 (LXDE), Ubuntu (Natty, Playstation), Arch 3 (XFCE), Debian 6 (LXDE)
sea Scripts: USB2boot, custom-shell, multimedia, and more

Offline

#9 2011-10-26 19:46:11

tenlegger
Member
From: West Yorkshire, England
Registered: 2009-12-18
Posts: 39

Re: Installing bootloader to a partition

OK, no problem and no damage done smile

I've tried all suggestions and I really do appreciate everyone's help but, alas, none of them work.

I thought I'd binned my old Arch installation CD but after having a good rummage I've found it and, within 30 minutes, I had a fresh install of Arch and the bootloader installed in my Arch root partition. It's so-so easy with the old installation CD but why it has to be so difficult (impossible?) with the new one is completely beyond me!

.\\artin


Arch Linux x86_64 | KDE SC 4.7.2
AMD Athlon 64 X2 5000+ CPU | 4Gb RAM
nVidia 8500GT GPU

Offline

#10 2011-10-26 19:52:36

lilsirecho
Veteran
Registered: 2003-10-24
Posts: 5,000

Re: Installing bootloader to a partition

The problem is with grub which doesn't allow partitioned boots in linux 3.0.....

EDIT:  I am presently booted from a partition and booted in raid0 while I post this.

The kernel I am using is kernel2.6.version 39.

Within that arena I believe that the suggested grub -install method will work but not in the new Linux 3.0.

And you cannot upgrade to Linux from that kernel arrangement because all will fail due to grub limits...it does not allow partitioned boot.

Some references to chattr -i fixes have appeared but I feel that isn't viable AFTER upgrade to luinux 3.0.

Perhaps regressing to kernel26 will allow your partitioned boot.

I haven't tried that method but used dd to create an up-sized version of my original bootable raid0 with great success!  Now I have two bootable raid0 pairs of CF devices.  One is made of 8GB devices and the other with 16GB devices.

Last edited by lilsirecho (2011-10-26 20:03:14)


Prediction...This year will be a very odd year!
Hard work does not kill people but why risk it: Charlie Mccarthy
A man is not complete until he is married..then..he is finished.
When ALL is lost, what can be found? Even bytes get lonely for a little bit!     X-ray confirms Iam spineless!

Offline

#11 2011-10-27 11:03:22

tenlegger
Member
From: West Yorkshire, England
Registered: 2009-12-18
Posts: 39

Re: Installing bootloader to a partition

Further to my previous post, I'm using the 3.0.7-1(x64) kernel and the grub bootloader is installed in /dev/sda5(my Arch partition) and I have no problems booting Arch big_smile

.\\artin


Arch Linux x86_64 | KDE SC 4.7.2
AMD Athlon 64 X2 5000+ CPU | 4Gb RAM
nVidia 8500GT GPU

Offline

Board footer

Powered by FluxBB