9/03/2011

How to transfer Ununtu11.04/Pandaboard to USB HDD

The pre-built Ubuntu 11.04/Pandaboard image is designed to be installed on a SD card. It could be transfer to the USB HDD with some extra efforts. Typically, a bootable OMAP4/Ubuntu SD card contains two partitions: boot and rootfs. Only rootfs should immigrate to a USB drive since Pandaboard requires booting form SD card.
  1. Prepares a bootable Ubuntu11.04 SD card. howto
  2. Create a ext3/4 partition on a USB HDD labeled "ubuntu".
  3. # /dev/sdXX should be the partition to be formatted,
    # for example /dev/sdc2
    $ sudo mkfs.ext3 -L ubuntu /dev/sdXX
    
  4. Copy rootfs on the SD card to USB HDD
  5. # Suppose USB is mounted on /mnt/ubuntu
    # and rootfs of SD is on /mnt/sd
    $ cd /mnt/ubuntu
    $ sudo cp -a /mnt/sd/* .
    
  6. Boot from SD card
  7. In order to mount USB HDD as rootfs, It'd update parameters that passed to the kernel. The configuration file is located at /boot/boot.script
    $ sudo vi /boot/boot.script
    
    You'd find bootargs have something like this:
    root=UUID=XXXX-XXXX-XXXX-XXXX
    
    Replace it to
    root=LABEL=ubuntu
    
    Then update boot.scr for uboot using:
    $ sudo flash-kernel
    
  8. Reboot it and Ubuntu should use USB HDD as root filesystem. :)

No comments:

Post a Comment