booting zipslack over nfs overview, part 2 of 4

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Next, you will want to edit /tftpboot/192.168.0.3/etc/rc.d/rc.S, and
get rid of all the stuff that deals with fsck. My
/tftpboot/192.168.0.3/etc/rc.d/rc.S is below.


--- cut here ---

#!/bin/sh
#
# /etc/rc.d/rc.S:  System initialization script.
#
# Mostly written by:  Patrick J. Volkerding, <volkerdi at slackware.com>
#

        # Heavily modified by Gregory Nowak
	<nowakg at users.sourceforge.net> to support booting over nfs.

        PATH=/sbin:/usr/sbin:/bin:/usr/bin

# Start devfsd if necessary
if [ -r /dev/.devfsd ]; then
  if [ -x /sbin/devfsd ]; then
    echo "Starting devfs daemon:  /sbin/devfsd /dev"
    /sbin/devfsd /dev
  fi
fi

# enable swapping
/sbin/swapon -a


# Initialize the Logical Volume Manager.
# This won't start unless /etc/lvmtab is found, which is created by
# /sbin/vgscan.
# Therefore, to use LVM you must run /sbin/vgscan yourself the first
# time.
if [ -r /etc/lvmtab ]; then
  # Mount /proc early (it's needed for vgscan):
  /sbin/mount /proc
  # Scan for new volume groups:
  /sbin/vgscan
  if [ $? = 0 ]; then
    # Make volume groups available to the kernel:
    /sbin/vgchange -ay
  fi
fi

# mount non-root file systems in fstab (but not NFS or SMB
# because TCP/IP is not yet configured):
/sbin/mount -a -v -t nonfs,nosmbfs

# Clean up some temporary files:
( cd /var/log/setup/tmp && rm -rf * )
/bin/rm -f /var/run/utmp /var/run/*pid /etc/nologin /var/run/lpd* \
  /var/run/ppp* /etc/dhcpc/dhcpcd-eth0.pid /etc/forcefsck
  /etc/fastboot
 
# Create a fresh utmp file:
cat /dev/null > /var/run/utmp

if [ "$ROOTTYPE" = "umsdos" ]; then # we need to update any files
added in DOS:
  echo "Synchronizing UMSDOS directory structure:"
  echo "  umssync -r99 -v- /"
  umssync -r99 -v- /
fi

# Setup the /etc/motd to reflect the current kernel level:
# THIS WIPES ANY CHANGES YOU MAKE TO /ETC/MOTD WITH EACH BOOT.
# COMMENT THIS OUT IF YOU WANT TO MAKE A CUSTOM VERSION.
echo "`/bin/uname -sr`." > /etc/motd

# Configure ISA Plug-and-Play devices:
if [ -r /etc/isapnp.conf ]; then
  if [ -x /sbin/isapnp ]; then
    /sbin/isapnp /etc/isapnp.conf
  fi
fi

# Set the system time from the hardware clock using hwclock --hctosys.
# Detect SGI Visual Workstation, since hwclock will make those freeze
# up:
if fgrep -l Cobalt-APIC /proc/interrupts 1> /dev/null 2> /dev/null ;
# then
  echo "SGI Visual Workstation detected.  Not running hwclock."
elif [ -x /sbin/hwclock ]; then
  if grep "^UTC" /etc/hardwareclock 1> /dev/null 2> /dev/null ; then
    echo "Setting system time from the hardware clock (UTC)."
    /sbin/hwclock --utc --hctosys
  else
    echo "Setting system time from the hardware clock (localtime)."
    /sbin/hwclock --localtime --hctosys
  fi
fi

# This loads any kernel modules that are needed.  These might be
required to
# use your ethernet card, sound card, or other optional hardware.
if [ -x /etc/rc.d/rc.modules -a -r /proc/modules ]; then
  . /etc/rc.d/rc.modules
fi

# Run serial port setup script:
# (CAREFUL! This can make some systems hang if the rc.serial script
# isn't
# set up correctly. If this happens, you may have to edit the file
# from a
# boot disk)
#
# . /etc/rc.d/rc.serial

# Carry an entropy pool between reboots to improve randomness.
# Load and then save 512 bytes, which is the size of the entropy pool.
if [ -f /etc/random-seed ]; then
  echo "Using /etc/random-seed to initialize /dev/urandom."
  cat /etc/random-seed >/dev/urandom
fi
dd if=/dev/urandom of=/etc/random-seed count=1 bs=512 2> /dev/null
 
--- cut here ---



-- 
Free domains: http://www.eu.org/ or mail dns-manager at EU.org





[Index of Archives]     [Linux for the Blind]     [Fedora Discussioin]     [Linux Kernel]     [Yosemite News]     [Big List of Linux Books]
  Powered by Linux