SUMMARY:can't boot alt root

From: David Stern (dstern@tsi-telsys.com)
Date: Thu Aug 31 2000 - 16:12:50 CDT


Thanks to the many people who answered, too many to list.

Original question:
>We're trying to set up a second slice on the same disk as root to allow an
>alternate boot mechanism. Basically, our users intend to do mean, nasty and
>ugly things where they expect that root (but not /usr) will be corrupted and
>want a mechanism to quickly boot and restore root).
>
>I carved out an identically-sized partition, newfs'ed it and used
>
>dd if=/dev/dsk/c0t0d0s0 of=/dev/dsk/c0t0d0s4
>I fsck the new partition then modify vfstab on it to point root to the new
>slice. I'd expect that from the ok prompt, I could "boot disk:d" (fourth
>slice) and be up and running. The error I get on boot is "the file just
>loaded does not appear to be executable" and then it automatically boots
>from the original partition.
>
>Do I need to dd the raw devices?
>I presume that because dd is bit for bit copy, I need not run installboot(?)
 
Some said it couldn't be done on the same disk. (It can)
Others said you need to run installboot. (You don't. dd is a bit-for-bit copy)

The answer is that target 4 (/dev/dsk/c0t0d0s4) corresponds to the letter "e",
not "d" as you start counting from slice "0"! DOH!

In any case, if anyone else wishes to do this, here's the procedure:

- carve out a slice identical in size to root
- dd it. Don't use the raw device
    dd if=/dev/dsk/c0t0d0s0 of=/dev/dsk/c0t0d0s4
- fsck the new partition
    fsck -y /dev/dsk/c0t0d0s4
- mount it and modify vfstab to point root to the new slice.

For recovery, the user would

- boot disk:e

- when it comes up, reverse the dd command
   dd if=/dev/dsk/c0t0d0s4 of=/dev/dsk/c0t0d0s0
- fsck the original root
     fsck -y /dev/dsk/c0t0d0s0
- fix vfstab
   In my case, I made two vfstab's, the user need only
    cd /etc;mount /dev/dsk/c0t0d0s0 /mnt;cp vfstab.orig /mnt/etc
- sync; sync;sync;halt
  boot -s, enter root password
  fsck -y
  <CTRL>D to bring it up the rest of the way

 =-=-=-=-=-=-=-=-=- generated by /dev/dave -=-=-=-=-=-=-=-=-=-=-=-=-=-=
 David Stern TSI TelSys
 Manager, Information Systems 410-872-3906

S
U BEFORE POSTING please READ the FAQ located at
N ftp://ftp.cs.toronto.edu/pub/jdd/sun-managers/faq
. and the list POLICY statement located at
M ftp://ftp.cs.toronto.edu/pub/jdd/sun-managers/policy
A To submit questions/summaries to this list send your email message to:
N sun-managers@ececs.uc.edu
A To unsubscribe from this list please send an email message to:
G majordomo@sunmanagers.ececs.uc.edu
E and in the BODY type:
R unsubscribe sun-managers
S Or
. unsubscribe sun-managers original@subscription.address
L To view an archive of this list please visit:
I http://www.latech.edu/sunman.html
S
T



This archive was generated by hypermail 2.1.2 : Fri Sep 28 2001 - 23:14:16 CDT