Wednesday, July 9, 2008

How to Restore entire content of root file systems to new HDD

1. Boot your system
2. At OK prompt type boot cdrom –s
3. Create a file system on new HDD
newfs /dev/rdsk/c0t0d0s0
4. Mount partition to /a directory mount /dev/dsk/c0t0d0s0 /a
5. Go to /a directory
cd /a
6. Restore tape content
ufsrestore rvf /dev/rmt/0
7. Remove the restoresym table file.rm restoresymtable
8. Unmount the /a umount /a
9.
cd /usr/platform/`uname-m`/lib/fs/ufs
10. Configure boot device
installboot bootblk /dev/rdsk/c0t0d0s0
11. Reboot your system init 6

Package Management

PKGADD
1. To install new package (pkgadd -d Source location)

# pkgadd -d /cdrom/sol_7_x86/s2/Solaris2.7/Product/ SUNWbnur

2. To install package from current Dir
#pkgadd –d . SUNWbnwr

3. Copy package to spool dir without installation
#pkgadd –d Source location –s spool pkg name
Spool dir => /var/spool/pkg

4. If Packages are already in spool dir no need to give –d option
#pkgadd SUNWbnwr

PKGCHK
5. Shows details about particular pkg
#Pkgchk –V SUNWbnwr

6.Shows details about particular pkg
#Pkgchk –P SUNWbnwr
It shows pkg permission ,modified details etc

PKGINFO
It shows info about all installed packages.
7.Shows details about particular pkg
#pkginfo –l SUNWbnwr

PKGRM
8. To remove a package
#pkgrm

9. Remove pkg from spool directory
#pkgrm –s spool

you can download sun packages on http://www.sunfreeware.com/