How can I boot OLPC by SD card

Andres Salomon dilinger at laptop.org
Fri Apr 13 21:27:32 EDT 2007


Hi,

In order to boot off an SD card, try the steps below.  This was tested
with a B2 using Q2C05, and a Transcend 4GB SD card.

1) Download and unpack the 385 ext3 OS devel image, and dd it to the SD
card (on a linux machine):

# dd
if=olpc-redhat-stream-development-build-385-20070406_2314-devel_ext3.img
of=/dev/mmcblk0; sync

985057+0 records in
985057+0 records out
504349184 bytes (504 MB) copied, 260.025 seconds, 1.9 MB/s

2) Mount the SD card (you may need to reinsert the card for the kernel
to noticed the updated partition table):

# mount /dev/mmcblk0p1  /mnt/

3) Free up some space on the SD card; there's a known bug where the
filesystem is filled up (SJ, please don't cry..):

# rm -rf /mnt/home/olpc/Library

3) Grab the latest stable kernel, and install it on the SD card

# wget -q -O /mnt/kernel.rpm
http://dev.laptop.org/~dilinger/stable/RPMS/i586/kernel-2.6.21-20070413.1.olpc.7952ac53e264154.i586.rpm
# chroot /mnt/
bash-3.1# rm /var/lib/rpm/__db.00*
bash-3.1# rpm --rebuilddb
bash-3.1# rpm -ivh kernel.rpm
error: failed to open /etc/mtab: No such file or directory
Preparing...                ###########################################
[100%]
   1:kernel                 ###########################################
[100%]
Ignore option --allow-missing for /sbin/mkinitrd compatibility
Building an initramfs at
/boot/initrd-2.6.21-20070413.1.olpc.7952ac53e264154.img for kernel
2.6.21-20070413.1.olpc.7952ac53e264154
FATAL: Module usb_storage not found.
FATAL: Module sd_mod not found.
FATAL: Module ehci_hcd not found.
FATAL: Module uhci_hcd not found.
FATAL: Module ohci_hcd not found.
FATAL: Module ext3 not found.
Done; initramfs is 2.5M.

warning: can't open /etc/mtab: No such file or directory
grubby fatal error: unable to find a suitable template
bash-3.1# exit
exit

4) Finally, overwrite /mnt/boot/olpc.fth with the recipe necessary to
boot from SD:

# printf "\\\ Boot script\n\" ro root=/dev/mmcblk0p1 rootdelay=1
console=ttyS0,115200 console=tty0 fbcon=font:SUN12x22\" to
boot-file\nboot sd:\\\boot\\\vmlinuz\n" > /mnt/boot/olpc.fth
# umount /mnt


And, you should be all set.  In case the olpc.fth recipe in step #4 got
mangled, I've attached olpc.fth.  X doesn't seem too happy for me, but I
believe that's simply the olpc-bios-sig binary getting confused by the
firmware revision.




Mitch Bradley wrote:
> Andres, Chris, and I have succeeded in booting Linux from SD using a
> procedure similar to the one that I outlined last night. Andres is
> currently testing it and will post further instructions.
> 
> Luna.Huang at quantatw.com wrote:
>> Dear Mitch,
>>
>> I do a boot key on SD card.
>> And set SD on OLPC before power on.
>> The BIOS version is Q2C05, OS image is 385 and motherboard is B2.
>> Power on and after count down, OFW show 
>>
>> " Boot device: /sd/disk:\boot\olpc.fth  Arguments:
>>  Boot device: disk:\boot\vmlinuz Arguments: ro root=LABEL=OLPCRoot rootfstype=ext3 console=ttyS0,115200 console=tty0 fbcon=font:SUN12x22
>> <buffer at 800000>:5:
>> Can't open boot device"
>>
>> Then I enter 
>> ok boot sd:\boot\vmlinuz
>> Machine also show 
>> "Can't open boot device" 
>> How can I boor OLPC by SD card?
>>
>> Thank you very mush
>> Best Regards.
>> Luna
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: olpc.fth
URL: <http://lists.laptop.org/pipermail/devel/attachments/20070413/b7b62b30/attachment.ksh>


More information about the Devel mailing list