Life, Code & Idiocy

Bloggage of a web coding nutcase

15 Oct 2006

Linux on the laptop – finally!

Well I have some good news and some bad news.

The good news is that I installed Linux on the laptop. The bad news is that I installed Ubuntu on the laptop, and configured it to dual-boot with Windows XP Professional.

So, why? Here’s the deal. Linux does not like my laptop. When I installed openSUSE on it a couple months ago, I had no ACPI, no modem, and no wireless, which pretty much renders a laptop with only half of a battery useless. I was forced to put XP Pro back on there, and further hope was seemingly ruined when I heard that I had to use Windows for some school stuff, and no WINE was not going to cut it.

Luckily my laptop didn’t have that much stuff on it, so yesterday I took the plunge and installed Ubuntu Linux on the laptop. But somehow I managed to keep Windows alive :) . Here’s what I did:

  1. I should have backed up my data. Don’t ask me why I didn’t, I just didn’t. But if you decide to do this, back up your data first, or the results could be catastrophic, as I almost found out.
  2. Rebooted into the Knoppix LiveDVD
  3. Resized the NTFS filesystem my D: drive, which was 15 (out of 30) GB, down to 5GB. This was by far the hardest step! The first time I attempted this, my laptop froze. The second time, the thing powered down, probably because of yet another false thermal alarm. I haven’t found any corrupted data yet, but that’s probably because I made sure to boot Windows (and thus run CHKDSK) after each failure.
  4. Resized the partition itself. The resizentfs command only shrinks the filesystem, it doesn’t shrink the partition it’s on. I did this with the QtParted utility.
  5. Created a 9.25GB ext3 partition (which can be read from Windows thanks to the ext2 IFS driver)
  6. Rebooted into Windows to verify that everything was safe
  7. Booted into the Ubuntu 6.10 (Edgy Eft beta) CD, and installed Ubuntu on /dev/hda3. Make absolutely sure that if you do this, you change the GRUB target partition to (hd0,#) where # is the Linux partition number minus 1. Otherwise your Windows MBR will get corrupted, and you will be stuck using FDISK or equivalent to fix it.
  8. Fussed with the boot menus. A lot. Currently my active partition is #1, so the Windows NTLDR boots by default. I have GRUB for Windows installed (it’s included with RiPLinuX) so what I do to boot Ubuntu is select GRUB from the NTLDR menu, then select the Ubuntu partition from the WinGRUB menu, then select Ubuntu from the GRUB menu on the Ubuntu partition. Why so many steps? Because when I update/upgrade Ubuntu, which will be quite a lot, the GRUB configuration will be seamlessly auto-upgraded. After I write this post I plan to set hda3 as my active partition, that way I can use a chainloader to boot XP Pro and I will only have to use one menu at startup.
  9. Only for systems that use the Intel i845 chipset: Ubuntu has this thing with being able to magically support ACPI on almost every recent computer. Hibernation mode worked without any configuration on my part. To get suspend to work, I had to compile this utility called video_post and update my ACPI config. Here’s a tar archive of the video_post utility and the updated acpid resume script. Untar it in your root directory with “sudo tar xzCf / ./ubuntu-intel-video-post.tar.gz” and try suspending/hibernating
Posted in Hardware, Linux Raves

No Responses to “Linux on the laptop – finally!” (post new)

 

Leave a Reply