Solved

Moving disk 1 to disk 2 and booting from disk 2

Posted on 2004-08-20
12
875 Views
Last Modified: 2013-12-16
I am currently working from a solaris 8 OS. I would like to move the contents of scsi disk 1 to scsi disk 2, and then boot from disk 2. Disk 2 will have partitions that are different from disk 1. I am familiar with using ufsdump to backup file systems/partitions and restoring the partitions to a /mnt subdirectory. What is confusing to a unix novice like myself is how would you install the bootblk on the secondary drive and when you boot to disk2, what happens to the mountpoints at /mnt/* ?

Thanks alot for your help!!!
0
Comment
Question by:sphunix
  • 6
  • 3
  • 3
12 Comments
 
LVL 20

Assisted Solution

by:tfewster
tfewster earned 250 total points
Comment Utility
0
 
LVL 38

Accepted Solution

by:
yuzh earned 250 total points
Comment Utility
If disk 2 have partitions that are different from disk 1, cpio is the tool to use, in this
case tfewster' link give you the answer.

You do need to run installboot to make your disk 2 bootable, eg install the bootblocks
in the root filesystem, assume your root filesystem is tansfered to /dev/rdsk/c0t2d0s0,
you do:

installboot /usr/platform/`uname -i`/lib/fs/ufs/bootblk  /dev/rdsk/c0t2d0s0




 
0
 

Author Comment

by:sphunix
Comment Utility
Is there any real significance between using solaris ufsdump and cpio. cpio seems to be similar to tar.

0
 

Author Comment

by:sphunix
Comment Utility
One more thing, after the filesystems have been transferred to disk2 and the vfstab has been edited to point to the filesystems on disk2 how will solaris resolve booting to disk 2 when disk 1 is still connected. The easy answer I presume would be to disconnect disk 1 first, but I would like to reconnect disk 1 to be mirrored from disk 2.

Thanks again!!
0
 
LVL 20

Expert Comment

by:tfewster
Comment Utility
Don't use tar, as it doesn't handle special files!   Apart from that, I can't see any difference between using ufsdump and cpio.

The link I posted mentions changing the boot-device from the OK-prompt; For more infor, see http://www.experts-exchange.com/Operating_Systems/Solaris/Q_20496366.html  - Or my assistant can probably help you ;-)

0
 
LVL 38

Expert Comment

by:yuzh
Comment Utility
As tfewster pointed out, tar is not the tool to use for this case, it can't habdle special files
(eg, device files...etc).

cpio is a gerneri *nix backup tool, can use for system level backup.

ufsdume/ufsrestore is a set of Solaris ONLY system level backup tool.

In your case, both cpio and "ufsdump/ufsrestore will do the job for you.

Please have a look at the following page to learn more dtails about these tools.
http://web.utanet.at/mario/ebook/chapter_13.htm
0
Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

 

Author Comment

by:sphunix
Comment Utility
Thanks for the useful links. I will be working on this today as soon as I can get my cdrom to boot (can't read disk label error).

Thanks.
0
 

Author Comment

by:sphunix
Comment Utility
Now I have a CDROM problem. When the OS (5.8) is loaded I can navigate the Solaris Installation CD,  but when I try booting from the CD I get:

/pci@1f, 4000/scsi@3/kisk@6,0:f

Drive not ready
Can't read disk label

Can't open disk label package

Obviously, the CDROM is identifable. I'm sure the CD integrity is good because I have used it before and its been stored in a safe place.

Since drive 1 was up and running I decided not to worry about the CDROM for now. I just copied the bootblk using "installboot /usr/platform/SUNW,Ultra-250/lib/fs/ufs/bootblk /dev/rdsk/c0t2d0s2

When I tried to boot from disk2 (after removing disk1) I got:

Can't read disk label
Can't open disk label package

I have edited the vfstab and copied the bootblk. It seems as if the bootblk isn't found when booting with only disk2 installed. I will be glad to hear your suggestions.
0
 
LVL 20

Expert Comment

by:tfewster
Comment Utility
> /pci@1f, 4000/scsi@3/kisk@6,0:f
If that's not a typo in your post - "kisk" should read "disk" -  It looks like the alias has been created incorrectly?

To set the system to boot from the "new" hard disk:
ok>show-disks
#this will give you instructions to select & setup the device alias, once you have that done, move on to the following steps.
ok> nvalias mydev (Then press ^Y   and append the "@scsi_target,0" to the pasted line)
# See http://www.filibeto.org/sun/lib/hardware/enterprise_4500/diskbrd_aliases.html for a detailed guide
ok> setenv boot-device mydev
ok> reset   # will reboot using mydev
0
 

Author Comment

by:sphunix
Comment Utility
After setenv boot-device to disk2,  disk2 came up without a problem. Now I'm running dd to clone disk2 to disk1. dd is taking a looooong time to run -over 24hrs on a dual 400Mhz Ultra Sparc, 2gb Ram, 20gbx2 drive Sun. Should I be concerned?

In anycase, thanks to tfewster and yuzh for providing very useful information. Your advice was right on point I will be closing this question soon.

 
0
 
LVL 38

Expert Comment

by:yuzh
Comment Utility
dd -- copy date block by block form the HD, it takes long time to finish for 20GB HD.
        You should only use "dd" when you have 2 indentical HD.
0
 

Author Comment

by:sphunix
Comment Utility
Your useful suggestions and resources helped me successfully accomplish this task. Thanks again!
0

Featured Post

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

Attention: This article will no longer be maintained. If you have any questions, please feel free to mail me. jgh@FreeBSD.org Please see http://www.freebsd.org/doc/en_US.ISO8859-1/articles/freebsd-update-server/ for the updated article. It is avail…
My previous tech tip, Installing the Solaris OS From the Flash Archive On a Tape (http://www.experts-exchange.com/articles/OS/Unix/Solaris/Installing-the-Solaris-OS-From-the-Flash-Archive-on-a-Tape.html), discussed installing the Solaris Operating S…
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…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…

772 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

10 Experts available now in Live!

Get 1:1 Help Now