Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

dd command

Status
Not open for further replies.

terrywashington

Technical User
Jun 28, 2001
185
US
I need to replace the root disk c0t0d0s0 in an Ultra-2 server. I want to install the replacement disk in the second bay, and use the dd command to copy the OS and data to the replacement disk. Does anyone know the syntax of the dd command that I should use to do this?
 
dd is not really the way.
make on the 2.disk the same struct you have on the 1.one
and mount on the 2. what you need.
starting by root
for each fs in root #get it by df
do ufsdump 0f - $fs |(cd 2.disk/$fs; ufsrestore xf -)
done
at least you have to install the bootblock
see: man installboot ------------ jamisar
Einfachheit ist das Resultat der Reife. (Friedrich Schiller)
Simplicity is the fruit of maturity.
 
the following is for primary disk as c0t0d0s2 and secondary as c0t1d0s2, change as needed:

/usr/sbin/prtvtoc /dev/rdsk/c0t0d0s0 | grep -v '*' > /var/tmp/root_vtoc

/usr/bin/dd if=/dev/rdsk/c0t0d0s2 of=/dev/rdsk/c0t1d0s2

/usr/sbin/fmthard -s /var/tmp/root_vtoc /dev/rdsk/c0t1d0s2

fsck your filesystems and see if you can mount them
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top