Back out in the hill country, and it's time to perform another reinstall of Windows XP on my father's computer -- the old install is doing unexplainably weird things, like refusing to go to websites like google.com but happily visiting other websites (while other computers on the same network happily visit google and the other apparently dark sites). Ubuntu is still doing fine on its partition, but hasn't been as much of a hit as I'd hoped. Dad did pick up a macbook recently (typing on it now) and so can do most things. I'm currently going through the painful process of updating XP to the point where it's usable.
but installing windows blows out the GRand Unified Boot loader (grub), of course, and so I followed these steps to restore it -- there are two hard drives - the first of which has windows and the second of which has ubuntu and the grub directory in /boot
First, boot off the ubuntu live CD, then start a terminal, and type:
>sudo grub
which starts the grub interactive shell from the live CD -- then, at the grub command prompt:
>find /boot/grub/stage1
which in this case returns:
(hd1,0)
that's the first partition (0) of the second hard drive (hd1) - I suppose I knew that, but it's nice to check. Next, establish that particular location s grub's "root", like so:
>root (hd1,0)
which in this case returns:
Filesystem type is ext2fs, partition type 0x83
then -- and here's the part that I kept getting wrong --
>setup (hd0)
which returns a bunch of text letting you know what it's doing.
some instructions I saw on the internet had me running that command for hd1, but that had no effect -- windows kept booting, since the master boot record (mbr)
on the first hard drive (hd0) was still in the same state that the windows install program had left it in. Instead, I had to "setup" the mbr of the first hard drive, which is hd0, even though grub (and root) resides on hd1.
and finally:
>quit
and then:
>sudo shutdown -rf now
I also changed the grub menu to make xp the default OS, at his request. I'm kind of behind the times, in that lilo was the only boot loader I had used much (with slackware *still* my favorite distro), but grub is nice and easy to work with.
|