Monday, March 11, 2013

On linux

I've successfully made the transition from Mac to Windows to Linux. I'd have stuck with OSX if not for the horrible expense of replacing my failing macbook.
I'm considering replacing its battery and harddrive but I'm not sure how much longer the actual processor etc will last so I might avoid the unnecessary expense for now.

At the moment my newish tower is dualbooting Mint, a recent variant of Ubuntu, and Windows7. Given the graphical and logical clusterbomb of Windows8 I figured I would stick with the familiar for running Solidworks and a few games.
The version of Mint I'm using uses the MATE UI but I'm contemplating switching that for the slightly more eye pleasing Cinnamon UI.

The reason for this post was to detail some of the problems I encountered during the Mint install in the hope that people in future might find this post useful. Alternately I might need to refer back to it.
You can find the rest below the cut here as it's not terribly exciting unless you have a definite interest in linux and the pains of installing it.


I started by creating a bootable usb stick with GParted on it using PendriveLinux, an .exe for Windows that will install most if not all linux variants as bootable USB devices. I also created a separate Mint install stick.
GParted is a really useful GUI based partitioning tool which simplifies the partitioning process enough that even a novice like myself can get through it. Booting into GParted I repartitioned my SSD to give 80gb to Win7 and 40gb as an ext3(extension 3) partition for Mint. Turns out that the extension system has moved on since my last play with linux and the preferred version is now Ext4.
So I then rebooted and jumped into the mint usb disk to try and install. It wanted to set up a 16gb swap partition which I figured was unnecessary since I didn't plan on using the hibernate function and I have 16gb of ram. So failing that I tried to manually allocate space and I think this is where my problems began.

The install itself went smoothly but when I rebooted I saw no sign of grub, the standard linux boot manager that allows you to select which OS to boot to. So I allowed it to boot to windows then rebooted again and went back to Gparted to check my partitions. Gparted could see both OS so I attempted another boot not thinking to check the boot order (which might have prevented the rest of this debacle). This failed so I reran the mint installer allowing it to select its own volume size and swap space. This then booted directly into mint with no sign of grub.

Gparted showed both OS looking ok so I deleted the swap partition and expanded the Mint OS partition into the remaining space. This time I checked the boot order but there was no sign of grub still. So I booted into windows...
Which didn't happen. I got an error telling me that the disc wasn't found. I can only assume that something had gone badly wrong in the mint install but that's never happened before or since so I'm going to blame windows at this point.
And then mint wouldn't boot either. So I believe the actual cause was my own foolish messing about in gparted.

With that in mind I decided to format the entire disc in Gparted and set windows up with a nicely divided NTFS 75gb partition and an ext4 partition for Mint later.
When I attempted to reinstall windows from ANOTHER usb it refused to recognise either partition as legitimate and demanded I reformate the whole drive.
Being close to madness by this point I gave in and reformatted the entire drive and installed windows.

I then booted into Gparted and found that it only saw the windows partition as unallocated space. Figuring enough was enough for now, I made do with Windows for a few weeks until I had time to really sit down and figure out the problem.

Once this opportunity came about I finally have a moment to check the disk integrity with the built in Windows disc checker. Unsurprisingly this was no help whatsoever so I tried an open source disc checking utility called [the name escapes me at present, will update next time I boot into Windows].
This showed overlapping cylinders in the Windows partition. Essentially this means that the Windows boot loader slightly overlapped with the Windows system which slightly overlapped with the unallocated space, causing Gparted to view it all as unallocated space.
e.g.
Boot:                  0       180
Windows:       180      4000
Unallocated: 4000      10000

This is just a vague example as I don't entirely understand it but I believe conventionally the partitions should start one number higher then the previous e.g. 0->180->181->4000->4001 etc
This hadn't happened.

At this point I backed everything up again and tried to use the disc utility to fix the overlapping cylinders. This caused Windows to fail to boot AGAIN.

At this point I was far beyond the end of my tether so I used Gparted to scrub the whole drive of all data. I noticed here that there was another option in Gparted to create a fake boot-table for Windows so I did this, reinstalled Windows and ensured it was working.
At this point I took a deep breath, plugged in my Mint drive and installed Mint along side Windows. Much to my awe it worked.
Apparently I'd just needed the fake boot-table all along...

Moral of the story, pay attention.

No comments:

Post a Comment