Hi! On Mon, Apr 24, 2006 at 05:06:04PM -0400, Brian A. Seklecki wrote: >All:
>Would it be hypothetical possible to change the device mounted as (/) >after the system has booted (possibly during the bootstrapping phase)? >This of course overriding the checks in src/sys/kern/sys_vfs* After root has been mounted, if I see things correctly, you can't unmount/change it. You can make the kernel ask for a root device though, using the -a boot option. Linux does tricks with a special syscall, called pivot_root IIRC. You have the initial root device mounted, mount something else on a subdirectory, e.g. /mnt, and then call pivot_root to swap them, and perhaps you can unmount /mnt (the original root device) later. On Linux you can in addition free the memory of a ramdisk you don't need any longer. Some Linux distributions ship with a relatively small kernel, and an initial ramdisk used as root device, together with stuff that probes for device using kernel modules contained in the root device, until it can access the hard disk and the filesystem types for the hard disk, and then does the pivot_root game and gets rid of the initial ramdisk altogether. I think pivot_root is somewhat of a hack and of less use for general OpenBSD machines, as OpenBSD doesn't really use kernel modules anyway. You can however shadow the original / with something else by mounting that on /. >~BAS Kind regards, Hannah.