FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Debian > Debian User

 
 
LinkBack Thread Tools
 
Old 05-15-2008, 09:14 AM
Gilles Guiot
 
Default problem with grub

Hello all,

I'm a newbie to Linux. I have a Dell server with two raid arrays (sda
and sdb), both raid 1. I created and LVM on sdb. After having copied
the filesystem from sda onto sdb, I want to configure grub so that it
boots on sdb. 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 ?

thanks a lot in advance

--
Gilles Guiot
Responsable exploitation informatique
Tél. : 01 53 23 02 20
gilles.guiot@saros.fr


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 
Old 05-15-2008, 02:32 PM
 
Default problem with grub

Am 2008-05-15 um 11:14 schrieb Gilles Guiot:

Hello all,

I'm a newbie to Linux. I have a Dell server with two raid arrays
(sda and

sdb), both raid 1. I created and LVM on sdb. After having copied the
filesystem from sda onto sdb, I want to configure grub so that it
boots on

sdb.


Could you clarify what your setup is?

Do you have two disks, sda and sdba, which together form *one* RAID1
array, or
do you have two partitions on each of the two disks and use two RAID1
arrays,
or...? 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".

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.

And now you want to make sure you can boot your system either from
sda or sdb,

i.e. you can start the system even if one disk has failed, correct?


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


-Moritz


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 
Old 05-15-2008, 02:43 PM
Gilles Guiot
 
Default problem with grub

hh.eu@gmx.de a écrit :


Am 2008-05-15 um 11:14 schrieb Gilles Guiot:

Hello all,

I'm a newbie to Linux. I have a Dell server with two raid arrays (sda
and

sdb), both raid 1. I created and LVM on sdb. After having copied the
filesystem from sda onto sdb, I want to configure grub so that it
boots on

sdb.


Could you clarify what your setup is?

Do you have two disks, sda and sdba, which together form *one* RAID1
array, or
do you have two partitions on each of the two disks and use two RAID1
arrays,

or...?


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.



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.


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.

And now you want to make sure you can boot your system either from sda
or sdb,

i.e. you can start the system even if one disk has failed, correct?


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.




-Moritz





--
Gilles Guiot
Responsable exploitation informatique
Tél. : 01 53 23 02 20
gilles.guiot@saros.fr


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 
Old 05-15-2008, 03:54 PM
 
Default problem with grub

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


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 
Old 05-15-2008, 04:25 PM
Wackojacko
 
Default 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


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 

Thread Tools




All times are GMT. The time now is 01:43 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2007 - 2008, www.linux-archive.org