It has been awhile since my last tech post, but I have been tweaking around and have some great new content. I am writing this article because of a problem I encountered when attempting to install a LAMP stack on my Kubuntu 11.10 system with tasksel.
In installed, started, and began looking at the options for installing a LAMP stack in tasksel. I checkmarked the LAMP stack box and found myself distracted by the other options that had been selected for installation – mainly system components. So like a complete Noob, I unchecked them… Well long story short, this flagged crucial components to be uninstalled!! AHHH!!!
I quickly did a hard shutdown (held finger on power button until power off). Well my shutdown was too late and I had made the system, the Kubuntu installation almost inoperable. I have been scraping the internet for a reinstallation/quick fix solution to a corrupted Ubuntu/Kubuntu installation and have not been able to find anything concrete.
So, the journey begins…
PART 1: WIPE THE PARTITION FOR LINUX WITH GPARTED
To use gParted, you need to create a live boot CD. So you need:
1. CD Burner with blank CD
2. Image burning software – I use imgburn – open source and free to download: http://www.imgburn.com/.
3. gParted Image: http://gparted.sourceforge.net/
Boot to your gParted Live CD and look at your partitions.
Everyone has a different setup and if anyone has a better solution to my process, please comment or send me some article content to correct this. All changes are at your own risk, you should backup all of your data before making any partition changes or anything that will create changes to your system – you have been warned!
My partitions were setup as:
/dev/sda1 – Dell Recovery Partition
/dev/sda2 – Windows Vista System
/dev/sda3 – Kubuntu Installation
First I erased “–Operating system”, next “–Linux Swap”, and finally “/dev/sda3”
My /dev/sda3 partition had 90GB of space, now showing up as unassigned/unrecognized, etc.
I formatted the unformatted space to match my windows vista installation as NTFS.
Once formatted I was able to resize my /dev/sda2 – Windows Vista System back to what it was before I setup the dual boot system (the full drive). I saved, and rebooted.
PART 2: REINSTALL KUBUNTU
Because I erased GRUB – the main bootloader and my Kubuntu linux installation, I received a “Grub Rescue>” prompt upon reboot. At this point, I could not boot into windows without using a different method: How to Boot Windows from Grub Rescue Prompt.
I booted off of the Kubuntu LIVE CD which I originally used to perform my dual boot setup, selected “Install Kubuntu”, ran through the first couple of usual motions and resized my drive for Kubuntu to my previous settings. At this point, the NTFS Windows portion of the drive was unrecognizable (it fixed itself). Before the end of the re-installation, I noticed the GRUB2 setup looking for “other operating systems”. Once the installation had completed I restarted, removed the LIVE CD and rebooted.
My first reboot after installation was a great success, the GRUB bootloader came up and I was able to boot into both Windows and Kubuntu 11.10 – Viola, the problem had been fixed.
I wrote this article to document my eight hours of trial and error. Please, if anyone has a better method for solving this problem I encourage you to comment. Also, if this article helped you out, please link to it from your blog, share it on facebook, twitter, linkedin, etc…
[…] I recently had an experience with a corrupt dual boot setup of Kubuntu 11.10 which led to me finding a solution for reinstalling Kubuntu 11.10 in a dual boot environment. If you are curious, read about it here: How to Reinstall Kubuntu 11.10 Oneiric Ocelot on Dual Boot System. […]