More Fedora on XO

So, you just got your XO to do some testing of Fedora on OLPC. You update the software that was on there, get a developer key, wait a day, and then get all ready to boot your Fedora image off of the SD card ….

And it boots. But it's slow. Very very slow. Some slowness is to be expected… this isn't a fast machine. But it should probably be a little bit speedier than it is. So want to try out a few experiments to try to help pin down the cause of the slowness? Then read on, pick a case and leave comments about your results.

  1. Try using a persistent overlay instead of the in-memory one. Add –overlay-size-mb to your livecd-iso-to-disk invocation. Amount should be relative to the size of your SD card.
  2. See if/how much having swap available helps. You can create a file on the SD card with dd, run mkswap against the file and then enable it on the XO. The best test for this would probably be to boot the XO single-user and run swapon from there and then do telinit 5.
  3. Try disabling some services from the live image. Again boot to single-user, chkconfig some services and then telinit 5
  4. … your idea here. Hopefully other people have some ideas of things to try as well. Try them out and let us know how it goes.

11 thoughts on “More Fedora on XO”

  1. Boot to single user?

    How do you boot to single user on the XO?

    I haven’t seen the grub-style bootloader menu in order to modify boot arguments. Do you have to hit at the open firmware timeout, and add boot arguments there?

  2. Re: Boot to single user?

    There isn’t a bootloader. You can do open firmware magic, but honestly, the easiest thing to do is to mount the SD card on another box and edit bootolpc.fth. You’ll see the obvious line with kernel arguments to change.

  3. Unable to find persistent overlay: using temporary

    I’ve added “–overlay-size-mb 768″ to my livecd-iso-to-disk.sh script … but it didn’t seem to stick.

  4. Re: Unable to find persistent overlay: using temporary

    # cat /media/OLPC-Live/boot/olpc.fth
    Boot script for USB boot
    patch 2drop erase claim-params
    : high-ramdisk ( — )
    cv-load-ramdisk
    h# 22c +lp l@ 1+ memory-limit umin /ramdisk – ( new-ramdisk-adr )
    ramdisk-adr over /ramdisk move ( new-ramdisk-adr )
    to ramdisk-adr
    ;
    ‘ high-ramdisk to load-ramdisk

    : set-bootpath-dev ( — )
    ” /chosen” find-package if ( phandle )
    ” bootpath” rot get-package-property 0= if ( propval$ )
    get-encoded-string ( bootpath$ )
    [char] left-parse-string 2nip ( dn$ )
    dn-buf place ( )
    then
    then

    ” /sd” dn-buf count sindex 0>= if
    ” sd:”
    else
    ” u:”
    then
    ” BOOTPATHDEV” $set-macro
    ;

    set-bootpath-dev
    ” root=UUID=fb1cd69b-00e6-4e34-a4e1-3b218cfa9c5c rootfstype=ext3 rw liveimg overlay=UUID=fb1cd69b-00e6-4e34-a4e1-3b218cfa9c5c quiet rhgb ” to boot-file
    ” ${BOOTPATHDEV}syslinuxinitrd0.img” expand$ to ramdisk
    ” ${BOOTPATHDEV}syslinuxvmlinuz0″ expand$ to boot-device
    unfreeze
    boot

  5. Re: Unable to find persistent overlay: using temporary

    That looks okay… what does /proc/cmdline look like after you’ve booted? And LiveOS/ has an overlay-$l-$u file (where $l is the label of the SD card, $u is the uuid)

  6. Re: Unable to find persistent overlay: using temporary

    > That looks okay… what does /proc/cmdline look like after you’ve booted?

    # cat /proc/cmdline
    root=UUID=fb1cd69b-00e6-4e34-a4e1-3b218cfa9c5c rootfstype=ext3 rw liveimg overlay=UUID=fb1cd69b-00e6-4e34-a4e1-3b218cfa9c5c quiet rhgb

    > And LiveOS/ has an overlay-$l-$u file (where $l is the label of the
    > SD card, $u is the uuid)

    /media/OLPC-Live/LiveOS/overlay–fb1cd69b-00e6-4e34-a4e1-3b218cfa9c5c

  7. Re: Unable to find persistent overlay: using temporary

    Problem solved …

    I introduced this by running: mklabel /dev/sdb1 after writing the live image.

    I’ve fixed this now by doing:

    $ dd if=/dev/zero of=/dev/sdb bs=512 count=1
    $ parted /dev/sdb
    mklabel msdos
    mkpart primary ext3 0 2048M
    mkpart primary ext3 2048M 3072M
    toggle 1 boot

    $ mkfs -t ext3 -L OLPC-Live /dev/sdb1
    $ mkswap -L SWAP /dev/sdb2

    $ livecd-iso-to-disk.sh …

    Overlay now seems happy … thanks!

  8. typo on livecd-iso-to-disk

    # bash livecd-iso-to-disk.sh –xo –overlay-size-mb 2047 –extra-kernel-args 3 olpc-gnome.iso /dev/sdd1
    Verifying image…
    /home/luya/Templates/fedora_on_xo/olpc-gnome.iso: 7f4978d6a17f8eb59acfa224f355f395
    Fragment sums: b1641134e653d748a55dd6e98dc4f7d37c12aa9724683148eabbb8e593af
    Fragment count: 20
    Checking: 100.0%

    The media check is complete, the result is: PASS.

    It is OK to use this media.
    Copying live image to USB stick
    Updating boot config file
    sed: can’t read /media/usbdev.xFvGOz/syslinux/isolinux.cfg.cfg: No such file or directory

    I removed the extra “.cfg”.

  9. question about over-size

    This might all be evident to me if I new anything about livecd, but I don’t.

    What’s an overlay?

    You say that overlay-size should be “relative to the size of your SD card”. In what way? The same as? Some percentage of?

    thanks

  10. Re: question about over-size

    The overlay is where all changes to the system land. By using overlay-size, they get written to a file on the SD card rather than into memory.

    As for how big to make it — at least 512 megs, more depending on how big your SD card is. Given some recent testing of other things, more than 512 is probably overkill and with the next image, it’s going to be tough to get larger than that with a 4 gig SD card.

Comments are closed.