Saturday, June 6, 2009

Repartitioning

If you're going to install Linux on a laptop, you'll need to repartition your hard drive. And if you're going to repartition your hard drive, you gotta backup in case stuff goes really wrong OK, I should be backing up anyway, but all my real computer stuff is in storage in Seattle and I'm just in Vancouver with my laptop.

So, off to Future Shop where I found a 1TB USB drive for CDN$130. Then I went to Best Buy where I found nothing priced as well. Then to London Drugs where nothing even came close. So I got 1TB of storage.

So, time to backup my C drive. Hmmm.... How to do it.... I guess I know how to back up. But what do I need to do to restore? Windows XP provides a backup utility in Start>Programs>Accessories>System Tools, but the option in which you make a full backup requires a floppy disk. I googled all over and everything seemed to indicate a floppy was needed. I started the full backup and went back to google--there has to be a way to trick it. Ugh!!! Nothing. In fact, one forums even said that some USB floppy drives won't be recognized. I can do a CD or a USB stick. But I have an equal number of 5¼", 3.5", and 8-Track tape players--all zero. This is insanity!

Fortunately, my friend Cathy saw my problem in my Facebook status and suggested Macrium Reflect which is free. I downloaded it and did a backup. It didn't work perfectly the first time, but I was using the computer. Once I stopped and let it do what it had to do, it was happier. Then I made a Recovery CD. The recovery CD booted and recognized the USB drive and found the backup. So I figured I was in good shape.

I defraged my C: drive a few times until it was pretty packed to the lower part of the drive. Then booted into Ubuntu from the CD. I ran gparted. I had read a page about how to do this. Actually, I think Ubuntu makes it even easier than the way I did it where you tell the installer how big to make the partition and it does the work. But I used gparted to make an ext3 partition of 20GB and a linux-swap partition of 2GB.

The repartition was over--time to see if Windows was OK. Upon booting, XP noticed its new smaller digs. It did a disk check and accepted its new situation gracefully.

Back to the Ubuntu Live CD. Now, time to install. The install was pretty straightforward. I assigned it to the ext3 partition. It complained that I hadn't marked it for formatting which I figured out.

The boot issue then came up. I had read earlier that you don't want to wipe out the MBR of the C drive. The website I read suggested you put the boot loader in another partition and then use the Linux 'dd' command to make an image of the first sector and turn that into a file which can be given to Windows and referenced in the boot.ini file. So I installed the bootloader on the ext3 partition. Then I mounted a fat32 partiton for the Windows recovery and then ran the dd command.

Back in Windows, I found the file I had created on the D: drive and copied it to C:. Then added a line to the boot.ini.

Upon booting, I could boot either windows, or kick from Windows to the Linux bootloader where I could boot Linux. I haven't yet, but I think I can make the Linux the default and shorten the timeout so that I can skip straight to the Linux bootloader.

No comments:

Post a Comment