[Mageia-discuss] Copying system to new disk

andre999 andre999mga at laposte.net
Mon Nov 14 10:45:41 CET 2011

Morgan Leijström a écrit :
> måndagen den 14 november 2011 09.37.33 skrev  Juergen Harms:
>> The hard drive containing my system partitions is dying. I can still
>> read it, but will have to rapidly replace it by a new (and bigger) drive.
> Try to avoid writing to it as temporary faults may screw files up....
Good point.

>> Does somebody have experience with - rather re-installing Mga and
>> Windows-7 partition - simply copying the corresponding file-system
>> (piped tar) and then just recreating the boot sector - would be much
>> quicker, in particular for the windows partition? Any particular
>> precautions to take?
> Once i simply booted a live system, used dd to copy from old to bigger larger
> drive, then gparted to extend (not move) windows partition, and i think i just
> moved and extended home while deleting linux system and reinstalled.
> Using dd on the whole disk ( /dev/sdx (whthout number ) take the whole drive
> including boot sector and whatever.
> Of course you can dd to a file on a mounted large drive too, to make a backup
> as soon as possible and then from the file to new drive at later time.

I've used a similar approach a few times on portables, to just install a 
larger disk.
Booting to systemrescuecd (a live cd, http://www.sysresccd.org/), I used 
gparted to format the new drive (attached via usb), and copied the 
Ms-windows C partition, ensuring that it starts on the same sector.  
(Which produces an exact copy like DD.)
Then I used gparted to copy (and resize at the same time) the other 
partitions (Ms-windows D + linux).  (This does copy + resize in one 
step, so faster.)
It is important to do it when not running from the old drive, hence 
using a live cd.
(At least for swap and /; also /home if logged on to an account other 
than root.)

After, I test-booted from the new drive, and if I wanted to, I resized 
the Ms C partition.  I always use a D partition for data files + any 
programs that are supposed to run on Linux via wine, so usually there 
was no need to resize C.  I usually set fstab so C is not normally 
mounted under Linux.
I've done this with Ms-XP and -Vista, don't know if -7 would cause any 

(I usually also use gdisk partition tables, with hybrid for Ms 
partitions, but that is another question.)


More information about the Mageia-discuss mailing list