Installing Linux on booting SD card
From GPLdevWiki
Linux on systems with SD card as primary storage device
Contents |
Preface
Recently, BIOS vendors have been starting to implement a 'boot from SD card' feature, much like they have added 'boot from USB memory stick' some years ago.
The only SD-card host controller that I've seen this implemented for is SDHCI compliant host controllers.
While this is a nice feature to support, for most systems it is just a gimmick and not something neccessarry.
However, there are hand-held devices such as netbooks in the pipeline which do not have any other mass storage device. No hard disk and no IDE-attached flash disk or the like. They just have one (more likely two or more) SD card slots and you install and store not only your data but the entire operating system on that SD card.
Furthermore, there are products like Samsung moviNAND which are basically a SDcard in a BGA package that can be soldered onto a PCB. So from a protocol and software point of view it is a SD card, but it is mechanically soldered onto the board. Such device have gained some popularity in ARM-based designs, but we'll likely see them in the x86 world, too.
Requirements
Bootloader requirements
There are no specific requirements on the bootloader, since BIOS abstracts all low-level details about how to talk to the SD card (controller) in the usual way through the BIOS ABI.
However, the program that installs the actuall bootloader record (grub-install, grub-installer, the 'lilo' commandline program) has to understand that /dev/mmcblk* is a valid block device and be able to discover the mapping between /dev/mmcblk* and the BIOS device number.
For grub (grub1, the old version), see
- http://savannah.gnu.org/bugs/index.php?24181
- http://savannah.gnu.org/bugs/download.php?file_id=16416
Installer requirements
The distribution installation initrd needs to
- include and auto-load the sdhc.ko and sdhci_pci.ko kernel modules
- create the /dev/mmcblk* device nodes as per udev/hotplug events
The actual distribution installation program needs to
- recognize /dev/mmcblk* as block devices that can be used as target device
- use a grub-install or similar program that can discover the bios drive number to /dev/mmcblk* device name mapping
Actual distributions
Debian
I have tested Debian testing i386 DVD1 2008-09-09:
- no sdhci.ko or sdhci_pci.ko kernel module
TODO
- add sdhci.ko and sdhci_pci.ko modules and autoload them
- make sure installer can use /dev/mmcblk* as install target
- verify that bootloader installation works
Bug report
Ubuntu
I have tested Ubuntu Intrepid alpha 5 desktop i386:
- the board I used could not bring up the graphical installer
- further status unknown
TODO
- unclear, get the installer running first
Bug report
OpenSUSE
I have tested OpenSuSE 10.0 i386 and OpenSUSE 11.1 Alpha2 i386
- no sdhci.ko or sdhci_pci.ko module, therefore no /dev/mmcblk*
- no installation possible to SD card
TODO
- add sdhci.ko and sdhci_pci.ko modules and autoload them
- make sure yast2 based installer can use /dev/mmcblk* as install target
- verify that bootloader installation works
Bug report
Fedora
I have tested Fedora 10 alpha i386
- no sdhci.ko driver
TODO
- add sdhci.ko and sdhci_pci.ko modules
- make sure installer can use /dev/mmcblk* as install target
- verify that bootloader installation works
Bug report
Mandriva
I have tested Mandriva Free 2009.0 RC1 camelopard i586
- sdhci.ko is present but not automatically loaded
- sdhci_pci.ko is not present
TODO
- add sdhci_pci.ko modules and autoload them
- make sure installer can use /dev/mmcblk* as install target
- verify that bootloader installation works

