Solved

Moving disk 1 to disk 2 and booting from disk 2

Posted on 2004-08-20
12
914 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 6
  • 3
  • 3
12 Comments
 
LVL 21

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
Get 15 Days FREE Full-Featured Trial

Benefit from a mission critical IT monitoring with Monitis Premium or get it FREE for your entry level monitoring needs.
-Over 200,000 users
-More than 300,000 websites monitored
-Used in 197 countries
-Recommended by 98% of users

 

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 21

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 21

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

What Is Transaction Monitoring and who needs it?

Synthetic Transaction Monitoring that you need for the day to day, which ensures your business website keeps running optimally, and that there is no downtime to impact your customer experience.

Question has a verified solution.

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

When you do backups in the Solaris Operating System, the file system must be inactive. Otherwise, the output may be inconsistent. A file system is inactive when it's unmounted or it's write-locked by the operating system. Although the fssnap utility…
I promised to write further about my project, and here I am.  First, I needed to setup the Primary Server.  You can read how in this article: Setup FreeBSD Server with full HDD encryption (http://www.experts-exchange.com/OS/Unix/BSD/FreeBSD/A_3660-S…
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.
In a previous video, we went over how to export a DynamoDB table into Amazon S3.  In this video, we show how to load the export from S3 into a DynamoDB table.

707 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