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 08-23-2011, 05:50 PM
abdelkader belahcene
 
Default howto boot from the second disk in raid 1

hi,
I installed squeeze* on 2 disks sata* using* raid 1.

the system runs fine with both disks,* it runs fine with the first disk alone,
*

but it fails to* reboot from the second disk alone.

although* i installed* grub in both disks*

when i used the second disk alone,* it is detected as slave!!!!* no master disk detected!!!,
so the system reboot without stopping!!!!

is there a possibility to declare the disk as master???


thanks for help
*
 
Old 08-23-2011, 07:28 PM
Stan Hoeppner
 
Default howto boot from the second disk in raid 1

On 8/23/2011 12:50 PM, abdelkader belahcene wrote:
> *hi,
> I installed squeeze on 2 disks sata using raid 1.

Hardware/mobo fakeraid, or Linux MD RAID (mdadm)? Please state mobo
brand and model#, as well as any IDE/SATA PCI/e cards.

> the system runs fine with both disks, it runs fine with the first disk
> alone,
>
>
> but it fails to reboot from the second disk alone.
> although i installed grub in both disks
>
> when i used the second disk alone, it is detected as slave!!!! no master
> disk detected!!!,
> so the system reboot without stopping!!!!
>
> is there a possibility to declare the disk as master???
>
> thanks for help
> *

SATA doesn't have "master" and "slave" designations, so I'd say you're
using IDE disks, or your system BIOS is funky. Also, Master and Slave
don't mean what you apparently think they do. These settings have
nothing to do with software, should not affect boot order, or how Linux
runs. In the world or IDE/PATA, you can have a single slave device on a
cable in absence of a "Master" device. Think of "Master" and "Slave" as
"0" and "1" instead. They are simply designations, but given horribly
bad names decades ago by engineers with brain damage.

Regardless, you should be able to configure the boot order in the BIOS
to do whatever you want, unless of course this is a really old PC.

--
Stan


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 4E53FF4E.8000201@hardwarefreak.com">http://lists.debian.org/4E53FF4E.8000201@hardwarefreak.com
 
Old 08-23-2011, 08:44 PM
Bob Proulx
 
Default howto boot from the second disk in raid 1

abdelkader belahcene wrote:
> but it fails to reboot from the second disk alone.
> although i installed grub in both disks

Are you very certain that you installed grub on both disks? Because
failure to do this is a very common reason that systems won't boot
from the second disk. Previous versions of Debian such as Lenny did
not automatically install onto both disks. I believe that is now
improved on Squeeze and later and grub is automatically installed on
both disks IIRC.

For the previous grub these instructions will install it on the second
disk. Assuming /dev/sdb is your second disk, adjust if needed.

# grub
grub> device (hd0) /dev/sdb
grub> root (hd0,0)
grub> setup (hd0)
grub> quit

For the new Grub2, I don't know. I haven't been able to learn it yet.
Perhaps someone else will be kind enough to step up and say what needs
to be done to install grub2 on a second disk. Probably just:

grub-install /dev/sdb

Bob
 
Old 08-23-2011, 08:50 PM
Bob Proulx
 
Default howto boot from the second disk in raid 1

Bob Proulx wrote:
> # grub
> grub> device (hd0) /dev/sdb
> grub> root (hd0,0)
> grub> setup (hd0)
> grub> quit

Oh! I made an (hd0,0) assumption above and didn't explain it. That
valud may be different depending upon your configuration. But in the
old grub you can search for it like this:

grub> find /grub/stage1
(hd0,0)
(hd1,0)

On my system /boot is in /dev/md0 and that is actually /dev/sda1 and
/dev/sdb1 and so the files are found in (hd0,0) and (hd1,0).
Therefore mapping /dev/sdb to hd0 means (hd0,0) will be /dev/sdb1. If
you have /boot some place else then your information will need to be
different.

Again, the new grub is probably completely different. I haven't
worked with it enough to know how to drive it at this level.

Bob
 
Old 08-23-2011, 09:03 PM
Tom H
 
Default howto boot from the second disk in raid 1

On Tue, Aug 23, 2011 at 4:44 PM, Bob Proulx <bob@proulx.com> wrote:
>
> For the new Grub2, I don't know. *I haven't been able to learn it yet.
> Perhaps someone else will be kind enough to step up and say what needs
> to be done to install grub2 on a second disk. *Probably just:
>
> *grub-install /dev/sdb

Correct. And should work for grub1 too.


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: http://lists.debian.org/CAOdo=SzFu605rdJJA-bPMGVbTsQ5qEbbhKXmBNMSH_O4DtQ@mail.gmail.com
 
Old 08-23-2011, 09:21 PM
Bob Proulx
 
Default howto boot from the second disk in raid 1

Tom H wrote:
> Bob Proulx wrote:
> > For the new Grub2, I don't know. I haven't been able to learn it yet.
> > Perhaps someone else will be kind enough to step up and say what needs
> > to be done to install grub2 on a second disk. Probably just:
> >
> > grub-install /dev/sdb
>
> Correct.

Oh good. Thanks for jumping in with information.

> And should work for grub1 too.

But it doesn't work for grub1. I am hoping that it is improved with
grub2 but don't know.

I have tried grub-install /dev/sdb with grub1 and it does not create a
bootable disk for me. I would need to set up a test case again to get
to the details but what seems to happen is that doing that with grub1
somehow creates a configuration where it only works if the disk is
/dev/sdb. But if sda fails then on the reboot sdb rotates down to
become sda and won't boot displaying an early part of the grub boot
line but never getting to the grub boot menu. I remember once putting
in another dummy disk just to hold the sda position to force the raid
disk back to sdb and that enabled it to boot which caused me to
believe somehow it is configured requiring it to be sdb and failing to
work when it is sda. That problem is why it is necessary with grub1
to specify the sdb device as (hd0) when issuing the grub setup
command. Then it is configured as sda and in the future when it is
sda it will boot.a

Bob
 
Old 08-23-2011, 10:26 PM
Tom H
 
Default howto boot from the second disk in raid 1

On Tue, Aug 23, 2011 at 5:21 PM, Bob Proulx <bob@proulx.com> wrote:
> Tom H wrote:
>> Bob Proulx wrote:


>>> For the new Grub2, I don't know. I haven't been able to learn it yet.
>>> Perhaps someone else will be kind enough to step up and say what needs
>>> to be done to install grub2 on a second disk. Probably just:
>>>
>>> grub-install /dev/sdb
>>
>> Correct.
>
> Oh good. Thanks for jumping in with information.

You're welcome.


>> And should work for grub1 too.
>
> But it doesn't work for grub1. I am hoping that it is improved with
> grub2 but don't know.

It works for grub1:

http://www.gnu.org/software/grub/manual/legacy/grub.html#Invoking-grub_002dinstall

And it also works with grub2 because it doesn't have a "grub" prompt
so there's no other way of populating "/boot/grub" and installing
grub2 to the MBR.


> I have tried grub-install /dev/sdb with grub1 and it does not create a
> bootable disk for me. I would need to set up a test case again to get
> to the details but what seems to happen is that doing that with grub1
> somehow creates a configuration where it only works if the disk is
> /dev/sdb. But if sda fails then on the reboot sdb rotates down to
> become sda and won't boot displaying an early part of the grub boot
> line but never getting to the grub boot menu. I remember once putting
> in another dummy disk just to hold the sda position to force the raid
> disk back to sdb and that enabled it to boot which caused me to
> believe somehow it is configured requiring it to be sdb and failing to
> work when it is sda. That problem is why it is necessary with grub1
> to specify the sdb device as (hd0) when issuing the grub setup
> command. Then it is configured as sda and in the future when it is
> sda it will boot.

Both of these work - and have worked for me. The first is the one that
most would agree is correct. As long as it works, I don't care.

#!/bin/sh
GRUB=/sbin/grub
$GRUB --batch --no-floppy <<EOF 1>/dev/null 2>/dev/null
device (hd0) /dev/sda
root (hd0,0)
setup (hd0)
device (hd1) /dev/sdb
root (hd1,0)
setup (hd1)
quit
EOF

#!/bin/sh
GRUB=/sbin/grub
$GRUB --batch --no-floppy <<EOF 1>/dev/null 2>/dev/null
device (hd0) /dev/sda
root (hd0,0)
setup (hd0)
device (hd0) /dev/sdb
root (hd0,0)
setup (hd0)
quit
EOF


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: CAOdo=SyfVUzj3qaGt51P-HG=-mCbV-kj86JxioCUeSQZJ8C0+A@mail.gmail.com">http://lists.debian.org/CAOdo=SyfVUzj3qaGt51P-HG=-mCbV-kj86JxioCUeSQZJ8C0+A@mail.gmail.com
 
Old 08-23-2011, 10:40 PM
Scott Ferguson
 
Default howto boot from the second disk in raid 1

On 24/08/11 06:44, Bob Proulx wrote:
> abdelkader belahcene wrote:
>> but it fails to reboot from the second disk alone.
>> although i installed grub in both disks
>

<snipped>

> Probably just:
>
> grub-install /dev/sdb
>
> Bob

Followed by:-
# update-grub


Cheers


--
"People ask me what I think about that woman priest thing. What, a woman
priest? Women priests. Great, great. Now there's priests of both sexes I
don't listen to."
~ Bill Hicks


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 4E542C67.9000700@gmail.com">http://lists.debian.org/4E542C67.9000700@gmail.com
 
Old 08-23-2011, 11:59 PM
Tom H
 
Default howto boot from the second disk in raid 1

On Tue, Aug 23, 2011 at 6:40 PM, Scott Ferguson
<prettyfly.productions@gmail.com> wrote:
> On 24/08/11 06:44, Bob Proulx wrote:
>> abdelkader belahcene wrote:
>>> but it fails to *reboot from the second disk alone.
>>> although *i installed *grub in both disks
>
> <snipped>
>
>> Probably just:
>>
>> * grub-install /dev/sdb
>
> Followed by:-
> # update-grub

Unecessary if grub's already installed.


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: CAOdo=SysL=kZLeW5Ca7h5HpxMqMRLm07sGjZKfQ6Q9DwUjfr0 A@mail.gmail.com">http://lists.debian.org/CAOdo=SysL=kZLeW5Ca7h5HpxMqMRLm07sGjZKfQ6Q9DwUjfr0 A@mail.gmail.com
 
Old 08-24-2011, 06:47 AM
Scott Ferguson
 
Default howto boot from the second disk in raid 1

On 24/08/11 09:59, Tom H wrote:
> On Tue, Aug 23, 2011 at 6:40 PM, Scott Ferguson
> <prettyfly.productions@gmail.com> wrote:
>> On 24/08/11 06:44, Bob Proulx wrote:
>>> abdelkader belahcene wrote:
>>>> but it fails to �reboot from the second disk alone.
>>>> although �i installed �grub in both disks
>>
>> <snipped>
>>
>>> Probably just:
>>>
>>> � grub-install /dev/sdb
>>
>> Followed by:-
>> # update-grub
>
> Unecessary if grub's already installed.
>
>
Yes - I was wrong.

If it was a new disk, the --recheck parameter should have been applied
to check the device map. If /boot/grub already exists on /dev/sdb then
that's probably not necessary.

# grub-install /dev/sdb
would have given an error if grub was not already installed.
That will install /boot on /dev/sdb


Cheers

--
"People ask me what I think about that woman priest thing. What, a woman
priest? Women priests. Great, great. Now there's priests of both sexes I
don't listen to."
~ Bill Hicks


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 4E549E8D.2040606@gmail.com">http://lists.debian.org/4E549E8D.2040606@gmail.com
 

Thread Tools




All times are GMT. The time now is 02:56 PM.

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