Re: [CentOS] boot problem after disk change on raid1

2011-09-07 Thread Bünyamin İzzet
The system works just fine now. I think there was a disk check or something
at boot time which takes 15-20 minutes (I rarely reboot the system once or
twice a year), and it made me think that the system does not boot.

Thanks for your help.

Bunyamin.

2011/9/8 Bünyamin İzzet 

>
>
> On Thu, Sep 8, 2011 at 8:11 AM, Devin Reade  wrote:
>
>> Bünyamin Ýzzet  wrote:
>>
>> > On Wed, Sep 7, 2011 at 11:38 PM, Devin Reade  wrote:
>> >
>> [snip]
>> >># grub
>> >>grub> device (hd0) /dev/sdb
>> >>grub> root (hd0,0)
>> >>grub> setup (hd0)
>> >>grub> quit
>> >
>> > It still does not boot. I could not see the error message, because it is
>> a
>> > dedicated server and I am not sitting at the monitor of the server. So I
>> > type the lines in grub.conf manually to see the error (I'm not sure if
>> it is
>> > the right thing to see the error).
>>
>> If you mean that you typed the lines I gave above into grub.conf, then
>> that was not what was intended (and I doubt that it would work).  My
>> intent was that you get the system booted and running normally (perhaps
>> via the rescue disk), and after that execute 'grub' interactively
>> and issue those commands.
>>
>>  Devin
>>
>
> As you said, I booted the system via rescue disk, and execute grub and
> issue those commands. Then, I reboot the system, but it does not boot.
>
> Then I searched on google about logging grub errors, which I could not find
> anything useful (meybe I did not look enough). So that, in rescue system, I
> execute grub and type commands in grub.conf (results are below) to see which
> error occurs.
>
>
>
> # grub
> Probing devices to guess BIOS drives. This may take a long time.
>
>
> GNU GRUB version 0.97 (640K lower / 3072K upper memory)
>
> [ Minimal BASH-like line editing is supported. For the first word, TAB
> lists possible command completions. Anywhere else TAB lists the possible
> completions of a device/filename.]
> grub> root (hd1,0)
> root (hd1,0)
> Filesystem type is ext2fs, partition type 0xfd
> grub> kernel /vmlinuz-2.6.18-238.19.1.el5 ro root=/dev/md1 vga=0x317
>
> kernel /vmlinuz-2.6.18-238.19.1.el5 ro root=/dev/md1 vga=0x317
> [Linux-bzImage, setup=0x1e00, size=0x1fe01c]
> grub> initrd /initrd-2.6.18-238.19.1.el5.img
>
> initrd /initrd-2.6.18-238.19.1.el5.img
>
> Error 28: Selected item cannot fit into memory
> grub> quit
> quit
>
___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] boot problem after disk change on raid1

2011-09-07 Thread Bünyamin İzzet
On Thu, Sep 8, 2011 at 8:11 AM, Devin Reade  wrote:

> Bünyamin Ýzzet  wrote:
>
> > On Wed, Sep 7, 2011 at 11:38 PM, Devin Reade  wrote:
> >
> [snip]
> >># grub
> >>grub> device (hd0) /dev/sdb
> >>grub> root (hd0,0)
> >>grub> setup (hd0)
> >>grub> quit
> >
> > It still does not boot. I could not see the error message, because it is
> a
> > dedicated server and I am not sitting at the monitor of the server. So I
> > type the lines in grub.conf manually to see the error (I'm not sure if it
> is
> > the right thing to see the error).
>
> If you mean that you typed the lines I gave above into grub.conf, then
> that was not what was intended (and I doubt that it would work).  My
> intent was that you get the system booted and running normally (perhaps
> via the rescue disk), and after that execute 'grub' interactively
> and issue those commands.
>
>  Devin
>

As you said, I booted the system via rescue disk, and execute grub and issue
those commands. Then, I reboot the system, but it does not boot.

Then I searched on google about logging grub errors, which I could not find
anything useful (meybe I did not look enough). So that, in rescue system, I
execute grub and type commands in grub.conf (results are below) to see which
error occurs.



# grub
Probing devices to guess BIOS drives. This may take a long time.


GNU GRUB version 0.97 (640K lower / 3072K upper memory)

[ Minimal BASH-like line editing is supported. For the first word, TAB
lists possible command completions. Anywhere else TAB lists the possible
completions of a device/filename.]
grub> root (hd1,0)
root (hd1,0)
Filesystem type is ext2fs, partition type 0xfd
grub> kernel /vmlinuz-2.6.18-238.19.1.el5 ro root=/dev/md1 vga=0x317

kernel /vmlinuz-2.6.18-238.19.1.el5 ro root=/dev/md1 vga=0x317
[Linux-bzImage, setup=0x1e00, size=0x1fe01c]
grub> initrd /initrd-2.6.18-238.19.1.el5.img

initrd /initrd-2.6.18-238.19.1.el5.img

Error 28: Selected item cannot fit into memory
grub> quit
quit
___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] boot problem after disk change on raid1

2011-09-07 Thread Devin Reade
Bünyamin Ýzzet  wrote:

> On Wed, Sep 7, 2011 at 11:38 PM, Devin Reade  wrote:
> 
[snip]
>># grub
>>grub> device (hd0) /dev/sdb
>>grub> root (hd0,0)
>>grub> setup (hd0)
>>grub> quit
> 
> It still does not boot. I could not see the error message, because it is a
> dedicated server and I am not sitting at the monitor of the server. So I
> type the lines in grub.conf manually to see the error (I'm not sure if it is
> the right thing to see the error).

If you mean that you typed the lines I gave above into grub.conf, then
that was not what was intended (and I doubt that it would work).  My 
intent was that you get the system booted and running normally (perhaps
via the rescue disk), and after that execute 'grub' interactively
and issue those commands.

Devin

___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] boot problem after disk change on raid1

2011-09-07 Thread Bünyamin İzzet
On Wed, Sep 7, 2011 at 11:38 PM, Devin Reade  wrote:

> --On Wednesday, September 07, 2011 08:22:47 PM +0300 Bünyamin İzzet
>  wrote:
>
>- made sure we have boot blocks on both disks, based on information
>  at http://grub.enbug.org/MirroringRAID
>modified /boot/grub/device.map from:
> (hd0) /dev/sda
>(hd1) /dev/sdb
> to:
>(hd0) /dev/sda
>(hd0) /dev/sdb
>
I have changed the device.map as you said


>and then:
># grub
>grub> device (hd0) /dev/sdb
>grub> root (hd0,0)
>grub> setup (hd0)
>grub> quit
>
> And, it is done too.


It still does not boot. I could not see the error message, because it is a
dedicated server and I am not sitting at the monitor of the server. So I
type the lines in grub.conf manually to see the error (I'm not sure if it is
the right thing to see the error).


# grub
Probing devices to guess BIOS drives. This may take a long time.


GNU GRUB  version 0.97  (640K lower / 3072K upper memory)

 [ Minimal BASH-like line editing is supported.  For the first word, TAB
   lists possible command completions.  Anywhere else TAB lists the possible
   completions of a device/filename.]
grub> root (hd1,0)
root (hd1,0)
 Filesystem type is ext2fs, partition type 0xfd
grub> kernel /vmlinuz-2.6.18-238.19.1.el5 ro root=/dev/md1 vga=0x317
kernel /vmlinuz-2.6.18-238.19.1.el5 ro root=/dev/md1 vga=0x317
   [Linux-bzImage, setup=0x1e00, size=0x1fe01c]
grub> initrd /initrd-2.6.18-238.19.1.el5.img
initrd /initrd-2.6.18-238.19.1.el5.img

Error 28: Selected item cannot fit into memory
grub> quit
quit


If it is not the right thing to see the error message at boot time, is there
any chance to log grub errors, boot errors?

Thanks,
Bunyamin.
___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] boot problem after disk change on raid1

2011-09-07 Thread Devin Reade
--On Wednesday, September 07, 2011 02:38:14 PM -0600 Devin Reade
 wrote:

> Sounds like the 'no boot record' issue.  Here's an extract from one
> of my server change logs, for setting things up *before* they go bad:

I should add that, with a tested boot-from-alternate disk in place
I've been able to avoid the boot into rescue mode procedure, thus
minimizing down time.  Ignoring the case of hot-swap devices and
hot spares:

   - shut down system
   - remove faulty disk
   - add in replacement disk
   - reboot to normal run level (3 or 5).  RAID is now running in 
 degraded mode, but you're back in operation
   - do disk paritioning, MBR init, and reconstruction while in service

Devin

___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] boot problem after disk change on raid1

2011-09-07 Thread Devin Reade
--On Wednesday, September 07, 2011 08:22:47 PM +0300 Bünyamin İzzet
 wrote:

> Hello,
> 
> I have two disks sda and sdb. One of the was broken so I have changed the
> broken disk with a working one. I started the server in rescue mode, and
> created the partional table, and added all the partitions to the software
> raid.

Sounds like the 'no boot record' issue.  Here's an extract from one
of my server change logs, for setting things up *before* they go bad:

- made sure we have boot blocks on both disks, based on information
  at http://grub.enbug.org/MirroringRAID
modified /boot/grub/device.map from:
(hd0) /dev/sda
(hd1) /dev/sdb
to:
(hd0) /dev/sda
(hd0) /dev/sdb
and then:
# grub
grub> device (hd0) /dev/sdb
grub> root (hd0,0)
grub> setup (hd0)
grub> quit

With the above in place you can boot from either disk as long as 
your BIOS will let you select the boot device.  I've had older
systems where the BIOS didn't have that option, in which case
the 'in event of breakage' procedure would be to take the working
slave disk and put it on the controller cable that originally had
the flawed master disk.

># cat /boot/grub/device.map
> (hd0)   /dev/sda
> (hd1)   /dev/sdb

Not quite right (need hd0 on both)

Devin

___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos