Ufsrestore on SunBlade 2500

Good Afternoon,

I'm setting up a SunBlade 2500 using

ufsrestore

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.

1 Like

Ah.. I was looking at

vfstab

without the drive mounted to /a. the

vfstab

on the

ufsrestore

d drive matches.

The machine had to be shut down over the weekend. So I booted from CDROM and mounted S0 to /a

When I reboot the machine, it still keeps rebooting. I'm getting something very similar to this:

Cannot mount root on /pseudo/md@0:0,10,blk fstype ufs

panic[cpu0]/thread=140a000: vfs_mountroot: cannot mount root

0000000001409970 genunix:vfs_mountroot+70 (0, 0, 0, 200, 1457ee0, 0)

  %l0-3: 000000000144b800 000000000144b800 0000000000002000 00000000014954a8
  %l4-7: 000000000149b000 0000000001411e28 000000000144c000 000000000144f400
0000000001409a20 genunix:main+90 (1409ba0, f005bc0c, 1409ec0, 394648, 2000, 438)

  %l0-3: 0000000000000001 000000000140a000 0000000001412f98 0000000000000000
  %l4-7: 0000000078002000 0000000000396000 00000000014a38b0 00000000010664f8

skipping system dump - no dump device configured
rebooting...
Probing system devices

It goes by too fast. I found that somewhere else so it doesn't match exactly but its close.

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.

1 Like
mount

on the original (list #1)=

/ on /dev/md/dsk/d0
/usr on /dev/md/dsk/d3
format

on the clone (list #2)=

c0t0d0

so its not a match (unless there's more I could have found selecting something from the format menu)

Mounted the root on a. I see about 200 slices including:

c0t0d0s0, c0t0d0s1, c0t0d0s2,c0t0d0s3,c0t0d0s4,c0t0d0s5,c0t0d0s6,c0t0d0s7

so not a match again.

The

tells me that, on the original system, the volumes are mirrored ("md") using Sun's Logical Volume Manager.

So, booting from DVD into single user and mounting your clone root under /a, edit /a/etc/vfstab file to point to the new clone devices:

eg,

/ on /dev/dsk/c0t0d0s0
swap on <whatever you created it as>
/usr on /dev/dsk/<whatever you create it as>
  eg,  c0t0d0s2

Then, shutdown the machine in an orderly manner:

# init 0

and at the ok> prompt:

ok> boot -r

to tell Solaris to reconfigure as it boots.

Post the results of that.

1 Like

Same result. Note, my

vfstab

doesn't look like this:

In

vfstab

I put

/dev/dsk/c0t0d0s0    /dev/rdsk/c0t0d0s0    /    ufs   1   no   - 

and similar for var's slice.

Yes, the format you posted for vfstab looks correct.

Boot from DVD into single user and mount your clone root hard disk filesysytem under /a

rm -f /a/dev/rdsk/c*
rm -f /a/dev/dsk/c*
rm -f /a/dev/cfg/c*
devfsadm -c disk -r /a -p /a/etc/path_to_inst

This will recreate any/all device nodes for disks.

Then, shutdown in an orderly manner

# init 0

and, reconfigure at boot

ok> boot -r
1 Like

Thanks.. Same result.

Can you post the error you are getting (or is it still scrolling too fast)?

1 Like

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.

  1. Boot from DVD into single user and 'newfs' the root filesystem slice (c0t0d0s0).
  2. Plumb, configure and up a network interface, and mount your NAS under /mnt
  3. mount your now empty root filesystem under /a, cd into /a, check for Lost+Found as the sole contents.
  4. Stay in /a and ufsrestore your root filesystem. When finished check the contents of /a looks like a root filesystem.
  5. If this file exists immediately delete it:
# rm restoresymtable
  1. Edit the file /a/etc/system and look for the line referencing 'rootdev'. Remove this line and write the file back.

  2. Edit /a/etc/vfstab to point to the correct devices and removing all references to 'md' devices (as you did before).

  3. Take the system down in orderly manner:

# init 0
  1. 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
  1. 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.

  1. Take the system down:
# init 0
  1. 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.

1 Like

Went pretty smooth up to step 11. When I

init 0

I get

INIT: Cannot access /var/adm/utmpx, remaining in single user mode

Is this a problem? I don't think var is mounted- correct?

Do you know if your /var is a separate filesystem?? If so, you are correct that /var is not mounted (does therefore not exist).

However, you must be careful how you bring the system down so not to corrupt anything.

If all else fails then the old-fashioned way is:

# sync
# sync
# <stop-A>

but that could still be iffy.

1 Like

OK I did

boot -r

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

Well you've already successfully booted into single user from this hard disk so you might as well try going multi-user with CTRL-D

1 Like

OK I put run level 3 and

Cannot access /var/adm/utmpx, remaining in single user mode

and then back to the

ctrl-d to proceed with normal...

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????

Repeat, is /var a separate filesystem or not?

1 Like

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.

1 Like

You have one of two scenarios.

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.

1 Like

Good Morning..

Good news- its starting to look like something! It lets me log in as root.

Yes,

/usr

is its own slice. Never did anything with it so I formatted and restored it.

Amended

vfstab

for that slice.

Booted without reconfigure switch.

Its coming up with

Cannot start X-Server

and driver error, which I expected.

Next, I intend to:

  1. Install the driver for that card.
  2. Format and restore the other slices.

Sound about right?