View Single Post
Old Dec 31, 2006 | 12:40 PM
  #10  
Graham S1's Avatar
Graham S1
PassionFord Post Troll
 
Joined: May 2004
Posts: 2,898
Likes: 1
From: Cornwall... Aarrhh me hearties!
Default

Originally Posted by UnseenMenace
I will however sort your grub installation out tonight so that you do not need to reinstall Linux and Fix your Windows MBR but that will be possibly tommorow depending upon what Im doing tonight but im going out to see the family now.. sorry... happy new year
cheers mate... much appreciated. no worries on time, as I can at least still access the net, emails etc. no need to be sorry.

I lost my Windows CD, but I do have a err backup one, but as said can't boot from that at the mo.

If I disconnect the first drive, do I have to change the switches at the back of the drive so it thinks it's the master drive?

Also.. just found this... would this help?

First... it's MUCH easier if XP is on the primary drive, and boots completely from there. If you want the bootloader to be on a different disk than XP, it's more complicated, and I won't get into that here... covering all the possibilities would be a full article, and this is already very long as it is. I will assume that you have XP on the primary drive, and Linux on the second drive. (this is generally how most people set it up anyway, because Linux doesn't give a rat's arse where it runs from, and NT/XP can act a little wonky about drive lettering sometimes.)

During your Linux install, choose not to install a bootloader on the primary drive... that will erase NTLDR, which you don't want. Tell the system, instead, to install the bootloader in /dev/hdb (or hdc if the two drives are on separate channels.) hda should be Windows; Linux will be hdb or hdc, and your CDROM will be hdb or hdd, generally. If you're on SATA, the drives will most likely be sda and sdb, and the CD will usually be hda or hdc. You want to install GRUB on the boot sector of the Linux drive, not the Windows drive. If you get this wrong, you will render Windows difficult to boot.

Now you have to get that boot sector off the drive and into a file. This is probably easiest if you just boot up a Linux LiveCD of some kind. If you're installing from Ubuntu's LiveCD, I imagine that would work fine. To transfer the data to the XP partition, you'll also want a floppy disk.... you can't write to NTFS from Linux, and XP can't easily read any of the linux filesystems. So format a DOS floppy in XP.

Boot onto the LiveCD and mount your floppy:

mkdir /mnt/floppy (this is just in case)
mount -t vfat /dev/fd0 /mnt/floppy

Now, extract the bootsector:

dd if=/dev/hdb of=/mnt/floppy/bootsect.lnx bs=512 count=1 (substitute your Linux drive for /dev/hdb... possibilities discussed above.)

That will write the first 512 bytes from the bootsector onto the floppy as a file called 'bootsect.lnx'.

Unmount the floppy:

umount /mnt/floppy

Wait for the drive light to go out before removing the disk, and then reboot back into XP. Copy the bootsect.lnx file to your C:\ drive.

Edit the (hidden) C:\boot.ini file, and add this line at the end:

C:\bootsect.lnx="Ubuntu"

Save the file and reboot. When XP starts, you will get a prompt of what OS to start, rather than the old instaboot. If you choose Ubuntu off the menu, NTLDR will run GRUB, which *should* then boot your Linux kernel.

The nice thing about GRUB is that if you change kernels, it will just figure it out. With LILO, you had to redo this entire process every time you changed kernels, because it hardcoded the kernel's location on disk. If you updated kernels, you had to update this file. Big PITA. With GRUB, you should only have to do it once, as long as you don't move your disks around.

One last comment, before you do anything: if you put the XP disk first, and the Linux disk second.... the original Ubuntu installer may just figure out how to get GRUB working as your primary bootloader. Possibly worth a try. It sounds like you may have tried that already, but I thought I'd mention it just in case.
I can get to an XP machine to format a DOS floppy, but I'll have to wait until work on Tuesday.

edit. would installing Wine be any use? Is there a program I can run within that to repair anything thats gone wrong in Windows?

cheers.

edit 2: would this help. ?

http://www.microsoft.com/downloads/d...displaylang=en

can I save it through ubuntu, or our other (win98) PC? then reinstall windows and everything else should still be on it?
Reply