Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Setting Up Grub on the Two Parts of a Mirror
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Installing Gentoo
View previous topic :: View next topic  
Author Message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 43178
Location: 56N 3W

PostPosted: Sat Jan 18, 2014 6:48 pm    Post subject: Setting Up Grub on the Two Parts of a Mirror Reply with quote

Team,

I'm trying to set up grub, built from grub-static an the two halves of a mdadm raid1
It goes like this ...
Code:
grub
Probing devices to guess BIOS drives. This may take a long time.


    GNU GRUB  version 0.97  (640K lower / 9216K 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)
root (hd0,0)
 Filesystem type is ext2fs, partition type 0x83
grub> setup (hd0)
setup (hd0)
 Checking if "/boot/grub/stage1" exists... yes
 Checking if "/boot/grub/stage2" exists... yes
 Checking if "/boot/grub/e2fs_stage1_5" exists... yes
 Running "embed /boot/grub/e2fs_stage1_5 (hd0)"... failed (this is not fatal)
 Running "embed /boot/grub/e2fs_stage1_5 (hd0,0)"... failed (this is not fatal)
 Running "install /boot/grub/stage1 (hd0) /boot/grub/stage2 p /boot/grub/menu.lst "... succeeded
Done.
grub> root (hd1,0)
root (hd1,0)
 Filesystem type is ext2fs, partition type 0x83
grub> setup (hd1)
setup (hd1)
 Checking if "/boot/grub/stage1" exists... yes
 Checking if "/boot/grub/stage2" exists... yes
 Checking if "/boot/grub/e2fs_stage1_5" exists... yes
 Running "embed /boot/grub/e2fs_stage1_5 (hd1)"... failed (this is not fatal)
 Running "embed /boot/grub/e2fs_stage1_5 (hd1,0)"... failed (this is not fatal)
 Running "install /boot/grub/stage1 (hd1) /boot/grub/stage2 p /boot/grub/menu.lst "... failed

Error 31: File is not sector aligned
grub>

The HDD uses GPT, so I am aware that stage1 will load stage2 directly from a block list, so it all breaks if grub-static is ever updated, which it won't be.

However, as you see from the above, I get an error setting up the MBR on (hd1).
Keep in mind that /boot is mdadm raid1.
So how does that happen, and what to do about it?

-- edit --
Hmm. whichever MBR I set up first works and the second one fails.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
szatox
Veteran
Veteran


Joined: 27 Aug 2013
Posts: 1746

PostPosted: Sat Jan 18, 2014 7:18 pm    Post subject: Reply with quote

AFAIR I have grub1 installed on partition rather than in MBR

Code:
fdisk -l /dev/sda

Disk /dev/sda: 1000.2 GB, 1000204886016 bytes, 1953525168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk identifier: 0x000dc962

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *        2048      104447       51200   fd  Linux raid autodetect
/dev/sda2          104448  1953525167   976710360   fd  Linux raid autodetect
Contents of /boot/grub/grub.conf also second this, as there is no root device defined, only a relative path to kernel and initrd.
Also, grub1 does undestand old format device mapper's tags, but it does not understand new format. Make sure your boot partition uses old one.
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 43178
Location: 56N 3W

PostPosted: Sun Jan 19, 2014 2:24 pm    Post subject: Reply with quote

I eventually found an old fdisk (thank you Debian rescue system) which says
Code:
   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1   *           1  4294967295  2147483647+  ee  GPT
Partition 1 does not start on physical sector boundary.

Which is as expected. The MSDOS partition table is only there for broken BIOSes that want to test the bootable flag in an MSDOS partition table before they will load the MBR.
This partition table is a fake, as the real partition table is GPT, which starts at LBA 1.

I set the bootable flag on here, in case this server has such a broken BIOS.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Installing Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum