FS#15776 - [grub] grub 0.97-16 fails to write to MBR on a RAID drive with dmraid 1.0.0rc15-8

Attached to Project: Arch Linux
Opened by Narthana Epa (Blissful_Choreography) - Tuesday, 04 August 2009, 01:45 GMT
Last edited by Allan McRae (Allan) - Monday, 01 March 2010, 00:59 GMT
Task Type Bug Report
Category Packages: Core
Status Closed
Assigned To Tobias Powalowski (tpowa)
Ronald van Haren (pressh)
Architecture All
Severity Medium
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 1
Private No

Details

Description:
I tried to re-install grub to the MBR by following the guide on ArchWiki (http://wiki.archlinux.org/index.php/Installing_with_Fake-RAID).
However I persistently encountered to following error:

Error 22: No such partition


I suspected that this has something to do the new naming format that dmraid 1.0.0rc15 introduced and sure enough a downgrade to dmraid 1.0.0rc14 and a dmraid -ay resolved the issue. However, people installing afresh with the current packages may not have this option.

Additional info:
* package version(s)
* config and/or log files etc.
grub 0.97-16
dmraid 1.0.0rc15-8
kernel26 2.6.30.4-1

Output:

grub> device (hd0) /dev/mapper/isw_cahdbgfecg_Volume0

grub> geometry (hd0) 10443 255 63
drive 0x80: C/H/S = 10443/255/63, The number of sectors = 167766795, /dev/mapper/isw_cahdbgfecg_Volume0
Partition num: 0, Filesystem type is ext2fs, partition type 0x83
Partition num: 1, Filesystem type unknown, partition type 0x82
Partition num: 2, Filesystem type unknown, partition type 0x7
Partition num: 4, Filesystem type is reiserfs, partition type 0x83
Partition num: 5, Filesystem type is ext2fs, partition type 0x83

grub> root (hd0,0)
Filesystem type is ext2fs, partition type 0x83

grub> 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)"... 25 sectors are embedded.
succeeded
Running "install /boot/grub/stage1 (hd0) (hd0)1+25 p (hd0,0)/boot/grub/stage2 /boot/grub/menu.lst"... failed

Error 22: No such partition


Steps to reproduce:
On a system with fakeRAID, attempt to install grub to a dmraid set:

# grub --device-map=/dev/null
grub> device (hd0) /dev/mapper/raid_set
grub> geometry (hd0) C H S #(use # fdisk -l /dev/mapper/raid_set)
grub> root (hd0,0)
grub> setup (hd0)


This task depends upon

Closed by  Allan McRae (Allan)
Monday, 01 March 2010, 00:59 GMT
Reason for closing:  Fixed
Additional comments about closing:  See final comment
Comment by Gerardo Exequiel Pozzi (djgera) - Tuesday, 04 August 2009, 02:03 GMT
So the problem is dmraid, that there is a bug report open  FS#15756  not grub at all, no matter if is grub -15 or -16. So this task is a duplicate of  FS#15756 , or I am missing something?
Comment by Narthana Epa (Blissful_Choreography) - Tuesday, 04 August 2009, 05:01 GMT
I don't think that the problems is necessarily with dmraid. Fedora have the same dmraid naming scheme but I managed to a write to the MBR using grub from a Fedora 10 LiveCD so I think that grub needs to be patched to support the new naming scheme.

Reverting to the old naming scheme in the dmraid package is a solution, but not a desirable one in my opinion.
Comment by Tobias Powalowski (tpowa) - Tuesday, 04 August 2009, 05:19 GMT
you need a hack to install grub on dmraid, archboot setup includes it you need to symlink to old namescheme
Comment by Narthana Epa (Blissful_Choreography) - Tuesday, 04 August 2009, 05:50 GMT
symlink ... why didn't I think of that!
Comment by André Fettouhi (A.Fettouhi) - Monday, 12 October 2009, 14:36 GMT
I'm having this issue also on 64 bit Arch doing a fresh installation. GRUB fails also at

grub> 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)"... 25 sectors are embedded.
succeeded
Running "install /boot/grub/stage1 (hd0) (hd0)1+25 p (hd0,0)/boot/grub/stage2 /boot/grub/menu.lst"... failed

Error 22: No such partition

using ext4 with no separate boot partition. How do I create these symlinks?
Comment by Narthana Epa (Blissful_Choreography) - Monday, 12 October 2009, 14:53 GMT
This will only work if you you ext4 partition is on a dmraid drive (which i assume is why you are here).

My boot partition is /dev/mapper/isw_cahdbgfecg_Volume0p1 . Under the old scheme it was /dev/mapper/isw_cahdbgfecg_Volume01 . So I want a to create a symlink to /dev/mapper/isw_cahdbgfecg_Volume0p1 called /dev/mapper/isw_cahdbgfecg_Volume01. This is accomplished by the command:

ln -s /dev/mapper/isw_cahdbgfecg_Volume0p1 /dev/mapper/isw_cahdbgfecg_Volume01

run under root privileges. Just replace isw_cahdbgfecg_Volume0 with the name of your raid set and the 1 with the number of your root (and boot) partition (use ls /dev/mapper to find out, but given that you formatted it you would already know the path to it).

You may delete the symlink after grub is set up.
Comment by André Fettouhi (A.Fettouhi) - Monday, 12 October 2009, 15:40 GMT
I tried that and it doesn't work. I created the symlink and did the installation again and it fails again at setup (hd0).
Comment by André Fettouhi (A.Fettouhi) - Monday, 12 October 2009, 19:36 GMT
So is there no official fix for this. I am pretty much stuck and can not reinstall my machine.

Regards

Andre
Comment by Tobias Powalowski (tpowa) - Monday, 12 October 2009, 19:44 GMT
as far as i can tell you is that archboot isos had a fix for this in setup routine, you can try them.
Comment by André Fettouhi (A.Fettouhi) - Monday, 12 October 2009, 19:46 GMT
Can I install with the archboot isos or only rescue?

Regards

André
Comment by Tobias Powalowski (tpowa) - Monday, 12 October 2009, 20:16 GMT
Archboot isos contain everything to install archlinux, it's a bit different than the official isos.
ftp://ftp.archlinux.org/iso/archboot/
Comment by Chris (maveric7911) - Saturday, 14 November 2009, 02:17 GMT
This worked perfectly! Thanks a ton. (Doing a fresh arch64 install with usb install on a x58 intel raid controller)

My boot partition is /dev/mapper/isw_cahdbgfecg_Volume0p1 . Under the old scheme it was /dev/mapper/isw_cahdbgfecg_Volume01 . So I want a to create a symlink to /dev/mapper/isw_cahdbgfecg_Volume0p1 called /dev/mapper/isw_cahdbgfecg_Volume01. This is accomplished by the command:

ln -s /dev/mapper/isw_cahdbgfecg_Volume0p1 /dev/mapper/isw_cahdbgfecg_Volume01
Comment by Gerardo Exequiel Pozzi (djgera) - Friday, 29 January 2010, 21:55 GMT
status of this?
Comment by André Fettouhi (A.Fettouhi) - Monday, 15 February 2010, 19:25 GMT
I used the archboot isos to reinstall my machine and they worked fine.

Loading...