[BlueOnyx:08488] Re: MBR lost
Michael Stauber
mstauber at blueonyx.it
Fri Sep 16 07:50:17 -05 2011
Hi Tobias,
> At the end of the now successful system start I
> saw a message like (its not the exact message, just from my memory)
> "writing sysconfig to harddisk 0"
> "writing sysconfig to harddisk 1"
>
> what I suspect to be the output of the process that is destroying the
> boot records on my harddisks. Because I tested it with a second reboot
> and reproduced the problem: the system did not find anything on its
> disks.
>
> Does somebody know the problem and maybe a solution?
What you saw there was probably the output of this command:
/etc/init.d/fix_grub stop
It runs as /etc/rc3.d/S80fix_grub during shutdown/reboot on a system with
software-raid.
Typical output looks like this:
[root at delve ~]# /etc/init.d/fix_grub stop
Rebuilding 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 (hd0,0)
Filesystem type is ext2fs, partition type 0xfd
grub> setup (hd0)
Checking if "/boot/grub/stage1" exists... no
Checking if "/grub/stage1" exists... yes
Checking if "/grub/stage2" exists... yes
Checking if "/grub/e2fs_stage1_5" exists... yes
Running "embed /grub/e2fs_stage1_5 (hd0)"... 15 sectors are embedded.
succeeded
Running "install /grub/stage1 (hd0) (hd0)1+15 p (hd0,0)/grub/stage2
/grub/grub.conf"... succeeded
Done.
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... yes
Checking if "/grub/stage2" exists... yes
Checking if "/grub/e2fs_stage1_5" exists... yes
Running "embed /grub/e2fs_stage1_5 (hd1)"... 15 sectors are embedded.
succeeded
Running "install /grub/stage1 (hd1) (hd1)1+15 p (hd1,0)/grub/stage2
/grub/grub.conf"... succeeded
Done.
grub> quit
[root at delve ~]#
Actually /etc/init.d/fix_grub is there to prevent the loss of the MBR. We
never really identified what caused the sporadic loss of MBR on a software
RAID1 system. So we eventually added this script to re-setup Grub every time
the system reboots. I'm not particularly happy with it either, but this work
around typically works fine.
--
With best regards
Michael Stauber
More information about the Blueonyx
mailing list