Linux - Laptop and Netbook Having a problem installing or configuring Linux on your laptop? Need help running Linux on your netbook? This forum is for you. This forum is for any topics relating to Linux and either traditional laptops or netbooks (such as the Asus EEE PC, Everex CloudBook or MSI Wind). |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
04-22-2006, 01:48 PM
|
#1
|
Member
Registered: Jan 2006
Location: Connecticut
Distribution: Ubuntu 10.10, Lubuntu 10.10, #!Crunchbang 10 "Statler"
Posts: 84
Rep:
|
I need to clone a laptop hard drive
My father-in-law has an old 10gig laptop drive containing winxp, hes purchased a newer 40gig drive and wants to make an exact image of the existing drive to the new 40gig.
can this be done using an external USB harddrive caddy and a linux live CD???
I was think there must be a way to mount the new drive as "/dev/sda1" and then from the live cd use an extended version of
"cp /dev/hda1 /dev/sda1"
any help would be appreciated
Thank You
|
|
|
04-22-2006, 02:10 PM
|
#2
|
Senior Member
Registered: Sep 2005
Location: France
Distribution: approximately NixOS (http://nixos.org)
Posts: 1,900
Rep:
|
dd if=/dev/hda1 of=/mnt/sda1/file.img?? man dd for details
|
|
|
04-22-2006, 02:14 PM
|
#3
|
Member
Registered: Apr 2006
Location: London, Uk
Distribution: Ubuntu on Desktop
Posts: 121
Rep:
|
You can use 'dd' to read and write partitions of the drive back out. This would be effectively treating the drive as just a block device and reading in like such. I would treat the old drive as a read only backup. Make sure to have a good read of the DD manual. You do not need to mount the drives at all to do this.
However, this assumes you are writing out with an identically sized partition on the drive. There are tools to resize ext2 (and other) linux partitions - and one group who seem to be a little familiar with it are the colinux people, for the simple reason that their bootable images generally come as 2Gb sized drive images.
On the colinux wiki, there are references to resizing the FS image (so that it is actually much larger). I would therefore get hold of those tools - make sure you have read the info on them first, and make them available to your liveCD distro.
This would need to be done on a partition by partition basis though, and I do not think it could be used for the whole drive. It should not matter that it is an internal or external USB drive.
|
|
|
04-22-2006, 02:28 PM
|
#4
|
Senior Member
Registered: Feb 2003
Location: Calif, USA
Distribution: PCLINUXOS
Posts: 2,918
Rep:
|
Quote:
...hes purchased a newer 40gig drive and wants to make an exact image of the existing drive to the new 40gig.
|
Don't new hard drives often come with software to clone from the old drive to the new one?
|
|
|
04-22-2006, 02:52 PM
|
#5
|
Member
Registered: Apr 2006
Location: London, Uk
Distribution: Ubuntu on Desktop
Posts: 121
Rep:
|
Do they? None of mine did, but then I purchase them OEM no frills. And dont be surprised if that software works in windows only and fails completely to recognise non windows partitions.
Still, if it did, and its linux compatible, and it works well, then let me know which drive you bought - I know which ones I will consider in future.
Danny
|
|
|
04-22-2006, 03:48 PM
|
#6
|
Member
Registered: Jan 2006
Location: Connecticut
Distribution: Ubuntu 10.10, Lubuntu 10.10, #!Crunchbang 10 "Statler"
Posts: 84
Original Poster
Rep:
|
thanks for the quick replies... none of the partitions will be of the Linux variety... and now that i think about it linux might not recognize an ntfs partion without some help....
i'm thinking the easiest way to clone the laptop drive (running winxp pro) would be to install both drives in a desktop machine using laptop-to-ide adapters and norton ghost.
If you guys have an easier method please let me know....
alternativley my suggestion was to just back up the important stuff and then do a fresh install of XP.. (though I wish I could get him try out linux)
I will read through the dd man to get a better understanding of the utility
tahnks for the help
|
|
|
04-22-2006, 04:21 PM
|
#7
|
Senior Member
Registered: Feb 2003
Location: Calif, USA
Distribution: PCLINUXOS
Posts: 2,918
Rep:
|
Quote:
Do they? None of mine did, but then I purchase them OEM no frills. And dont be surprised if that software works in windows only and fails completely to recognise non windows partitions.
|
Check this.
The copy feature lets you make an exact duplicate of your existing hard drive.
His idea to run Norton Ghost sounds like a good idea. The hard drive manufacturer's utility would be for if he did not have or want to purchase special software.
|
|
|
04-23-2006, 08:56 AM
|
#8
|
Member
Registered: Apr 2006
Location: London, Uk
Distribution: Ubuntu on Desktop
Posts: 121
Rep:
|
Mike - dd will copy the partition, regardless of if it is NTFS, FAT, ExtFs or anything. However, I do not utilities to resize an NTFS partition. Maybe Symantec has an offering for that.
2damncommon - as predicted, the manufacturer provided windows only software, which would be a FAT (pun intended) lot of use for my fs's which are not FAT or NTFS based. You might be able to create the bootfloppy using DOSBox, and boot it, but again, it doesnt look like it has an awful lot to do with anything outside of Windows land - "Supports both FAT32 and NTFS drive partitions". Of course, it doesnt state that explicitly does not support other partitions though, and that might be up for test.
dd is not special software that needs to be purchased, it is free and comes with pretty much every *nix installation I know, and is available for windows under cygwin at least, if not with a variety of other ways. Using dd and a livecd is a fairly reasonable method - although the manufacturers utility will probably be more graphical and user friendly. MaxBlast still said nothing of resizing the partitions though. I am sure you could delegate parts of the filesystem to other partitions in lieu of being able to copy it onto a larger partition.
Danny
|
|
|
04-23-2006, 05:31 PM
|
#9
|
Senior Member
Registered: Feb 2003
Location: Calif, USA
Distribution: PCLINUXOS
Posts: 2,918
Rep:
|
Quote:
2damncommon - as predicted, the manufacturer provided windows only software, which would be a FAT (pun intended) lot of use for my fs's which are not FAT or NTFS based.
|
Okay, however the OP is transfering Windows. Yes, the image download is stuck inside a Windows exe, which the OP would be able to access if he did not already have the software.
It was a valid suggestion for the OP.
|
|
|
04-23-2006, 06:23 PM
|
#10
|
Senior Member
Registered: Sep 2005
Location: Newcastle upon Tyne UK
Distribution: Any free distro.
Posts: 3,398
Rep:
|
Well the first link of my sigature documents the details of using a LiveCD to clone XP.
I would purchase a USB2 2.5" hard disk enclosure. Put the new 40Gb hard disk inside and so it will be read as sda in Linux. Boot up any LiveCD, change to superuser and issue the following command
Code:
dd if=/dev/hda of=/dev/sda bs=32768
Block size 32768 equal to 64 sectors times 512 bytes per sector so that the entire track is copied at a time. No bs parameter will force dd to default to 512 bytes per record and slow down the cloning. dd should clone at about 50Mb/sec for internal drives. In USB2 transfer it is a lot slower, probably between 1/4 to 1/3.
Watch out for the following
(1) A USB2 port supplies only 0.5 amp and this may be marginal for a 2.5" 40Gb hard disk. You should find the modern USB2 2.5" hard disk enclosure supplied with a twin head USB plug so that you draw current from two USB2 ports while one end connected to the enclosure.
(2) If the laptop has only one USB2 port then you can buy a USB port spliter which always comes with its own power supply. That power supply can be directly plugged into the 2.5" external enclosure if it has a 5DVC socket point (better models have but cheaper model don't) and so one laptop USB port is suffice if the hard disk has its own power. Alternatively just power up the USB port spliter and use 2 USB ports to power the external hard disk. The new 40Gb hard disk should have the power consumption printed on the casing. If the USB is under power you don't get reliable read/write data transfer.
(3) If the output-file (the target disk 40Gb) is bigger than the input-file (the source 10Gb) dd will copy the first 10Gb leaving the remaining 30Gb unallocated empty space.
(4) After cloning swap the 10Gb with the 40Gb and you should find it boots as the original.
(5) You can use Ghost but dd is faster and simpler.
(6) dd copies binary pattern sector by sector and so the boot sector in the partition is also copied making the target bootable. Also dd doesn't need to know the file system and so it can clone XP as easy as Linux, Dos, BSD or Solaris.
Last edited by saikee; 04-23-2006 at 06:27 PM.
|
|
|
All times are GMT -5. The time now is 12:25 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|