Posts Tagged ‘System Rescue CD’

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

Another Linux Win

11 January 2010

Had another Linux mini-win this weekend.

A friends laptop computer crashed due to a bad power supply. She needed the files, and I am happy to recover them if I can. So I pulled the drive; it was a SATA drive. I looked for an external drive carrier, they are more than $75, too expensive; I needed to move the files to DVD. I tried mounting the drive into my main desktop, since I had found some SATA data cables and we had had a standard four-pin Molex to SATA power connector donated, but the inserted SATA drive screwed up the drive mappings in my GRUB and so the computer wouldn’t boot. I played with ways to change the drive mappings with no luck. My very cute but computer-using roommate has a computer with a SATA drive, but she is constantly on and the machine is hard to get at, so that was out.

So I thought a little bit, and decided to take my SATA laptop and use it. I pulled the “native” drive out, put the drive to be recovered in, and booted from my System Rescue CD. The laptop booted and we were off. SysResCD mounted the NTFS SATA drive with no problems. It started the laptops built-in wireless and connected to my home network. I had to set a root password, and then I went to my desktop and fired up my open source FileZilla GUI client. FileZilla went to the laptop via Secure FTP, and I was dragging and dropping the files with no glitches.

Well, three glitches. Two were unusual – the house WiFi access point lost it’s mind twice during the transfer process. I had to repower-reboot it (note, I wonder why. It was still working for the two computers hard-wired into it, but it would not talk to the two computers connected into it via access point. I wonder if it was a data volume issue, or a buffer problem). The cool thing was that FileZilla remembered the stuff I was trying to transfer but was still in queue, so I didn’t lose anything. The first WiFi croak was also a bit fortuitous in that I was starting to run out of disk space on the machine I was recovering to (there was about 20GB of stuff to be recovered), so I took the opportunity to copy a lot of the stuff off to DVD using the open source CDBurnerXP Pro.

It did take a while to transfer all that data over the house WiFi link between the computers – about eight hours total. Fortunately, I was doing stuff around the house, so it wasn’t like I was sitting there the whole time watching the display.

So all the stuff was transferred and burned off to five DVDs. I was writing this and feeling very happy with the results, when I… realized I could have done it much faster, or at least more directly.

This is how I should have done it. Mount the SATA drive into my main computer (which will not boot using the installed disks and GRUB), but boot the computer from the System Rescue CD directly. Then, mount the SATA disk, and use the DVD burner program on the SysResCD to write the data directly from the SATA disk to the DVD. I probably would have been done in an hour that way.

Live and learn. Linux Rules.