Mounting the CD doesn't get me "suninstall" and all that. Is that
stuff only available when booting from the CDROM? How do I do a full
install (not an upgrade) onto a blank disk attached to a machine that
is live in multi-user mode?
--
Paul Southworth
CICNet Systems Support
pa...@cic.net
I have received dozens of "me too" replies to this post so here is the
best answer I received. Credit for this solution goes to Mark Thomas
and friends. He has submitted it to the comp.sys.sun.admin FAQ maintainer
for inclusion in the next release of the FAQ.
----
From: Mark Thomas <Ma...@jane.sas.upenn.edu>
I have been meaning to write this up clearly, but have never got around to
it and am sure it would be of much general interests. I never used to
have anything bootable accept other Suns, so I installed many OS without
SunInstall (credit to Avi Freedman), and actually never learned how to
boot of a CDRom or tape until recently :) I usually get the tars and
MAKEDEV going in the background, while setting up the new /etc files. I
hope I didn't miss anything below as it is from memory and I don't have a
disk handy to do it on. It is actually much simpler than it appears.
Installing SunOS-4.1.X from mounted cdrom:
Note, these commands are examples; filenames may need to be adjusted for
your OS version or architecture. You can perform this from a Sun3 or Sun4
running any SunOS-4.1.X, provided you take care to run the right version
of "installboot". The man page includes details about which systems
require bootblocks with a.out format executables with headers, and which
versions of installboot provide such.
1) # Label, format, and partition your new hard disk.
# be sure sd?b is bigger then your physical RAM will be
# (else system dump will overwrite /usr)
# Use the device name you are installing to.
# You may want to also make a /dev/rsd?d /var partition
#
newfs /dev/rsd?a ; newfs /dev/rsd?d ; newfs /dev/rsd?f
mount /dev/rsd?a /mnt
mkdir /mnt/var ; mount /dev/rsd?d /mnt/var # if you made one
mkdir /mnt/usr ; mount /dev/rsd?f /mnt/usr
2) mount -t hsfs -o ro /dev/sr0 /cdrom
cd /mnt
tar xpf /cdrom/export/exec/proto_root_sunos_4_1_3_u1
3) # Install kernel specific sys files, pick correct directory
# for your 'arch -k'
#
mkdir /mnt/usr/kvm
cd /mnt/usr/kvm
tar xpf /cdrom/export/exec/kvm/sun4c_sunos_4_1_3_u1/kvm
tar xpf /cdrom/export/exec/kvm/sun4c_sunos_4_1_3_u1/sys
4) # pick packages you want, but you must install usr
#
cd /mnt/usr
tar xpf /cdrom/export/exec/sun4_sunos_4_1_3_u1/usr
tar xpf /cdrom/export/exec/sun4_sunos_4_1_3_u1/debugging
tar xpf /cdrom/export/exec/sun4_sunos_4_1_3_u1/demo
tar xpf /cdrom/export/exec/sun4_sunos_4_1_3_u1/games
tar xpf /cdrom/export/exec/sun4_sunos_4_1_3_u1/graphics
tar xpf /cdrom/export/exec/sun4_sunos_4_1_3_u1/install
tar xpf /cdrom/export/exec/sun4_sunos_4_1_3_u1/networking
tar xpf /cdrom/export/exec/sun4_sunos_4_1_3_u1/openwindows_demo
tar xpf /cdrom/export/exec/sun4_sunos_4_1_3_u1/openwindows_fonts
tar xpf /cdrom/export/exec/sun4_sunos_4_1_3_u1/openwindows_programmers
tar xpf /cdrom/export/exec/sun4_sunos_4_1_3_u1/openwindows_users
tar xpf /cdrom/export/exec/sun4_sunos_4_1_3_u1/rfs
tar xpf /cdrom/export/exec/sun4_sunos_4_1_3_u1/security
tar xpf /cdrom/export/exec/sun4_sunos_4_1_3_u1/shlib_custom
tar xpf /cdrom/export/exec/sun4_sunos_4_1_3_u1/sunview_demo
tar xpf /cdrom/export/exec/sun4_sunos_4_1_3_u1/sunview_programmers
tar xpf /cdrom/export/exec/sun4_sunos_4_1_3_u1/sunview_users
tar xpf /cdrom/export/exec/sun4_sunos_4_1_3_u1/system
tar xpf /cdrom/export/exec/sun4_sunos_4_1_3_u1/text
tar xpf /cdrom/export/exec/sun4_sunos_4_1_3_u1/tli
tar xpf /cdrom/export/exec/sun4_sunos_4_1_3_u1/user_diag
tar xpf /cdrom/export/exec/sun4_sunos_4_1_3_u1/uucp
tar xpf /cdrom/export/exec/sun4_sunos_4_1_3_u1/versatec
5) # Install man pages if you want
#
6) cd /mnt/usr
tar xpf /cdrom/export/share/sunos_4_1_3_u1/manual
7) # set up /sbin
#
cp /mnt/usr/etc/hostconfig /mnt/sbin
cp /mnt/usr/etc/ifconfig /mnt/sbin
cp /mnt/usr/etc/init /mnt/sbin
cp /mnt/usr/etc/intr /mnt/sbin
cp /mnt/usr/etc/mount /mnt/sbin
cp /mnt/usr/bin/sh /mnt/sbin
cp /mnt/usr/bin/hostname /mnt/sbin
8) # make new device nodes, you may do as needed
#
cd /mnt/dev
./MAKEDEV std pty0 pty pty2 pty3 win0 win1
9) # additional root setup
#
cp /mnt/usr/kvm/stand/vmunix /mnt
chmod go-x /mnt/vmunix
cp /mnt/usr/kvm/stand/boot.sun4 /mnt/boot
10) # run installboot
# I suggest reading the man page, note paths below, take care
# to run operating installboot binary, but specify device and paths
# for new boot disk. You can even do this from a Sun3.
#
/usr/kvm/mdec/installboot -ltv /mnt/boot /mnt/usr/kvm/mdec/bootsd /dev/rsd?a
# if you are making a sun4c boot disk and running on a 4 or 4m machine:
/usr/kvm/mdec/installboot -ltvh /mnt/boot /mnt/usr/kvm/mdec/bootsd /dev/rsd?a
# if you are making a sun4 boot disk on a 4c machine, you need to
# use a 4c installboot, not the one on your sun4.
11) # if it will have a Lance interface
echo newhostname >> /mnt/etc/hostname.le0
# or if will have an Intel interface
echo newhostname >> /mnt/etc/hostname.ie0
12) # create /mnt/etc/fstab, /mnt/etc/defaultrouter, /mnt/etc/resolv.conf
# /mnt/etc/hosts (must have own entry here)
# I also create /mnt/etc/shells, /mnt/etc/ftpusers
# Depending on your timezone:
# don't forget to 'rm /usr/lib/zoneinfo/localtime', then
# 'ln /usr/lib/zoneinfo/EST5EDT /usr/lib/zoneinfo/localtime'
13) # This is important. If you don't manually umount them before
# shutdown, they may not get sync. (Don't ask me why.)
#
umount /mnt/usr
umount /mnt/var
umount /mnt
# and if you're really paranoid:
fsck /dev/rsd?f
fsck /dev/rsd?d
fsck /dev/rsd?a
I suggest booting single user the first time (b sd() -s).
Knowing the above will save you from doing total re-installs just because
of a messed up root partition or similar.
If you are copying an existing OS, instead of extracting distribution tar
files, you may use the following before running installboot etc...:
tar cf - <directories and files to include> | (cd /mnt/<area> ; tar xpf - )
..just be careful to skip your /mnt directory if you are doing this from
root to avoid a recursive copy.
MAKEDEV will re-create device special files that tar skips over
Some people use: find . -depth -print | cpio -pdlm newdir
The advantage of this is it works with longer pathnames, and doesn't skip
device special files. You can also use find rules to limit to a device or
skip/include specific files.
--
Mark G. Thomas (ma...@jane.sas.upenn.edu) - (215)898-9735
SAS Computing, University of Pennsylvania
Look at installboot command.
Scott