Meego Wiki
From MeeGo wiki
(Difference between revisions)
Jump to: navigation, search
(Create SOS file system)
(Create SOS file system)
Line 3: Line 3:
== Create SOS file system ==
== Create SOS file system ==
-
Root file system of SOS can be gotten from any Linux Distros - Fedora, Ubuntu, MeeGo, etc. Below is a way to create SOS root filesystem from MeeGo
+
Root file system of SOS can be gotten from any Linux Distros - Fedora, Ubuntu, MeeGo, etc. Below is a way to create SOS root file system from MeeGo
* Download image-creator tool from http://meego.gitorious.org/meego-developer-tools
* Download image-creator tool from http://meego.gitorious.org/meego-developer-tools
* Create a .ks config file which include all rpm groups or packages you want.
* Create a .ks config file which include all rpm groups or packages you want.

Revision as of 09:12, 31 July 2010

What's Service OS (SOS)

Service OS is small Linux os which resides on USB/SDHC or hard disk partition. It can boot target platform individually. By combined with specific script upon, it can achieve various of purposes. Typical usage is on automated testing system, help do image auto-installation, HW health check.

Create SOS file system

Root file system of SOS can be gotten from any Linux Distros - Fedora, Ubuntu, MeeGo, etc. Below is a way to create SOS root file system from MeeGo

   mic-image-creator --record-pkgs=name -P $prefix -S $suffix -c ./sos.ks -f loop --cache=./mycache
  • File system is in loop image file, do some tweaks before tarball
   Mount fs: mount -o loop ${prefix}-meego-${suffix}.img $pmnt
   Adjust run level: sed -i 's/id:5/id:3/' $pmnt/etc/inittab
   Create grub configure file based on kernel and initrd under /boot

Create bootable SOS image

   Assuming we have gotten root file system in last section as rootfs.tgz
  • Create empty image file
   dd if=/dev/zero of=$IMGFILE bs=512 count=$SECTORS
  • Associate the image to free loop device
   losetup $loopdev $IMGFILE
  • Create a partition and its mapping
  • Format the partition
   mkfs.ext3 /dev/mapper/$part_name
  • Copy whole root file system into image
   mount /dev/mapper/$part_name $pmnt
   tar vxf $FS -C $pmnt/
  • Install grub
   grub --batch --no-floppy <<EOF
   device (hd0) $loopdev
   root (hd0,0)
   setup --stage2=$pmnt/boot/grub/stage2 (hd0)
   EOF
  • A bootable image is done.
   dd if=serviceos.IMG of=/dev/[USBDevice]
Personal tools