Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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.
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.
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).
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.