fs-root revision 7c478bd95313f5f23a4c958a745db2134aa03244
20787N/A# The contents of this file are subject to the terms of the 20787N/A# Common Development and Distribution License, Version 1.0 only 20787N/A# (the "License"). You may not use this file except in compliance 20787N/A# See the License for the specific language governing permissions 20787N/A# and limitations under the License. 20787N/A# When distributing Covered Code, include this CDDL HEADER in each 20787N/A# If applicable, add the following below this CDDL HEADER, with the 20787N/A# fields enclosed by brackets "[]" replaced with your own identifying 20787N/A# information: Portions Copyright [yyyy] [name of copyright owner] 20787N/A# Copyright 2005 Sun Microsystems, Inc. All rights reserved. 20787N/A# Use is subject to license terms. 20787N/A# Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T. 20787N/A# Make sure that the libraries essential to this stage of booting can be found. 20787N/A # If there is an optimized libc available in /usr that fits this 20787N/A # processor, mount it on top of the base libc. # Most of the operations in this script are only necessary in the global # zone but due to the way initialization scripts like this are packaged, # it needs to currently exist for all zones. if [
"${_INIT_ZONENAME:=`/sbin/zonename`}" !=
"global" ];
then # Root is already mounted (by the kernel), but still needs to be # checked, possibly remounted and entered into mnttab. First # mount /usr read only if it is a separate file system. This must # be done first to allow utilities such as fsck and setmnt to # reside on /usr minimizing the space required by the root file # Mount without the cache initially. We'll enable it # later at remount time. This lets us avoid # teaching the statically linked mount program about # cachefs. Here we determine the backfstype. # This is not pretty, but we have no tools for parsing # the option string until we get /usr mounted... msg=
'invalid vfstab entry for /usr' # Must use -o largefiles here to ensure the # read-only mount does not fail as a result of # having a large file present on /usr. This gives # fsck a chance to fix up the largefiles flag # before we remount /usr read-write. # Requesting logging on a read-only mount # causes errors to be displayed, so remove # "logging" from the list of options for now. # The read-write mount performed later will # specify the logging option if appropriate. # Also mount /boot now so that things like keymap.sh can access # boot properties through eeprom. Readonly isn't required because # /boot (and other pcfs filesystems) aren't fsck'ed at boot yet. # Also, we don't account for caching /boot as it must be on a local # disk. So what's in vfstab is fine as it stands; just look to see # if it's there and avoid the mount if not. # files found on /usr, and device permissions from /etc/minor_perm.