Re: Transferring the root filesystem to a ramdisk?

2004-02-03 Thread Cordula's Web
 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/

___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Transferring the root filesystem to a ramdisk?

2004-01-31 Thread Cordula's Web
Hello,

in an attempt to save power on FreeBSD servers, I'm
trying to replace the hdd with a ramdisk. The idea is to:

  1. boot from the hdd (or netboot from an NFS server)
  2. configure a ram disk (md(4))
  3. copy everything that's needed to ram disk
  4. transfer kernel root to ramdisk (*)
  5. turn off the hdd (**)

(*) is the hairy question.
(**) How can that be done?

I won't need paging, because there'll be enough ram for
everything (ramdisk, kernel and userland).

Now the questions are:

  * How to attach the root filesystem to the ram disk?

Can this be done only through pxe/netboot before the
kernel starts, or is there some kind of system call
that can transfer root on a running system?

  * How to power off (and on) the hdd (both for ATA and SCSI)?

  * Will the power consumption decrease (no hdd) or will
it increase (more ram)? Anybody measured this before
with regular diskless machines?

Thanks,
-cpghost.

-- 
Cordula's Web. http://www.cordula.ws/

___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Transferring the root filesystem to a ramdisk?

2004-01-31 Thread Bjorn Eikeland
I'm probably in over my head here, but;
chroot should change the root filesystem for you.
(look in the manpages for more details)
As for powering down the hdd I did find a page for this,
but havent had time to play with it yet:
http://www.cran.org.uk/bruce/software.php
best of luck!

Hello,

in an attempt to save power on FreeBSD servers, I'm
trying to replace the hdd with a ramdisk. The idea is to:
  1. boot from the hdd (or netboot from an NFS server)
  2. configure a ram disk (md(4))
  3. copy everything that's needed to ram disk
  4. transfer kernel root to ramdisk (*)
  5. turn off the hdd (**)
(*) is the hairy question.
(**) How can that be done?
I won't need paging, because there'll be enough ram for
everything (ramdisk, kernel and userland).
Now the questions are:

  * How to attach the root filesystem to the ram disk?

Can this be done only through pxe/netboot before the
kernel starts, or is there some kind of system call
that can transfer root on a running system?
  * How to power off (and on) the hdd (both for ATA and SCSI)?

  * Will the power consumption decrease (no hdd) or will
it increase (more ram)? Anybody measured this before
with regular diskless machines?
Thanks,
-cpghost.


___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-multimedia
To unsubscribe, send any mail to 
[EMAIL PROTECTED]
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Transferring the root filesystem to a ramdisk?

2004-01-31 Thread Cordula's Web
  in an attempt to save power on FreeBSD servers, I'm
  trying to replace the hdd with a ramdisk. The idea is to:
 
1. boot from the hdd (or netboot from an NFS server)
2. configure a ram disk (md(4))
3. copy everything that's needed to ram disk
4. transfer kernel root to ramdisk (*)
5. turn off the hdd (**)
 
  (*) is the hairy question.
  (**) How can that be done?

 I'm probably in over my head here, but;
 chroot should change the root filesystem for you.
 (look in the manpages for more details)

Nope, chroot(2) affects only the calling process, not the whole
system.

 As for powering down the hdd I did find a page for this,
 but havent had time to play with it yet:
 http://www.cran.org.uk/bruce/software.php

ATAidle is great. Just tried it successfully on a 5.2-RELEASE
with two drives. powering down the inactive drive (not the one
with swap and root-fs) is possible this way.

Thanks,
-cpghost.

-- 
Cordula's Web. http://www.cordula.ws/

___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]