You are not logged in.

#1 2010-07-02 04:44:46

CPUnltd
Member
From: Milwaukee, WI
Registered: 2009-12-05
Posts: 483
Website

installing JUST the boot loader

experimenting with a few things and am looking to figure out how I can JUST install the boot loader.... via the ISO, it requires me to do all the steps before it (installing packages, partitioning, etc before I can install the boot loader.  I'm looking for a way to essentially detect what's already there and skip all the other portions of the install process to JUST install the boot loader... anyone have any ideas where I can start?  Searching the forums has not produced the specific thing I'm looking to do.  A lot of stuff coverd about the bootloader in general, but not standalone installation of such.  Thanks in advance!!!


Help grow the dev population... have your tech trained and certified!

Offline

#2 2010-07-02 04:59:27

Cr0k
Member
Registered: 2009-10-16
Posts: 174

Re: installing JUST the boot loader

You cannot just execute grub on the root prompt ?

Offline

#3 2010-07-02 07:45:48

demian
Member
From: Frankfurt, Germany
Registered: 2009-05-06
Posts: 709

Re: installing JUST the boot loader

Mount the volume you want to install it to and do a grub-install with the --root-directory parameter:

mount /dev/sda1 /mnt
grub-install --root-directory=/mnt /dev/sda


no place like /home
github

Offline

#4 2010-07-02 14:30:50

CPUnltd
Member
From: Milwaukee, WI
Registered: 2009-12-05
Posts: 483
Website

Re: installing JUST the boot loader

I think demian is along the lines I am working for... but why would I need to mount sda1 when I'm installing grub in sda? just curious...


Help grow the dev population... have your tech trained and certified!

Offline

#5 2010-07-02 14:35:54

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,592
Website

Re: installing JUST the boot loader

grub-install is risky... better to boot to a live cd and load grub, set the root, then do a setup

# grub
<<Now you're in grub>>
>root (hdx,y)
>setup (hdx)

That will install grub to the MBR of hdx - you can also install grub to a partition if you want.  See the grub wiki page.


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

#6 2010-07-02 14:39:53

CPUnltd
Member
From: Milwaukee, WI
Registered: 2009-12-05
Posts: 483
Website

Re: installing JUST the boot loader

much appreciated... I will play with the info that graysky has offered and see where it gets me.... thanks again.


Help grow the dev population... have your tech trained and certified!

Offline

#7 2010-07-02 15:49:20

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,592
Website

Re: installing JUST the boot loader

Let us know how it goes.


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

#8 2010-07-02 22:59:57

CPUnltd
Member
From: Milwaukee, WI
Registered: 2009-12-05
Posts: 483
Website

Re: installing JUST the boot loader

most definitely! big_smile


Help grow the dev population... have your tech trained and certified!

Offline

#9 2010-07-03 01:10:53

CPUnltd
Member
From: Milwaukee, WI
Registered: 2009-12-05
Posts: 483
Website

Re: installing JUST the boot loader

within grub via most recent Arch iso:


---------

<grub> root (sda2)

Error 23: Error while parsing number

<grub> root (sda)

Error 23: Error while parsing number

<grub> setup (sda)

Error 23: Error while parsing number

---------


what am I doing wrong here?

Last edited by CPUnltd (2010-07-03 01:11:22)


Help grow the dev population... have your tech trained and certified!

Offline

#10 2010-07-03 01:13:01

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,592
Website

Re: installing JUST the boot loader

grub uses hdx not sda

see my post or better yet the grub wiki page tongue

http://wiki.archlinux.org/index.php/Grub

Last edited by graysky (2010-07-03 01:13:43)


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

#11 2010-07-03 09:16:49

demian
Member
From: Frankfurt, Germany
Registered: 2009-05-06
Posts: 709

Re: installing JUST the boot loader

graysky wrote:
# grub
<<Now you're in grub>>
>root (hdx,y)
>setup (hdx)

That will install grub to the MBR of hdx - you can also install grub to a partition if you want.  See the grub wiki page.

Isn't that exactly what my line does? (grub-install --root-directory=/mnt /dev/sda)

@cpunltd: You have to mount a partition because Grub needs to know where to find the menu.lst and its other files. The package "grub" needs to be installed on /dev/sda1 in my example.

Last edited by demian (2010-07-03 09:20:30)


no place like /home
github

Offline

#12 2010-07-03 09:29:33

hokasch
Member
Registered: 2007-09-23
Posts: 1,461

Re: installing JUST the boot loader

It is kind of, but as repeatedly stated, using grub-install has its risks, so it is recommended to use the grub shell.

From Grub Manual /  Installing GRUB using grub-install:

Caution: This procedure is definitely less safe, because there are several ways in which your computer can become unbootable. For example, most operating systems don't tell GRUB how to map BIOS drives to OS devices correctly—GRUB merely guesses the mapping. This will succeed in most cases, but not always. Therefore, GRUB provides you with a map file called the device map, which you must fix if it is wrong. See Device map, for more details.

Offline

#13 2010-07-03 10:35:16

CPUnltd
Member
From: Milwaukee, WI
Registered: 2009-12-05
Posts: 483
Website

Re: installing JUST the boot loader

interesting... will have to test this tomorrow when I get back from work...


Help grow the dev population... have your tech trained and certified!

Offline

#14 2010-07-03 10:44:33

.:B:.
Forum Fellow
Registered: 2006-11-26
Posts: 5,819
Website

Re: installing JUST the boot loader

CPUnltd wrote:

I think demian is along the lines I am working for... but why would I need to mount sda1 when I'm installing grub in sda? just curious...

Because the GRUB needs its files to be in /boot? Try removing your /boot/grub directory, and see what happens.*


* Only test if you can fix this and have the time for it


Got Leenucks? :: Arch: Power in simplicity :: Get Counted! Registered Linux User #392717 :: Blog thingy

Offline

Board footer

Powered by FluxBB