Posts Tagged ‘Ubuntu 10.10’

Some Dual-Boot Weirdness, XP and Linux

19 December 2010

My very cute and computationally intensive roommate has a fairly beefy Dell dual-core machine. She does a lot of graphics work, and collects music and videos. Her machine had a 160GB drive and 1GB of memory, and we determined that an upgrade was in order. She also wanted a Linux distribution to get some experience with.

I did a short amount of searching, found that prices for the components I needed were pretty much the same, and chose a 1.5TB Seagate drive, and four 1GB DDR2 sticks from TigerDirect. Total price, about $160 including shipping. I was amazed at the low price. The stuff arrived at the house a day earlier than the four-day shipping promised.

So yesterday, I started off by installing the memory sticks first (and got the 32-bit Windows limitation of only showing 3.7GB, in spite of the BIOS showing all 4GB. Really, you would think a big-time outfit like Microsoft would fix that).

Next, I installed the 1.5TB disk into the chassis as the first SATA drive. Dell recognized it immediately.

I booted the computer with my trusty System Rescue CD v 1.6. It started up just fine. At the command prompt I did an fdisk -l and it showed both disks. Here I made two small errors. I executed my favorite cloning command dd bs=256 if=/dev/sdb2 of=/dev/sda. First error, there were a couple useless partitions on the 160GB disk, and I just wanted the XP partition, so I thought to copy it over and grow it to the full size later. Second error – a “bs”, or blocksize of 256 bytes, so it made for the least efficient transfer. This second error meant it took about four hours to do the cloning operation, and the first error meant that the clone would fail. Fortunately, because I had not changed the original disk, the errors were no-impact.

The second time I did it right. I executed dd bs=256K /dev/sdb /dev/sda. This time the 160MB cloning took about 40 minutes. One thing – when I clone drives at school, it usually takes about 40 minutes to clone a 40GB disk using IDE. The two SATA drives have rated throughput of 1.5GBps and 3.0Gbps, and that speed shows!

Once I got the disk cloned, I booted the 1.5TB disk and watched Windows thrash around a couple minutes to deal with the new disk and the moved disk. Then, I rebooted into System Rescue CD, and used gparted to (1) delete the two useless Dell partitions (getting back another 3.5GB of disk), and then grew the XP partition forward and backward to make it about 1.4TB. I rebooted the computer again, XP came up, and disk usage had gone from about 90% to 10%. Very cool. I’m running the 160GB disk as a secondary disk for a while, then I will go clean XP off it, and use it as a backup disk.

So I started the second part, putting Linux on. When I grew the XP partition, I created two other partitions at the end of the disk, one 5GB partition formatted as FAT32 (which both Linux and XP understand), named “Shared”, and one 50GB partition named “Linux”. I did this out of habit. XP doesn’t understand any disk format except for Microsoft-developed stuff. Linux has understood NTFS as read-only for a while, and for read-write more recently. I have usually dealt with this by creating couple GB of partition formatted as FAT32, mainly so that if I needed to share a file between Windows and Linux, then using FAT32 is a common format both understand. I need to get out of that habit, and start just having Linux mount the Windows partition every time, using ntfs-3g or whatever the distro supports.

I had given some thought as to the Linux distro to install. I am partial to Fedora, which I use for the wide variety of tools, the fact that it is the same as I use for the school server, and it has multiple software development environments. Raegan needed much less – editing (OpenOffice), graphics (The GIMP), Internet (Firefox and Opera), and media (audio and video). Given that, and the fact that I use Ubuntu on several of the student computers at school, and the fact that Fedora has to be hand-configured with a lot of video and audio tools (that I rarely use), I decided to get her Ubuntu.

I downloaded it on her new disk, and burned the CD, and then booted the computer from the CD, and… major problem. Ubuntu seemed to hang for a looooong time, then I got an error “Ubi-language crashed” or something like that. It was consistent across several tries at loading. I looked the error up on Google and got very few references to what caused it. So after thinking about troubleshooting versus a known good route, I said the heck with Ubuntu and went to Fedora 13. [Quick update later this afternoon: I popped the Ubuntu 10.10 CD into two of my machines, and it booted all the way up just fine. One is a Dell Dimension 4600, and the other is my cranky HP 6930p. I say cranky because it needs a particular driver for both XP and Vista and W7 installs, and even a special parameter for a Fedora install. But it ran Ubuntu just fine.]

I pulled my F13 live CD (which I knew had an install-to-disk function) and fired up her computer with it. It started just fine, and so I told it to install to disk. I had told gparted to format the partition intended for Linux as an ext3 filesystem, and F13 found it just fine when I told it to select existing Linux partitions and use it for the installation.

The installation went very quickly, and eventually it asked me about the bootloader. It detected the XP bootloader on the first partition (which is called /dev/sda1). I used the editor to rename the XP description from “Other” to “Windows XP”, and changed the Linux description from “Fedora” to “Fedora 13”). Looking good so far.

The next time I rebooted, there was a bit of a delay, but no Grub boot screen. I seemed to remember that when I did a F12 installation at one point, that the Grub had been set to not show a menu (why, I don’t know, that seems stupid for a multi-boot computer). I tried to force my way into the boot menu by hitting the space bar during boot a number of times, but it only annoyed Windows as it booted each time.

I did some research and found away to boot using Linux rescue mode from the full Fedora 13 DVD. This quickly showed me that the Grub menu had indeed been set to not display. I changed that using “vi” (I had to dredge up the editing commands from a memory long ago and far away – I am not a vi fan) by commenting out the line that said to not display the menu, and then changed the time before starting the default from 5 seconds to 15 seconds.

Restarted the machine, and damned if XP didn’t come up again! At this point, it was about 2300, and I said the heck with it and went and did other things.

My general feeling is that it was just too hard to install Linux (rather, it was easy to install Linux, but making it work with XP is too hard)! I have thousands of OS installs under my belt, including hundreds of Linux installs. When I did my first dual-boot installation (I think it was Windows 2000 and Fedora Core 2), the FC2 built the dual-boot configuration automatically. The last couple duals I have done required me to use System Rescue CD to fix things, something that is easy for me but impossible for 99% of people. That is not a good thing for Linux.

I’ve found some rather detailed things to try (including changing the XP boot loader to find the Linux install), but that is low-priority to other things I’m doing around the house, so it will be a while before I get Raegan up on Linux also.

Advertisements