NEXTSTEP

Title: Recovering Data Files from a Hard Drive You Can't Boot
for NEXTSTEP 3.0, 3.1 and 3.2
Entry Number: 1469
Last update: <<Date June 17, 1997>>

Steps 1 and 2 depend on the type of computer running NEXTSTEP.  After that
it's the same for all NEXTSTEP machines.

If you have an Intel based Computer:

1. Put your installation floppy in the floppy drive, the installation CD-ROM in the CD-ROM drive and turn on your computer.

2. At the boot: prompt, type:

If your internal hard drive is IDE

	fd()mach_kernel -s rootdev=sd0a

If your internal hard drive is SCSI

	fd()mach_kernel -s rootdev=sd1a

3.2 will ask for installation language and boot drivers;  answer the questions and don't fear, this will not re-install NEXTSTEP.

If you have a NeXT Computer:

1. Put your installation floppy in the floppy drive, the installation CD-ROM in the CD-ROM drive and turn on your computer.

2.  When the machine displays "testing system" press 

	Command-Command-tilde_on_numeric_keypad

You should get the "NeXT ROM Monitor". 

At the NeXT>  prompt, type:

	bfd -s

For all types of computers:

The system will start in "single user mode".  When it is finished, you will see a # prompt.

2a.  If you are running NS3.2 for Intel, load the floppy driver:

	/usr/etc/driverLoader D=Floppy

3. You need to mount your internal hard drive on the filesystem.  Here's the command: 

if you have an IDE disk

	mount -n -o ro /dev/hd0a /disk

if you have a SCSI  disk

	mount -n -o ro /dev/sd0a /disk

Your entire hard drive is now /disk.

4. Put a blank floppy disk into the floppy drive and format it with this command:

	/usr/etc/disk -i /dev/rfd0b

5. Mount the floppy disk on the filesystem, as the directory /floppy

	mount -n /dev/fd0a /floppy

6. Change directories, for example:

	cd /disk/pat/files

7. List the files in a directory:

	ls

8. Copy a file onto the floppy disk:

	cp logo.ps /floppy

9.  The floppy will fill up eventually.  When that happens, you need to unmount it.  Here's how:

	umount /floppy

10. Remove that floppy from the floppy drive and build another floppy, starting with step 4.

Tips:

If you have files with spaces or ampersands in the names, for example:

	Dan Resume.ps

you must copy them this way:

	cp "Dan Resume.ps" /floppy

If you get  the error "command not found" you need to use the full path for commands:

	mount:	/usr/etc/mount
	umount:	/usr/etc/umount
	ls: 		/bin/ls
	cp:		/bin/cp

If you get the error "/private/etc/mtab00026: read only file system" when umount'ing a floppy, you need to type

	sync; sync; reboot

and start this procedure again, using another blank floppy. The data you wrote to the first floppy got copied.  You do not need to copy it again.

You can check the sizes of files with the -l option to ls.

	ls -l