Moved every bit of laptop’s disk to a much bigger disk

My dear old Dell laptop has served me well over the years. At the time the hard drive was average, I’d guess. 30 GB total. Of course today that’s rather small and the poor thing was getting close to full, with a few too many “C: drive nearly full” messages popping up.

So what to do?  The rest of it is fine.

I decided to buy a replacement hard disk. For like $77 I got a brand name 160 GB laptop IDE drive.

Rather than start again (copy all my data to a spare disk or PC, install the new disk, install Windows XP and all the drivers and updates and applications and fixes and settings and and and), I went for the uber-geek approach: clone the current hard drive, every bit of it, over to the new drive. And I did it with (legally) free software.

Technically I copied three things:

  1. The partition table (tiny)
  2. The boot record (tiny)
  3. The NTFS partition itself (big, the C: drive itself)

The Basic Steps

I may give the step-by-step instructions in another post, but the executive summary goes like this:

  • Booted the Laptop with a Live CD of Linux. I used Knoppix, a Linux distribution, in basic Command Line mode (Mode 2). This boots a fantastic, powerful operating system, but it itself does not write to the hard drives, i.e. it totally runs in RAM. However,  Knoppix can still ‘see’ the Laptop’s hardware, including the hard drive….it can even copy and write to it (!).  Windows cannot copy itself to a new drive, whilst active.
  • Configured Knoppix for networking on my LAN
  • On my main Linux (Debian) PC configured the NFS server, enabling the Knoppix Laptop to ‘directly’ copy files to it
  • Copied the above 3 items over using Knoppix commands:
  • Partition Table (using sfdisk)
  • Boot Record (via dd)
  • The NTFS parition (using ntfsclone)
  • ..to the Debian PC via NFS
  • For more on these last few steps, I used this site and this one for ntfsclone.

    If we stop and look now, I have a complete, bit-perfect image of the laptop’s hard drive – it only had one, the C: disk – stored on an external system, my Debian Linux PC.  

    Now it was time to replace the hard drive with the new one and reverse the process:

    • Following the Dell Manual, I removed the Laptop’s hard drive and put in the new one and restarted the Laptop.  The system found it, but – naturally – got an error saying it couldn’t boot from it.
    • So I booted the Laptop via the Knoppix CD and it too found the new drive; even reporting it as 160 GB. Sweet.
    • Using sfdisk, dd and ntsfclone I copied the ‘image’  files back from the Debian PC, via the LAN, to the new, empty 160 GB disk in the Laptop.

    The laptop booted first time into XP with all my data and settings there just fine. Not a single error message!

    Grow grow grow

    As it was literally a bit copy, the Laptop happily reported a C: drive of 30 GB. And 130 GB unused. Not available as such, not as a D: drive…just sitting there empty.

    Easy to fix, simply ‘grow’ the C: drive.  Again some (legally) free software called Gparted to the rescue. Booted with that and via a GUI just dragged the size of the C: disk (technically the NTFS Partition) from 30 GB to 120 GB.  I wanted to leave a bit free for something else later on, beyond the scope of this Post.

    It took a few minutes to do this. When I rebooted, XP correctly saw the disk had changed size and ran some (quick) tests on it. Another reboot and there it is. My C: drive is now 120 GB and all my original data, programs, settings etc are still there.

    Some things I learned

    I didn’t know, but my Dell IDE drive had an adapter over most of the IDE connectors. This really confused me as the manual didn’t mention it.  Hence the new drive and old drive had different physical plugs and the new one wouldn’t initially work; the new drive didn’t ship with said adapter. In semi desperation I just tugged at the current drive’s connectors and the adapter slipped off.  Hence I learned of its existence :-)

    The first time I’ve used NFS and it was easy to use, but wasn’t very fast at all. Could be that the LAN adapters – at one or both ends – were only running at 100 MB, not 1000 MB.

    I may have been able to directly copy the data from the old drive to the new drive, in situ. If I’d known about the IDE adapter thing and had a spare adapter. I have a IDE-to-USB2 adapter and it may have worked.

    All in all, very happy indeed. Not something for the feint hearted, but I reckon it saved me hours, if not days of work.

    Been quiet on the blogging front; blame my love of Egypt. Sort of.

    What started out as a minor sore throat expanded into all sorts of ailments. Not whinging, just explaining the lack of blog posts over the last week and a bit.  In fact it was some 10 days ago that I woke up – in the middle of the night – with a mildly sore throat.  And only today do I really start to feel it’s finally fading. For all of that, we don’t think it was the flu, but a cold that cascaded outward, causing a sinus infection, conjunctivitis and a raking, dry chest cough.

    My one trick, discovered 2 years ago when I really did get the flu, was to sleep ‘upright’ in my comfortable recliner chair in the lounge.  A small heater in the room and a big old doona and I’m done.  Sure beats lying down in bed and cough. Cough cough. Cough cough cough….

    Back nearly 20 years ago I got a bad bad cough whilst on a holiday in the Middle East and it really wasn’t treated. A few weeks after getting back, the doctors here said it was most probably Whooping Cough (!)    They said that if they’d known that at the time, I probably would have gone into quarantine (!!)

    So perhaps the fine tubes or lining of my lungs were damaged and this makes me more susceptible to a post-cold, dry un-productive cough. No, I don’t smoke!

    Phone battery poor, but then realised

    Haven’t been well over the last week, so Blogging hasn’t been on my mind as I fight off a head cold with sinus infection thrown in. This may have contributed to a very Human Error condition a few days ago.

    I was getting frustrated at my new mobile phone’s battery life. I’d charge it up and it would be nearly flat 8 hours later. And I’d hardly used it at all!!

    What gives? Was the battery-eating GPS or Bluetooth activating? Was there a virus or bot on it that was starting up and using heaps of power? Was it the option to Check Email every 10 minutes doing it?

    Finally it just hit me. I’d turned off the power saving feature. The default is for the phone to go into (soft) power-off mode after 2 minutes of inactivity.  As part of the attempt to copy a big file over to the phone, I’d turned this off.  I’d even said so in the Blog post: It even has a resume function, which was needed when the phone went into sleep mode after 2 minutes. Oops. Fixed that by temporarily telling it to not sleep.

    Oh dear. Temporarily became permanently. Back to the sleep-after-2-minutes now and seems to be fine again.

    Technorati Tags:

    Homo Vacuous and the great big nod

    Good comedy, to me, has me not only laughing but nodding.  I not only find it amusing but it has triggered a recognition, even if it’s one that is disguised, buried or exaggerated via satire.

    One of my favourite hobbies is Spot the Bluffer.  This is a person, usually in the workplace, who is good at linking together the buzz words and statistics, whipping them into a verbal froth and smothering those around them.  No-one really questions exactly what they do or value they bring.  And why would you, when they can easily say things like:

    The entire solution is built around open standards, embracing Web 2, mulitmedia streaming, XML with an Enterprise Bus as a central  object-oriented workflow engine. The rigidity of the framework offers a stable platform for immediate deployment, yet has the potential to embrace new IEEE Web Services as they are developed, to further enhance the interoperability.  Overall productivity, as measured via Michelson–Morley end-to-end,  vector synthesis, is expected to be 18.3%. Compounding.

    The Bluffer. Homo Vacuous. The Hollowmen.

    So was I nodding last night whilst watching episode one of The Hollowmen (ABC TV, Wed 9:30pm).  Whilst not quite the same thing as my Bluffer concept, I reckon it’s close enough for me to get a sore neck anyway.

    The repetitive catch cries, buzz and key words,  the boiling down of complex problems into a few points on a white board (and hence they can be easily ticked off), the change of priorities (but not telling others). It’s all there.

    A few other items of interest that I spotted in Hollowmen:

    The 180 degree task flip: I once had a manager who explicitly – on the phone – told me NOT to contact Customer A and gave me 2 reasons why I shouldn’t. Some months later, during a team meeting, they asked me why I hadn’t contacted Customer A (!).  And then told me off when I tried to point out their original instructions. 

    Paper shuffling bureaucrats. One of the great cliches of this class of person is the paper shuffling. Yet Tony, in the show, has the running gag of not having a pen. So he’s clearly not one of those :-)   In fact he whips up his ideas on a whiteboard – well actually other people’s ideas – then asks them to capture them and email them to his mobile phone.

    Seizing the Momentum. Sounds a great concept, grabbing the energy and manfully forcing it into a policy. But Momentum itself is actually quite an abstract thing in science. It’s a mathematical construct that is velocity multiplied by mass (weight). You can’t touch it or seize it.  In fact what hurts you in a collision is not the momentum, but the change in momentum ; the impulse. So, in fact, if you could somehow quickly seize the momentum, you may very well end up in hospital.

    Sparkling White Wine comedy from the Working Dog team.

    Technorati Tags:

    "Spencer’s warbler" and quantum electrodynamics.

    Heard a great quote from the late, great physicist Richard P Feynman today. He was talking about an incident from his childhood, where he was out with his father:

    ‘See that bird?’ he says. ‘It’s a Spencer’s warbler. (I knew he didn’t  know  the real name.) ‘Well, in Italian, it’s  a  Chutto Lapittida. In Portuguese, it’s a Bom da Peida. In Chinese  it’s a Chung-long-tah, and in Japanese it’s a Katano Takeda. You  can know the name of that bird in all the languages of the world, but when  you’re finished, you’ll know absolutely  nothing  whatever about  the  bird.  You’ll only know  about  humans  in  different places,  and what they call the bird. So let’s look at the  bird and see what it’s doing – that’s what counts!

    Feynman went on to win a Nobel prize for his theory of Quantum Electrodynamics, which has the satisfying acronym (contraction?) of QED. He was also involved with the development of the first atomic bombs as well as the commission into the Challenger space shuttle disaster.

    Variation of quote heard today via ABC Radio National Podcast of an In Conversation episode. The above text, which is a variation of the same theme, was found at another web site. Apparently he used this example a number of times.

    Finally got 192 MB file on to mobile phone

    Well, despite my original optimism, yesterdays FTP over Wireless failed. I went out and when I returned the transfer rate had slowed down to a crawl; literally the 4 k/sec of dial up. No idea why.

    Tried a few other things, including breaking up the 192 MB file into chunks, via RAR. I moved the 10 chunks over with standard Windows Explorer, via the ActiveSynch, but then RAR on the phone got internal errors.

    In the end the following worked:

    • Installed an FTP server on the phone
    • Ensured “TCP/IP over USB” was enabled on the phone (via selecting Enable Advanced Network Functionality in the USB to PC section of Settings
    • Connected the phone to the PC via USB
    • On the PC used RAR to break up the file into about 90 MB chunks with no compression (Store option). See notes below as to why.
    • Started my standard FTP client on the PC
    • FTP’d the 3 RAR files over to the Phone, specifically it’s memory card
    • Used RAR on the Phone to re-assemble the file

    Pocket Wikipedia now works on the mobile phone!

    Important notes:

    1. Tried to FTP the whole 192 MB file over at once. FTP got most of way then got an error. Hard to work out what error was actually saying. After trying a few things, found one solution was to break file up into 3 files (RAR) , transfer one of these file, restart both FTP client and server, then do final two files.
    2. Had to configure RAR on the Phone to use the storage card for it’s temporary working area. Otherwise not enough ‘RAM’ memory free to unpack a 192 MB file.

     

    Copying BIG files to the mobile phone

    Bit frustrating to find that Windows seems to have a limit on how big a file can be, if you are transferring it to your phone the official way (by ActiveSynch). But a step back first.

    Pocket Wikipedia is now available for Windows Mobile phones, like my HTC p3600i. It’s a subset of the main Wikipedia that as they say only (ha ha) is “about the size of a fifteen volume encyclopaedia (24,000 images and 14 million words)”

    But the problem is that the Wikipedia content itself is in one big file.  Now large is a relative term. But 192 MB is large for mobile phone transfers.

    And Microsoft’s ActiveSynch kept apparently re-starting after a few minutes.  I tried some other file manager software but it wouldn’t work.  Then I had a brain wave: FTP (File Transfer Protocol).  An ‘old’ but reliable way to move files about networks.

    Within a few minutes I had:

    • Installed an FTP server on the PC with the big file on it
    • Installed an FTP client on the mobile phone
    • Configured the phone to use my home wireless network
    • Connected away

    Right now, as I type, it’s transferring happily. It even has a resume function, which was needed when the phone went into sleep mode after 2 minutes. Oops. Fixed that by temporarily telling it to not sleep.