Bug#497403: grub-install does not work on SD/MMC cards

Harald Welte HaraldWelte at viatech.com
Mon Sep 1 14:45:53 UTC 2008


Package: grub
Version: 0.97-46

When grub-install is invoked to install the grub bootloader onto a SD/MMC
card, it fails because the grub-install script does not include regular
expressions for linux SD/MMC devices called /dev/mmcblkN

The 'boot from SD card' feature is already present in some currently shipping
hardware like some ASUS eeePC models.  Industry rumours say that multiple BIOS
vendors are adding support for this.  Also, apparently Windows 7 is supposed
to support this feature, so this is really about to become a standard feature.

It would be great to have boot-from-SD support in Debian before those devices
become more popular :)

The following patch (against grub svn) adresses this issue:

Index: grub/util/grub-install.in
===================================================================
--- a/util/grub-install.in	(revision 1843)
+++ b/util/grub-install.in	(working copy)
@@ -97,11 +97,13 @@
     case "$host_os" in
     linux*)
 	tmp_disk=`echo "$1" | sed -e 's%\([sh]d[a-z]\)[0-9]*$%\1%' \
+				  -e 's%\(mmcblk[0-9]*\)p[0-9]*$%\1%' \
 				  -e 's%\(d[0-9]*\)p[0-9]*$%\1%' \
 				  -e 's%\(fd[0-9]*\)$%\1%' \
 				  -e 's%/part[0-9]*$%/disc%' \
 				  -e 's%\(c[0-7]d[0-9]*\).*$%\1%'`
 	tmp_part=`echo "$1" | sed -e 's%.*/[sh]d[a-z]\([0-9]*\)$%\1%' \
+				  -e 's%.*/mmcblk[0-9]*p\([0-9]*\)$%\1%' \
 				  -e 's%.*d[0-9]*p%%' \
 				  -e 's%.*/fd[0-9]*$%%' \
 				  -e 's%.*/floppy/[0-9]*$%%' \

-- 
- Harald Welte <HaraldWelte at viatech.com>	    http://linux.via.com.tw/
============================================================================
VIA Open Source Liaison





More information about the Pkg-grub-devel mailing list