[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: problem with grub



hh.eu@gmx.de wrote:

2008-05-15 17:02+0200 Gilles Guiot:

my server has two raid1 arrays, each with two disks, for a total of four hd. sda1 relates to the biggest partion on the first array (sda) and sdb1 relates to the only partition on the second raid array. point is this sdb1 is "in lvm" so to speak, ie there is an lv using all of the partition.

2008-05-15 16:43+0200 hh.eu:

I don't quite understand why you only create LVM on sdb, not on sda,
and what you mean by "copying the filesystem from sda to sdb".
This is an installed and working server. Because we needed more space for backuppc, the initial plan was to create an lvm on the second raid array, boot to it and see if it worked, if so extend it by incorporating the first raid array.

I am using software RAID, which gives me device names such as md0 and md1 for
the RAID arrays rather than sda and sdb, so are you using some sort of
hardware RAID (either with a real hardware RAID controller or 'fake hardware
RAID' using the embedded controller on the motherboard)?

Anyway, if I understand you correctly, you have two partitions on the old RAID
set and just one partition (with LVM) on the new RAID set. The problem is
that (legacy) GRUB cannot deal with LVM directly. GRUB can understand RAID,
but not LVM. That's why people usually have a small RAID1 set on two disks
that contains just a partition on each disk for /boot, and another larger
RAID1 set on the same two disks that is entirely filled with LVM. That's what
I was talking about:

You probably mean you have two partitions on disks sda and sdb, one small
partition and a larger partition. Then you put the two small partitions
together in RAID1 and use it for /boot. You also put the two larger partitions
together into another RAID1 array and use this for LVM.

In other words: You need two partitions on the new RAID set, too. The size for the /boot partitions can be quite small, I chose 512 MB which should be much more than enough. (I didn't want to make it smaller because hard disk space is
cheap nowadays and making it bigger isn't so convenient because it's not on
LVM!).

when i type grub> root (sdb,0) , i get the message : syntax error near
unexpected token '('.
Could someone tell me what's my mistake and how to do it properly ?

Do you type "grub> root (sdb,0)" (without the "") all in one line? If so, you have misunderstood the instructions! You first need to type "grub", then press enter, this will get you to the GRUB command, i.e. you will see a command prompt of "grub>" at the left. Only then you have to enter "root (sdb,0)" and all the other commands (each followed by pressing enter and without the "").
I typed the first grub to enter the grub command, omitted to specifiy it . Apologies.

I was asking because the error message seems very much like an error message
from your normal shell, e.g. bash, which you shouldn't get from the GRUB
shell. (I am not in front of a Debian system so I can't test...)

You also need to specify the hard disk name/number in GRUB notation (which is something like hd0 or hd1, even for SCSI disks), not in the normal notation,
i.e. "root (sdb,0)" doesn't work.

Unfortunately, GRUB uses some sort of guessing to map device names (e.g. sdb <--> hd0, sda <--> hd1) which is not very reliable. See a recent post from me
for tips and details to find out about the mapping:

<http://lists.debian.org/debian-user/2008/05/msg01006.html>

Did you read the manual <http://www.gnu.org/software/grub/manual/grub.html>?

-Moritz



Grub does tab completion so if you type root (<tab> it should give you a list of the available drives as grub sees them. The file /boot/grub/device.map shows how these translate to real hard drives.

HTH

Wackojacko


Reply to: