ghosting(?) a drive

classic Classic list List threaded Threaded
15 messages Options
Reply | Threaded
Open this post in threaded view
|

ghosting(?) a drive

maxim wexler
Hello everyone,

Just received a new, unformatted SATA 120G HD with the
intention of moving my entire gentoo OS over to it
from a flaky 120G ATA drive(reiserfs). Hopefully, I
can just boot up from the new drive as if nothing had
changed.

Can anybody recommend any tool(s) for the job?
Gotchas? Does SATA prefer a certain fs?

-mw


               
__________________________________
Yahoo! FareChase: Search multiple travel sites in one click.
http://farechase.yahoo.com
--
[hidden email] mailing list

Reply | Threaded
Open this post in threaded view
|

Re: ghosting(?) a drive

Jonathan A. Kollasch-3
On Fri, Nov 11, 2005 at 02:50:22PM -0800, maxim wexler wrote:
> intention of moving my entire gentoo OS over to it
> from a flaky 120G ATA drive(reiserfs). Hopefully, I
> can just boot up from the new drive as if nothing had
> changed.
>
> Can anybody recommend any tool(s) for the job?
> Gotchas? Does SATA prefer a certain fs?

If the new drive has a greater or equal number of blocks than the old you could boot a LiveCD then dd(1) the old device (something like "dd if=/dev/hda of=/dev/sda" IIRC) onto the new device. You then should be able to boot directly off of the new drive.

Or you could create new file systems on the new drive then cp -PRp or rsync the old data to the new drive. In the later case you'd need to reinstall GRUB or LILO.

Be sure to not erase the old drive until you're sure the data got copied correctly.

        Jonathan Kollasch

attachment0 (193 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: ghosting(?) a drive

Bryan Whitehead
In reply to this post by maxim wexler
The best way would to be to create a new filesystem on the new disk. Then
copy the data via rsync.

<startfsflamewar>
had you used a real fs, like xfs, you could do a dump/restore to generate
an exact copy at the filesystem level (full acl, and other details
embedded into a filesystem)
</startfsflamewar>

On Fri, 11 Nov 2005, maxim wexler wrote:

> Hello everyone,
>
> Just received a new, unformatted SATA 120G HD with the
> intention of moving my entire gentoo OS over to it
> from a flaky 120G ATA drive(reiserfs). Hopefully, I
> can just boot up from the new drive as if nothing had
> changed.
>
> Can anybody recommend any tool(s) for the job?
> Gotchas? Does SATA prefer a certain fs?
>
> -mw
>
>
>
> __________________________________
> Yahoo! FareChase: Search multiple travel sites in one click.
> http://farechase.yahoo.com
>

--
Bryan Whitehead
Email:[hidden email]
--
[hidden email] mailing list

Reply | Threaded
Open this post in threaded view
|

Re: ghosting(?) a drive

John Jolet
In reply to this post by maxim wexler
On Friday 11 November 2005 16:50, maxim wexler wrote:

> Hello everyone,
>
> Just received a new, unformatted SATA 120G HD with the
> intention of moving my entire gentoo OS over to it
> from a flaky 120G ATA drive(reiserfs). Hopefully, I
> can just boot up from the new drive as if nothing had
> changed.
>
> Can anybody recommend any tool(s) for the job?
> Gotchas? Does SATA prefer a certain fs?
put it in, dd if=/dev/sda of=/dev/sdb (note at the hd level, not the partition
level)
>
> -mw
>
>
>
> __________________________________
> Yahoo! FareChase: Search multiple travel sites in one click.
> http://farechase.yahoo.com

--
John Jolet
Your On-Demand IT Department
512-762-0729
www.jolet.net
[hidden email]
--
[hidden email] mailing list

Reply | Threaded
Open this post in threaded view
|

Re: ghosting(?) a drive

Christoph Eckert-2
In reply to this post by maxim wexler

> Can anybody recommend any tool(s) for the job?
> Gotchas? Does SATA prefer a certain fs?

AFAIR there's a sourceforge project which does similar things like
Ghost, but I do not remember the name, sorry.


Best regards


    ce
--
[hidden email] mailing list

Reply | Threaded
Open this post in threaded view
|

Re: ghosting(?) a drive

stroller-6

On Nov 12, 2005, at 12:47 am, Christoph Eckert wrote:

>
>> Can anybody recommend any tool(s) for the job?
>> Gotchas? Does SATA prefer a certain fs?
>
> AFAIR there's a sourceforge project which does similar things like
> Ghost, but I do not remember the name, sorry.

I looked into this a while back & found 2:
   http://freshmeat.net/projects/g4u/
   http://freshmeat.net/projects/g4l/

I believe that one claims the other is a rip-off of his work, but from
a usage point-of-view both are open-source. I can't recall why I found
neither of them to be suitable for me in the past - I ended up using
`partimage` from the Knoppix CD.

`partimage` allowed me to save my partition images onto a USB
hard-drive & split them up to cope with the FAT32 file size limit. It
worked perfectly but I recall it took me a few tries to get it right as
the originating hard-drive had a number of partitions, primary &
logical.

Stroller.

--
[hidden email] mailing list

Reply | Threaded
Open this post in threaded view
|

Re: ghosting(?) a drive

stroller-6
In reply to this post by Jonathan A. Kollasch-3

On Nov 11, 2005, at 11:20 pm, Jonathan A. Kollasch wrote:

> On Fri, Nov 11, 2005 at 02:50:22PM -0800, maxim wexler wrote:
>> intention of moving my entire gentoo OS over to it
>> from a flaky 120G ATA drive(reiserfs). Hopefully, I
>> can just boot up from the new drive as if nothing had
>> changed.
>
> If the new drive has a greater or equal number of blocks than the old
> you could boot a LiveCD then dd(1) the old device (something like "dd
> if=/dev/hda of=/dev/sda" IIRC) onto the new device. You then should be
> able to boot directly off of the new drive.

Presumably this copies the boot sector & the main partition data
correctly, but what about the "whitespace" at the end of the drive?

The reason I ask is that a local pension wants his Windows partition
copied to a new, larger hard-drive. Will `dd` work? Can I just use
PartitionMagic (boo! hiss! proprietary software! hiss!) to resize the
partition to take up the full drive once I'm done?

Normally I'd use something like Maxblast http://tinyurl.com/5ppq4 or
Data Lifeguard Tools http://tinyurl.com/97zw7 for this but the guy's
new drive is a Samsung & they don't seem to do such a utility.

Stroller.

--
[hidden email] mailing list

Reply | Threaded
Open this post in threaded view
|

Re: ghosting(?) a drive

listjiro
In reply to this post by maxim wexler
On Friday 11 November 2005 23.50, maxim wexler wrote:

> Hello everyone,
>
> Just received a new, unformatted SATA 120G HD with the
> intention of moving my entire gentoo OS over to it
> from a flaky 120G ATA drive(reiserfs). Hopefully, I
> can just boot up from the new drive as if nothing had
> changed.
>
> Can anybody recommend any tool(s) for the job?
> Gotchas? Does SATA prefer a certain fs?
>
> -mw
>
>
>
> __________________________________
> Yahoo! FareChase: Search multiple travel sites in one click.
> http://farechase.yahoo.com


I would recommend creating a new file system on the destination drive.
The do a rsync -axH src dst
Then install grub on the master boot sector on the destination drive
as specified in the gentoo installation manual.

I have had problems with dd ghosting in the past but rsync has worked
flawlessly so far.

Jimmy
--
[hidden email] mailing list

Reply | Threaded
Open this post in threaded view
|

Re: ghosting(?) a drive

Digby Tarvin
In reply to this post by maxim wexler
I do this quite frequently - except that in most cases I am
replacing an old drive with a new larger driver, but want
the existing partitions copied accross identically as if
nothing has changed. To complicate matters, I often have
more that one operating system installed on the disk.

The basic appreach is really the same thing you would do if
your old drive failed completely and you were recovering from
backups - only this way you can make sure your backups are
completely up to date so that nothing is lost.

The best method (IMHO) is as follows:

Firstly, always make sure your backups are completely up
to date before you start plugging and unplugging hard drives.
Use 'fdisk -l' or similar to get the exact partitioning of the
old drive, and print a copy.

Next connect and partition the new drive with identically sized
partitions to the original drive. Any extra space will be available for
new partitions - these can be created now or later.

Now load all of the partitions with the content of the corresponding
original. If I am using dump to backup ext2/ext3 filesystems, I usually
just use restore at this point.

Alternatively, boot your old system single user (so all filesystems
are read-only) and dd each old filsystem to the corresponding
new filesystem.

Finally, move the new drive to its final address and remove the
original, boot using a floppy or CD, and use grub/lilo to update your
boot blocks. Then, of course, you chould run a filesystem check
on each of the filesystems just to make sure.

This ensures that the information in the boot sector is correct
for the new drive. Two 120G drives will typically not have
*exactly* the same number of sectors, and usually will have
a different geometry. So long as the new drive has the same
or more, then you are ok and just need to make sure you copy
the original partition sizes exactly. If you have slightly less,
then at least one partition will be smaller and should be
formatted and copied file by file (although you could avoid
this by choosing to shrink the swap partition).

The dd means I don't have to worry about what operating system
is in the partition, and there is no possibility that oversights
with rsync will have resulted in subtle changes that might go
un-noticed for a long time - such as forgetting to preserve
hard links (archive mode does not preserve everything..).

When I need to change the size of one or more filesystems, then
I use dump/restore (for ext2/3 filesystem) or rsync for Unix
based systems.

Regards,
DigbyT

On Fri, Nov 11, 2005 at 02:50:22PM -0800, maxim wexler wrote:

> Hello everyone,
>
> Just received a new, unformatted SATA 120G HD with the
> intention of moving my entire gentoo OS over to it
> from a flaky 120G ATA drive(reiserfs). Hopefully, I
> can just boot up from the new drive as if nothing had
> changed.
>
> Can anybody recommend any tool(s) for the job?
> Gotchas? Does SATA prefer a certain fs?
>
> -mw
>
>
>
> __________________________________
> Yahoo! FareChase: Search multiple travel sites in one click.
> http://farechase.yahoo.com
> --
> [hidden email] mailing list

--
Digby R. S. Tarvin                                             [hidden email]
http://www.digbyt.com
--
[hidden email] mailing list

Reply | Threaded
Open this post in threaded view
|

Re: ghosting(?) a drive

Neil Bothwick
In reply to this post by Jonathan A. Kollasch-3
On Fri, 11 Nov 2005 17:20:35 -0600, Jonathan A. Kollasch wrote:

> If the new drive has a greater or equal number of blocks than the old
> you could boot a LiveCD then dd(1) the old device (something like "dd
> if=/dev/hda of=/dev/sda" IIRC) onto the new device. You then should be
> able to boot directly off of the new drive.

Add something like bs=10240 or you'll be waiting until Christmas for it
to complete.

You'll also need to edit etc/fstab on the new drive, replacing /dev/hda
with /dev/sda throughout.


--
Neil Bothwick

Beware of cover disks bearing upgrades.

signature.asc (196 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: ghosting(?) a drive

Neil Bothwick
In reply to this post by stroller-6
On Sat, 12 Nov 2005 02:24:01 +0000, Stroller wrote:

> > If the new drive has a greater or equal number of blocks than the old
> > you could boot a LiveCD then dd(1) the old device (something like "dd
> > if=/dev/hda of=/dev/sda" IIRC) onto the new device. You then should
> > be able to boot directly off of the new drive.
>
> Presumably this copies the boot sector & the main partition data
> correctly, but what about the "whitespace" at the end of the drive?

That stays unpartitioned. You can either create a new partition there or
resize the final partition, using either qtparted or the command line
tools.


--
Neil Bothwick

Daddy? What's this little red button for?

signature.asc (196 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: ghosting(?) a drive

maxim wexler
In reply to this post by Bryan Whitehead
> <startfsflamewar>
> had you used a real fs, like xfs, you could do a
> dump/restore to generate

What's dump/restore? There are no manuals for either
and it's not mentioned in man rsync as far as I could
see.

> an exact copy at the filesystem level (full acl, and
> other details
> embedded into a filesystem)
> </startfsflamewar>



       
               
__________________________________
Yahoo! Mail - PC Magazine Editors' Choice 2005
http://mail.yahoo.com
--
[hidden email] mailing list

Reply | Threaded
Open this post in threaded view
|

Re: ghosting(?) a drive

Abhay Kedia
On Monday 14 Nov 2005 10:13 am, maxim wexler wrote:
> What's dump/restore? There are no manuals for either
> and it's not mentioned in man rsync as far as I could
> see.
He is talking about xfsdump/xfsrestore. They are tools available for XFS file
system and are available in "sys-fs/xfsprogs" package.

Abhay

attachment0 (196 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: ghosting(?) a drive

maxim wexler
In reply to this post by Jonathan A. Kollasch-3


--- "Jonathan A. Kollasch" <[hidden email]>
wrote:

> On Fri, Nov 11, 2005 at 02:50:22PM -0800, maxim
> wexler wrote:
> > intention of moving my entire gentoo OS over to it
> > from a flaky 120G ATA drive(reiserfs). Hopefully,
> I
> > can just boot up from the new drive as if nothing
> had
> > changed.
> >
> > Can anybody recommend any tool(s) for the job?
> > Gotchas? Does SATA prefer a certain fs?
>
> If the new drive has a greater or equal number of
> blocks than the old you could boot a LiveCD then
> dd(1) the old device (something like "dd if=/dev/hda
> of=/dev/sda" IIRC) onto the new device. You then
> should be able to boot directly off of the new
> drive.

boots into a panic. Here's the last 5 lines:

[28.856347] ReiserFS: sda3: found reiserfs format
"3.6" with standard journal
[31.560835] ReiserFS: sda3: warning: sh-2029: reiserfs
read_bitmaps: bitmap bitlock(#14057372) reading failed
[31.663418] UDF-fs: No partition found (1)
[31.663466] Kernel panic - not syncing: VFS: Unable to
mount root fs on unknown-block(8,3)
[31.663493]

After dd'ing I compared both drives w/fdisk and they
were identical except for the device names, of course.
I *did* update fstab and grub.conf and ran
grub-install w/o error. Don't know why it was looking
for a UDF fs.

one thing I noticed though, the SATA drive is about 3M
smaller than the ATA.


       
               
__________________________________
Yahoo! Mail - PC Magazine Editors' Choice 2005
http://mail.yahoo.com
--
[hidden email] mailing list

Reply | Threaded
Open this post in threaded view
|

Re: ghosting(?) a drive

Digby Tarvin
I still think you need to partition the new drive first, then
dd the individual partitions.

Addresses within partitions are normally handled as sector offsets, but
booting and locating the start/extent of partitions don't always.

The fdisk format on PCs is ancient and predates SCSI (and IDE drives that
pretend to be SCSI). It encodes addresses in terms of sector/head/cylinder,
as well as storing block offset information.

Unless the old and new drives are identical geometry (for example,
the same make and model) then any code that tries to use physical
addressing based on geometry is going to screw up if the fdisk table
does not match the drive...

Regards,
DigbyT

On Mon, Nov 14, 2005 at 04:54:57PM -0800, maxim wexler wrote:

>
> boots into a panic. Here's the last 5 lines:
>
> [28.856347] ReiserFS: sda3: found reiserfs format
> "3.6" with standard journal
> [31.560835] ReiserFS: sda3: warning: sh-2029: reiserfs
> read_bitmaps: bitmap bitlock(#14057372) reading failed
> [31.663418] UDF-fs: No partition found (1)
> [31.663466] Kernel panic - not syncing: VFS: Unable to
> mount root fs on unknown-block(8,3)
> [31.663493]
>
> After dd'ing I compared both drives w/fdisk and they
> were identical except for the device names, of course.
> I *did* update fstab and grub.conf and ran
> grub-install w/o error. Don't know why it was looking
> for a UDF fs.
>
> one thing I noticed though, the SATA drive is about 3M
> smaller than the ATA.
>
--
Digby R. S. Tarvin                                             [hidden email]
http://www.digbyt.com
--
[hidden email] mailing list