NEXTSTEP for Intel Processors

Title: Booting from CD-ROM
Entry Number: 1381
Last Updated: <<Date June 17, 1997>>



Overview
It is possible to boot from a release CD-ROM disc and not be required to initialize or upgrade the hard disk drive.  You will have the ability to view, copy, move, etc. files, run programs, and perform other similar operations.



Solution
While you can't boot a full NEXTSTEP environment (Workspace Manager, et al.), you can boot single-user from the CD-ROM installation disc.



Intel (i386) architecture
Insert the CD-ROM disc and the boot floppy and boot the system.  On the i386 architecture, booting starts from the floppy drive and continues  to the CD-ROM.

At the boot: prompt type:
boot: mach_kernel -s
Follow any instructions (it may appear as though an install or upgrade is being performed; be patient) until the UNIX command line prompt is displayed.  If you are asked which disk to install NEXTSTEP to, then you must have made a mistake at the boot prompt.



NeXT (m68k) architecture
Use <Command><Command><~> after power-on to get to the ROM monitor and type the following:

For Non-Turbo systems with internal floppy
Insert the boot floppy and type:
NeXT> bfd -s

For Non-Turbo systems with SCSI floppy
Insert the boot floppy and type:
NeXT> bsd(n,0,0) sdmach -s rootdev=sdn
Where n is the unit number of the floppy drive.  In this scenario, it may be helpful to have the CD-ROM drive set to a higher SCSI address than the SCSI floppy.

For Turbo systems
Turbo systems have the ability to boot directly off the CD-ROM drive without assistance from the floppy drive.
NeXT> bsd(n,0,0) sdmach -s rootdev=sdn
Where n is the unit number of the CD-ROM drive.



All architectures
Mounting a hard disk
Note that when booted single user from a CD-ROM, the file system is mounted read-only. Certain functions may not be available.  This state can be somewhat alleviated by mounting /tmp on another available disk.  Use the -n option with the mount command to prevent writing to /etc/mtab (which fails, obviously).  As an example:
# mount -n /dev/<device> /tmp
where <device> is the disk you wish to mount (eg. sd0a, hd0a).

Once in single-user mode, you can still run the CD-ROM build disk scripts by running the rc scripts:
# sh /etc/rc

Copying & Editing.
Under Release 3.3, you can use ditto(8) to perform a copy of an entire directory, preserving links and setuid and setgid modes.  pico(1) is a simple text editor that ships with 3.3 for those that find vi(1) confusing.  See the man pages for information on these commands.



See Also
1469_Recovering_Data_Files_from_a_Hard_Drive