grub package update may crash when used with PnP wireless modems
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
grub2 (Ubuntu) |
Fix Released
|
Undecided
|
Colin Watson |
Bug Description
Binary package hint: grub2
Many plug-and-play wireless modems present themselves as group of USB devices, including storage device, like CD-ROM. It is not a real drive, but a trick to help installing drivers on Windows. This storage has autorun file and drivers for Windows so that they are automatically installed when device is plugged in.
I use Samsung U200 supported by madwimax package. It turns off the CD part of device with '/bin/echo -n $kernel > /sys/$devpath/
When one updates to grub 1.98+20100804-
milaz@K8N:~$ sudo dpkg-reconfigure grub-pc
Segmentation fault
Generating grub.cfg ...
Segmentation fault
Segmentation fault
Found linux image: /boot/vmlinuz-
Found initrd image: /boot/initrd.
Segmentation fault
Segmentation fault
Found memtest86+ image: /boot/memtest86
Segmentation fault
Found Ubuntu 9.10 (9.10) on /dev/sda5
Segmentation fault
Found Ubuntu 10.04.1 LTS (10.04) on /dev/sda6
Segmentation fault
done
During this process, /boot/grub/
The reason is grub-mkdevicemap program, which crashes with segfault. It happens because NULL pointer (because of failed canonicalize_
The patch to resolve this issue is attached.
While my issue may seem exotic, there may be more plain way to get into the same trouble. There's also bugs like 518026 and 510436 which can be caused by this or likely issue, and remedied by the proposed patch.
I am no way experienced in Debian or Ubuntu infrastructure, so please excuse me if this is prepared in a wrong way, and be welcome with questions and suggestions.
Thanks for your patch. I'm afraid I hadn't noticed this at the time, but somebody asked about this independently on IRC yesterday and I fixed it a different way:
2010-11-23 Colin Watson <email address hidden>
* util/deviceiter.c (compare_devices): If the by-id link for a
device couldn't be resolved, fall back to sorting by the by-id link
rather than segfaulting.
Reported and tested by: Daniel Mierswa.
This patch is in version 1.99~20101124- 1ubuntu1, now in Natty.