and have gotten to the point where I have restored the root and usr partitions. However, the machine keeps rebooting, never really coming up. Looking at
vfstab
, it looks pretty empty- shouldn't I see entries like
/dev/dsk/c0t0d0s0
etc?. I'm cloning a machine so should I pretty much just make it match the other?
Yes, it should look pretty much like the original machine, except if the device nodes are different on this new hardware.
For example, if the original system root device is c0t0d0s0 but on the clone it is c2t0d0s0, then you need to edit that. Same with other filesystems such as /usr.
In /etc/vfstab (that's /a/etc/vfstab when booted from DVD) you should easily pick out the device to be mounted on '/' (root) and the device to be mounted on /usr. You can tell from running 'format' whilst in single user node which disk and which slice any particular filesystem is on.
So first question is: Are they different???
If yes, then there might be other things to do too.
The point is that the device nodes for the root filesystem and the /usr filesystem might be different on the new hardware.
If you enter the command:
# mount
on the original system you will be able to see the devices mounted for root (/) and /usr. Make a note of them. This is device node list #1.
Now, on the clone, when booted from DVD into single user (with nothing mounted) and using the 'format' command you can see the devices on the clone plus you know what slice YOU are using to configure, format, and ufsrestore different filesystems on. Make a note of these. This is device node list #2. Are they the same devices (eg, c0t0d0s0) on both machines??? Also, if you now mount the root filesystem of the clone on /a and look in /a/dev/dsk, do the required devices (from list #2) exist in this directory?? If not, we need to create them before the system will boot and find its root filesystem.
I think the problem has occurred because we didn't know at the start that the original system from which the ufsdump was taken had volumes mirrored by Sun Volume manager.
Having thought about it, I think we need to repeat the root filesystem restore and insert some more steps. Most of the main steps you already know so this won't take too long.
Boot from DVD into single user and 'newfs' the root filesystem slice (c0t0d0s0).
Plumb, configure and up a network interface, and mount your NAS under /mnt
mount your now empty root filesystem under /a, cd into /a, check for Lost+Found as the sole contents.
Stay in /a and ufsrestore your root filesystem. When finished check the contents of /a looks like a root filesystem.
If this file exists immediately delete it:
# rm restoresymtable
Edit the file /a/etc/system and look for the line referencing 'rootdev'. Remove this line and write the file back.
Edit /a/etc/vfstab to point to the correct devices and removing all references to 'md' devices (as you did before).
Take the system down in orderly manner:
# init 0
Now be careful NOT to try and boot the system multi-user. Instead, boot from hard disk into single user mounting the root volume with write access:
ok> boot -sw
When at the # prompt (you may need to enter the root password to get there), issue the command:
# metaclear -a -f
which will blow away all the mirroring information.
Take the system down:
# init 0
Boot the system with the reconfigure switch:
ok> boot -r
Let's see if that will fix it. Leave the restored /usr volume alone; it shouldn't be affected.
Its come back up with the correct host name. Its checked the slice where my var is and says its stable. Failed the forceload of a bunch of md stuff. Several messages about not being create and write to
utmpx
. I'm at
Type control-d to proceed with normal startup
(or give root password for system maintenance
Is /var a separate filesystem? Have you allocated the slice, newfs'd and restored it? Have you modified /etc/vfstab with the right device node to point to it?
If you boot into single user:
ok> boot -sw
and give the root password to get to a # prompt, can you then manually mount /dev/dsk/c?t?d?s? on /var? Does it work or does it complain?
If it works, take a look in /var/adm to see if the file is there.
Or have you restored the /var contents into /var on the root filesystem with the vfstab mounting over the top and hiding the files????
Double check your entries in /etc/vfstab (/a/etc/vfstab when mounted on the DVD) to ensure that the devices you have set for root (/), /usr, and /var (if separate) point to the slices that you restored them to.
An incorrect setting for root (/) could be causing this.
The /var is either (a) a separate filesystem (which you will have dumped separately from the original system), or (b) it is not separate and is therefore included in the root filesystem.
If it is (a) then when you boot from DVD and mount your hard disk root filesystem under /a, when you look in /a/var it will be empty since the other /var slice will be mounted here. Also, in this case, there will be an entry in /a/etc/vfstab to mount this other slice under /var at boot time.
If it is (b) then when you boot from DVD and mount your hard disk root filesystem under /a, when you look in /a/var the normal files will be in there. Also, there will be no entry in /a/etc/vfstab to mount anything on /var.
If you have checked everything is in order for (a) or (b) and the system still won't boot correctly, then recreate the device nodes for all disks using 'devfsadm' as described previously.