Transferring the root filesystem to a ramdisk?
Cordula's Web
cpghost at cordula.ws
Tue Feb 3 08:06:30 PST 2004
> in an attempt to save power on FreeBSD servers, I'm
> trying to replace the hdd with a ramdisk. The idea is to:
Thanks to all who helped, on and off-list. To sum up:
* Spin down and up of ATA devices: /usr/ports/sysutils/ataidle
or SCSI devices: camcontrol {start | stop} device
* Changing the root device of an already running kernel
is very hard, and should be avoided at all costs.
(A suggestion was to modify loader(8), and have
the kernel use a chunk of pre-loaded memory as initial
root device a.k.a. md(4). However, this would involve
a _lot_ of work.)
* /sbin/init could chroot() to the new root device.
(This is possible, but requires easy access to the underlying
root fs where init was originally located. => disk must
spin up on request, so it can't be completely turned off.)
* diskless(8) is possible, though only when connectivity
is available.
Since our intended use is to embed FreeBSD in moving robots
that are connected with each other through an ad hoc mobile
network, where the radio links are both intermittent and
low-bandwidth; and since the systems are not always well
connected or reachable, diskless(8) is not a solution.
We've finally decided to use flash ram for the root device, and
avoid the complete issue of moving root.
Thanks again for all the help and insights.
-cpghost.
--
Cordula's Web. http://www.cordula.ws/
More information about the freebsd-questions
mailing list