Index: build/qemu/assemble ================================================================== --- build/qemu/assemble +++ build/qemu/assemble @@ -10,13 +10,14 @@ make init LDFLAGS=-static cp init root/bin rm -f appfs.img -truncate --size 512M appfs.img +truncate --size 1024M appfs.img sfdisk --no-tell-kernel --no-reread ./appfs.img <<<'label: dos size=16M type=83 bootable +size=239M type=83 type=83' sudo umount x-boot || : sudo losetup -d /dev/loop3 || : sudo losetup --partscan /dev/loop3 $(pwd)/appfs.img @@ -27,26 +28,36 @@ -N 0 \ -O ^64bit \ -d boot \ -m 5 \ -r 1 \ - -t ext2 \ + -t ext4 \ /dev/loop3p1 sudo mke2fs \ -L 'ROOT' \ -N 0 \ -O ^64bit \ -d root \ -m 5 \ -r 1 \ - -t ext2 \ + -t ext4 \ /dev/loop3p2 +sudo mke2fs \ + -L 'DATA' \ + -N 0 \ + -O ^64bit \ + -d root \ + -m 5 \ + -r 1 \ + -t ext4 \ + /dev/loop3p3 + mkdir x-boot || : sudo mount /dev/loop3p1 x-boot sudo extlinux --install $(pwd)/x-boot sudo umount x-boot dd if=/usr/lib/EXTLINUX/mbr.bin of=appfs.img conv=notrunc rmdir x-boot losetup -d /dev/loop3 Index: build/qemu/init.c ================================================================== --- build/qemu/init.c +++ build/qemu/init.c @@ -74,13 +74,16 @@ mkdir("/etc", 0755); mkdir("/bin", 0755); mkdir("/lib", 0755); mkdir("/opt", 0755); mkdir("/opt/appfs", 0755); + mkdir("/var", 0755); mkdir("/var/cache", 0755); mkdir("/var/cache/appfs", 0755); + mount("/dev/vda3", "/var/cache/appfs", "ext4", 0, NULL); + run("/bin/appfsd", "appfsd", "/var/cache/appfs", "/opt/appfs", NULL); symlink(".", "/usr"); symlink("lib", "/lib64"); @@ -92,10 +95,11 @@ symlink("/bin/bash", "/bin/sh"); setenv("PATH", "/bin:/opt/appfs/core.appfs.rkeene.org/coreutils/platform/latest/bin", 1); run("/bin/appfs-cache", "appfs-cache", "install", "-lib", "core.appfs.rkeene.org", "glibc", NULL); run("/bin/appfs-cache", "appfs-cache", "install", "core.appfs.rkeene.org", "coreutils", NULL); + run("/bin/appfs-cache", "appfs-cache", "install", "core.appfs.rkeene.org", "procps-ng", NULL); setenv("PATH", "/bin", 1); run("/bin/sh", "sh", NULL); /* @@ -104,10 +108,11 @@ umount("/dev"); umount("/tmp"); umount("/proc"); umount("/sys"); umount("/opt/appfs"); + umount("/var/cache/appfs"); mount("/dev/vda2", "/", "ext4", MS_REMOUNT | MS_RDONLY, NULL); sync(); return(0); }