: Here's an interesting x86 challenge that I am working on...
: I have a system on which I ufsdump'd the root partition, in order
: to move it to another system. I restored the dump on the new system,
: and now I realize that because the boot device node is completely
: different, I am running into trouble right at boot time.
: The system boots and loads the kernel, but when it comes time
: to fsck and mount the file system, it says "cannot stat
: /dev/rdsk/c1t6d0s0" and of course there is no device in
: /devices that point to this hardware, and thus there is no
: /dev/rdsk/c1t6d0s0. (The system is up in maintenance mode
: and the filesystem is real-only.)
: The question is, can I create this device node manually? I
: have another boot device which works fine, and I suppose I
: could mount this new disk, and cpio the device nodes. Is
: there another way?
: Please don't tell me about b -r, /reconfugure or
: sys-unconfig. I am way past that point.
Beware: All commands are from memory and man contain some minor faults.
If you have a separate / and /usr partition then you have to boot from
CD because the necessary tools to rebuild the /devices and /dev tree
are in /usr.
Wheather you are booting from disk or CD-ROM the remaining steps are
mount a writable fs (tmpfs). This is normally automatically done for CD-ROM
boot. For disk boot, mount /tmp without an entry in /etc/mnttab:
mount -m /tmp
You can now rebuild /devices and /dev in /tmp:
mkdir /tmp/devices; drvconfig -r /tmp/devices -p /tmp/path_to_inst
devlinks -r /tmp; disks -r /tmp
You now can remount / from the /tmp/dev/dsk/... entry:
mount -o remount,rw /tmp/dev/dsk/..... /
Now copy the new /devices and /dev to /. Use the tools in /usr/sbin/static
because after moving away /dev or /devices you won't have a /dev/zero
which is needed for dynamically linked programs.
You may have to change /etc/vfstab to reflect the new numbering of devices.
If you want the device numbering starting at 0 again, remove /etc/path_to_inst,
reboot with the -a flag. If asked to rebuild /etc/path_to_inst, answer with "y"
You can now redo the drvconfig/devlinks and device numbering will start at
I have done several system copies with this technique and never had major
problems. At least for desktop configurations I recommend using one big /
instead of a separate /usr. It is a major help in such and other emergency
situations. Many of the machines I configured don't have a CD-ROM drive at all,
so otherwise I'd have to setup a network boot server.