Base Project

Jump to: navigation, search

The Base Project is an initiative to reduce the size of the minimal installable and bootable openSUSE system. Think of something similar to Linux From Scratch. The project also includes a small installation tool like debootstrap known from debian.

At the moment it consist of the following projects in the openSUSE buildservice: Base:build, Base:install and Base:Kernel.

Base:build forms a set of packages that can bootstrap themselves from within a changeroot that they form theirself. It mainly consists of GCC with all its build and runtime dependencies and packages specific to the setup of standard openSUSE build roots.



A short HOWTO

This text describes some of the tools that you can find when you install the base-installer package from the Base:install repository.

base-bootstrap root-directory [--repo repo-name] package-names

The base-bootstrap tools is resolving and downloading a bunch of packages to the local disk and installs them into the directory given on the command line. By default it is using the openSUSE:Factory repo.

base-bootstrap ~/scratch/base-install/ -- \
        --repo Base:install/standard \
        --repo Base:Kernel/standard \
        --repo Base:build/standard \
        aaa_base kernel-default util-linux

The base-installer itself is an image creator that currently only supports QEMU images.

sudo base-installer -t qemu -f ext3 -r /dev/sda1 /tmp/test

This will create an QEMU image /tmp/test.qcow. You can select either ext2 or ext3 as filesystem and it will use grub as a bootloader. You can use QEMU to boot the image (with empty root password):

sudo qemu -m 256 -std-vga -hda /tmp/test.qcow

(Future) Packaging Rules

For packages in Base only file requirements are allowed. The rationale behind this is to be able to replace certain tools by e.g. busybox without modification of other packages.

Only packages built from C sourcecode are allowed in Base. The rationale behind this is that we don't want to build a full blown toolchain for all kind of languages here.

Default system configuration should not be done in packages. The rationale behind this is that a default configuration may impose requirements on installed tools (such as pam or ldap) while this choice should be defered to product settings (which thus need to provide a default system configuration in some way). The exact best way to achieve this has not been discussed yet, but the aaa_base package already does parts of that (and would need to be made product specific).

FIXME HACKS

Currently the kernel requires perl-Bootloader, module-init-tools and mkinitrd. The only hard requirement here is module-init-tools since we build a modularized kernel. perl-Bootloader and mkinitrd must be Required due to another reason: there is no way to tell yast, zypper or rpm to install/update perl-Bootloader and mkinitrd before the kernel. Therfore we came up with a hack: we provide both packages by base-relase :)


TODO

Make all packages in Base work with plain /usr/bin/perl (perl-base), instead of pulling in the 58MB perl package. This seems to be fine at the moment, though enabling perl-requires support in rpm would make QA possible here.

Base:Kernel: Split weak-modules (KMP script) from module-init-tools to get rid of the binutils dependency.

Base:Kernel: makedumpfile requires gcc-c++, libdw-devel and zlib-devel during build.

Base:Kernel: make mkinitrd not depend on perl (rewrite /sbin/mkinitrd_setup and /sbin/module_upgrade).

module-init-tools seems to call 'uname' in post but doesn't pre-require it.

kernel-modules take 64MB. If the tools would support gzipped .ko files this would shrink to 26MB. Support for compressed modules.*map and modules.dep and for /boot/System.map* would shrink requirements even more.