Difference between revisions of "Updating from Root File System Images"

From odroid US
Jump to: navigation, search
(Created page with "There is a distinction between an SD-Card image and a root file system image. The SD-card image has all content needed to boot and run the system. The root file system image...")
 
(Changed file to untar from .tgz.md5sum to .tgz)
Line 39: Line 39:
 
6. As root, expand the tarball to the top directory on the SD-card
 
6. As root, expand the tarball to the top directory on the SD-card
 
<pre>
 
<pre>
sudo tar -xvzf ../odroidu2_20130104-linaro-lbuntu-desktop-1-rootfs.tgz.md5sum
+
sudo tar -xvzf ../odroidu2_20130104-linaro-lbuntu-desktop-1-rootfs.tgz
 
cd ..
 
cd ..
 
sync
 
sync

Revision as of 10:27, 28 January 2013

There is a distinction between an SD-Card image and a root file system image. The SD-card image has all content needed to boot and run the system. The root file system image contains just the files needed to run.

It is possible just replace the rootfs partition contents to boot a different "distro". We can run ubuntu with the unity desktop, then change to a plain vanilla Debian wheezy and then change to ubuntu using LXDE. It is convenient to avoid downloading SD-card images since they are so large.

The key to making this work is to agree to use a certain kernel as a base. The issue is that the root file system contains kernel modules, that may be inserted into the kernel at run-time. Kernel modules are marked with version information at compile time -- only kernel modules built from the same kernel configuration may/should be used. [ ed. is this a digression? ]

non-partitioned space

The non-partition space stores u-boot image, u-boot environment variables and proprietary Samsung code. There is no partition to mount, normally you need to use the fastboot command from u-boot consoles to update any thing in this area

boot partition

The bootloader mounts this partition, loads the kernel, and the initial root file system (initrd). It jumps into the kernel and the kernel starts the initialization controlled by the initial ram disk.

At some point, the init process mounts the rootfs partition and then runs the initialization it finds there, the boot proceeds from there.

rootfs partition

This is where the "distro" lives. If you mount a rootfs partition, you will see /usr, /lib, and so on.

How to update using a root file system image

1. Download the root file system image to your host (for example)

 cd /media
 # get the checksum file
 sudo wget http://odroid.us/odroid/odroidu2/ubuntu/odroidu2_20130104-linaro-lbuntu-desktop-1-rootfs.tgz.md5sum
 # get the root file system image
 sudo wget http://odroid.us/odroid/odroidu2/ubuntu/odroidu2_20130104-linaro-lbuntu-desktop-1-rootfs.tgz
 # verify the tarball is valid
 md5sum -c odroidu2_20130104-linaro-lbuntu-desktop-1-rootfs.tgz.md5sum

2. Start with and SD-Card with a known-compatible image, say odroidu2_20130104-linaro-ubunty-desktop-uSDeMMC.img 3. Mount the SD-card on the host [ todo: add link to step-by-step instructions ]. For reference call the mount point /media/rootfs 4. cd to the top directory on the SD-card.

cd /media/rootfs

5. As root delete the contents, rm -rf * (really dangerous make sure you are in the right directory)

/media/rootfs# sudo rm -rf *

6. As root, expand the tarball to the top directory on the SD-card

sudo tar -xvzf ../odroidu2_20130104-linaro-lbuntu-desktop-1-rootfs.tgz
cd ..
sync
# replace the X below with the drive designation for the rootfs partition that was mounted (like b or c or d)
# sudo umount /media/rootfs has caused my host to hang due to umounting my host rootfs...
sudo umount /dev/sdX2