[Techtalk] Installing XP without affectin Linux
david at aeolia.co.uk
Sat Apr 4 19:37:18 UTC 2009
Sincere thanks to all of you who helped me solve my problem - which was
that, having installed Windows XP Pro on partition 1 of my hard drive, I
could not rebuild the MBR to enable me to boot Ubuntu on partition 7.
On Sat, 2009-04-04 at 15:30 +0200, Wim De Smet wrote:
> Right, sorry, didn't think it all through and forgot about all that
> when replying. You can mount procfs and your /dev inside the chroot,
> making it easier to just plain run grub.
> Suppose you've got hda7 mounted to /mnt/hda7 (I wouldn't mount it to
> /mnt, personally). Just mount the procfs and /dev dir like this (as
> mount -t procfs none /mnt/hda7/proc
> mount -o bind /dev /mnt/hda7/dev
> Then chroot and see if that works.
I tried the above ('procfs' should, of course, be 'proc') and it got me
a stage further. I now got an error "/dev/sda7 does not have any
corresponding BIOS drive." when I ran grub-install.
After searching on the web, I tried changing a line
in /boot/grub/device-map from '(hd0) /dev/hda' to '(hd0) /dev/sda'.
That did the trick!
Grub obviously has a surfeit of data, because the offending line has
never caused problems with automated rebuilds of grub after an updated
kernel has been downloaded.
Anyway, alls well that ends well and I am now back in the comfort of
Linux. The WinXP installation, incidentally, was a success, in the
sense that I can now sync my iPhone with iTunes; this didn't work with
iTunes running under XP in VirtualBox, which was the reason I needed to
install XP on the real machine.
David Sumbler <david at aeolia.co.uk>
More information about the Techtalk