You are not logged in.

#1 2009-04-27 07:00:50

JK3mp
Member
Registered: 2009-03-25
Posts: 105

Grub Error 22 [SOLVED]

Okay. So i was installing Arch linux for a friend. And not being very "expert" at it  myself i now end up with an error 22  boot issue. I noticed i had forgotten to change default set for grub configs, so i went back and set that hd0,2 for the windows partition on sda2 and hd0,3 for sda3 which is carrying the arch linux (apparently). Well..same error... Anywho..im still fairly new myself glad i got my own working fine xD. SO were kinda learning it along, don't know where i went wrong here, any help or suggestions appreciated.



EDIT: THanks to lucke i figured out my ignorant problems.  Thanks again ev1 .

Last edited by JK3mp (2009-04-27 21:24:34)

Offline

#2 2009-04-27 07:49:17

deej
Member
Registered: 2008-02-08
Posts: 395

Re: Grub Error 22 [SOLVED]

This may help:

http://wiki.archlinux.org/index.php/Win … _Dual_Boot

What, as a matter of interest, do you have on hd0,0 and hd0,1 ? As far as I
recall, 'doze has to occupy hd0,0, as evinced in the menu.lst ( rootnoverify (hd0,0) ).

Deej

Offline

#3 2009-04-27 15:13:06

JK3mp
Member
Registered: 2009-03-25
Posts: 105

Re: Grub Error 22 [SOLVED]

Ahhh..i must've got mixed up. My only labels, are
sda
-----sda1 <--some windows default something idk wtf it is, lol. only like 4mb or somethin
-------sda2 <----NTFS volume (windows)
-------sda3 <-----Linux Volume

, and i thought it was  based off there label, like hda1, is hd0,1 , and hda2, hd0,2 etc. So would the NTFS volume windows need to be set as (hd0,1) in the grub config?

Last edited by JK3mp (2009-04-27 15:54:54)

Offline

#4 2009-04-27 15:54:19

JK3mp
Member
Registered: 2009-03-25
Posts: 105

Re: Grub Error 22 [SOLVED]

*bump* still havn't figured it out...
Here's how my partition table looks


----------Name-------Flags-------Type----------FSType------------------Label---------------------size
-------------------------------------Pri/Log ------Freespace ----------------------------------------1.05
----------sda1 ---------------------Primary------Unknown-----------------(27)--------------------8856.2
----------sda2 -----Boot-----------Primary---------NTFS ------------------[^R]-------------------156266
----------sda3--------------------- Primary---------Linux-------------------------------------------84933

Any help or can someone fill in a bit on how i would setup the grub.conf. I tried several times, but thus far all i get is error 22 still. Since i dont want the "unknown" in the boot menu, i skip it  in grub is that the issue ? i put sda2 as (0,2) and sda3 as (hd0,3) . I thought this was correct and i've switched it up just to see, but no avail. Help please... big_smile

Offline

#5 2009-04-27 16:01:18

JK3mp
Member
Registered: 2009-03-25
Posts: 105

Re: Grub Error 22 [SOLVED]

Alright so i tried letting the "unknown" into the boot config.
GOOD NEWS! NO MORE ERROR 22! big_smile
BAD NEWS.... I get Error 17 sad , LoL .

Offline

#6 2009-04-27 16:03:08

alienman
Member
From: Mexico
Registered: 2008-07-08
Posts: 106

Re: Grub Error 22 [SOLVED]

Ok I see what the problem is. And here a little brief explanation. Your hda or sda (which is btw the first physical drive) is set as hd0 meaning the first one, if you have more than one pyshical drives hdb, hdc, etc they will be labeled as hdb = hd1; hdc = hd2. This means that the devices are mapped Zero-based, the same applies for any partition in the drive.

So your problem is that your hda1 drive is actually (hd0,0), hda2 is (hd0,1) and hda3 is (hd0,2).

You have to fix your grub section for both your windows partition and archlinux to be able to boot any of them. During grub you achieve it by editing one of the entries and press the "e" key and change of the lines, boot to your arch system and then edit the /boot/grub/menu.lst file.

Hope this helps you.


ISC - Ignacio Marmolejo
ArchLinux & GNOME User.

Offline

#7 2009-04-27 16:13:59

JK3mp
Member
Registered: 2009-03-25
Posts: 105

Re: Grub Error 22 [SOLVED]

Well i don't have any additional drives. And by default it shows Arch AND windows (commented out) in grub conf. But do i need to add the unknown like i previously tried ?
Like such.

Offline

#8 2009-04-27 16:29:03

JK3mp
Member
Registered: 2009-03-25
Posts: 105

Re: Grub Error 22 [SOLVED]

Okay..so i did another last attempt,

same partition table as above, with grub .conf like

title Arch Linux
rootnoverify (hd0,3)
makeactive
etc. (not sure exactly..i can copy it here exactly if it'll help)

title Windows
rootnoverify (hd0,2)
makeactive
chainloader +1 etc.

Really tryin to get this up. Thanks for your attempts so far ev1

Offline

#9 2009-04-27 16:49:36

JK3mp
Member
Registered: 2009-03-25
Posts: 105

Re: Grub Error 22 [SOLVED]

*bump* Anyone idea's?....

Offline

#10 2009-04-27 17:28:25

JK3mp
Member
Registered: 2009-03-25
Posts: 105

Re: Grub Error 22 [SOLVED]

Alright well he's back to using ubuntu right now. But any help to get him up on Arch is appreciated. And thanks again people who have attempted thus far.

Offline

#11 2009-04-27 17:29:01

fishonadish
Member
Registered: 2006-11-04
Posts: 125

Re: Grub Error 22 [SOLVED]

Hi,

Like Alienman pointed out above, your Grub is pointing to the wrong partitions.  Partition numbering in Grub starts with 0, so to point to sda2 you should have (hd0,1) etc.

Your partitions:

sda2 -> (hd0,1)
sda3 -> (hd0,2)

There's no need to add the other partition unless you plan to boot from it.

Regards,
Fishondish

Offline

#12 2009-04-27 17:34:42

JK3mp
Member
Registered: 2009-03-25
Posts: 105

Re: Grub Error 22 [SOLVED]

OHHHH...i just wasn't "getting" it lol, kay i'll try that out.

Offline

#13 2009-04-27 17:48:22

JK3mp
Member
Registered: 2009-03-25
Posts: 105

Re: Grub Error 22 [SOLVED]

Okay...well still no luck.

Here's my grub.conf

#(0) Arch Linux
title Arch Linux [boot/vmlinuz26]
root (hd0,2)
kernel /vmlinuz26 root=/dev/sda3 ro
initrd /kernel26.img

#(1)Windows
title Windows
rootnoverify (hd0,1)
makeactive
chainloader +1

Still getting error

Loading Stage 1.5
Grub loading....
Grub Error 22

Last edited by JK3mp (2009-04-27 19:08:51)

Offline

#14 2009-04-27 17:54:09

JK3mp
Member
Registered: 2009-03-25
Posts: 105

Re: Grub Error 22 [SOLVED]

Oh i guess i'll also note. That when it asks where to install Grub, i chose. sda, then it asked for full path of root device and i chose what it had by default sda3

Offline

#15 2009-04-27 18:20:29

JK3mp
Member
Registered: 2009-03-25
Posts: 105

Re: Grub Error 22 [SOLVED]

*bump* ......

Offline

#16 2009-04-27 18:51:11

lucke
Member
From: Poland
Registered: 2004-11-30
Posts: 4,018

Re: Grub Error 22 [SOLVED]

Bumping is frowned upon.

root can't be /dev/sda. It has to be /dev/sdaX (X being 3 in your case).

Offline

#17 2009-04-27 18:57:13

JK3mp
Member
Registered: 2009-03-25
Posts: 105

Re: Grub Error 22 [SOLVED]

lucke wrote:

Bumping is frowned upon.

root can't be /dev/sda. It has to be /dev/sdaX (X being 3 in your case).

Sorry about the bumping, lack of patience is...a bad trait of mine. lol. So when it asks where to install i should choose a partition not sda? or do u just mean that sda3 was correct when asked for root device?

Offline

#18 2009-04-27 18:58:49

lucke
Member
From: Poland
Registered: 2004-11-30
Posts: 4,018

Re: Grub Error 22 [SOLVED]

The kernel line in your menu.lst should read "root=/dev/sda3", not "root=/dev/sda".

Offline

#19 2009-04-27 19:08:10

JK3mp
Member
Registered: 2009-03-25
Posts: 105

Re: Grub Error 22 [SOLVED]

Sorry lucke , it does i just neglected the 3 on accident when typing it in, edited now. Also someone in another forum insisted i show output of
fdisk -ul. So here it is in case it'll help someone here figure out this mess i've made, tongue

Disk /dev/sda : 250.0gb
255 HEADS 635 SECTORS/TRACKS, 30401 CYLINDERS
TOTAL 488397168 SECTORS
UNITS=SECTORS OF 1*512=512 BYTES
DISK IDENTIFIER, 0X0F7F14E6

DEVICE____BOOT_____START___________END__________BLOCKS___ID__SYSTEM
-----------------------------------------------------------------------------
/dev/sda1/         2048            17299455     8648704  27 Unknown
/dev/sda2/ *       17299456        322507111    142603528 7 HP/NTFS
/dev/sda3/         322507112       48839204     82942476+ 83  Linux

Last edited by JK3mp (2009-04-27 19:08:22)

Offline

#20 2009-04-27 19:35:35

lucke
Member
From: Poland
Registered: 2004-11-30
Posts: 4,018

Re: Grub Error 22 [SOLVED]

All your descriptions are kind of ... chaotic, so I can't be sure what you're doing. How are you getting that fdisk output? Using Arch's install CD?

Googling seems to indicate that reinstalling GRUB to MBR might be the solution to error 22. Running "grub" from any live media and then "root (hd0,2)" and "setup (hd0)" should do the reinstall.

Offline

#21 2009-04-27 19:37:34

JK3mp
Member
Registered: 2009-03-25
Posts: 105

Re: Grub Error 22 [SOLVED]

lucke wrote:

All your descriptions are kind of ... chaotic, so I can't be sure what you're doing. How are you getting that fdisk output? Using Arch's install CD?

Googling seems to indicate that reinstalling GRUB to MBR might be the solution to error 22. Running "grub" from any live media and then "root (hd0,2)" and "setup (hd0)" should do the reinstall.

Sorry, yes, from the arch disk. i've reinstalled arch in general several times.

Offline

#22 2009-04-27 19:39:34

JK3mp
Member
Registered: 2009-03-25
Posts: 105

Re: Grub Error 22 [SOLVED]

With root (hd0,2)
i get, "Filesystem type unknown, partition type 0x27"

with setup (hd0)
Error 17: Cannot mount selected partition.

Offline

#23 2009-04-27 19:45:24

lucke
Member
From: Poland
Registered: 2004-11-30
Posts: 4,018

Re: Grub Error 22 [SOLVED]

Something is very nonstandard in all this.

Where are you posting from? Another PC? Perhaps we could talk in real time on freenode.

Offline

#24 2009-04-27 19:56:08

JK3mp
Member
Registered: 2009-03-25
Posts: 105

Re: Grub Error 22 [SOLVED]

lucke wrote:

Something is very nonstandard in all this.

Where are you posting from? Another PC? Perhaps we could talk in real time on freenode.

Yes...i'll get on irc. Are you in the main #archlinux irc ?

Offline

Board footer

Powered by FluxBB