LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This 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


Reply
  Search this Thread
Old 05-06-2008, 04:41 PM   #1
Snow Keld
LQ Newbie
 
Registered: May 2008
Posts: 2

Rep: Reputation: 0
GRUB error 22 <linux uninstalled, windows wont boot>


ok, well i downloaded mandriva linux and made a partition.

this is'nt my computer so i was betting on the fact that i would still be able to boot on Windows, i was unable to, it botted on linux automaticly.

thus i decided to delete the linuz partition (using the disk i installed it with)

now i'm running on the linux disk trying to find out how to fix the mess.

the error that comes up when i try to boot off the hard drive is

GRUB Loading stage1.5…

GRUB loading, please wait…
Error 22



i cant find the windows disk either.





somone please help
 
Old 05-06-2008, 05:47 PM   #2
sfjoe
Member
 
Registered: Jun 2007
Location: San Francisco
Distribution: Centos 4, Debian
Posts: 55

Rep: Reputation: 16
default boot

Every install I've ever seen picks up that you have multiple OSes installed and adds them to the grub menu. I believe it defaults to Linux but you can interrupt the boot process manually or set the default OS to be something besides Linux. I think the best way for you would be to go back and reinstall Linux, then when it boots up check the grub documentation for the way to set the default OS.
Another possibility would be to go find a DOS bootable disk and boot into a DOS prompt and type :
fdisk /mbr
I take no reponsibility for what that might hose.
 
Old 05-06-2008, 05:54 PM   #3
Dazed_75
Member
 
Registered: Oct 2005
Location: Arizona
Distribution: Debian, Ubuntu, Puppy, others
Posts: 36

Rep: Reputation: 16
| ok, well i downloaded mandriva linux and made a partition.
|
This is not clear about what you did with existing partition(s) and what new partition(s) you created. Also whether you did this manually or used the install program to do it. So you MAY need to provide more information to get a useful answer.

I am going to make some assumptions (see below) to try to give you an answer now.

|
| this is'nt my computer so i was betting on the fact that i would still | be able to boot on Windows, i was unable to, it botted on linux
| automaticly.
|

This would be normal although there should have been a menu at boot time for a few seconds to allow you to choose whether to boot XP or linux. The menu would have defaulted to linux if you did not make a selection in those few seconds. This is making the assumption that you had not partitioned the disk to get rid of the windows partition.

If you did get rid of the windows partition (whether intentionally or by accident), you are now SOL because you reused that same disk space so windows and the user's data is now wiped out (hopefully they can re-install and restore from a backup). But let's assume the windows partition is still there first.

|
| thus i decided to delete the linuz partition (using the disk i
| installed it with)
|

This is the root of the grub error. When you installed linux, the installatation replaced the windows MBR (Master Boot Record) with a more capable one that gets instructions from a file which is normally in the Linux partition containing instructions on how to boot the system in a variety of ways including to windows (if it still exists). When you removed this partition, the grub MBR could no longer find its instructions and gives the error you mention below. Even if Windows is still present in its own partition, GRUB has no way to find it.

|
| now i'm running on the linux disk trying to find out how to fix the
| mess.
|
|
| the error that comes up when i try to boot off the hard drive is
|
| GRUB Loading stage1.5…
|
| GRUB loading, please wait…
| Error 22
|
|
| i cant find the windows disk either.
|

While running the linux live cd, open a terminal window (there should be a menu entry for that though I don't use Mandriva so I do not know where). Once the terminal is open, type the command "sfdisk -l" without the quotes and press enter. You might have to use "sudo sfdisk -l" depending on how the Mandriva CD is set up. You should get output something like:

Disk /dev/sda: 9729 cylinders, 255 heads, 63 sectors/track
Units = cylinders of 8225280 bytes, blocks of 1024 bytes, counting from 0

Device Boot Start End #cyls #blocks Id System
/dev/sda1 * 0+ 3781 3782- 30378883+ 7 HPFS/NTFS
/dev/sda2 3782 8182 4401 35351032+ 83 Linux
/dev/sda3 8183 9728 1546 12418245 f W95 Ext'd (LBA)
/dev/sda4 0 - 0 0 0 Empty
/dev/sda5 9364 9728 365 2931862+ 82 Linux swap/Solaris

Your details will be different, but if you show no lines that begin with /dev/... then all partitions are gone and your friend will need to re-install windows and restore from backup.

If there is at least one such line and the last column of it shows either HPFS/NTFS or FAT32 (or a variation of that), then the windows partition may be intact. In that case all you should have to do is restore the windows boot record and there are a variety of ways to do that documented all over the internet. Here are a couple but it would be good for you to look them up for more complete descriptions before doing them.

1) if your friend has a Windows XP install disk, try booting up with it and selecting the 'R' recovery console. When you get a prompt, type FIXMBR and press ENTER.

2) download and make a CD of the UltimateBootCD or some other recovery disk. Follow the directions they give to restore a windows MBR.

Reboot the machine (without the CD) and, hopefully, windows will be back.
If it is, the C: drive (windows partition) will be smaller than it originally was but can be resized to be the entire disk again. I don't think I will take the time to explain that right now.

Good Luck!
 
Old 05-08-2008, 10:01 AM   #4
Snow Keld
LQ Newbie
 
Registered: May 2008
Posts: 2

Original Poster
Rep: Reputation: 0
thank you for all of the help, but i raised the question on my own forum as well, i was suggested to install lilo to give the duel boot and choose what operating system to boot from, just always choose windows and it works just fine.


by the way, thank you all for your help, this problem didn't deter me from linux at all (honestly makes me hate windows all the more) i got a new comp today and will be putting linux on it (no windows partition this time :P)
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Grub 17 - Uninstalled Linux : Won't Boot to Windows fordianslip Linux - General 5 09-01-2006 02:27 PM
Dual boot Linux with Windows: Grub Error 17 Veniogenesis Linux - Newbie 3 10-23-2005 10:41 AM
grub wont boot windows xp sonesay Red Hat 1 04-27-2005 01:14 AM
grub wont boot windows on second hard drive ryan00davis Linux - General 12 05-19-2004 03:13 PM
Grub help - Windows XP wont boot! Kennifer Linux - Software 8 06-09-2003 01:37 AM


All times are GMT -5. The time now is 09:49 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration