Description of problem: During installation of Fedora using patches for md installation support in anaconda, grub is trying open root partition with incorrect name. The first partition was created as /dev/md126p1, but grub is trying to open device /dev/md1261. Version-Release number of selected component (if applicable): grub-0.97-50.fc11.i586 Steps to Reproduce: 1. Apply patches from anaconda list for md installation support on isw raid1 array for anaconda 2. During installation create root partition on /dev/md126 device 3. Choose installation of grub on MBR of /dev/md126 Actual results: Running... ['/sbin/grub', '--batch', '--no-floppy', '--device-map=/boot/grub/device.map'] 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) Error 21: Selected disk does not exist grub> install --stage2=/boot/grub/stage2 /boot/grub/stage1 d (hd0) /boot/grub/stage2 p (hd0,0)/boot/grub/grub.conf Error 12: Invalid device requested grub> Expected results: Grub opens correct device for root partition. Additional info:
I've added some traces to grub source code. Results are shown in attachment. grub was executed by command: /sbin/grub --device-map=/boot/grub/device.map File device.map contains line: (hd0) /dev/md125 Patch for traces for grub 0.97 diff --git a/lib/device.c b/lib/device.c index 587cc3e..53d3673 100644 --- a/lib/device.c +++ b/lib/device.c @@ -1097,6 +1097,9 @@ write_to_partition (char **map, int drive, int partition, + fprintf(stderr, "\nwrite_to_partition: drive=%d dev=%s", + drive, map[drive]); + + fprintf(stdout, "\nwrite_to_partition: drive=%d dev=%s", + drive, map[drive]); strcpy (dev, map[drive]); if (have_devfs ()) @@ -1116,6 +1119,7 @@ write_to_partition (char **map, int drive, int partition, /* Open the partition. */ fprintf (stderr, "\nopen dev=%s\n", dev); + fprintf (stdout, "\nopen dev=%s\n", dev); fd = open (dev, O_RDWR); if (fd < 0) {
Created attachment 346680 [details] qemu screen dump with logs from grub console
This is probably something wrong in grub-install , not in the grub binary itself.
Can you tell which commands are being passed in to grub?
The answer is in comment #1 As a workaround I'm creating during installation link /dev/md1261 using command: ln -s /dev/md126p1 /dev/md1261 in directory /mnt/sysimage/dev
Please don't do it that way.
I'm creating this link manually. I'm not adding this workaround to the code.
This bug appears to have been reported against 'rawhide' during the Fedora 11 development cycle. Changing version to '11'. More information and reason for this action is here: http://fedoraproject.org/wiki/BugZappers/HouseKeeping
Created attachment 351034 [details] PATCH: add support for partitionable md Here is a patch fixing this.
I've checked grub-0.97-54.fc12.i586 and found next problem. Error: 22r: No such partition After link md1271 was created problem disappeared. ln -s /dev/md127p1 /dev/md1271 I'm testing using commands: /sbin/grub --device-map=/boot/grub/device.map and then in grub: root (hd0,0) setup (hd0)
I've checked patch with install command instead of setup and it worked OK.
grub-0.97-56.fc12 which includes the patch fixing this is on its way to rawhide, closing.