User:Erik Garrison/rpmxo

From OLPC
Jump to navigation Jump to search

RpmXO is a system image scheme in the style of DebXO. It aims to allow the creation and modification of system images for use on the XO with a minimal set of infrastructure.

My initial tests have used rinse (descendant of rpmstrap) to bootstrap such systems. It should be equally possible to do so using mock. I have also used Fedora core 9 as a system base, but it should be possible to use Fedora 10 in exactly the same pattern.

Setup.

  • Bootstrap the system using rinse:
  sudo rinse --arch i386 --distribution fedora-core-9 --directory fc9.root
  • Install our custom kernel:
  wget http://dev.laptop.org/~dilinger/testing/kernel-2.6.25-20080923.3.olpc.f10b654367d7065.i586.rpm
  sudo rpm -ivh --root fc9.root kernel-2.6.25-20080923.3.olpc.f10b654367d7065.i586.rpm
  • Set up files which aren't bootstrapped:
  -- /etc/fstab
  -- /etc/hostname
  -- /etc/hosts
  -- /etc/sudoers
  -- /boot/olpc.fth
  • Generate, then modify the initramfs to use busybox to mount the root partition:
  sudo linux32 chroot fc9.root mkinitrd /boot/initrd.img-2.6.25-custom 2.6.25-20080925.1.olpc.f10b654367d7065
  mkdir fc9.initrd && cd fc9.initrd
  gunzip -c ../fc9.root/boot/initrd-2.6.25-custom | cpio -i
  # replace mount command with 'busybox mount'
  # install busybox rpm 
  cd .. && wget ftp://ftp.isu.edu.tw/pub/Linux/Trustix/releases/trustix-2.2/i586/trustix/rpms/busybox-1.00-2tr.i586.rpm
  rpm -ivh --root fc9.initrd busybox-1.00-2tr.i586.rpm
  # then rebuild (as root)
  sudo -s
  cd fc9.initrd && find . -print | cpio -H newc -o | gzip -9 >../fc9.root/boot/initrd.img-2.6.25-custom
  cd ..
  # and link to the initrd
  sudo linux32 chroot fc9.root ln -s boot/initrd.img-2.6.25-custom initrd.img

Additional packages I installed: passwd, sudo, When installing using yum you must mount proc as follows:

  sudo mount -t proc proc fc9.root/proc