bugGNU GRUB - Bugs: bug #25008, grub2 cannot read soft-raid...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

bug #25008: grub2 cannot read soft-raid partitions

Submitter:  cengiz gunay <cengique>
Submitted:  Thu 04 Dec 2008 05:30:45 AM UTC
   
 
Category:  Booting Severity:  Major
Priority:  5 - Normal Item Group:  Software Error
Status:  Wont Fix Privacy:  Public
Assigned to:  None Originator Name: 
Open/Closed:  Closed Release:  Bazaar - trunk
Release:  1.96 Reproducibility:  Every Time
Planned Release:  None

Sat 06 Nov 2010 09:04:10 PM UTC, comment #5: 

--debug is undocumented on purpose

Vladimir Serbinenko <phcoder>
Group administrator
Wed 10 Dec 2008 03:39:24 PM UTC, comment #4: 

Two things:

1) grub-install's decision to put only the gpt and dos modules and not the linux and pc modules into core.img was correct. I was installing grub2 to a usb stick which had a gpt partition table and no linux partitions. So grub-probe worked correctly to detect the modules necessary to include in core.img.

2) grub-install does have an "undocumented" --debug option that tells grub-setup to be verbose among producing other verbose output.

My only remaining complaint would be about the documentation then. I could help in that respect but I'm not if I'm qualified.

cengiz gunay <cengique>
Sun 07 Dec 2008 05:08:11 PM UTC, comment #3: 

Thanks for the reply. I realized what was wrong. I was creating the core.img using grub-mkimage but when I ran grub-install it overwrote the image I created previously.

So the correct command should be:

grub-install --root-directory=/media/sdg2 --modules="linux raid ext2 gpt pc biosdisk" /dev/sdg2

I still wonder why the "pc" and "linux" modules are not put in core.img when I ran grub-install and modules like "pxe" and "bsd" were there?

The second reason I was confused was not understanding the function of grub-install from the documentation. I now see that the grub-install manual page has the crucial information in one sentence at the very end. I would expect to see that sentence at the very top of the DESCRIPTION section, not hidden after listing all the options.

If the user could see the steps that grub-install executes it would have helped, too. grub-install should accept the '-v' option to pass to its subordinate processes to verbosely display the steps it's executing to be able to properly debug problems (mkimage, setup, etc.). I saw several examples on the internet where grub-install is followed by grub-setup, which is unnecessary since install does setup. So I probably am not the only one confused.

cengiz gunay <cengique>
Sat 06 Dec 2008 06:18:27 PM UTC, comment #2: 

All modules should be loaded if they are embedded to core.img. Perhaps there was ordering problem?

Vesa Jääskeläinen <chaac>
Group Member
Sat 06 Dec 2008 06:05:12 PM UTC, comment #1: 

My mistake. Doing 'insmod pc' allowed reading the soft-raid partitions. You can close the bug report.

I have included the modules in core.img but they were not loaded. Also the auto-generated grub.cfg did not have these commands explicitly. It's frustrating that this behavior wasn't documented somewhere prevalent.

cengiz gunay <cengique>
Thu 04 Dec 2008 05:30:45 AM UTC, original submission:  

Hi,

I have a striped soft-raid system with an Nvidia SATA controller. Legacy GRUB didn't handle it too well, either, but at least it could boot into the first linux partition. GRUB2 cannot even see the partitions in the disk.

My current workaround is copying the kernel and initrd to a usb flash drive and boot with grub2 from there. Once dmraid runs the kernel can find the mapped raid volume.

To demonstrate the issue, when I open a grub console at boot time and fo 'ls', I get (hd0) (hd0,1) (hd1). I can list the files in (hd0) which points to the USB drive. When I 'ls (hd1)' it says it's a 'partition table'. But addressing partitions always results in something like 'invalid partition'.

I have the following modules in core.img: 'linux raid ext2 gpt pc biosdisk'. Am I missing something? The 'linux' module was missing somehow before and it didn't allow me to run the linux and initrd commands. I don't know how the setup scripts can make such a mistake. I hade to manually create the core.img, craft my own manual grub.cfg and run grub-install and grub-setup manually, too. I am really impressed with the promise of GRUB2, but unfortunately it's been pretty rough for me with GRUB2 so far.

Finally, here's my configuration:

Debian unstable, with the grub-pc package from 2008-11-20.

# uname -a
Linux salon 2.6.23.9testing #2 SMP PREEMPT Thu Feb 7 10:39:46 EST 2008 i686 GNU/Linux

but running on an Intel Core 2 Duo processor (64 bit).

lspci output:
00:0e.0 RAID bus controller: nVidia Corporation MCP51 Serial ATA Controller (rev a1)

contents of /dev/mapper created by dmraid:
# ls /dev/mapper/
nvidia_ceebaiib1  nvidia_ceebaiib5  nvidia_ceebaiib7
nvidia_ceebaiib  nvidia_ceebaiib2  nvidia_ceebaiib6

partition table for the striped raid volume nvidia_ceebaiib:
# fdisk -l /dev/mapper/nvidia_ceebaiib

Disk /dev/mapper/nvidia_ceebaiib: 500.1 GB, 500118585344 bytes
255 heads, 63 sectors/track, 60802 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x9df59df5

                      Device Boot      Start         End      Blocks   Id  System
/dev/mapper/nvidia_ceebaiib1               1        1825    14659281   83  Linux
/dev/mapper/nvidia_ceebaiib2   *        1826       16485   117756450    7  HPFS/NTFS
/dev/mapper/nvidia_ceebaiib3           16486       60801   355968270    f  W95 Ext'd (LBA)
/dev/mapper/nvidia_ceebaiib5           16486       19526    24426801    7  HPFS/NTFS
/dev/mapper/nvidia_ceebaiib6           19527       21351    14659281   83  Linux
/dev/mapper/nvidia_ceebaiib7           21352       60801   316882093+   7  HPFS/NTFS

grub.cfg:
### BEGIN /etc/grub.d/00_header ###
insmod raid
set default=0
set timeout=5
insmod lvm
set root=(hd0,2)
search --fs-uuid --set 9370b0bb-092a-4a6f-b68d-c5f7b87390ef
if font /usr/share/grub/ascii.pff ; then
  #set gfxmode=640x480
  set gfxmode=800x600
  insmod gfxterm
  insmod vbe
  if terminal_output gfxterm ; then true ; else
    # For backward compatibility with versions of terminal.mod that don't
    # understand terminal_output
    terminal gfxterm
  fi
fi
### END /etc/grub.d/00_header ###

### BEGIN /etc/grub.d/05_debian_theme ###
set menu_color_normal=cyan/blue
set menu_color_highlight=white/blue

### BEGIN /etc/grub.d/10_linux ###
menuentry "Debian GNU/Linux, linux 2.6.23.9testing" {
        insmod lvm
        set root=(hd0,2)
        search --fs-uuid --set 9370b0bb-092a-4a6f-b68d-c5f7b87390ef
        linux   /boot/vmlinuz-2.6.23.9testing root=/dev/mapper/nvidia_ceebaiib1 ro
        initrd  /boot/initrd.img-2.6.23.9testing
}
menuentry "Debian GNU/Linux, linux 2.6.23.9" {
        insmod lvm
        set root=(hd0,2)
        search --fs-uuid --set 9370b0bb-092a-4a6f-b68d-c5f7b87390ef
        linux   /boot/vmlinuz-2.6.23.9 root=/dev/mapper/nvidia_ceebaiibp1 ro
        initrd  /boot/initrd.img-2.6.23.9
}
### END /etc/grub.d/10_linux ###

### BEGIN /etc/grub.d/30_os-prober ###
### END /etc/grub.d/30_os-prober ###

### BEGIN /etc/grub.d/40_custom ###
# This file is an example on how to add custom entries
### END /etc/grub.d/40_custom ###


grub commands ran (/mnt/tmp is where the usb stick is mounted):
grub-install --root-directory=/mnt/tmp /dev/sdg2
grub-setup -d /mnt/tmp/boot/grub/ -v -r '(hd2,2)' -m /boot/grub/device.map '(hd2)'

The usb stick is currently (hd2), but during bootup it becomes (hd0). That's why I used two different device.map files during the setup and install steps.

Please let me know if I missed something. Thanks.

cengiz gunay <cengique>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by phcoder (Posted a comment)
  • -email is unavailable- added by chaac (Posted a comment)
  • -email is unavailable- added by cengique
  • -email is unavailable- added by cengique (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

     

    Follow 4 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2010-11-06 phcoder StatusNone Wont Fix
        Open/ClosedOpen Closed
        ReleaseNone Bazaar - trunk
    2008-12-04 cengique Carbon-Copy- Added cengique

    Back to the top

    Powered by Savane 3.13-758e.
    Corresponding source code