Visit Our UNIX and Linux User Community


How do I clone Solaris 7 disk


 
Thread Tools Search this Thread
Special Forums UNIX Desktop Questions & Answers How do I clone Solaris 7 disk
# 1  
Old 05-20-2002
Question How do I clone Solaris 7 disk

could anyone give me a general idea of how i may clone a 2 Gig disk running Solaris 7 on it to another disk of the same size?

currently, this system only has one disk in it though. i do have the ability to hook up another disk via SCSI.

i have been told i need to boot to "miniroot" to run "dd," but how can i do this? i have searched for help on miniroot but have found nothing that has helped so far. thanks in advance!

shane
# 2  
Old 05-20-2002
If you use a clone server with identical hardware configuration,
you can use jumpstart to install a image created with
flarcreate.

Regards. Hugo.
# 3  
Old 05-20-2002
In Solaris it's booting into single user mode - to do it and get a dump of the file systems, boot cdrom -s from the okay prompt.
Search the forums for booting single user for more info - that question has been answered many times.
thehoghunter
# 4  
Old 05-21-2002
"flarcreate"

where could i find documentation on "flarcreate".....i'm not familiar with this.

i so however have documentation on JumpStart that comes included with the Solaris 7 manuals.

basically what i am trying to do is to speed up the installation process spread over 5 machines in a computer lab. right now after going through a manual Solaris install, i also have to apply patches that take an hour or more. i would like to just be able to clone a complete machine on those 5 other machines and have the entire thing automated as much as possible. i thought that JumpStart only did a Solaris install, i did not know it was capable of cloning "images" to various machines. if this is true that JumpStart is capable of "installing" disk images, that would be perfect.
# 5  
Old 05-21-2002
1- Creation of flar file
Use /var/tmp as the destination for the flar file (and exclude /var/tmp from the flar -x /var/tmp), select the / as the source (-R /).

Example:

flarcreate -n "Solaris 7 web server image" \
-a "your_mail" \
-R / \
-x /var/tmp \
/var/tmp/S7.web.archive

2- FTP the flar archive to the jumpstart server

3- create a basic.profile with installation type flash_install and with the partitioning of the original server

install_type flash_install
archive_location nfs 192.168.215.183:/jumpstart/FlashArchives/S7.web.archive
partitioning explicit
filesys rootdisk.s0 3072 /
filesys rootdisk.s1 1024 swap
filesys rootdisk.s3 9216 /opt
filesys rootdisk.s5 3072 /var
filesys rootdisk.s6 720 /var/spool
filesys rootdisk.s7 128 /export/home

4- Create a generic rules file:
any - - Profiles/basic.profile Finish/cleanup_temp_files.sh


5- File cleanup_temp_files.sh

#!/bin/sh
for i in /a/var/adm/messages* /a/var/adm/utmpx \
/a/var/adm/wtmpx /a/var/adm/lastlog
do
cp /dev/null ${i}
done
mkdir /a/var/tmp
chown root:sys /a/var/tmp
chmod 1777 /a/var/tmp

Note: Remember that the original server may not be "alive" when
you do the installation, and you need to remove the entry of the
original server from the arp table (arp -d host).

6- Execute the installation
IP=client_IP
MAC=client_MAC
replace the IP of jumpstart server (in my case 192.168.215.183)
replace platform if needed (in my case sun4u)
CLIENT=hostname_of_client
replace ar-liss18 with the server:/path to the sysidcfg file

./add_install_client -i $IP -e $MAC -c 192.168.215.183:/jumpstart
-p ar-liss18:/jumpstart/Sysidcfg/Solaris_7 $CLIENT sun4u

7- You will need to modify the /etc/hosts file, /etc/nodename,
/etc/hostname.hmeX (or whatever qfe, etc), /etc/resolv.conf, etc . You can modify the finalization script to do this.

Note: I've post in the past 16/04/2002 (boot sector in Solaris) an example with more detail with Solaris 8 jumpstart server, see as reference and use man pages for add_install_client.
example for configuring an inexistent resolv.conf:
Add to the finish scripts the following lines:

echo "domain your_domain" >> /a/etc/resolv.conf
echo "nameserver your_first_dns" >> /a/etc/resolv.conf
echo "nameserver your_second_DNS" >> /a/etc/resolv.conf

Good luck. Hugo

more information:

flarcreate
Use the flarcreate command to create a Web Start Flash archive from a master system. You can use this command when the master system is running in multiuser or single-user mode. You can also use flarcreate when the master system was booted from the Solaris 8 Software 1 of 2 CD or from an image of the Solaris 8 Software and Solaris 8 Languages CDs. The master system should be in as stable a state as possible when you create a Web Start Flash archive. The syntax of the command is:

flarcreate -n name [-R root] [-S] [-H] [-c] [-x exclude] [-t [-p posn][-b blocksize]] [-i date] [-m [-u section [-d dir]] [-f file_list] [-F] [-U key=val] master] [-a author] [-e descr:-E descr_file] [-T type] path/filename

In this command line, path is the directory in which you want the archive file to be saved and filename is the name of the archive file. If you do not specify a path, flarcreate saves the archive file in the current directory.

Table 21 - Command-Line Options for flarcreate Option
Description

Required Options

-n name
The value of this flag is the name of the archive. The name you specify is the value of the content_name keyword.

Option for Compression

-c
Compresses the archive by using compress(1).

Options for Directories and Sizes

-R root
Creates the archive from the file system tree that is rooted at root. If you do not specify this option, flarcreate creates an archive from a file system that is rooted at /.

-S
Does not include sizing information in the archive.

-x exclude
Excludes the directory exclude from the archive. If you specify a file system with -R root, the path to the directory exclude is assumed to be relative to root.

-H
Does not generate the hash identifier.

Options Used With User-Defined Sections

-u section
Includes a user-defined section. To include more than one user-defined section, section must be a space-separated list of section names.

-d dir
Retrieves the section file that is specified with -u from dir.

Options Used With Tape Archives

-t
Creates an archive on a tape device. The outfile argument is the name of the tape device.

-p posn
Use only with the -t option. Specifies the position on the tape device for flarcreate to store the archive. If you do not use this option, flarcreate places the archive in the current position of the tape.

-b blocksize
Specifies the block size flarcreate uses when creating the archive. If you do not specify a block size, flarcreate uses the default block size of 64k.

Options for Specifying Files

-f file_list
Adds the files in the file file_list to the archive.

The file_list file must contain one file per line. The path to each file must be relative to the alternate root directory or an absolute path.

If you use "-" as the value of file_list, flarcreate uses the output of stdin as the list of files. When you use the value "-", the archive size is not calculated.

-F
Uses only the files in file_list to create the archive.

Options for Archive Identification

-U key=val
Includes user-defined keyword(s) and values in the Archive Identification section.

-i date
Uses date as the value for the creation_date keyword. If you do not specify a date, flarcreate uses the current system time and date.

-m master
Uses master as the name of the master system on which you created the archive for the creation_master keyword. If you do not specify a master, flarcreate uses the system name that is reported by uname -n.

-e descr
Uses descr for the value of the content_description keyword. You cannot use this option when you use the -E option.

-E descr_file
Retrieves the value for the content_description keyword from the file descr_file. You cannot use this option when you use the -e option.

-a author
Uses author as the author name in the Archive Identification section for the content_author keyword. If you do not specify an author, flarcreate does not include the content_author keyword in the Archive Identification section.

-T type
Uses type as the value for the content_type keyword. If you do not specify a type, flarcreate does not include the content_type keyword.


flar
The flar command allows you to administer archives. With the flar command you can accomplish the following tasks.

Extracting Information From an Archive

Splitting Archives

Combining Archives

Extracting Information From an Archive
Use the flar command with the -i option to get information about archives you have already created. The syntax of the command is:

flar -i:info [-l] [-k keyword] [-t [-p posn] [-b blocksize]] filename

Table 22 - Command-Line Options for flar -i Option
Description

-k keyword
Returns only the value of the keyword keyword.

-l
Lists all the files in the archive section.


Splitting Archives
The flar command with the -s option splits a Web Start Flash archive into sections. The flar command copies each section into a separate file in the current or specified directory. The files are named after the sections, for example, the archive cookie is saved in a file named cookie. You can specify that the flar command only save one section. The syntax of the command is:

flar -s:split[-d dir] [-u section] [-f archive] [-S section] [-t [-p posn] [-b blocksize]] filename

Table 23 - Command-Line Options for flar -s Option
Description

-d dir
Retrieves the sections to copy from dir, rather than from the current directory.

-u section
If you do not use this option, flar copies all sections in the current directory. If you use this option, flar copies the Cookie, Identification, Archive, and section sections. You can specify a single section name or a space-separated list of section names.

-f archive
Extracts the Archive section into a directory called archive, rather than place it in a file with the name archive.

-S section
Only copies the section named section from the archive.


Combining Archives
The flar command with the -c option creates a Web Start Flash archive from individual sections. Each section is assumed to be in a separate file, the names of which are the section names. At a minimum, the Archive Cookie (cookie) , Archive Identification (identification), and Archive Files (archive) sections must be present. If archive is a directory, the flar command uses cpio to archive it before including it in the combined archive. If the Archive Identification section specifies to compress the archive, flar compresses the contents of the newly combined archive.

flar -c:combine [-d dir] [-u section] [-t [-p posn] [-b blocksize]] filename


--------------------------------------------------------------------------------
Note -
No validation is performed on any of the sections. In particular, no fields in the Archive Identification section are validated or updated.


--------------------------------------------------------------------------------
Table 24 - Command-Line Options for flar -c Option
Description

-d dir
Retrieves the sections to combine from dir, rather than from the current directory.

-u section
If you do not use this option, flar combines all sections in the current directory. If you use this option, flar combines only the Cookie, Identification, Archive, and section sections. You can specify a single section name or a space-separated list of section names.


Last edited by hugo_perez; 05-22-2002 at 09:58 AM..
# 6  
Old 05-22-2002
Thanks Hugo

thanks hugo, but where do i find flarcreate? i booted single user mode from my Solaris 7 installation CD, and attempted to run "flarcreate" from the command line but it didn't recognize it as a valid command.

do i need to run it from a specific directory???
# 7  
Old 05-22-2002
try with miniroot or other recovery methods

see:

http://www.sun.com/solutions/bluepri...sesubject.html

Regards. Hugo.

Previous Thread | Next Thread
Test Your Knowledge in Computers #976
Difficulty: Medium
In April 2014, Linus Torvalds banned Kay Sievers from submitting patches to the Linux kernel for failing to deal with bugs that caused systemd to negatively interact with the kernel.
True or False?

8 More Discussions You Might Find Interesting

1. Solaris

Need to Clone Solaris OS to another disk

Hi, I am trying to clone the hard disk image of Solaris OS on one disk to another disk. After some googling I found that there is a command "dd" to achieve this. However there is a condition to use the dd command, that the disk geometry of both the disks (source and target disks) should... (5 Replies)
Discussion started by: rajujayanthy
5 Replies

2. UNIX for Advanced & Expert Users

Faster dd for disk clone

Guys can anyone tell how can we do faster disk cloning Below i found in google 1. dd if=/dev/sda of=/dev/sdb bs=4096 conv=noerror,sync So adding "conv=noerror,sync " makes it faster looks against not adding it 2. Enable write cache activated (hdparm -W1 /dev/sda) then run dd .. ... (2 Replies)
Discussion started by: heman96
2 Replies

3. AIX

Clone or mirror your AIX OS larger disk to smaller disk ?

hello folks, I have a 300GB ROOTVG volume groups with one filesystem /backup having 200GB allocated space Now, I cannot alt disk clone or mirrorvg this hdisk with another smaller disk. The disk size has to be 300GB; I tried alt disk clone and mirrorvg , it doesn't work. you cannot copy LVs as... (9 Replies)
Discussion started by: filosophizer
9 Replies

4. Ubuntu

Mounting a disk clone

I wasn't sure where to put this thread but since i use ubuntu for data recovery, I figured this is the best place. So, a friend passed me a 250G Western Digital hard disk the other day and said that his client needs to get her pictures off it. the problem: windows says it wants to reformat the... (13 Replies)
Discussion started by: old noob
13 Replies

5. SCO

Hard disk clone of OpenServer 5.0.0 didn't work, why?

Continuing saga of working on making a retail store more robust by creating a backup clone of the main server, a 1995 era :eek: PC running SCO OpenServer 5.0.0b and a discontinued Point of Sales (POS) software system. I have a PC of the same make and model. The CPU runs faster and it has a... (5 Replies)
Discussion started by: jgt10
5 Replies

6. SCO

Clone hard disk using Ghost

Hi. We tried cloning a SCO Unix hard disk using Norton Ghost. However, the new cloned hard disk encounter booting problem. What possibly go wrong? (1 Reply)
Discussion started by: Mizan
1 Replies

7. Filesystems, Disks and Memory

clone disk

Disk cloning I had an external SCSI master disk that I used to clone to an identical external SCSI disk because the other SCSI disk would become corrupted. My original Master became corrupted so I used one of the other to good disk to copy back to the master. Unfortunately the new master needs... (1 Reply)
Discussion started by: stamperr
1 Replies

8. Solaris

Clone disk for Sun Blade 2000

Hai ......... my name Rio, I want to clone my harddisk at Sun Balade 2000 server with Solaris 8 OS, my question is : a. what kind method for making backup or clonning disk ? b. what method more easier , quick but still reliable ? c. how to proceed it ? Thanks (1 Reply)
Discussion started by: rioria
1 Replies

Featured Tech Videos