Solved

Moving disk 1 to disk 2 and booting from disk 2

Posted on 2004-08-20
12
896 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
ID: 11858349
0
 
LVL 38

Accepted Solution

by:
yuzh earned 250 total points
ID: 11867015
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
ID: 11904141
Is there any real significance between using solaris ufsdump and cpio. cpio seems to be similar to tar.

0
Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

 

Author Comment

by:sphunix
ID: 11904255
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
ID: 11906624
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
ID: 11909548
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
 

Author Comment

by:sphunix
ID: 11931728
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
ID: 11933784
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
ID: 11934572
> /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
ID: 11953331
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
ID: 11959951
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
ID: 12003133
Your useful suggestions and resources helped me successfully accomplish this task. Thanks again!
0

Featured Post

Is Your AD Toolbox Looking More Like a Toybox?

Managing Active Directory can get complicated.  Often, the native tools for managing AD are just not up to the task.  The largest Active Directory installations in the world have relied on one tool to manage their day-to-day administration tasks: Hyena. Start your trial today.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
how to check for shares on HP-UX 1 59
text in table need to be center of the box 4 78
Where to get php 5.6 for AIX 7.1? 5 100
Linux hostname change 2 71
In tuning file systems on the Solaris Operating System, changing some parameters of a file system usually destroys the data on it. For instance, changing the cache segment block size in the volume of a T3 requires that you delete the existing volu…
Installing FreeBSD… FreeBSD is a darling of an operating system. The stability and usability make it a clear choice for servers and desktops (for the cunning). Savvy?  The Ports collection makes available every popular FOSS application and packag…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
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.

770 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