3 # Before running, make sure 'vmlinuz' in this examples directory is a
4 # bootable Linux kernel or a symlink to one. You can just use any
5 # kernel out of the /boot directory for this.
9 # ln -s /boot/vmlinuz-NNN vmlinuz
11 # This creates a very minimal filesystem, just containing bash and a
12 # few command line utilities. One of the joys of Fedora is that even
13 # this minimal install is still 200 MB ...
17 if [ $(id -u) -eq 0 ]; then
18 echo "Don't run this script as root. Read instructions in script first."
22 if [ ! -e vmlinuz ]; then
23 echo "Read instructions in script first."
27 ../febootstrap -i bash -i coreutils fedora-10 ./minimal $1
29 # ... but let's minimize it aggressively.
31 echo -n "Before minimization: "; du -sh minimal
32 ../febootstrap-minimize --all --pack-executables ./minimal
33 echo -n "After minimization: "; du -sh minimal
35 # Create the /init which is just a simple script to give users an
40 cat > /init <<'__EOF__'
43 echo "Welcome to the minimal filesystem example"
50 ../febootstrap-run ./minimal -- bash -c create_init
52 # Convert the filesystem to an initrd image.
54 ../febootstrap-to-initramfs ./minimal > minimal-initrd.img
56 # This is needed because of crappiness with qemu.
59 dd if=/dev/zero of=zero bs=2048 count=1
61 # Now run qemu to boot this minimal system.
65 -kernel vmlinuz -initrd minimal-initrd.img \