RE: Cloning boot disk
> On Tue, May 07, 2002 at 06:36:56PM -0400, Solarisexpert.com wrote:
> > I have 2 SCSI hard drives, different geometries (1Gb vs. 9GB ;
> dd will not
> > work).
> > How do I clone them (tar may be ok ?) so that my new disk
> becomes bootable
> > (meaning, what is the Linux equivalent of the solaris
> 'installboot'?) and
> > all the data is preserved ?
> Boot a rescue disk, mount both disks like in /target and /target2, then
> cp -a /target/. /target2/.
> When that's done, do:
> chroot /target2 /sbin/silo -f
> That should do it for you.
Well, moved more by laziness more than anything else, I partially took the
advice here and I made a live copy of the disk with tar instead. I created a
tarball on the new drive I had mounted under /mnt using a simple 'tar cvf
/mnt/root.tar /' . Later on I changed directory and issued a 'tar xvf
That could have probably been accomplished with a cleaner approach, using
tar -cvO / | tar xv -C /mnt
The version of tar I use under Solaris has a different sintax and I was not
comfortable taking chances on my only good disk with my finally fully
functional kernel and 4 days of work on getting the socal driver to work...
I am pretty sure it will do the job.
I almost forgot, make sure you use the --exclude flag on tar to keep at
least /proc/kcore out of the tarball. If you forget, you will be reading
through all of your physical memory. (I am not sure if you cn leave out all
of /proc. I think this should be built dynamically every time the kernel
initializes, but I am not sure if the kernel expects to find at least the
mount points for the virtual filesystems... Any hints here ?)
I stil needed the bootblock to contain the boot code. The line from Ben's
recommendation above worked nicely for that purpose:
chroot /target2 /sbin/silo -f
which in my case was
chroot /mnt /sbin/silo -f
Phone (877) 44 SOL EX (Toll Free)
Phone +001 407 323 1668 (outside US)
Fax +001 586 816 7086
TEL;WORK;VOICE:(877) 44 SOLEX
ADR;WORK:;;8142 Fan Palm way;Kissimmee;FL;34747;United States of America
LABEL;WORK;ENCODING=QUOTED-PRINTABLE:8142 Fan Palm way=0D=0AKissimmee, FL 34747=0D=0AUnited States of America