You are not logged in.

#1 2012-02-28 11:33:33

v43
Member
Registered: 2011-02-03
Posts: 140

GRUB: boot sector in different disk than Grub installation

is it possible to put the grub boot sector in /sdb and the grub installation folder and kernel images in /sda1?


EDIT: maybe should I chainload the second drive? is there a better option?

Last edited by v43 (2012-02-28 11:41:41)

Offline

#2 2012-02-28 12:08:39

v43
Member
Registered: 2011-02-03
Posts: 140

Re: GRUB: boot sector in different disk than Grub installation

is there some way of editing /grub/stage1 to make it look for stage2 in another drive?

Offline

#3 2012-02-28 12:18:02

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

Re: GRUB: boot sector in different disk than Grub installation

yes, reinstall it with a different root.

is it possible to put the grub boot sector in /sdb and the grub installation folder and kernel images in /sda1?

sure. check the grub wiki, and if you need more help describe your partition layout and what you want to achieve.

Offline

#4 2012-02-28 12:40:24

v43
Member
Registered: 2011-02-03
Posts: 140

Re: GRUB: boot sector in different disk than Grub installation

my concern is that the kernel images should reside in sda (which is way faster than sdb), but the bootloader must stay in sdb since sda isn't detected by the bios.

so if i install the bootloader in  sdb (hd1) then i need to make it point for the kernel images in sda1 (hd0,0). i'll give it a try



so far i've been trying the path of chainloading, but grub says that sda doesn't exist (i pointed to it as hd1, as grub thinks sdb is hd0 (ie hd0 is its root)). maybe grub can't detect a drive if the bios doesn't list it? i mean, at the low level. i know it can load a system residing on a drive which the bios can't 'see'.

Offline

#5 2012-02-28 13:47:11

v43
Member
Registered: 2011-02-03
Posts: 140

Re: GRUB: boot sector in different disk than Grub installation

nope, i can't point the root to another drive if this drive isn't detected by the bios.
and chainloading isn't a solution.. so i guess i must put the kernel images in (hd0,0) alias sdb1

ie: this won't work

# (0) Arch Linux
title  Arch Linux
root   (hd1,0)
kernel /boot/vmlinuz-linux root=/dev/sda3 ro
initrd /boot/initramfs-linux.img

this of course does.. but it suffer the super slow transfer rate of sdb. too bad sad

# (0) Arch Linux
title  Arch Linux
root   (hd0,0)
kernel /vmlinuz-linux root=/dev/sda3 ro
initrd /initramfs-linux.img

Last edited by v43 (2012-02-28 13:49:31)

Offline

#6 2012-02-28 16:23:18

perbh
Member
From: Republic of Texas
Registered: 2005-03-04
Posts: 765

Re: GRUB: boot sector in different disk than Grub installation

Since you only have (what you call /dev/sdb) available from the bios, that's where you need to have the MBR and stage1/2-files _and_ the kernel and initrd files
However, once the kernel is loaded (I presume that is when (what you call /dev/sda) is recognized)
Maybe something like this will work:

title archlinux
root (hd0,0)
kernel /vmlinuz-linux ro root=/dev/sdb3
initrd /initramfs-linux.img

This will make your boot slow (but who cares?), but all your commands and utilities and apps will be on the fast(er) disk.
Infact - in your etc/fstab you could have /boot as /dev/sda1 (if you want a seperate boot-partition)

To _my_ way of thinking - the slow disk (which is the only one recognized by the bios) should be /dev/sda and your faster disk should be /dev/sdb.
It could be (and I have no way of knowing) if the kernel swaps these once its loaded - could well be the case ...

Last edited by perbh (2012-02-28 16:27:15)

Offline

Board footer

Powered by FluxBB