LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 05-12-2007, 02:56 AM   #1
babag
Member
 
Registered: Aug 2003
Posts: 419

Rep: Reputation: 31
using linux to move xp to larger drive?


i'm planning on getting a larger drive for my laptop and am
looking for suggestions on how to proceed. i expect to use
knoppix or something like it for the process. the laptop
runs on xp and (unfortunately) has to stay that way as i
use it mainly with some apps i haven't been able to replace
on linux.

i've looked at a number of sites offering walk-throughs of
cloning procedures but most seem specific to cloning to a
partition of a size matching the original's size. i want to
give the new drive more room for everything.

the way the system is currently set up is this:

c: system partition
x: programs partition
y: swap partition
z: data partition

i'd like to proportionately increase the space avaiable to
each partition by something like 50% and whatever's left over
add onto the data partition.

what procedures and software would anyone suggest for this
process?

my initial thoughts are to keep the old drive as a 'pocket'
drive. i thought i'd buy both a new drive and a usb enclosure.
i was hoping there'd be a way i could use the new drive in
the enclosure during the migration process, then swap the
old drive out of the laptop and into the enclosure, and the
new drive out of the enclosure and into the laptop.

does this sound feasible?

thanks,
BabaG
 
Old 05-12-2007, 04:00 AM   #2
rjwilmsi
Member
 
Registered: Mar 2005
Location: UK
Distribution: opensuse 12.2 x86_64
Posts: 563

Rep: Reputation: 38
That sounds like a good method to set up partitions on the new drive and transfer data. I think you'll have to install Windows fresh on the new drive though - I don't think copying it across will work properly.
 
Old 05-12-2007, 08:25 AM   #3
saikee
Senior Member
 
Registered: Sep 2005
Location: Newcastle upon Tyne UK
Distribution: Any free distro.
Posts: 3,398
Blog Entries: 1

Rep: Reputation: 113Reputation: 113
It is a dead simple task. The tool you need is a Live CD from gparted or Parted Magic downloadable from any of the official site by Google "Parted Magic" etc.

Steps

(1) Download the software and burn it into a bootable CD

(2) Buy the bigger 2.5" hard disk. put it into the 2.5" hdd enclosure and hook it up as a USB hard disk. No need to format. Use it as the raw disk.

(3) Boot up the Live CD and click terminal. Check the disk names by terminal command
Code:
fdisk -l
The new disk should be sda without any partition inside and its size should match the capacity you purchase. The disk will be named sdb only if your existing 4-partition disk is a Sata., otherwise the source should be called hda and the new target sda. Adjust the name according to what "fdisk -l" reveals. If in doubt post here the output of "fdisk -l".

(4) Assuming the new disk is sda and the source disk is hda then the entire 4-partition can be cloned by just one line of terminal command
Code:
dd if=/dev/hda of=/dev/sda bs=32768
Since the target is a USB device the cloning rate should drop to about 7 to 11 Mb/s. The above will work as long as the target disk is bigger in capacity.

(5) When dd complete it will report to you the No. of records each transferring 32768 bytes. The total of bytes should match approximately the new bigger disk. Once satisfied it is completed power down the PC.

(6) Remove the existing disk as a backup for safe keeping. Put the new disk into it place. Reboot and satisfy with yourself that everything work perfectly before attempting to resize any of the partitions.

(7) XP will know the hard disk has been changed. This is allowed but to amend the register it will demand an immediate reboot. After the reboot you have an activated XP legally transferred into a new disk. XP has an internal record of every hardware and so an activated XP cannot be used on other machine. The hardware change for a hard disk is within the threshold set in the factory. MS allows this because a hard disk can fail in service.

(8) Satisfy everything work perfectly and then boot up Parted Magic and use it to resize the partitions. I recommend to resize and test one partition at a time before moving onto the next partition. Also have the XP defragged first before resizing it. Parted Magic is a graphic resizer with which you just drag the partition boundary to the size you want and press enter.

Knoppix doesn't resize as reliably as the current version of gparted and Parted Magic so don't use it!
 
Old 05-12-2007, 12:42 PM   #4
babag
Member
 
Registered: Aug 2003
Posts: 419

Original Poster
Rep: Reputation: 31
thanks saikee. this is a near perfect solution. just downloaded and
burned partition magic. if i can pick up a drive this weekend i'll
try this out right away. one question: is there a way to do this
while predefining the new partition sizes on the new drive?

i do some audio recording sometimes and would like to minimize any
fragmentation. i'm uncertain as to how resizing partitions deals with
the disk allocation. does the partition space remain contiguous? or,
as in my case of multiple partitions, is new space allocated at the
end of all the data, making the partition space discontiguous?

my thinking is that if i can define the partition sizes before i copy
i can avoid any resizing fragmentation. not the hugest of issues nut
if i can avoid it, hey, why not?


thanks,
BabaG

Last edited by babag; 05-12-2007 at 12:46 PM.
 
Old 05-12-2007, 01:28 PM   #5
saikee
Senior Member
 
Registered: Sep 2005
Location: Newcastle upon Tyne UK
Distribution: Any free distro.
Posts: 3,398
Blog Entries: 1

Rep: Reputation: 113Reputation: 113
You first priority in cloning is to have the target disk bootable in exactly the same manner as the original so forget about altering the partition size in this process because you need the partition table duplicated 100% accurately on the target disk.

The main feature Parted Magic is its ability to resize the NTFS partition reliably. You will find the files are packed tight together after a resizing exercise. In any case if you don't like it you cam always defrag it afterward. You will find the resizing ability of Parted Magic one of the best around.

Linux clones hard disk reliably because a carbon copy is produced by reading the binary pattern of one disk and writing the information on the same spot on the other disk. The process is counted by sectors. Empty spaces are faithfully reproduced. The cloning process will break down if you start to mess around the partition sizes causing the informatio to be written on different locations.

I moved my operating systems from 200Gb to 300Gb, then to 400Gb and finally to 500Gb disks and have never met any problem. Sometime I can have over 50 systems in the source disk but I never expect any of them to fail in the cloned drive.

dd is one of the wonders in Linux because up to now Linux does not write on a NTFS partition, unless special software is installed, but can clone XP.
 
Old 05-14-2007, 04:12 PM   #6
babag
Member
 
Registered: Aug 2003
Posts: 419

Original Poster
Rep: Reputation: 31
thanks for all the help saikee. process is done now and remarkably
painless. hardest part was figuring out how to get at the drive in
the notebook. it's a bit older now and the site that once had pix up
on the process is no longer available.

parted magic was great, as was the live cd generally. did take
something like sixteen hours to redo the partitions on the new
100gb drive, though. hadn't realized it would take that long.

thanks again,
BabaG
 
Old 05-14-2007, 06:17 PM   #7
saikee
Senior Member
 
Registered: Sep 2005
Location: Newcastle upon Tyne UK
Distribution: Any free distro.
Posts: 3,398
Blog Entries: 1

Rep: Reputation: 113Reputation: 113
Glad you got it sorted.

Linux is easy, simple, flexible and powerful to me.

I really see no reason why it can't be the same for you.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Moving to a larger drive eric_marsh Linux - General 6 12-07-2006 10:32 PM
how to move root parition to a larger partition miner49er Linux - General 2 04-23-2006 03:38 AM
smaller drive to larger drive duplication mystery midlifecrisis Solaris / OpenSolaris 6 02-01-2006 07:23 AM
How to move to larger drive.... bishoptf Linux - Hardware 2 08-27-2005 04:37 PM
Upgrading to a larger drive madcrutch Linux - Software 3 04-30-2002 02:19 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 07:23 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration