1
0
Fork 0
This repository has been archived on 2021-01-06. You can view files and clone it, but cannot push or open issues or pull requests.
dennogumi.org-archive/_posts/2006-12-09-grub-hell.markdown

22 lines
2 KiB
Markdown

---
author: einar
comments: true
date: 2006-12-09 08:57:15+00:00
layout: page
slug: grub-hell
title: GRUB hell
wordpress_id: 137
categories:
- General
- Linux
---
Two days ago I decided to install Linux on the new computer I had obtained, so I just got a Kubuntu 6.10 alternate CD and went through the steps. THe network card was not detected, but by reading around I found it was just a matter of the r1000 module not being present in the installation kernel. The problems arose when GRUB was installed.
Actually, that part of the installation went fine, but once rebooted I got "error 21", which meant "disk not found". Looking around in the Ubuntu bug tracker showed that [GRUB did not support the JMicron SATA](https://launchpad.net/distros/ubuntu/+source/grub/+bug/64574) controller of the motherboard (I put the disk there by mistake, instead that on the ICH8 controller). Well, I wanted to remove GRUB, and that's where problems started to arise.
I tried installing LILO but it did not remove part of the GRUB code. Then I just rewrote the MBR with the install-mbr utility and yet it didn't work. I tried to use something called Super Grub Disc to restore the Windows bootloader, but since the CDROM was on the PATA controller (JMicron) GRUB wouldn't load properly.
I swapped controllers then GRUB worked, but Windows wouldn't boot. I loaded Linux (disabling IOAPIC and therefore one of the cores of the CPU) and checked the NTFS partition. Its boot sector had become corrupted somehow. Passing the mount option errors=recover enabled me to mount it using the backup boot sector. What to do to restore it? The folks at Microsoft suggested to use a disk editor(!!!) to manually copy it to the main boot sector. Luckily I found a program called [TestDisk](http://www.cgsecurity.org/wiki/TestDisk) that was in the Ubuntu repositories. It recovered the backup sector and copied it to the main boot sector. I was able to boot into Windows again (how come Microsoft designed a backup in NTFS and is unable to use it in Windowss?).
In short, it was a mess that lasted seven hours.