Solved

Restoring root partition

Posted on 1998-04-18
4
893 Views
Last Modified: 2013-12-16
The situation: On a Sparc2 with Solaris 2.5, I am replacing the boot disk which has slice0 root, slice 1 swap, slice 7 data.  I ufsdump  the root and data partitions, then booted from cdrom in single user mode with "b cdrom -s".
The Question:  How do ufsrestore the root partition?  It appears that when booted from cdrom the root is mounted from the cdrom.  Therefore I cannot restore to root since it is already there and it is also read-only being that it on the cdrom.  Obviously i'm missing something here, what do i need to do to ufsrestore back to the root???
0
Comment
Question by:j_k
  • 2
4 Comments
 
LVL 2

Accepted Solution

by:
gormenghast earned 50 total points
ID: 1811775
Hi

Dont worry about the root filesystem when booted from CD, as this is not the same file system as the HD you are going to restore to.
Mount the root partition from your new HD (I think on the CD Solaris filesystem they provide a directory called "a" to mount to -- or use /mnt), cd into this directory then do a restore of your backed up root partition. Do the same for /usr if this is also a separate partition.
It is some time since I have done this and I have more comprehensive notes at the office, so if there is anything I have omitted to mention, then I will get back to you tomorrow.
0
 
LVL 3

Expert Comment

by:rickyr
ID: 1811776
Hi...
fsck /dev/rdsk/c0t3d0s0
mount /dev/dsk/c0t3d0s0 /a
cd /a
ufsrestore ivf /dev/rmt/#lbn
ufsrestore> add *
ufsrestore> extract
rm restoresymtable
cd /ur/platform/`uname -i`/lib/fs/ufs
installboot bootblk /dev/rdsk/c0t3d0s0
cd /
umount /a
fsck /dev/rdsk/c0t3d0s0
init 6
These are the note that Gormenghast left at the office
regards
0
 
LVL 3

Expert Comment

by:rickyr
ID: 1811777
woops
installboot bootblk /dev/rdsk/c0t3d0s0
should be the block device not the raw device
installboot bootblk /dev/dsk/c0t3d0s0
regards
0
 

Author Comment

by:j_k
ID: 1811778
I have not been able to do this yet,
Hope to get to it soon
May have more questions then!

0

Featured Post

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

I have been running these systems for a few years now and I am just very happy with them.   I just wanted to share the manual that I have created for upgrades and other things.  Oooh yes! FreeBSD makes me happy (as a server), no maintenance and I al…
FreeBSD on EC2 FreeBSD (https://www.freebsd.org) is a robust Unix-like operating system that has been around for many years. FreeBSD is available on Amazon EC2 through Amazon Machine Images (AMIs) provided by FreeBSD developer and security office…
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now