Booting OS from SD card reader(through SDIO interface)

Bug #263944 reported by Bruce Chang
18
Affects Status Importance Assigned to Milestone
grub
Invalid
Undecided
Unassigned
grub (Ubuntu)
Won't Fix
Wishlist
Unassigned
grub-installer (Ubuntu)
Invalid
Wishlist
Unassigned
grub2 (Ubuntu)
Invalid
Undecided
Unassigned
linux (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

Current Grub can't boot OS from SD card reader through SDIO interface. This patch can support boot Ubuntu from SD card reader through SDIO interface and verified on VIA VX800 platform. It's a good feature and suggested to integrate.
Thanks

Revision history for this message
Bruce Chang (brucechang) wrote :
Revision history for this message
Bartosz Kosiorek (gang65) wrote :

1. Summary
During the last step of installation of Ubuntu, grub will be installed. Before run grub commands to install grub, the device name must be convert from OS syntax to grub’s syntax. Such as “/dev/sda1” will be translated into “(hd0, 0)”. But SD memory card’s name style, “/dev/mmcblkxpy” (x: device number, y: partition number), doesn’t support in current grub install shell script. The grub installation will fail when install Ubuntu into SD memory card. In order to complete the installation, we must modify the grub install shell script to support SD memory card.

2.1 Modified Files
/usr/share/grub-installer/grub-installer
/usr/sbin/grub-install

2.2 For Device Mapping
According to the grub’s syntax, the OS device name will be split into disk part and partition part. Such as “/dev/mmcblk0p1” will be translated into “(hd0, 0)”.
To complete this, I add some code in grub-installer and grub-install to recognize /dev/mmcblkxpy and add some command in grub-installer to generate the device mapping file “device.map”.

2.3 For initrd Update
I add commands to update the initrd at the end of the grub-installer.

2.4 Notice

1. All the modification in source code has been added comment with my name “tonyxu”.
2. I have used “touch” and “echo” commands to generate the device mapping file “device.map”. It’s better to generate it by /usr/sbin/grub. But “grub” is a binary file; I have no idea how to generate the file in it.
3. To boot from SD memory card, the driver modules needed by the card (mmc_core, mmc_block, sdhci) must be loaded at the boot time. So I add commands to update the initrd at the end of the grub-installer. Maybe the initrd should be updated before grub installation.

Changed in grub (Ubuntu):
importance: Undecided → Low
Changed in grub-installer (Ubuntu):
importance: Undecided → Wishlist
Changed in grub (Ubuntu):
importance: Low → Wishlist
Revision history for this message
Phillip Susi (psusi) wrote :

Grub legacy is no longer being developed, so this new feature will not be added. Please upgrade to grub2 and if you find a similar issue, file a bug report against the grub2 package.

Changed in grub (Ubuntu):
status: New → Won't Fix
Changed in grub-installer (Ubuntu):
status: New → Won't Fix
Phillip Susi (psusi)
Changed in grub:
status: New → Invalid
Revision history for this message
Steve Langasek (vorlon) wrote :

grub-installer is the installer component for both grub1 and grub2.

In general I don't think it's helpful to mark as 'wontfix' bugs solely on the grounds that no one is currently working on them, but I'm leaving the grub task alone.

Changed in grub-installer (Ubuntu):
status: Won't Fix → New
Revision history for this message
Phillip Susi (psusi) wrote :

I did not mark it as won't fix because nobody is working on it. It is won't fix because grub legacy is no longer being developed, so this will not be fixed. Also grub-install is from the grub package, not the grub-installer package so that task is invalid. If this is still an issue with grub2, please reassign it to grub2 and set the status to new. Until then it will not be fixed in grub legacy.

Changed in grub-installer (Ubuntu):
status: New → Invalid
Revision history for this message
Steve Langasek (vorlon) wrote : Re: [Bug 263944] Re: Booting OS from SD card reader(through SDIO interface)

On Thu, Oct 28, 2010 at 07:02:34PM -0000, Phillip Susi wrote:
> I did not mark it as won't fix because nobody is working on it. It is
> won't fix because grub legacy is no longer being developed,

That's the same thing.

> so this will not be fixed.

"No longer being developed" does not mean "no one can fix this if they are
so interested". As long as the package is shipping in Ubuntu, we should use
the bug list to accurately track the set of relevant bugs, *not* sweep under
the rug all the issues that we aren't ourselves going to bother with fixing.

--
Steve Langasek Give me a lever long enough and a Free OS
Debian Developer to set it on, and I can move the world.
Ubuntu Developer http://www.debian.org/
<email address hidden> <email address hidden>

Changed in grub-installer (Ubuntu):
status: Invalid → New
status: New → Invalid
Revision history for this message
komputes (komputes) wrote :

From what I understand there are two things to do in this case.

- Create a kernel which contains "mmc_core mmc_block sdhci sdhci-pci" modules in the initrd so that the filesystem can be mounted and booted.
- GRUB 2 needs to be tested once this kernel is compiled to see if it can now boot from SD (using another disk for MBR/GRUB).
---
Ubuntu Bug Squad volunteer triager
http://wiki.ubuntu.com/BugSquad

Revision history for this message
Brad Figg (brad-figg) wrote : Missing required logs.

This bug is missing log files that will aid in dianosing the problem. From a terminal window please run:

apport-collect 263944

and then change the status of the bug back to 'New'.

If, due to the nature of the issue you have encountered, you are unable to run this command, please add a comment stating that fact and change the bug status to 'Confirmed'.

This change has been made by an automated script, maintained by the Ubuntu Kernel Team.

Changed in linux (Ubuntu):
status: New → Incomplete
Revision history for this message
Brad Figg (brad-figg) wrote :

Missing logs don't apply to this case.

Changed in linux (Ubuntu):
status: Incomplete → Confirmed
Revision history for this message
Michael Vorburger (mike-vorburger) wrote :
Revision history for this message
Marcus Tomlinson (marcustomlinson) wrote :

This release of Ubuntu is no longer receiving maintenance updates. If this is still an issue on a maintained version of Ubuntu please let us know.

Changed in grub2 (Ubuntu):
status: New → Incomplete
Revision history for this message
Marcus Tomlinson (marcustomlinson) wrote :

This issue has sat incomplete for more than 60 days now. I'm going to close it as invalid. Please feel free re-open if this is still an issue for you. Thank you.

Changed in grub2 (Ubuntu):
status: Incomplete → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Patches

Remote bug watches

Bug watches keep track of this bug in other bug trackers.