{"id":1173,"date":"2013-02-10T09:32:56","date_gmt":"2013-02-10T14:32:56","guid":{"rendered":"https:\/\/unixed.com\/blog\/?p=80"},"modified":"2013-02-10T09:32:56","modified_gmt":"2013-02-10T14:32:56","slug":"recover-root-x86-solaris10","status":"publish","type":"post","link":"https:\/\/unixed.com\/index.php\/2013\/02\/10\/recover-root-x86-solaris10\/","title":{"rendered":"Recovering Root (\/) on an x86-Based Solaris 10 System"},"content":{"rendered":"<p><span style=\"color: #000000;\">This procedure describes how to recover the root file system on an x86-based Solaris 10 system from a ufsdump recovery tape (or file).<\/span><\/p>\n<p><span style=\"font-size: medium;\"><span style=\"color: #000000;\"><span style=\"font-family: Calibri;\">1. Replace and partition the disk if it has failed.<br \/>\n<\/span><\/span><\/span><span style=\"font-size: medium;\"><span style=\"color: #000000;\"><span style=\"font-family: Calibri;\">\u00a0 \u00a0 Because the system cannot be booted from the boot disk, boot from the DVD or CD-ROM.<\/span><\/span><\/span><\/p>\n<p><span style=\"font-size: medium;\"><span style=\"color: #000000;\"><span style=\"font-family: Calibri;\">2. The system begins its boot process from the Solaris miniroot on DVD (or CD-ROM). The following list <\/span><\/span><\/span><span style=\"font-size: medium;\"><span style=\"color: #000000;\"><span style=\"font-family: Calibri;\">of boot choices is displayed:<\/span><\/span><\/span><\/p>\n<ol>\n<li><span style=\"font-size: medium;\"><span style=\"color: #000000;\"><span style=\"font-family: Calibri;\">Solaris Interactive (default)<\/span><\/span><\/span><\/li>\n<li><span style=\"font-size: medium;\"><span style=\"color: #000000;\"><span style=\"font-family: Calibri;\">Custom JumpStart<\/span><\/span><\/span><\/li>\n<li><span style=\"font-size: medium;\"><span style=\"color: #000000;\"><span style=\"font-family: Calibri;\">Solaris Interactive Text (Desktop Session)<\/span><\/span><\/span><\/li>\n<li><span style=\"font-size: medium;\"><span style=\"color: #000000;\"><span style=\"font-family: Calibri;\">Solaris Interactive Text (Console Session)<\/span><\/span><\/span><\/li>\n<li><span style=\"font-size: medium;\"><span style=\"color: #000000;\"><span style=\"font-family: Calibri;\">Apply driver updates<\/span><\/span><\/span><\/li>\n<li><span style=\"font-size: medium;\"><span style=\"color: #000000;\"><span style=\"font-family: Calibri;\">Single user shell<br \/>\n<\/span><\/span><\/span><span style=\"font-size: medium;\"><span style=\"color: #000000;\"><span style=\"font-family: Calibri;\">Enter the number of your choice:<\/span><\/span><\/span><\/li>\n<\/ol>\n<p><span style=\"font-family: Calibri;\"><span style=\"font-size: medium;\"><span style=\"color: #000000;\">3. Select boot choice <strong>6<\/strong>, the single user shell. If an instance of Solaris is found on the disk, the system asks if you want to mount it on \/a. \u00a0<\/span><\/span><span style=\"font-size: medium;\"><span style=\"color: #000000;\">Answer <strong>n<\/strong> to avoid mounting an existing root file system.<\/span><\/span><\/span><\/p>\n<p><span style=\"font-size: medium;\"><span style=\"color: #000000;\"><span style=\"font-family: Calibri;\">4. Re-create the failed file system by issuing the newfs command:<br \/>\n<\/span><\/span><\/span><span style=\"font-size: medium;\"><span style=\"color: #000000;\"><span style=\"font-family: Calibri;\">\u00a0 \u00a0# newfs \/dev\/rdsk\/&lt;<em>disk-partition-name<\/em>&gt;<br \/>\nWhere: <\/span><\/span><\/span><span style=\"font-size: medium;\"><span style=\"color: #000000;\"><span style=\"font-family: Calibri;\">&lt;disk-partition-name&gt; is the name of the raw disk partition that contains the corrupted root file <\/span><\/span><\/span><span style=\"font-size: medium;\"><span style=\"color: #000000;\"><span style=\"font-family: Calibri;\">system.<\/span><\/span><\/span><\/p>\n<p><span style=\"font-size: medium;\"><span style=\"color: #000000;\"><span style=\"font-family: Calibri;\">5. Check the new file system by using fsck:<br \/>\n<\/span><\/span><\/span><span style=\"font-size: medium;\"><span style=\"color: #000000;\"><span style=\"font-family: Calibri;\">\u00a0 \u00a0# fsck \/dev\/rdsk\/&lt;<em>disk-partiton-name<\/em>&gt;<\/span><\/span><\/span><\/p>\n<p><span style=\"font-size: medium;\"><span style=\"color: #000000;\"><span style=\"font-family: Calibri;\">6. Mount the new file system on a temporary mount point:<br \/>\n<\/span><\/span><\/span><span style=\"font-size: medium;\"><span style=\"color: #000000;\"><span style=\"font-family: Calibri;\">\u00a0 \u00a0# mount \/dev\/dsk\/&lt;<em>disk-partition-name<\/em>&gt; \/mnt<\/span><\/span><\/span><\/p>\n<p><span style=\"font-size: medium;\"><span style=\"color: #000000;\"><span style=\"font-family: Calibri;\">7. Change to the \/mnt directory:<br \/>\n<\/span><\/span><\/span><span style=\"font-size: medium;\"><span style=\"color: #000000;\"><span style=\"font-family: Calibri;\">\u00a0 \u00a0# cd \/mnt<\/span><\/span><\/span><\/p>\n<p><span style=\"font-size: medium;\"><span style=\"color: #000000;\"><span style=\"font-family: Calibri;\">8. If using a tape, write-protect the tapes so that you don\u2019t accidentally overwrite them.<\/span><\/span><\/span><\/p>\n<p><span style=\"font-size: medium;\"><span style=\"color: #000000;\"><span style=\"font-family: Calibri;\">9. Load the tape and issue the following command:<br \/>\n<\/span><\/span><\/span><span style=\"font-size: medium;\"><span style=\"color: #000000;\"><span style=\"font-family: Calibri;\"># ufsrestore rf \/dev\/rmt\/0<\/span><\/span><\/span><\/p>\n<p><span style=\"font-size: medium;\"><span style=\"color: #000000;\"><span style=\"font-family: Calibri;\">The entire contents of the tape are restored to the file system. All permissions, ownerships, and dates remain as they were when the last incremental tape was created.<\/span><\/span><\/span><\/p>\n<p><span style=\"font-size: medium;\"><span style=\"color: #000000;\"><span style=\"font-family: Calibri;\">10. Verify that the file system is restored:<br \/>\n<\/span><\/span><\/span><span style=\"font-family: Calibri;\"><span style=\"color: #000000; font-size: medium;\">\u00a0 \u00a0<\/span><span style=\"font-size: medium;\"><span style=\"color: #000000;\"># ls<\/span><\/span><\/span><\/p>\n<p><span style=\"font-size: medium;\"><span style=\"color: #000000;\"><span style=\"font-family: Calibri;\">11. Remove the restoresymtable file that is created and used by ufsrestore to checkpoint the <\/span><\/span><\/span><span style=\"font-size: medium;\"><span style=\"color: #000000;\"><span style=\"font-family: Calibri;\">restoration:<br \/>\n<\/span><\/span><\/span><span style=\"font-size: medium;\"><span style=\"color: #000000;\"><span style=\"font-family: Calibri;\">\u00a0 \u00a0# rm restoresymtable<\/span><\/span><\/span><\/p>\n<p><span style=\"font-size: medium;\"><span style=\"color: #000000;\"><span style=\"font-family: Calibri;\">12. Install the GRUB stage1 and stage2 programs on the Solaris partition. The installgrub command installs the GRUB stage1 program in sector 0 and the GRUB stage2 program beginning at sector 50. These sectors are within the reserved first cylinder\u00a0 f the partition. Depending on the nature of the damage, they may not require reinstallation.<\/span><\/span><\/span><\/p>\n<p><span style=\"font-size: medium;\"><span style=\"color: #000000;\"><span style=\"font-family: Calibri;\">To install the stage1 and stage2 programs found in the miniroot from the Solaris DVD (or CDROM), use the following command:<br \/>\n<\/span><\/span><\/span><span style=\"font-size: medium;\"><span style=\"color: #000000;\"><span style=\"font-family: Calibri;\">\u00a0 \u00a0# \/sbin\/installgrub \/boot\/grub\/stage1 \/boot\/grub\/stage2 \/dev\/rdsk\/&lt;disk-partition-<\/span><\/span><\/span><span style=\"font-size: medium;\"><span style=\"color: #000000;\"><span style=\"font-family: Calibri;\">name&gt;<\/span><\/span><\/span><\/p>\n<p><span style=\"font-size: medium;\"><span style=\"color: #000000;\"><span style=\"font-family: Calibri;\">13. Change to the root (\/) directory:<br \/>\n<\/span><\/span><\/span><span style=\"font-size: medium;\"><span style=\"color: #000000;\"><span style=\"font-family: Calibri;\">\u00a0 \u00a0# cd \/<\/span><\/span><\/span><\/p>\n<p><span style=\"font-size: medium;\"><span style=\"color: #000000;\"><span style=\"font-family: Calibri;\">14. Unmount the newly created file system:<br \/>\n<\/span><\/span><\/span><span style=\"font-size: medium;\"><span style=\"color: #000000;\"><span style=\"font-family: Calibri;\">\u00a0 \u00a0# umount \/mnt<\/span><\/span><\/span><\/p>\n<p><span style=\"color: #000000; font-family: Calibri; font-size: medium;\">\u00a0<\/span><span style=\"font-size: medium;\"><span style=\"color: #000000;\"><span style=\"font-family: Calibri;\">15. Check the new file system with fsck:<br \/>\n<\/span><\/span><\/span><span style=\"font-size: medium;\"><span style=\"color: #000000;\"><span style=\"font-family: Calibri;\">\u00a0 \u00a0# fsck \/dev\/rdsk\/&lt;<em>disk-partition-name<\/em>&gt;<br \/>\n<\/span><\/span><\/span><span style=\"font-size: medium;\"><span style=\"color: #000000;\"><span style=\"font-family: Calibri;\">The restored file system is checked for consistency.<\/span><\/span><\/span><\/p>\n<p><span style=\"color: #000000; font-family: Calibri; font-size: medium;\">\u00a0<\/span><span style=\"font-size: medium;\"><span style=\"color: #000000;\"><span style=\"font-family: Calibri;\">16. Perform a full backup of the file system:<br \/>\n# <\/span><\/span><\/span><span style=\"font-size: medium;\"><span style=\"color: #000000;\"><span style=\"font-family: Calibri;\">ufsdump ouf \/dev\/rmt\/0 dev\/rdsk\/&lt;<em>disk-partition-name<\/em>&gt;<\/span><\/span><\/span><\/p>\n<p><span style=\"color: #000000;\">Note: You should always create a new backup of the newly created file system. \u00a0ufsrestore\u00a0re-positions\u00a0the files and changes the inode allocation.<\/span><\/p>\n<p><span style=\"color: #000000;\">If you have separate filesystems for \/usr, \/var, or \/opt- repeat the steps (except for step 12) \u00a0for each of the filesystems.<\/span><\/p>\n<p><span style=\"font-size: medium;\"><span style=\"color: #000000;\"><span style=\"font-family: Calibri;\">17.\u00a0<\/span><\/span><\/span><span style=\"font-size: medium;\"><span style=\"color: #000000;\"><span style=\"font-family: Calibri;\">Reboot the system, but first eject the DVD (or CD-ROM) to prevent the system from booting to it again:<\/span><br \/>\n<span id=\"__mceDel\"><span style=\"font-size: medium;\"><span style=\"color: #000000;\">\u00a0 \u00a0\u00a0<span style=\"font-family: Calibri;\"># init 6<\/span><\/span><\/span><\/span><\/span><\/span><\/p>\n<p><span style=\"color: #000000; font-family: Calibri; font-size: medium;\">\u00a0<\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<p>This procedure describes how to recover the root file system on an x86-based Solaris 10 system from a ufsdump recovery tape (or file). 1. Replace and partition the disk if [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"default","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-gradient":""}},"footnotes":""},"categories":[16,19],"tags":[17,18,20,21],"class_list":["post-1173","post","type-post","status-publish","format-standard","hentry","category-recovery","category-solaris10","tag-restore-solaris-root","tag-solaris-x86-root-recovery","tag-ufsrestore-root","tag-x86-solaris-10-disaster-recovery"],"aioseo_notices":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p9J8F7-iV","_links":{"self":[{"href":"https:\/\/unixed.com\/index.php\/wp-json\/wp\/v2\/posts\/1173","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/unixed.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/unixed.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/unixed.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/unixed.com\/index.php\/wp-json\/wp\/v2\/comments?post=1173"}],"version-history":[{"count":0,"href":"https:\/\/unixed.com\/index.php\/wp-json\/wp\/v2\/posts\/1173\/revisions"}],"wp:attachment":[{"href":"https:\/\/unixed.com\/index.php\/wp-json\/wp\/v2\/media?parent=1173"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/unixed.com\/index.php\/wp-json\/wp\/v2\/categories?post=1173"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/unixed.com\/index.php\/wp-json\/wp\/v2\/tags?post=1173"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}