public inbox for gentoo-user@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-user] ghosting(?) a drive
@ 2005-11-11 22:50 maxim wexler
  2005-11-11 23:20 ` Jonathan A. Kollasch
                   ` (5 more replies)
  0 siblings, 6 replies; 15+ messages in thread
From: maxim wexler @ 2005-11-11 22:50 UTC (permalink / raw
  To: gentoo-user

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
-- 
gentoo-user@gentoo.org mailing list



^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [gentoo-user] ghosting(?) a drive
  2005-11-11 22:50 [gentoo-user] ghosting(?) a drive maxim wexler
@ 2005-11-11 23:20 ` Jonathan A. Kollasch
  2005-11-12  2:24   ` Stroller
                     ` (2 more replies)
  2005-11-11 23:41 ` Bryan Whitehead
                   ` (4 subsequent siblings)
  5 siblings, 3 replies; 15+ messages in thread
From: Jonathan A. Kollasch @ 2005-11-11 23:20 UTC (permalink / raw
  To: gentoo-user

[-- Attachment #1: Type: text/plain, Size: 871 bytes --]

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

[-- Attachment #2: Type: application/pgp-signature, Size: 186 bytes --]

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [gentoo-user] ghosting(?) a drive
  2005-11-11 22:50 [gentoo-user] ghosting(?) a drive maxim wexler
  2005-11-11 23:20 ` Jonathan A. Kollasch
@ 2005-11-11 23:41 ` Bryan Whitehead
  2005-11-14  4:43   ` maxim wexler
  2005-11-12  0:43 ` John Jolet
                   ` (3 subsequent siblings)
  5 siblings, 1 reply; 15+ messages in thread
From: Bryan Whitehead @ 2005-11-11 23:41 UTC (permalink / raw
  To: gentoo-user

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:driver@megahappy.net
-- 
gentoo-user@gentoo.org mailing list



^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [gentoo-user] ghosting(?) a drive
  2005-11-11 22:50 [gentoo-user] ghosting(?) a drive maxim wexler
  2005-11-11 23:20 ` Jonathan A. Kollasch
  2005-11-11 23:41 ` Bryan Whitehead
@ 2005-11-12  0:43 ` John Jolet
  2005-11-12  0:47 ` Christoph Eckert
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 15+ messages in thread
From: John Jolet @ 2005-11-12  0:43 UTC (permalink / raw
  To: gentoo-user

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
john@jolet.net
-- 
gentoo-user@gentoo.org mailing list



^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [gentoo-user] ghosting(?) a drive
  2005-11-11 22:50 [gentoo-user] ghosting(?) a drive maxim wexler
                   ` (2 preceding siblings ...)
  2005-11-12  0:43 ` John Jolet
@ 2005-11-12  0:47 ` Christoph Eckert
  2005-11-12  1:49   ` Stroller
  2005-11-12  9:23 ` Jimmy Rosen
  2005-11-12 15:02 ` Digby Tarvin
  5 siblings, 1 reply; 15+ messages in thread
From: Christoph Eckert @ 2005-11-12  0:47 UTC (permalink / raw
  To: gentoo-user


> 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
-- 
gentoo-user@gentoo.org mailing list



^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [gentoo-user] ghosting(?) a drive
  2005-11-12  0:47 ` Christoph Eckert
@ 2005-11-12  1:49   ` Stroller
  0 siblings, 0 replies; 15+ messages in thread
From: Stroller @ 2005-11-12  1:49 UTC (permalink / raw
  To: gentoo-user


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.

-- 
gentoo-user@gentoo.org mailing list



^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [gentoo-user] ghosting(?) a drive
  2005-11-11 23:20 ` Jonathan A. Kollasch
@ 2005-11-12  2:24   ` Stroller
  2005-11-13 18:53     ` Neil Bothwick
  2005-11-13 18:52   ` Neil Bothwick
  2005-11-15  0:54   ` maxim wexler
  2 siblings, 1 reply; 15+ messages in thread
From: Stroller @ 2005-11-12  2:24 UTC (permalink / raw
  To: gentoo-user


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.

-- 
gentoo-user@gentoo.org mailing list



^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [gentoo-user] ghosting(?) a drive
  2005-11-11 22:50 [gentoo-user] ghosting(?) a drive maxim wexler
                   ` (3 preceding siblings ...)
  2005-11-12  0:47 ` Christoph Eckert
@ 2005-11-12  9:23 ` Jimmy Rosen
  2005-11-12 15:02 ` Digby Tarvin
  5 siblings, 0 replies; 15+ messages in thread
From: Jimmy Rosen @ 2005-11-12  9:23 UTC (permalink / raw
  To: gentoo-user

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
-- 
gentoo-user@gentoo.org mailing list



^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [gentoo-user] ghosting(?) a drive
  2005-11-11 22:50 [gentoo-user] ghosting(?) a drive maxim wexler
                   ` (4 preceding siblings ...)
  2005-11-12  9:23 ` Jimmy Rosen
@ 2005-11-12 15:02 ` Digby Tarvin
  5 siblings, 0 replies; 15+ messages in thread
From: Digby Tarvin @ 2005-11-12 15:02 UTC (permalink / raw
  To: gentoo-user

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
> -- 
> gentoo-user@gentoo.org mailing list

-- 
Digby R. S. Tarvin                                             digbyt@digbyt.com
http://www.digbyt.com
-- 
gentoo-user@gentoo.org mailing list



^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [gentoo-user] ghosting(?) a drive
  2005-11-11 23:20 ` Jonathan A. Kollasch
  2005-11-12  2:24   ` Stroller
@ 2005-11-13 18:52   ` Neil Bothwick
  2005-11-15  0:54   ` maxim wexler
  2 siblings, 0 replies; 15+ messages in thread
From: Neil Bothwick @ 2005-11-13 18:52 UTC (permalink / raw
  To: gentoo-user

[-- Attachment #1: Type: text/plain, Size: 592 bytes --]

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.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [gentoo-user] ghosting(?) a drive
  2005-11-12  2:24   ` Stroller
@ 2005-11-13 18:53     ` Neil Bothwick
  0 siblings, 0 replies; 15+ messages in thread
From: Neil Bothwick @ 2005-11-13 18:53 UTC (permalink / raw
  To: gentoo-user

[-- Attachment #1: Type: text/plain, Size: 700 bytes --]

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?

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [gentoo-user] ghosting(?) a drive
  2005-11-11 23:41 ` Bryan Whitehead
@ 2005-11-14  4:43   ` maxim wexler
  2005-11-14  9:08     ` abhay
  0 siblings, 1 reply; 15+ messages in thread
From: maxim wexler @ 2005-11-14  4:43 UTC (permalink / raw
  To: gentoo-user

> <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
-- 
gentoo-user@gentoo.org mailing list



^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [gentoo-user] ghosting(?) a drive
  2005-11-14  4:43   ` maxim wexler
@ 2005-11-14  9:08     ` abhay
  0 siblings, 0 replies; 15+ messages in thread
From: abhay @ 2005-11-14  9:08 UTC (permalink / raw
  To: gentoo-user

[-- Attachment #1: Type: text/plain, Size: 319 bytes --]

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

[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [gentoo-user] ghosting(?) a drive
  2005-11-11 23:20 ` Jonathan A. Kollasch
  2005-11-12  2:24   ` Stroller
  2005-11-13 18:52   ` Neil Bothwick
@ 2005-11-15  0:54   ` maxim wexler
  2005-11-18 11:38     ` Digby Tarvin
  2 siblings, 1 reply; 15+ messages in thread
From: maxim wexler @ 2005-11-15  0:54 UTC (permalink / raw
  To: gentoo-user



--- "Jonathan A. Kollasch" <jakllsch@kollasch.net>
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
-- 
gentoo-user@gentoo.org mailing list



^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [gentoo-user] ghosting(?) a drive
  2005-11-15  0:54   ` maxim wexler
@ 2005-11-18 11:38     ` Digby Tarvin
  0 siblings, 0 replies; 15+ messages in thread
From: Digby Tarvin @ 2005-11-18 11:38 UTC (permalink / raw
  To: gentoo-user

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                                             digbyt@digbyt.com
http://www.digbyt.com
-- 
gentoo-user@gentoo.org mailing list



^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2005-11-18 11:42 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-11-11 22:50 [gentoo-user] ghosting(?) a drive maxim wexler
2005-11-11 23:20 ` Jonathan A. Kollasch
2005-11-12  2:24   ` Stroller
2005-11-13 18:53     ` Neil Bothwick
2005-11-13 18:52   ` Neil Bothwick
2005-11-15  0:54   ` maxim wexler
2005-11-18 11:38     ` Digby Tarvin
2005-11-11 23:41 ` Bryan Whitehead
2005-11-14  4:43   ` maxim wexler
2005-11-14  9:08     ` abhay
2005-11-12  0:43 ` John Jolet
2005-11-12  0:47 ` Christoph Eckert
2005-11-12  1:49   ` Stroller
2005-11-12  9:23 ` Jimmy Rosen
2005-11-12 15:02 ` Digby Tarvin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox