Showing posts with label partimage. Show all posts
Showing posts with label partimage. Show all posts

Wednesday, August 7, 2013

Cloning XP and linux to a SSD, part1

I've recently bought a Crucial SSD M500 240GB SATA III to substitute my old IDE HD seagate (120GB). 162e from Prokoo, not bad.
Crucial M500 240GB 2.5-inch Internal SSD
Capacity (Unformatted): 240GB
Interface: SATA 6Gb/s (SATA 3GB/s compatible)
Sustained Sequential Read up to (128k transfer): 500MB/s
Sustained Sequential Write up to (128k transfer): 250MB/s
Random Read up to (4k transfer): 72,000 IOPS
Random Write up to (4k transfer): 60,000 IOPS
Form Factor: 2.5-inch, m-SATA, and M.2
NAND: 20nm Micron MLC NND
Life Expectancy: 1.2 million hours mean time to failure (MTTF)
Endurance: 72TB total bytes written (TBW), equal to 40GB per day for 5 years
Operating Temperature: 0°C to 70°C
Compliance: RoHS, CE, FCC, UL, BSMI, C-TICK, KCC RRL, W.E.E.E., TUV VCCI, IC
Firmware: Field upgradable firmware
Product Health Monitoring: Self-Monitoring, Analysis and Reporting Technology (SMART) commands

The old disk hosted WinXP and Ubuntu 10.04, the latter spread on several dedicated partitions (boot, / and swap on this disk, /home on another, larger, SATA disk).

Cloning
Once connected internally to a SATA port my pc (Fujitsu-Siemens, quite old, Athlon64 X2), the SSD took the first disk position (sda) and the old disk moved to the last (sdc).
Cloning with Parted Magic (pmagic_2013_05_01) live from DVD was fast and easy.
It used partclone to copy "disk to local disk" at the astonishing rate of 3.35GB/min!!
Then I edited the grub.cfg file adding a new instance of linux pointing to the correct disk and to differentiate from the grub in the old disk: this would make evident that I'm actually booting from the SSD.
At this point I rebooted, entered BIOS to set the boot disk priority to let the SSD kick in first, rebooted and the grub from the SSD showed up correctly.
So far, so good.
But here my BIG mistake: I booted firstly windows, with BOTH the new and the old disk (cloned) connected.
WinXP did boot, but it went to the old disk, not the new one.
The reason -I've learned after long internet serach- is probably that I didn't change the UUIDs of the partitions of the new disk, therefore the boot got confused and started the old installation. The problem is that windows apparently realised that there was an identical installation on an identical partition and changed something to prevent -possibly- copy of the system.

Lesson learnt: after cloning NEVER reboot with both disks connected! Start with the new one, restart with a liveCD, change the UUIDs, re-install grub, reboot in the new disk (both OSs) and only ath this point you can safely reconnect the old disk!

Before going into the part2, with the recovery and installation of the lates LinuxMint LMDE 201303 along with XP and Ubuntu, here are the final performances:

Win XP:
was 1'16" from grub to the ethernet icon appearance (=system usable)
is ~45"

Ubuntu:
was ~ 47" from grub to the ethernet connected (=system boot finished)
is ~32"

Mint (not installed originally):
is ~ 27" from grub to the ethernet connected (=system boot finished)


Very, very good!

Thursday, April 12, 2007

backup partizione vista

per il backup della partizione di vista ho usato partimage.
sudo apt-get install partimage

prima di lanciarlo, smontare le partizioni:
Code:
sudo umount -a

connettere ed eventualmente montare i dischi esterni necessari (nel caso il sistema non li avesse montati automaticamente)
Code:
sudo mkdir /mnt/temp
sudo mount -t auto /dev/sda1 /mnt/temp
sudo ntfs-3g /dev/sdb1 /mnt/temp
(o l'uno o l'altro: nell'esempio sda1 e' un generico filesystem linux o fat, sdb1 invece e' una partizione con filesystem ntfs)

lanciare partimage:
Code:
sudo partimage



selezionare la partizione da copiare e dare un nome al file di backup

dopo un paio di ok e un po' di tempo, il backup finisce.


se si riceve l'ok, vuol dire che la copia della partizione e' andata a buon fine.
il supporto per ntfs e' limitato, ma se si riceve l'ok la copia e' ben fatta.

meglio comunque controllare.
rilanciare partimage, selezionare la partizione, dare il nome del file seguito da .000 e selezionare "restore"
nella schermata successiva selezionare "simulate"

qui bastano pochi minuti

al termine, meglio rimettere la proprieta' dei file all'utente, per poterli successivamente cancellare comodamente:

Code:
sudo chown nome_utente vista*