LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   windows xp/linux dual boot problem (https://www.linuxquestions.org/questions/linux-newbie-8/windows-xp-linux-dual-boot-problem-653308/)

Ganeshkadam 07-03-2008 05:56 AM

windows xp/linux dual boot problem
 
Hello all,
I had dual boot system of windows xp and linux. Accidentely, i deleted linux partition and now i get GRUB option for booting.I even can not access Windows now. How can i recover linux or atleast access windows? I don't have instalation CDs of both systems.
Any help is appriciated.

Larry Webb 07-03-2008 06:28 AM

Here is a link to a page full of options.

http://www.users.bigpond.net.au/hermanzone/p18.htm

I personally would get a distro cd and reinstall a live distro.

Chris H 07-03-2008 06:29 AM

Get hold of another linux installation cd and install it.

onebuck 07-03-2008 06:38 AM

Hi,

Welcome to LQ!

You can do a F8 and enter the maintenance phase for win/xp.

Just do a 'fixboot' for the option.

royce2020 07-16-2008 04:59 PM

I agree with onebuck, in that the trick here is to recreate your windows MBR then reinstall linux, but his sugestion of hitting F8 simply will not work if you are using GRUB or LiLo. You'll need a live CD (I use Knoppix, but you could also use Ubuntu or Vector) to find the bin file that contains your windows boot sector. If you used GRUB, depending on how your machine was setup, your boot menu configuration will be in /mnt/<your linux drive here>/boot/grub/menu.lst (your linux drive could be sda2 (second partition on first scusi/sata drive) or hdb1 (first partition on second IDE drive), or one of a host of others), or you could use the KDE search function to find menu.lst. Having found it, scan your file for the windows entry, if it's set up like I think, it will list a BIN file, this is your windows boot sector (if not there will be a chain load command) what you need to do after finding the file is use DD to write it back to the MBR area of the hard drive (google it, I alwasy get it wrong - but be verry carful, DD is often called DestroyDisk and not without reason). If you find a chain load command, then the windows boot sector is actualy in a real boot area, just not the master one and you can set your BIOS to boot from that boot sector instead (this is diferent for each bios sorry).

Another thing you could do (which is eayser to explain, but more labour intensive) is to make a complete back up of all your files (just zip them up onto a USB disk or something) then reinstall windows (this includes a new boot sector), and finaly delete the contents of the drive and replace with the zipped files from the USB disk. That should be using all your old files, but with a new boot sector.

Once you do get windows working again, I sugest using GRUBldr to dual boot. I use it, and think it's great. It hooks into the windows boot loader (NTldr), so if anything happens to linux then windows always boots (becuase it's using it own loader rather than one of the linux ones). Also using this method you can upgrade XP to vista, hibernate and other things with the windows boot sector without messing up your linux installation.

bcwagne 07-16-2008 05:15 PM

The easiest way to get windows working again is to boot with a windows cd or boot disk, then at the command prompt, type:
Code:

fdisk /mbr
This will restore your boot sector to normal windows settings without erasing anything.

Then from there, at least you will have a usable computer again, and can install linux as you would normally. (Don't forget to back-up your data before installing).

Good luck.

shridhar005 07-16-2008 07:07 PM

Better way go with fresh installation of Linux,by which at the time of partition making you will get chance to install new grub with partitions.

onebuck 07-16-2008 10:28 PM

Hi,

Just a reminder that the OP should install his/her Win/xp first. Then do the Linux of choice.


All times are GMT -5. The time now is 09:14 AM.