Index: [Article Count Order] [Thread]

Date:  Fri, 12 Sep 2008 21:39:03 +0200
From:  "Taco Scargo" <taco (at mark) scargo.nl>
Subject:  [coba-e:13964] Re: Grub problems
To:  <coba-e (at mark) bluequartz.org>
Message-Id:  <F008A9268D7A46DA872478B39C559B25@DELLP4TACO>
References:  <0C1A4BDC27774157924CF6AE3B259936 (at mark) DELLP4TACO> <1221228495.20700.3.camel (at mark) dragon.home.osser.se> <48CA7A8D.2050202 (at mark) mixfans.org> <1221230165.20700.13.camel (at mark) dragon.home.osser.se> <48CA826A.6070806 (at mark) mixfans.org> <1221245035.20700.19.camel (at mark) dragon.home.osser.se>
X-Mail-Count: 13964

Normally to find out the exact boot partition in grub, you do a find 
grub/grub.conf

You cou.ld parse the results to find the partitions.
If they are setup in a different order, it might be (hd0,1) or something 
similar.

Taco
----- Original Message ----- 
From: "Rickard Osser" <rickard.osser (at mark) bluapp.com>
To: <coba-e (at mark) bluequartz.org>
Sent: Friday, September 12, 2008 8:43 PM
Subject: [coba-e:13962] Re: Grub problems


> Hi Dennis,
>
> sorry about the /dev/mdstat (I was in a hurry).
>
> Hmm, the script should work....
>
> There's something fishy about your md0 and hda1/hdc1. According to all
> logic hda1 should be (hd0,0)...
>
> Ok, I've got 1 machine running with 2 disks (raid1 using libata) and 1
> with 4 disks, also running with libata. I haven't tried using ide for
> raid.
>
> I'll have to install 1 machine and try it out.
> I'll get back to you.
>
> Regards,
>
> Rickard
>
> On Fri, 2008-09-12 at 16:53 +0200, Dennis wrote:
>> cat /dev/mdstat does not work
>> this works:
>> [root@wb boot]# cat /proc/mdstat
>> Personalities : [raid1]
>> md1 : active raid1 hdc2[1] hda2[0]
>>       6289344 blocks [2/2] [UU]
>>
>> md2 : active raid1 hdc3[1] hda3[0]
>>       1052160 blocks [2/2] [UU]
>>
>> md3 : active raid1 hdc5[1] hda5[0]
>>       191695488 blocks [2/2] [UU]
>>
>> md0 : active raid1 hdc1[1] hda1[0]
>>       104320 blocks [2/2] [UU]
>>
>> unused devices: <none>
>>
>> cat /etc/fstab
>> # This file is edited by fstab-sync - see 'man fstab-sync' for details
>> /dev/md1                /                       ext3    defaults        1 
>> 1
>> /dev/md0                /boot                   ext3    defaults        1 
>> 2
>> none                    /dev/pts                devpts  gid=5,mode=620  0 
>> 0
>> none                    /dev/shm                tmpfs   defaults        0 
>> 0
>> /dev/md3                /home                   ext3
>> defaults,usrquota,grpquota        1 2
>> none                    /proc                   proc    defaults        0 
>> 0
>> none                    /sys                    sysfs   defaults        0 
>> 0
>> /dev/md2                swap                    swap    defaults        0 
>> 0
>> /dev/hdd                /media/cdrom            auto
>> pamconsole,exec,noauto,managed 0 0
>>
>>
>>
>> Rickard Osser schreef:
>> > Hi Dennis,
>> >
>> > can you do the following:
>> >
>> > # cat /dev/mdstat
>> > and
>> > # cat /etc/fstab
>> >
>> > and post the results.
>> >
>> > Thanks in advance,
>> >
>> > Rickard
>> >
>> >
>> > On Fri, 2008-09-12 at 16:19 +0200, Dennis wrote:
>> >
>> >> In the past I encountered similar issues as Taco and the solution for 
>> >> me
>> >> was same as Taco is describing
>> >>
>> >> now found your script (I had holiday, so I skipped a lot of messages)
>> >> and tried it
>> >>
>> >> I can start the script .. and when stopping it .. i get errors ..
>> >>
>> >> [root (at mark) wb tmp]# ./fix_grub stop
>> >> Rebuilding grub:
>> >> Probing devices to guess BIOS drives. This may take a long time.
>> >>
>> >>
>> >>     GNU GRUB  version 0.95  (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 (hd0,0)
>> >>  Filesystem type is ext2fs, partition type 0xfd
>> >> grub> setup (hd0)
>> >>  Checking if "/boot/grub/stage1" exists... no
>> >>  Checking if "/grub/stage1" exists... no
>> >>
>> >> Error 15: File not found
>> >> grub> root (hd1,0)
>> >>  Filesystem type is ext2fs, partition type 0xfd
>> >> grub> setup (hd1)
>> >>  Checking if "/boot/grub/stage1" exists... no
>> >>  Checking if "/grub/stage1" exists... no
>> >>
>> >> Error 15: File not found
>> >> grub> quit
>> >>
>> >> where:
>> >> boot gives me
>> >> [root@wb boot]# ls -l
>> >> total 2728
>> >> -rw-r--r--  1 root root     512 Sep 18  2005 boot.0300
>> >> -rw-r--r--  1 root root     512 Sep 18  2005 boot.1600
>> >> -rw-r--r--  1 root root    5824 Feb 21  2005 boot.b
>> >> -rw-r--r--  1 root root     612 Feb 21  2005 chain.b
>> >> -rw-r--r--  1 root root   48513 Jan 17  2006 config-2.6.9-22.0.2.EL
>> >> drwxr-xr-x  2 root root    1024 Jun 19  2007 grub
>> >> -rw-r--r--  1 root root  405320 Jan 23  2006 
>> >> initrd-2.6.9-22.0.2.EL.img
>> >> drwx------  2 root root   12288 Sep 18  2005 lost+found
>> >> -rw-------  1 root root   23040 Jun 30 19:31 map.0301
>> >> -rw-------  1 root root   43520 Sep 28  2006 map.1601
>> >> -rw-r--r--  1 root root    9371 Aug 13  2006 message
>> >> -rw-r--r--  1 root root    9371 Aug 13  2006 message.ja
>> >> -rw-r--r--  1 root root     640 Feb 21  2005 os2_d.b
>> >> -rw-r--r--  1 root root  731295 Jan 17  2006 
>> >> System.map-2.6.9-22.0.2.EL
>> >> -rw-r--r--  1 root root 1469597 Jan 17  2006 vmlinuz-2.6.9-22.0.2.EL
>> >>
>> >> and grub
>> >> [root@wb boot]# cd grub/
>> >> [root@wb grub]# ls -l
>> >> total 8
>> >> -rw-r--r--  1 root root   82 Sep 18  2005 device.map
>> >> -rw-------  1 root root  566 Jun 19  2007 grub.conf
>> >> lrwxrwxrwx  1 root root   11 Sep 18  2005 menu.lst -> ./grub.conf
>> >> -rw-r--r--  1 root root 3605 Aug 13  2006 splash.xpm.gz
>> >>
>> >> Maybe it's helpful ..
>> >>
>> >> Rickard Osser schreef:
>> >>
>> >>> Hi Taco,
>> >>>
>> >>> do you use software raid on that machine?
>> >>> If so I've created a script that rewrites the grub correctly on every
>> >>> shutdown that I posted on the list about a month ago.
>> >>>
>> >>> The problem is that mkinitrd and grub on centos4/rhel4 doesn't really
>> >>> support /boot running with raid1. This means problems everytime there 
>> >>> is
>> >>> a kernel upgrade. I think it's fixed on centos5/rhel5.
>> >>>
>> >>> Hisao said he would incorporate the script in and update.
>> >>>
>> >>> Best regards,
>> >>>
>> >>> Rickard
>> >>>
>> >>> On Fri, 2008-09-12 at 15:53 +0200, Taco Scargo wrote:
>> >>>
>> >>>
>> >>>> Hello,
>> >>>>
>> >>>> Recently one of my many BQ machines did not startup after a reboot 
>> >>>> (when a
>> >>>> new kernel was installed).
>> >>>>
>> >>>> After investigation it seemed as if Grub was not started.
>> >>>>
>> >>>> I booted up with the Nuonce CD in rescue mode and reinstalled grub 
>> >>>> again.
>> >>>> After the reboot, now grub started, but in the grub command prompt 
>> >>>> mode.
>> >>>> When issuing the "configfile /grub/grub.conf" command, the config 
>> >>>> was loaded
>> >>>> and the boot was succesfull.
>> >>>>
>> >>>> When rebooting again, grub did not start anymore.
>> >>>> Lilo is not installed, so that is not the problem.
>> >>>> I have never had this kind of problem, and I have tried a lot to fix 
>> >>>> this.
>> >>>>
>> >>>> If someone ever had a similar problem and was able to fix it, please 
>> >>>> let me
>> >>>> know.
>> >>>>
>> >>>> Regards,
>> >>>>
>> >>>> Taco
>> >>>>
>> >>>>
>> >>>>
>> >>>
>> >>>
>> >
>> >
>> >
>
>
>