From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <96075321606428.tru64-unix-managers.marc@archive.invalid> From: NSYSTEM () beau ! nb ! rockwell ! com Date: Thu, 06 Jul 1995 22:01:18 +0000 To: tru64-unix-managers Subject: SUMMARY: Restoring Bootable Disk X-MARC-Message: https://marc.info/?l=tru64-unix-managers&m=96075321606428 The summary is provided below for your review. The original question was how to restore a crash root disk. ___________________________________________________________________________ Thanks to Steve McLaughlin for the following procedure: 1) take down system; boot from cd 2) select system management [3] 3) run ./MAKEDEV rz3 4) run disklabel -e [root device [i.e. rz3 ]] *note - this invokes the ed editor to edit disklabel **note - don't wait until this point to do the math 5) run newfs on disk partitions to be mounted [i.e. newfs /dev/rz3a & newfs /dev/rz3g] 6) type halt; boot off cd; select advanced install *note - use existing disktab when promted 7) reboot to single user mode; system will prompt for install options; choose basic options 8) system will restart after install selections have been made 9) reboot off the cd; select system management [3]; make system disk and tape device [i.e. ./MAKEDEV rz3 tz13] 10) mount the /usr device to /usr and the / device to /mnt; *note - if you get an error about the filesystems being dirty, run fsck -p on them then try mounting again 11) cd /usr and delete everything - be sure to delete .smdb. dir, if not you will be asked hundreds of times if you want to overwrite these files; restore data from tape 12) cd to / and once again delete everything; restore data from tape 12) restart system. ** NOTE ** Do not attempt this procedure using a tape device connected to a different machine. Weird, unspeakable things will happen, trust me ;) Thanks to Jon Buchanan for the following procedure: However, a better strategy is to keep a copy of your root partition on one of your other disks. Be sure to use the 'a' partition or you can't use it for booting. But... if you do it right then it's a simple matter to boot with the reserve partition to single-user mode and restore your backups, eg: if your usual system disk is rz2 but you have a copy of root on rz3: >>> b -fl s dka300 # /sbin/fsck /dev/rrz3a # File system check on backup root # /sbin/mount -uv /dev/rz3a / # Mount / for read/write # /sbin/disklabel -rw rz2 RZ26L # Re-label your original system disk # /sbin/newfs /dev/rrz2a # Initialise the original / parition # /sbin/mount /dev/rz2a /root2 # Mount for restoring backups (perhaps # cd /root2 # use /mnt or /opt if no /root2) # /sbin/restore -rf /dev/rmt0h # Restore your last dump of / # /sbin/umount /root2 # /sbin/newfs /dev/rrz2g # Repeat for /usr partition # /sbin/mount /usr # cd /usr # /sbin/restore -s 2 -rf /dev/nrmt0h # Restores second dump on tape # shutdown -h now "Rebooting from original system disk" >>> b As for copying the root partition in the first place: # mkdir /root2 # newfs /dev/rrz3a # mount /dev/rrz3a /root2 # dump -0 -f - / | ( cd /root2; restore -rf - ) # umount /root2 You can do this while the system is running, although single user mode would of course be better. Thanks to Gyula Szokoly for the following procedure: Never tried, but under SunOS/Solaris it was easy (no reinstall): 1. Boot from the CD in single user mode (i.e. >>> setenv BOOT_OSFLAGS "S", >>> boot cdrom). 2. Format, install, etc. See the hardware manual about how to (low level) format the disk from the boot prom if necessary. You can also start 'scu' if available in single user mode (than 'set nexus bus 0 target 3 lun 0', etc.). 3. Label the disk. Create the device file first (e.g. cd /dev;./MAKEDEV rz3). After this, a disklabel -w -r rz3 rz28 (rz28 == your disk type). After this, disklabel -e rz3 and you can edit it. Have a Unix manual handy, because you will have to use 'ed', no 'vi' in single user mode. 4. newfs / and /usr. 5. mount the / partition under /mnt. 6. cd there, run 'restore -if /dev/nrmt0h'. You probably have to create the device file first (cd /dev;./MAKEDEV tz4). restore the / partition. 7. On Suns you were supposed to install a boot block. I can't find the equivalent under OSF. 8. shutdown / boot from the new disk (still single user). 9. /sbin/bcheckrc (so / is mounted rw). It will try to mount all partitions, some will fail. 10. cd to /usr 11. Restore /usr (Don't forget to position the tape -- during boot, a SCSI reset is issued, which will rewind the tape). 12. shutdown 13. setenv BOOT_OSFLAGS "S" (so boots in multiuser) 14. boot. P.S.: I wrote all this from memory, so device names, etc. might be wrong. Double check and understand all commands before executing it. __________________________________________________________________________ Candice Rockwell International