Package: grub-common; Maintainer for grub-common is GRUB Maintainers <pkg-grub-devel@lists.alioth.debian.org>; Source for grub-common is src:grub2 (PTS, buildd, popcon).
Reported by: Modestas Vainius <modestas@vainius.eu>
Date: Tue, 24 Aug 2010 16:33:05 UTC
Severity: important
Tags: patch, sid, squeeze
Found in version grub2/1.98+20100804-2
Fixed in version grub2/1.98+20100804-5
Done: Colin Watson <cjwatson@debian.org>
Bug is archived. No further changes may be made.
View this report as an mbox folder, status mbox, maintainer mbox
Report forwarded
to debian-bugs-dist@lists.debian.org, GRUB Maintainers <pkg-grub-devel@lists.alioth.debian.org>:
Bug#594221; Package grub-common.
(Tue, 24 Aug 2010 16:33:08 GMT) (full text, mbox, link).
Acknowledgement sent
to Modestas Vainius <modestas@vainius.eu>:
New Bug report received and forwarded. Copy sent to GRUB Maintainers <pkg-grub-devel@lists.alioth.debian.org>.
(Tue, 24 Aug 2010 16:33:08 GMT) (full text, mbox, link).
Message #5 received at submit@bugs.debian.org (full text, mbox, reply):
[Message part 1 (text/plain, inline)]
Package: grub-common Version: 1.98+20100804-2 Severity: important Tags: patch sid squeeze Hello, current versions of grub-probe in squeeze and sid have problems with DMRAID partitions. The problems are demonstrated below. As a result, grub lenny->squeeze upgrade failed leaving my system without a bootloader. While grub-common/lenny had no support for DMRAID at all, it would be a pity to release current grub-common with half working DMRAID support. Therefore, it would be great if the bug was fixed in squeeze. A proposed patch is attached to this mail. Please forward the bug and/or the patch upstream. As you see, the root is mounted on the DMRAID partition. $ mount /dev/mapper/pdc_bacfhgjjjc1 on / type ext3 (rw,errors=remount-ro) tmpfs on /lib/init/rw type tmpfs (rw,nosuid,mode=0755) proc on /proc type proc (rw,noexec,nosuid,nodev) sysfs on /sys type sysfs (rw,noexec,nosuid,nodev) udev on /dev type tmpfs (rw,mode=0755) tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev) devpts on /dev/pts type devpts (rw,noexec,nosuid,gid=5,mode=620) fusectl on /sys/fs/fuse/connections type fusectl (rw) /dev/mapper/lvmmain-usr on /usr type ext3 (rw,errors=remount-ro) /dev/mapper/lvmmain-var on /var type ext3 (rw,errors=remount-ro) /dev/mapper/lvmmain-home on /home type ext3 (rw,errors=remount-ro) /dev/mapper/lvmmain-data on /mnt/data type ext3 (rw,user_xattr,errors=remount-ro) binfmt_misc on /proc/sys/fs/binfmt_misc type binfmt_misc (rw,noexec,nosuid,nodev) $ cat /boot/grub/device.map (fd0) /dev/fd0 (hd0) /dev/disk/by-id/ata-WDC_WD800BB-00DKA0_WD-WMAHL3755817 (hd1) /dev/disk/by-id/ata-WDC_WD800BB-00DKA0_WD-WMAHL3848610 (hd2) /dev/mapper/pdc_bacfhgjjjc $ ls -l /dev/mapper total 0 crw------- 1 root root 10, 59 Rgp 24 13:19 control lrwxrwxrwx 1 root root 7 Rgp 24 13:19 lvmmain-data -> ../dm-6 lrwxrwxrwx 1 root root 7 Rgp 24 13:19 lvmmain-home -> ../dm-5 lrwxrwxrwx 1 root root 7 Rgp 24 13:19 lvmmain-swap -> ../dm-7 lrwxrwxrwx 1 root root 7 Rgp 24 13:19 lvmmain-usr -> ../dm-4 lrwxrwxrwx 1 root root 7 Rgp 24 13:19 lvmmain-var -> ../dm-3 lrwxrwxrwx 1 root root 7 Rgp 24 13:19 pdc_bacfhgjjjc -> ../dm-0 lrwxrwxrwx 1 root root 7 Rgp 24 13:19 pdc_bacfhgjjjc1 -> ../dm-1 lrwxrwxrwx 1 root root 7 Rgp 24 13:19 pdc_bacfhgjjjc2 -> ../dm-2 The attached patch fixes the following issues. The first two prevent grub-install from working when / is mounted to a partition on the DMRAID disk. Before patching (1.98+20100804-4): # grub-probe --device-map=/boot/grub/device.map --target=drive -d /dev/mapper/pdc_bacfhgjjjc1 grub-probe: error: cannot find a GRUB drive for /dev/mapper/pdc_bacfhgjjjc1. Check your device.map. # grub-probe --device-map=/boot/grub/device.map --target=fs / grub-probe: error: cannot find a GRUB drive for /dev/mapper/pdc_bacfhgjjjc1. Check your device.map. # grub-probe --device-map=/boot/grub/device.map --target=drive -d /dev/dm-1 (/dev/dm-1) # grub-probe --device-map=/boot/grub/device.map --target=drive -d /dev/mapper/pdc_bacfhgjjjc (hd2) # grub-probe --device-map=/boot/grub/device.map --target=drive -d /dev/dm-0 (hd2) After patching: # grub-probe --device-map=/boot/grub/device.map --target=drive -d /dev/mapper/pdc_bacfhgjjjc1 (hd2,msdos1) # grub-probe --device-map=/boot/grub/device.map --target=fs / ext2 # grub-probe --device-map=/boot/grub/device.map --target=drive -d /dev/dm-1 (hd2,msdos1) # grub-probe --device-map=/boot/grub/device.map --target=drive -d /dev/mapper/pdc_bacfhgjjjc (hd2) # grub-probe --device-map=/boot/grub/device.map --target=drive -d /dev/dm-0 (hd2) The patch also fixes a memory leak which I discovered when fixing the above (error message originates from libdevmapper): # grub-probe --device-map=/boot/grub/device.map --target=fs / ext2 You have a memory leak (not released memory pool): [0x88157e0] -- Modestas Vainius <modestas@vainius.eu>
[fix_dmraid.patch (text/x-patch, attachment)]
[signature.asc (application/pgp-signature, inline)]
Information forwarded
to debian-bugs-dist@lists.debian.org, GRUB Maintainers <pkg-grub-devel@lists.alioth.debian.org>:
Bug#594221; Package grub-common.
(Fri, 17 Sep 2010 10:51:03 GMT) (full text, mbox, link).
Acknowledgement sent
to Colin Watson <cjwatson@ubuntu.com>:
Extra info received and forwarded to list. Copy sent to GRUB Maintainers <pkg-grub-devel@lists.alioth.debian.org>.
(Fri, 17 Sep 2010 10:51:03 GMT) (full text, mbox, link).
Message #10 received at 594221@bugs.debian.org (full text, mbox, reply):
On Tue, Aug 24, 2010 at 07:30:01PM +0300, Modestas Vainius wrote:
> current versions of grub-probe in squeeze and sid have problems with DMRAID
> partitions. The problems are demonstrated below. As a result, grub
> lenny->squeeze upgrade failed leaving my system without a bootloader. While
> grub-common/lenny had no support for DMRAID at all, it would be a pity to
> release current grub-common with half working DMRAID support. Therefore, it
> would be great if the bug was fixed in squeeze. A proposed patch is attached
> to this mail. Please forward the bug and/or the patch upstream.
Thanks for this. Since I'm an upstream developer ... :-)
> From: Modestas Vainius <modax@debian.org>
> Subject: fix DMRAID support in grub-probe
> Forwarded: no
> Last-Update: 2010-08-24
>
> /dev/mapper/* are symlinks to /dev/dm-* and
> convert_system_partition_to_system_disk() checks against fully a canonicalized
> real path. Therefore, it should look for dm-* when identifying DMRAID devices.
> Likewise, return the same form (/dev/mapper/* or /dev/dm-$minor) which was
> asked for in the input. This is needed since strcmp() is typically used by the
> callers to check if returned device is the same as given.
I disagree with this approach. In general, we should be treating
/dev/mapper/* as the canonical name, despite the symlink layout. For
one, those device names convey much more information than the terse
/dev/dm-*; for another, it's consistent with other GNU packages, such as
GNU Parted:
commit c1eb485b9fd8919e18f192d678bc52b0488e6ee0
Author: Hans de Goede <hdegoede@redhat.com>
Date: Tue Apr 6 15:57:18 2010 +0200
libparted: don't canonicalize /dev/mapper paths
Besides fixing the issue displayed by libparted/tests/symlink.c,
this has the added advantage that the output of parted p on one of these
devices now says:
"Disk /dev/mapper/BigVol2-lv_iscsi_disk2: 34.4GB"
Which is a lot more user friendly then the output before this patch:
"Disk /dev/dm-6: 34.4GB"
* libparted/device.c (ped_device_get): Don't canonicalize names
that start with "/dev/mapper/".
* NEWS (Bug fixes): Mention it.
Thanks to Ales Kozumplik for the analysis.
Details in <http://bugzilla.redhat.com/577824>.
I've committed a patch upstream which implements this:
2010-09-17 Colin Watson <cjwatson@ubuntu.com>
Fix DM-RAID probing with recent versions of device-mapper udev
rules.
* grub-core/kern/emu/hostdisk.c (read_device_map): Don't
canonicalise device paths under /dev/mapper/.
(convert_system_partition_to_system_disk): Compare the
uncanonicalised path to /dev/mapper/ rather than the canonicalised
path, since device nodes under /dev/mapper/ are often symlinks.
> While at it, the patch also fixes a memory pool leak in dm_* related code.
> devmapper library complains loudly about memory pool leaks.
[...]
> - static struct dm_tree *tree = NULL;
> + struct dm_tree *tree = NULL;
It's a shame to have to repeatedly reconstruct the dm_tree, but I
suppose we have little choice if libdevmapper is going to complain
loudly at us.
I've committed a patch upstream, based on the general idea of your patch
but I rearranged things so that all the freeing happens on a single exit
path from the function:
2010-09-17 Colin Watson <cjwatson@ubuntu.com>
* grub-core/kern/emu/hostdisk.c
(convert_system_partition_to_system_disk): Fix devmapper memory pool
leak.
Reported and based on patch by: Modestas Vainius.
I'll backport these two patches in my next upload.
Thanks,
--
Colin Watson [cjwatson@ubuntu.com]
Reply sent
to Colin Watson <cjwatson@debian.org>:
You have taken responsibility.
(Sun, 19 Sep 2010 23:03:17 GMT) (full text, mbox, link).
Notification sent
to Modestas Vainius <modestas@vainius.eu>:
Bug acknowledged by developer.
(Sun, 19 Sep 2010 23:03:17 GMT) (full text, mbox, link).
Message #15 received at 594221-close@bugs.debian.org (full text, mbox, reply):
Source: grub2
Source-Version: 1.98+20100804-5
We believe that the bug you reported is fixed in the latest version of
grub2, which is due to be installed in the Debian FTP archive:
grub-common_1.98+20100804-5_i386.deb
to main/g/grub2/grub-common_1.98+20100804-5_i386.deb
grub-coreboot_1.98+20100804-5_i386.deb
to main/g/grub2/grub-coreboot_1.98+20100804-5_i386.deb
grub-efi-amd64_1.98+20100804-5_i386.deb
to main/g/grub2/grub-efi-amd64_1.98+20100804-5_i386.deb
grub-efi-ia32_1.98+20100804-5_i386.deb
to main/g/grub2/grub-efi-ia32_1.98+20100804-5_i386.deb
grub-efi_1.98+20100804-5_i386.deb
to main/g/grub2/grub-efi_1.98+20100804-5_i386.deb
grub-emu_1.98+20100804-5_i386.deb
to main/g/grub2/grub-emu_1.98+20100804-5_i386.deb
grub-firmware-qemu_1.98+20100804-5_i386.deb
to main/g/grub2/grub-firmware-qemu_1.98+20100804-5_i386.deb
grub-ieee1275_1.98+20100804-5_i386.deb
to main/g/grub2/grub-ieee1275_1.98+20100804-5_i386.deb
grub-linuxbios_1.98+20100804-5_i386.deb
to main/g/grub2/grub-linuxbios_1.98+20100804-5_i386.deb
grub-pc_1.98+20100804-5_i386.deb
to main/g/grub2/grub-pc_1.98+20100804-5_i386.deb
grub-rescue-pc_1.98+20100804-5_i386.deb
to main/g/grub2/grub-rescue-pc_1.98+20100804-5_i386.deb
grub2_1.98+20100804-5.diff.gz
to main/g/grub2/grub2_1.98+20100804-5.diff.gz
grub2_1.98+20100804-5.dsc
to main/g/grub2/grub2_1.98+20100804-5.dsc
grub2_1.98+20100804-5_i386.deb
to main/g/grub2/grub2_1.98+20100804-5_i386.deb
A summary of the changes between this version and the previous one is
attached.
Thank you for reporting the bug, which will now be closed. If you
have further comments please address them to 594221@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.
Debian distribution maintenance software
pp.
Colin Watson <cjwatson@debian.org> (supplier of updated grub2 package)
(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@debian.org)
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256
Format: 1.8
Date: Fri, 17 Sep 2010 23:45:10 +0100
Source: grub2
Binary: grub2 grub-linuxbios grub-efi grub-common grub-emu grub-pc grub-rescue-pc grub-coreboot grub-efi-ia32 grub-efi-amd64 grub-ieee1275 grub-firmware-qemu grub-yeeloong
Architecture: source i386
Version: 1.98+20100804-5
Distribution: unstable
Urgency: low
Maintainer: GRUB Maintainers <pkg-grub-devel@lists.alioth.debian.org>
Changed-By: Colin Watson <cjwatson@debian.org>
Description:
grub-common - GRand Unified Bootloader, version 2 (common files)
grub-coreboot - GRand Unified Bootloader, version 2 (Coreboot version)
grub-efi - GRand Unified Bootloader, version 2 (dummy package)
grub-efi-amd64 - GRand Unified Bootloader, version 2 (EFI-AMD64 version)
grub-efi-ia32 - GRand Unified Bootloader, version 2 (EFI-IA32 version)
grub-emu - GRand Unified Bootloader, version 2 (emulated version)
grub-firmware-qemu - GRUB firmware image for QEMU
grub-ieee1275 - GRand Unified Bootloader, version 2 (Open Firmware version)
grub-linuxbios - GRand Unified Bootloader, version 2 (dummy package)
grub-pc - GRand Unified Bootloader, version 2 (PC/BIOS version)
grub-rescue-pc - GRUB bootable rescue images, version 2 (PC/BIOS version)
grub-yeeloong - GRand Unified Bootloader, version 2 (Yeeloong version)
grub2 - GRand Unified Bootloader, version 2 (dummy package)
Closes: 593855 594221 595727 596171
Changes:
grub2 (1.98+20100804-5) unstable; urgency=low
.
[ Updated translations ]
* Hebrew (he.po) by Omer Zak and Lior Kaplan (closes: #593855).
* Romanian (ro.po) by ioan-eugen STAN (closes: #595727).
* Esperanto (eo.po) by Felipe Castro (closes: #596171).
.
[ Colin Watson ]
* Make grub-efi-amd64 conflict with grub-pc as well as the other way
round.
* Backport upstream patches to fix DM-RAID support (closes: #594221,
LP: #634840).
.
[ Robert Millan ]
* enable_zfs.patch: Fix grub-fstest build problem.
* zfs_fix_label_arg.patch: Fix kfreebsd_device initialization on ZFS
for non-main filesystems.
Checksums-Sha1:
8b0e3b28d50ad55850afdcf689b31b44127d1caa 2891 grub2_1.98+20100804-5.dsc
36f6b86d8f5034d1b28203a4ad3ee2b078dd41db 475207 grub2_1.98+20100804-5.diff.gz
3c36e1886d6c4defb2ec729895fc982361f74238 281170 grub2_1.98+20100804-5_i386.deb
e57ee8f00f15df1c6f3cbd7d84fce665eafc8fb0 279734 grub-linuxbios_1.98+20100804-5_i386.deb
4304089567df5c7231214b87fa5eb4701aaf529a 279746 grub-efi_1.98+20100804-5_i386.deb
1737b2a65e105f5fdfef948ba80a5f86d297c9ea 1772936 grub-common_1.98+20100804-5_i386.deb
1bc587ebe97bc904d45df8b0f73ffd39adda8e6e 2778320 grub-emu_1.98+20100804-5_i386.deb
bfc957ff1598631f313dbe685895765abd1cd08b 1015072 grub-pc_1.98+20100804-5_i386.deb
11194f155b08880cd714b4afcafc55683b850ea0 1470240 grub-rescue-pc_1.98+20100804-5_i386.deb
2b564d3668e21992b31be5e0885be65717484a8f 775272 grub-coreboot_1.98+20100804-5_i386.deb
789c57fb0f8f4c400c722fc935a44fc84cffeb85 809968 grub-efi-ia32_1.98+20100804-5_i386.deb
147672afe4bad7c089e37840ff65b4fca9cd6362 884090 grub-efi-amd64_1.98+20100804-5_i386.deb
419bd48110f5cf511a023be7b3a672ad07807f08 765858 grub-ieee1275_1.98+20100804-5_i386.deb
8d1f8b67ccaf7125b9e39572c4171554bc6fba42 707026 grub-firmware-qemu_1.98+20100804-5_i386.deb
Checksums-Sha256:
d624a54f9dca98e24deb0c1c41871c69451498be785a3be454e1fdedd23bc41f 2891 grub2_1.98+20100804-5.dsc
0f6b3a8e9460ec0a8d4b3e169ba0226a96f54a09f229f69df9b7f32582a387eb 475207 grub2_1.98+20100804-5.diff.gz
b7d4fdeb76908074267cab4768d10a6185c6b7cc6934b228176bf2a2afc0bb6f 281170 grub2_1.98+20100804-5_i386.deb
c15695e7fc4d09596e7bcf5a575ad5ebd63ef35a1e4ecf6c64e99536f22e8ecf 279734 grub-linuxbios_1.98+20100804-5_i386.deb
d970ce0f70f78485d43c1e40b7df8f52be8e0246d6d231ff7642fe07d5598a0e 279746 grub-efi_1.98+20100804-5_i386.deb
aac459ebbc2f90ec0632a7e0bcf8f5a2b4a999dd387d7118a24d1aeed5c752d4 1772936 grub-common_1.98+20100804-5_i386.deb
7e10d28a5bcfc1dbb44ace406b98abf9f87ffb6ec87bfb55e8bf33aa266d0b85 2778320 grub-emu_1.98+20100804-5_i386.deb
d6d1006c0dbea3ba8f5e89f2c7d6e13ae41517c4c74b8987e5a9fc4bed3cc602 1015072 grub-pc_1.98+20100804-5_i386.deb
52d4b9ac1a258897813395e22c6be0ef5affe4dde7e924b649ab8e4e248e3e09 1470240 grub-rescue-pc_1.98+20100804-5_i386.deb
38bf330fca2166395f05fafaf0ec3a62188810ae980cc28508ae50b663dc02d8 775272 grub-coreboot_1.98+20100804-5_i386.deb
5609f9f4a138a8364c3863ccc14d1ee9ec50ea9ae4982b083353543cca1dc3b9 809968 grub-efi-ia32_1.98+20100804-5_i386.deb
00681ea4798f9ff2b3a30c203f07d505bded76fd39421f860809fbd974cd56b7 884090 grub-efi-amd64_1.98+20100804-5_i386.deb
6be9858d799d137b9576d9d676a55e2d20e1b972ea0879ffcc52601691ac43ad 765858 grub-ieee1275_1.98+20100804-5_i386.deb
62e764940bc5a7ff4641d422649ee54806b9d5e8864946930c14d0d334ddb8b0 707026 grub-firmware-qemu_1.98+20100804-5_i386.deb
Files:
32755e23dbea7874123a98cfc62e0ffa 2891 admin extra grub2_1.98+20100804-5.dsc
93646c1ab2268ddc632e289d50518169 475207 admin extra grub2_1.98+20100804-5.diff.gz
1ea75400f8d4509a8039740516a64918 281170 admin extra grub2_1.98+20100804-5_i386.deb
d72b2ef5c7b3cb016a019773424c3cec 279734 admin extra grub-linuxbios_1.98+20100804-5_i386.deb
dd534c208fc1c0fdc089146178d91e65 279746 admin extra grub-efi_1.98+20100804-5_i386.deb
5da1281e4ba5bf6e61b05c09f0bb5519 1772936 admin optional grub-common_1.98+20100804-5_i386.deb
b32b7f90466e39c611e430d7a1fd45e4 2778320 admin extra grub-emu_1.98+20100804-5_i386.deb
a1d062cc9817a5f7984bf7fda4a35e61 1015072 admin optional grub-pc_1.98+20100804-5_i386.deb
53c5326ccdb7fc37cca459a7f6a40ee6 1470240 admin extra grub-rescue-pc_1.98+20100804-5_i386.deb
716e5cabe892be1b6c1b493697ab439e 775272 admin extra grub-coreboot_1.98+20100804-5_i386.deb
da9545082f6d7e89d692dbf0adc8e1b9 809968 admin extra grub-efi-ia32_1.98+20100804-5_i386.deb
bddea8293b894df23b31b75d84034403 884090 admin extra grub-efi-amd64_1.98+20100804-5_i386.deb
cd41f8c6e4af573949aadc8352568ce6 765858 admin extra grub-ieee1275_1.98+20100804-5_i386.deb
018f6a153ddb4ccf59d0e2dc57c24b00 707026 admin extra grub-firmware-qemu_1.98+20100804-5_i386.deb
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Colin Watson <cjwatson@debian.org> -- Debian developer
iQIVAwUBTJaSBzk1h9l9hlALAQglWRAAt4eYppXZlrT63wMT043MNkj1ZjcxcBAK
CaMDh7bxHUafhLKNg+F/Y5mKpM+tkjORZSa21qqDqnKmq1Petc4GDYn1ZaXTPhuB
Lg2X1wxrD7iAY/kKZQGlaQVoa2R7QU6HVprZxs0WP9y1o/Yhc/y2xJnIgu50jJWT
2/BNJYkCSpLA+gFlld9wb4vIQvVuHfiSrvreXztsRAswEVD7hNFRFov+YRIiB1X7
q9xT12QFrUY55/fZwek0vV0rNdi5t5lRdkhRK9D47nCnCuRRsJQmlwkFcrrYyluL
YbdYPOmtG+sA2Rk1MjWkx7KeO7eUga1oAnHPk/Ss3znU/eRdRW6PYMQ6RltHiV2s
Th4WC/xJ2rKNpYBExRRC/GDRjeI4dLmCx/3KBaXTDG+neJYHZPpAZ5FziVTOQh2c
6wwlg1RB7htHNcCWs5k/WVDjCf5WkIRU6d158rQkk/28d+tACvh8HTfW+YyNT0fV
S3yxwilHN3x5yEk2XCzBg3G6o+/GCjwaym6WqbhZ1CSl4coDDMSFhHCeuA4zWGB5
U5FjUTRMI0yMDMLsJrx00QA1XrpoltIw6TiT41K5I+kEPSabeYbIiw/ouDmca8zn
+9pLMSrcAPo8UIDPtRkwnLxXxHj23NzuuHt4km3Fd8cBq2eSlrgO8Iz0/7EGod5T
x8XXALDnbhE=
=W2+3
-----END PGP SIGNATURE-----
Bug archived.
Request was from Debbugs Internal Request <owner@bugs.debian.org>
to internal_control@bugs.debian.org.
(Thu, 04 Nov 2010 07:32:00 GMT) (full text, mbox, link).
Send a report that this bug log contains spam.
Debbugs is free software and licensed under the terms of the GNU Public License version 2. The current version can be obtained from https://bugs.debian.org/debbugs-source/.
Copyright © 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson, 2005-2017 Don Armstrong, and many other contributors.