The Notebook Review forums were hosted by TechTarget, who shut down them down on January 31, 2022. This static read-only archive was pulled by NBR forum users between January 20 and January 31, 2022, in an effort to make sure that the valuable technical information that had been posted on the forums is preserved. For current discussions, many NBR forum users moved over to NotebookTalk.net after the shutdown.
Problems? See this thread at archive.org.

    New hard drive... under Linux

    Discussion in 'Linux Compatibility and Software' started by Pitabred, Mar 30, 2007.

  1. Pitabred

    Pitabred Linux geek con rat flail!

    Reputations:
    3,300
    Messages:
    7,115
    Likes Received:
    3
    Trophy Points:
    206
    Alright y'all, just thought I've give you a play-by-play on a new hard drive I got, how the install is going, etc. I'll update this post as the process goes on.

    First, I bought my laptop with a 5400RPM, 100GB hard drive. Not a bad investment, but I keep pushing at the seams of it with video, music and game images on the drive. So I decided to upgrade, and still keep the old drive as useful.

    I picked up a BYTECC external enclosure from newegg.com. It supports up to 100GB drives, and as that is what I had in the laptop, I figured it would work fine. The nice thing about it is that it comes with the USB Y-cable, so that it can be powered from the USB connection, and the secondary power connection has a pass-through, so it won't block you from using another device on the port such as a mouse (which is important, as I only have two USB ports on my work laptop). I did put a small bit of paper on the end of the drive as I inserted it into the enclosure, and now it doesn't move when I shake it (as per the first feedback in the newegg product info). It all went together quite easily, includes 4 screws to hold the drive to the logic board, and 2 screws to hold the whole thing together.

    I also got a Hitachi 160GB hard drive. I didn't want to go with the 200GB drive, as I have heard those get hot, and they're only 4200RPM, and newegg isn't selling them. Plus, I have heard that the 160GB perpendicular recording drives run as fast as a 7200RPM drive, which would be a decent speed boost.

    First off, I shut down (don't just hibernate if you have Windows, shut it down) the laptop, took out the battery, removed the old drive, and placed it in the caddy. If you don't shut down Windows, you won't be able to resize the partition! If that's not an issue, carry on. If it is, and you forget, you'll have to swap the drives back like I had to, start up and shut down Windows, then re-do it all again. Then I put the new 160GB drive in the place of the old one, and put the panel and screws back on, and the battery back in. Booted up the machine using a Kubuntu 7.04 Beta AMD64 disc (I'm a risk-taker!), and that was that.

    Once booted, I plugged in the drive, and then unmounted all the automatic mounting that it does. It's handy, but not what I want at the moment. Next, I opened a console, and typed in "sudo fdisk /dev/sda". /dev/sda is my primary, internal hard drive, eg., the newly installed 160GB drive. I then typed "c" to create a partition, made it a bootable, primary partition, and sized it to 80GB. The previous partition was 70GB, and Windows only had 10GB left, so I figured 80 should be just about right, especially as little as I use Windows. Type "w" to write the new partitions and such to the disk, and then fdisk quits.

    Next step, to copy the actual Windows installation to the new drive, I typed in "dd if=/dev/sdb1 of=/dev/sda1 bs=1M". These parts are important. I knew my Windows partition was the first partition of the old drive, or /dev/sdb. You can check this by typing "sudo fstab /dev/sdb" and then typing "p" to print out the partition information, and then "q" to quit. The bs=1M argument is necessary because it copies in block sizes of 1 megabyte. If you don't do a larger block size, it will "thrash" a lot, taking lots of small, 512 byte chunks, which isn't efficient on a hard drive, and will take an even longer forever than the current operation. As in, I did an experiment, and it ran longer than overnight on a different system, and only 20GB. You might be able to use larger than a 1M block size, but I've found that it's usually pretty efficient. Now, get a book. This will take a LONG time :) Update: it just finished. 2596.25 seconds (or 43 minutes, 16.25 seconds), an average of 28.2MB/s. Not too bad for USB 2.0, which is by default 480Mbps, or a theoretical top of 60MB/s, a realistic actual top speed of 40MB/s.

    After this, if you're doing like I am and expanding an NTFS partition, you will need to type "ntfsresize /dev/sda1", which will expand the NTFS filesystem on /dev/sda1 to the size of the partition. Otherwise, you'll have a smaller filesystem that doesn't know it can access more room on a partition. After running ntfsresize, it sets Windows to do a chkdsk when it starts up next, so be aware of that.

    I then installed the 64bit version of Kubuntu Beta 7.04, as I've been wanting an excuse to upgrade ;) As a Linux user, you can just copy your home directory over, and most programs will work exactly as you want them to, such as Kopete, etc. Much easier than migrating settings under Windows. So now I have Windows with more disk space, Linux with a LOT more disk space, a shared drive that I can use for transferring data between both and holding shared media and such, and I've got a 100GB USB drive. w00t.
     
  2. Paul

    Paul Mom! Hot Pockets! NBR Reviewer

    Reputations:
    759
    Messages:
    2,637
    Likes Received:
    0
    Trophy Points:
    55
    Awesome. Bit complicated though. How come you decided to use fdisk rather than a third party solution such as GParted LiveCD (or LiveUSB) or Partition Magic, etc? I'm assuming it's because fdisk is small, lightweight, and inlcuded in many OS', but just looking for confirmation.

    I've been thinking about replacing my hard drive with something bigger, but I don't really have a need personally. My 100GB is pretty good, and I only have 30GB allocated to Windows XP. Even that never gets booted anymore, so I'm considering just nuking it and putting another Linux distro on there (like Fedora) so I can get used to other things besides Ubuntu.
     
  3. Pitabred

    Pitabred Linux geek con rat flail!

    Reputations:
    3,300
    Messages:
    7,115
    Likes Received:
    3
    Trophy Points:
    206
    Because fdisk is there, and the other tools aren't? I didn't want to download and burn lots of other cd's.

    As for size, I still play games under XP, and I use Alcohol to store disc images so I don't have to haul around CD's, so I find that I use more disk space than I normally would.

    As for other things, I'd just use vmware if I were you. Multiple partitions is a pain.
     
  4. Gladiator

    Gladiator Notebook Consultant

    Reputations:
    38
    Messages:
    126
    Likes Received:
    0
    Trophy Points:
    30
    interesting...
    are you going to do the same with the Linux installation?
     
  5. wearetheborg

    wearetheborg Notebook Virtuoso

    Reputations:
    1,282
    Messages:
    3,122
    Likes Received:
    0
    Trophy Points:
    105
    I'm curious, how do people do this (swap drives and OS) without linux ?

    OP, u may want to post this guide on the "software" forum too.
     
  6. Pitabred

    Pitabred Linux geek con rat flail!

    Reputations:
    3,300
    Messages:
    7,115
    Likes Received:
    3
    Trophy Points:
    206
    We can point people here ;)

    What happens under Windows is that you need to use Partition Magic, or Norton Ghost, or some other proprietary utility to move the data around (I know newegg sells an Apricorn caddy + software to do this, I doubt it works with Linux). You will need an external caddy, or at least some way to access the old drive and the new drive simultaneously, otherwise you'll be stuck just reinstalling everything.