| Summary: | [PATCH] mount_mfs is being phased out -> new diskless boot procedure | ||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | Base System | Reporter: | krepel <krepel> | ||||||||||||
| Component: | conf | Assignee: | Brian Dean <bsd> | ||||||||||||
| Status: | Closed FIXED | ||||||||||||||
| Severity: | Affects Only Me | ||||||||||||||
| Priority: | Normal | ||||||||||||||
| Version: | Unspecified | ||||||||||||||
| Hardware: | Any | ||||||||||||||
| OS: | Any | ||||||||||||||
| Attachments: |
|
||||||||||||||
|
Description
krepel
2001-03-12 11:10:01 UTC
I have implemented some good ideas from Mike Smith in my
rc.diskless{1,2} files and make some other changes:
1. Now I use the kernel flag "vm.nswapdev" to determine if swap is
available.
2. To determine if DEVFS are used I check the kernel flag
"vfs.devfs.generation" as it done within the /etc/rc file.
3. I write "chk_err" and "mkmd" functions also in rc.diskless2 because
the rc.diskless2 file is executed in the rc file: "sh rc.diskless2"
When you change this call to ". rc.diskless2" than the mkmd function
from rc.diskless2 could replace the mkmd function in rc.diskless1. The
chk_err funcktion in rc.diskless2 could be deleted.
The following knobs must be added in the /etc/defaults/rc.conf:
diskless_var_size="32m"
diskless_tmp_enable="NO"
diskless_tmp_size="32m"
diskless_dev_size="2m"
Maybe other values are more useful.
--
Falco Krepel Phone: +49-(0)30 - 34 63 - 7 276
GMD-FOKUS Fax: +49-(0)30 - 34 63 - 8 276
Kaiserin-Augusta-Allee 31 e-mail: krepel@fokus.gmd.de
10589 Berlin WWW: http://www.fokus.gmd.de/usr/krepel
Responsible Changed From-To: freebsd-bugs->bsd Brian seems to have done some work in this area recently. Most of the requested features have already been added to the
rc.diskless scripts. Specifically, mfs has been completely removed
from -current and a wrapper function has been supplied for mounting
the memory filesystems. This same wrapper name is used in -stable,
albeit, it is defined to use mount_mfs there. Thus, the only
difference now between -current and -stable is the definition of the
'mount_md' shell function.
Additionally:
* devfs is used automatically if it is available
* /var is constructed using the /etc/mtree/BSD.var.dist file
and /var/log/* are initially populated based on the contents
of /etc/newsyslog.conf instead of hard-coding everything
* /var and /tmp can be individually sized (using varsize and
tmpsize) and /tmp can be seperate from /var/tmp now as well
I think the only thing left in the patch that is not already addressed
is making /var swap-backed if swap_enable is set to 'yes'. If swap is
available, then by the time that rc.diskless2 runs, the sysctl
vm.swap_enabled could be checked instead of supplying a new rc
variable. However, one may not want to do this in all cases due to
swap perhaps being on slow NFS storage, so I'm reluctant to make that
change.
If the submitter feels this feature is really important, I would
consider something like 'diskless_var_swapbk=YES' which would be
checked and cause /var to be set up swap-backed but only if the sysctl
vm.swap_enable reported true.
But before I spend time on this, please look over the newer code in
-current and -stable and let us know if it meets your needs.
-Brian
--
Brian Dean
bsd@FreeBSD.org
State Changed From-To: open->closed No feedback from submitter. |