LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
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 10-20-2006, 10:37 PM   #1
paul85
Member
 
Registered: Jul 2005
Location: New Jersey
Distribution: FC 5, Ubuntu
Posts: 92

Rep: Reputation: 15
grub 22 error


Installed XP on my third drive /dev/hda, but now when i try to boot into linux /dev/sdb3 I get grub 22. Is this fixable without having to reinstall either fc5 or ubuntu.
 
Old 10-20-2006, 10:52 PM   #2
bigrigdriver
LQ Addict
 
Registered: Jul 2002
Location: East Centra Illinois, USA
Distribution: Debian stable
Posts: 5,889

Rep: Reputation: 351Reputation: 351Reputation: 351Reputation: 351
Quote:
22 : No such partition
This error is returned if a partition is requested in the device
part of a device- or full file name which isn't on the selected
disk.
Grub seems to be saying that /dev/sdb3 doesn't exist, or doesn't have Linux installed. Are you certain you installed xp on /dev/hda?

Boot from a Linux install cd, or a live cd. Then, as root, run 'fdisk -l /dev/hda' to see if xp is really there. Do the same on /dev/sdb. You might have installed xp over something else and not realise it.
 
Old 10-20-2006, 10:58 PM   #3
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 15,729

Rep: Reputation: 2123Reputation: 2123Reputation: 2123Reputation: 2123Reputation: 2123Reputation: 2123Reputation: 2123Reputation: 2123Reputation: 2123Reputation: 2123Reputation: 2123
Mmmm - just "fdisk -l" is fine.
We're going to need all the info we can get.
menu.lst and the device.map might be handy too.
 
Old 10-21-2006, 09:22 AM   #4
paul85
Member
 
Registered: Jul 2005
Location: New Jersey
Distribution: FC 5, Ubuntu
Posts: 92

Original Poster
Rep: Reputation: 15
currently running knoppix.

fdisk

Code:
Disk /dev/hda: 60.0 GB, 60022480896 bytes
255 heads, 63 sectors/track, 7297 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/hda1   *           1        7297    58613121    7  HPFS/NTFS

Disk /dev/sda: 160.0 GB, 160041885696 bytes
255 heads, 63 sectors/track, 19457 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1               1          13      104391   83  Linux
/dev/sda2              14        2624    20972857+  83  Linux
/dev/sda3            2625        5235    20972857+  83  Linux
/dev/sda4            5236       19457   114238215    5  Extended
/dev/sda5            5236        7846    20972826   83  Linux
/dev/sda6            7847       10457    20972826   83  Linux
/dev/sda7           10458       13068    20972826   83  Linux
/dev/sda8           13069       15679    20972826   83  Linux
/dev/sda9   *       15680       19262    28780416   83  Linux
/dev/sda10          19393       19457      522081   82  Linux swap / Solaris

Disk /dev/sdb: 160.0 GB, 160041885696 bytes
255 heads, 63 sectors/track, 19457 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1   *           1        6374    51199123+   b  W95 FAT32
/dev/sdb3            7650       10226    20699752+  83  Linux
/dev/sdb4           10261       19457    73874902+   5  Extended
/dev/sdb5           10261       12810    20482812   83  Linux
/dev/sdb6           12811       15360    20482843+  83  Linux
/dev/sdb7           15361       17971    20972826   83  Linux
/dev/sdb8           17972       19261    10361893+  83  Linux
/dev/sdb9           19393       19457      522112+  82  Linux swap / Solaris
device.map

(hd0) /dev/sda
(hd1) /dev/sdb

menu.lst

title Ubuntu, kernel 2.6.15-27-386
root (hd1,2)
kernel /boot/vmlinuz-2.6.15-27-386 root=/dev/sdb3 ro quiet splash
initrd /boot/initrd.img-2.6.15-27-386
savedefault
boot

title Ubuntu, kernel 2.6.15-27-386 (recovery mode)
root (hd1,2)
kernel /boot/vmlinuz-2.6.15-27-386 root=/dev/sdb3 ro single
initrd /boot/initrd.img-2.6.15-27-386
boot

title Ubuntu, kernel 2.6.12-10-386
root (hd1,2)
kernel /boot/vmlinuz-2.6.12-10-386 root=/dev/sdb3 ro quiet splash
initrd /boot/initrd.img-2.6.12-10-386
savedefault
boot

title Ubuntu, kernel 2.6.12-10-386 (recovery mode)
root (hd1,2)
kernel /boot/vmlinuz-2.6.12-10-386 root=/dev/sdb3 ro single
initrd /boot/initrd.img-2.6.12-10-386
boot

title Ubuntu, kernel 2.6.12-9-386
root (hd1,2)
kernel /boot/vmlinuz-2.6.12-9-386 root=/dev/sdb3 ro quiet splash
initrd /boot/initrd.img-2.6.12-9-386
savedefault
boot

title Ubuntu, kernel 2.6.12-9-386 (recovery mode)
root (hd1,2)
kernel /boot/vmlinuz-2.6.12-9-386 root=/dev/sdb3 ro single
initrd /boot/initrd.img-2.6.12-9-386
boot

title Ubuntu, memtest86+
root (hd1,2)
kernel /boot/memtest86+.bin
boot

### END DEBIAN AUTOMAGIC KERNELS LIST

# This is a divider, added to separate the menu items below from the Debian
# ones.
title Other operating systems:
root


# This entry automatically added by the Debian installer for an existing
# linux installation on /dev/sda2.
title Fedora Core (2.6.17-1.2187_FC5) (on /dev/sda2)
root (hd0,0)
kernel /vmlinuz-2.6.17-1.2187_FC5 ro root=LABEL=/ rhgb quiet
initrd /initrd-2.6.17-1.2187_FC5.img
savedefault
boot


# This entry automatically added by the Debian installer for an existing
# linux installation on /dev/sda2.
title Fedora Core (2.6.17-1.2174_FC5) (on /dev/sda2)
root (hd0,0)
kernel /vmlinuz-2.6.17-1.2174_FC5 ro root=LABEL=/ rhgb quiet
initrd /initrd-2.6.17-1.2174_FC5.img
savedefault
boot


does this help
 
Old 10-21-2006, 07:40 PM   #5
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 15,729

Rep: Reputation: 2123Reputation: 2123Reputation: 2123Reputation: 2123Reputation: 2123Reputation: 2123Reputation: 2123Reputation: 2123Reputation: 2123Reputation: 2123Reputation: 2123
So it looks like you've added that IDE drive (recently) ???.
How do you manage the XP versus Linux booting - swap the boot disk in the BIOS ???.
Try pulling the cable out of the IDE and see if everything (Linux) works again.

If so, you'll need to change all the "hd1" references in menu.lst to hd2, and then all hd0 to hd1. And adjust fstab accordingly.
Personally I would then install grub to the MBR on hda,and boot all the systems (XP included) from the one place.
 
Old 10-21-2006, 09:03 PM   #6
paul85
Member
 
Registered: Jul 2005
Location: New Jersey
Distribution: FC 5, Ubuntu
Posts: 92

Original Poster
Rep: Reputation: 15
swapped the bios boot to st- 0 shich is sda now linux boots.
It was an old WD 60 which I had used on another system. Did not trust M$ enough to let it install on my main drives.


If I change the device map to this:
(hd0) /dev/sda
(hd1) /dev/sdb
(hd2) /dev/hda

and add these lines to menu.list

# title Windows XP
root (hd2,0)

will the dual boot work? do i need to change fstab as well?

Last edited by paul85; 10-21-2006 at 09:05 PM.
 
Old 10-21-2006, 09:46 PM   #7
aus9
LQ Addict
 
Registered: Oct 2003
Location: Australia
Distribution: MX 16
Posts: 5,268

Rep: Reputation: Disabled
3 issues.....device map versus bios boot order and menu.lst AND

issue FSTAB.....irrelevant.....the fstab relates to that drive and its design so sda3 remains sda3......unless you swap the drives on the controllers which I assume you are not

2)
menu.lst becomes

title MS on hda
root (hd2,0)
chainloader +1

but try your suggestion on the device map....and if it works who cares

3)
if it does not work.....you can use the live cd to install grub into the hda MBR point hda mbr to whatever sd drive you like....edit that drives /boot/grub/menu.lst to reflect the new hd order

yes I know it looks messy but some bioses prefer to boot ide drives b4 sata/scsi drives.

use the troubleshooter with the find /etc/fstab to work out which is which if there are any problems.

Last edited by aus9; 10-21-2006 at 09:50 PM.
 
Old 10-21-2006, 10:11 PM   #8
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 15,729

Rep: Reputation: 2123Reputation: 2123Reputation: 2123Reputation: 2123Reputation: 2123Reputation: 2123Reputation: 2123Reputation: 2123Reputation: 2123Reputation: 2123Reputation: 2123
I believe device.map is only used at grub install.
For XP, I agree it probably will be hd2, but you'll need to map it. Try:
Code:
rootnoverify (hd2,0)
map (hd0) (hd2)
map (hd2) (hd0)
chainloader +1
 
Old 10-22-2006, 05:32 PM   #9
paul85
Member
 
Registered: Jul 2005
Location: New Jersey
Distribution: FC 5, Ubuntu
Posts: 92

Original Poster
Rep: Reputation: 15
updated device.map and added the rootnoverify(2,0) and chainloader +1 to my menu.list but when I select XP from the menu it just sits there and doesn't appear to load.

not sure if the ide harddrive is mounting, volume doesn't show on desktop, can't use file browser on it but yet disk manager sees it?
 
Old 10-23-2006, 10:12 AM   #10
aus9
LQ Addict
 
Registered: Oct 2003
Location: Australia
Distribution: MX 16
Posts: 5,268

Rep: Reputation: Disabled
if you have grub at boot up....you can boot into any system using commands

check out my trouble shooter on use of tab with map commands makeactive etc

ahh, follow the link to the pix as it may be handy
 
Old 10-25-2006, 01:01 PM   #11
paul85
Member
 
Registered: Jul 2005
Location: New Jersey
Distribution: FC 5, Ubuntu
Posts: 92

Original Poster
Rep: Reputation: 15
Added map(hd0) (hd2),map(hd2) (hd0) to menu.list now I can get to xp. Found out I have 2 copies of grub one from the original FC5 install and one from ubuntu, even though ubuntu lists Fedora as an option I can't seem to get there. is this due to the two copies of grub?

I get this when I boot from menu.list in ubuntu:

Error: FATAL cant load /lib/modules/2.6.17-1.2187_FC5/modules.dep on /dev/sda2 file or directory does not exist.

Do I have to reinstall FC5 or do a rescue?

Last edited by paul85; 10-25-2006 at 04:09 PM.
 
Old 10-25-2006, 04:17 PM   #12
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 15,729

Rep: Reputation: 2123Reputation: 2123Reputation: 2123Reputation: 2123Reputation: 2123Reputation: 2123Reputation: 2123Reputation: 2123Reputation: 2123Reputation: 2123Reputation: 2123
Nothing to do with it. sda used to be hd0, now it's hd1. Did you edit the hd? in the Ubuntu menu.lst as I suggested above ???.

With that setup, the menu.lst of FC won't (ever) be used. Unless you try and re-install FC - in which case you'll just create more trouble.
 
Old 10-25-2006, 04:25 PM   #13
paul85
Member
 
Registered: Jul 2005
Location: New Jersey
Distribution: FC 5, Ubuntu
Posts: 92

Original Poster
Rep: Reputation: 15
I made the mapping changes as suggested. If I let the system boot when it brings up the menu list from ubuntu and select FC5 thats when I recieve the fatal error. right now I can boot to XP from the menu with no problem.

apparently when I installed ubuntu I also installed a second grub instead of editing the grub from fedora, newbie mistake.

the Fedora boot option is before XP, do I still need to take the map into account?

Last edited by paul85; 10-25-2006 at 04:35 PM.
 
Old 10-25-2006, 04:46 PM   #14
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 15,729

Rep: Reputation: 2123Reputation: 2123Reputation: 2123Reputation: 2123Reputation: 2123Reputation: 2123Reputation: 2123Reputation: 2123Reputation: 2123Reputation: 2123Reputation: 2123
Didn't see the error message - you must have been editting your post as I was (slowly) typing.
Looks like you are getting to FC then. Possibly an fstab issue - although I thought FC used labels on everything. You should be able to see the FC fstab from Ubuntu. See if it needs updating to accomodate the disks "moving".

Edit: - the "maps" are only needed for M$ost. Linux is multiboot aware, and can be loaded fine as you are doing.

Last edited by syg00; 10-25-2006 at 04:48 PM.
 
Old 10-25-2006, 04:53 PM   #15
paul85
Member
 
Registered: Jul 2005
Location: New Jersey
Distribution: FC 5, Ubuntu
Posts: 92

Original Poster
Rep: Reputation: 15
I got rid of a couple swap partitions, sine I found out I don't need 3g of swap space. I'll try editing the fc fstab to reflect the changes and let you know. This takes a while to get used to after yrs of m$.

That didn't work and yes FC does use labels for everything. I did not see any relation to hda or sd* in FC fstab just labels.

Could the Error: FATAL cant load /lib/modules/2.6.17-1.2187_FC5/modules.dep on /dev/sda2 file or directory does not exist.

becaused because the boot flag on sda is set to sda9 instead of sda1 (/boot in FC)?

Last edited by paul85; 10-25-2006 at 05:26 PM.
 
  


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 error 17, and wont reinstall using grub-install! chiefreborn Linux - General 6 06-06-2007 10:29 AM
Grub Error 17: Cannot mount selected partition and other Grub problems Sebastian Naitsabes Linux - General 1 07-05-2005 08:33 AM
GRUB bootloader spits out "GRUB hard disk error" Crampedson Linux - Software 2 01-26-2005 06:34 PM
GRUB Section2 load error, partition error. Ryle Linux - General 1 06-27-2004 02:55 PM
GRUB error? DriveReady SeekComplete DataRequest Error sth Linux - Hardware 3 02-26-2003 05:10 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 11:46 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