From 18e7d26c8d6e4cc9aba4efa9f7ff7ddf44335620 Mon Sep 17 00:00:00 2001 From: Ingo Weinhold Date: Sun, 19 Jun 2011 19:27:34 +0200 Subject: [PATCH] Mount the /boot/system packagefs on boot --- src/system/kernel/fs/vfs_boot.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/system/kernel/fs/vfs_boot.cpp b/src/system/kernel/fs/vfs_boot.cpp index 677be1e11e..9dd854f0d8 100644 --- a/src/system/kernel/fs/vfs_boot.cpp +++ b/src/system/kernel/fs/vfs_boot.cpp @@ -508,6 +508,19 @@ vfs_mount_boot_file_system(kernel_args* args) _kern_create_symlink(-1, path, "/boot", 0); } + // If we're booting off a packaged system, mount packagefs. + if (args->boot_volume.GetBool(BOOT_VOLUME_PACKAGED, false)) { + static const char* const kPackageFSName = "packagefs"; + + dev_t systemPackageMount = _kern_mount("/boot/system", + NULL, kPackageFSName, 0, "packages /boot/system/packages", + 0 /* unused argument length */); + if (systemPackageMount < 0) { + panic("Failed to mount system packagefs: %s", + strerror(systemPackageMount)); + } + } + // Do post-boot-volume module initialization. The module code wants to know // whether the module images the boot loader has pre-loaded are the same as // on the boot volume. That is the case when booting from hard disk or CD,