User:Erik Garrison/rpmxo: Difference between revisions

From OLPC
Jump to navigation Jump to search
(in progress)
 
No edit summary
 
(5 intermediate revisions by 2 users not shown)
Line 1: Line 1:
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.
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.

== Downloadable image ==

I have produce one working Fedora Core 9 image: []
It can be flashed onto a security-disabled laptop using copy-nand. At the OFW prompt with a usb key containing the image and its corresponding crc file inserted:

copy-nand u:\fc9.img

Will install to internal NAND. After completion reboot (with 'bye' or power off).

== Tests ==


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.
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.
Line 11: Line 22:
wget http://dev.laptop.org/~dilinger/testing/kernel-2.6.25-20080923.3.olpc.f10b654367d7065.i586.rpm
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
sudo rpm -ivh --root fc9.root kernel-2.6.25-20080923.3.olpc.f10b654367d7065.i586.rpm


* Set up files which aren't bootstrapped:
Additional packages I installed: passwd, sudo,
-- /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, wireless-tools, libertas-usb8388-firmware

When installing packages using yum you must mount proc as follows:
sudo mount -t proc proc fc9.root/proc

==Problems I encountered==

sudo complains: audit_log_user_command(): Connection refused [https://bugzilla.redhat.com/show_bug.cgi?id=401201]. This probably is resolved with upgrade to Fedora 10. Testing use of mock now to do so.

Latest revision as of 17:53, 9 December 2008

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.

Downloadable image

I have produce one working Fedora Core 9 image: [] It can be flashed onto a security-disabled laptop using copy-nand. At the OFW prompt with a usb key containing the image and its corresponding crc file inserted:

 copy-nand u:\fc9.img

Will install to internal NAND. After completion reboot (with 'bye' or power off).

Tests

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, wireless-tools, libertas-usb8388-firmware

When installing packages using yum you must mount proc as follows:

  sudo mount -t proc proc fc9.root/proc

Problems I encountered

sudo complains: audit_log_user_command(): Connection refused [1]. This probably is resolved with upgrade to Fedora 10. Testing use of mock now to do so.