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 11-19-2008, 12:26 AM   #1
con2111
LQ Newbie
 
Registered: Nov 2008
Posts: 3

Rep: Reputation: 0
error 22. help me


Recently i decided to partition my hard drive to run vista and ubuntu on it. i ran great for like a day then, until i deleted a small(5gb) partition that didn't have anything in it. Once my computer rebooted i got something like this:
-------------
GRUB Loading stage1.5.

GRUB loading, please wait...
Error 22
-------------
What do i do to get it running like it did?
 
Old 11-19-2008, 06:00 AM   #2
amphibioustoaster
LQ Newbie
 
Registered: Dec 2006
Location: Somwhere
Distribution: Ubuntu Linux 8.10 Intrepid Ibex
Posts: 15

Rep: Reputation: 0
I'm not at all familiar with Error 22, but it's possible that this small, empty partition may have been the Linux swap partition. Do you remember what its type was? Was it swapfs?
 
Old 11-19-2008, 06:06 AM   #3
billymayday
LQ Guru
 
Registered: Mar 2006
Location: Sydney, Australia
Distribution: Fedora, CentOS, OpenSuse, Slack, Gentoo, Debian, Arch, PCBSD
Posts: 6,678

Rep: Reputation: 122Reputation: 122
http://www.linuxselfhelp.com/gnu/gru...r/grub_13.html

Looks like a pretty simple issue to sort. Assuming you have a live CD or some other way to boot, can you show us

The contents of /boot/grub/menu.lst

and the output of "fdisk -l"

I'll bet your partition numbers have changed and the menu.lst entry is now pointing to a nonexistent partition.
 
Old 11-19-2008, 06:07 AM   #4
colucix
LQ Guru
 
Registered: Sep 2003
Location: Bologna
Distribution: CentOS 6.5 OpenSuSE 12.3
Posts: 10,509

Rep: Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976
From the GRUB manual
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.
It looks like you've removed the wrong partition. Try to boot from a live CD, e.g. Knoppix, look for the menu.lst file of the linux installed on the hard drive, and see which is the root partition. Then compare the result with the output of
Code:
fdisk -l
Feel free to post the content of menu.lst and the output of fdisk here.

Edit: billymayday beat me, this time...

Last edited by colucix; 11-19-2008 at 06:08 AM.
 
Old 11-19-2008, 06:12 AM   #5
billymayday
LQ Guru
 
Registered: Mar 2006
Location: Sydney, Australia
Distribution: Fedora, CentOS, OpenSuse, Slack, Gentoo, Debian, Arch, PCBSD
Posts: 6,678

Rep: Reputation: 122Reputation: 122
Quote:
Originally Posted by colucix View Post
Edit: billymayday beat me, this time...
Knowing my luck on getting beaten, I probably owe you a few!
 
Old 11-19-2008, 09:38 AM   #6
con2111
LQ Newbie
 
Registered: Nov 2008
Posts: 3

Original Poster
Rep: Reputation: 0
okay I can boot ubuntu up with just the disc, but the problem is i am pretty much retarded when it comes to linux. Would reinstalling ubuntu to the same partition help or is just a grub problem?
 
Old 11-19-2008, 09:56 AM   #7
amani
Senior Member
 
Registered: Jul 2006
Location: Kolkata, India
Distribution: Debian 64-bit GNU/Linux, Kubuntu64, Fedora QA, Slackware,
Posts: 2,766

Rep: Reputation: Disabled
It is a simple grub configuration problem.

Simply take a look at the entry for booting Ubuntu

and edit (press e) it.

Change root= .. to root=(hd0,2)
(for example 3rd partition of 1st hard disk)
 
Old 11-19-2008, 09:57 AM   #8
amani
Senior Member
 
Registered: Jul 2006
Location: Kolkata, India
Distribution: Debian 64-bit GNU/Linux, Kubuntu64, Fedora QA, Slackware,
Posts: 2,766

Rep: Reputation: Disabled
If it takes you to a shell, then you may need to edit /etc/fstab or just press enter , ctrl d
 
Old 11-19-2008, 10:16 AM   #9
con2111
LQ Newbie
 
Registered: Nov 2008
Posts: 3

Original Poster
Rep: Reputation: 0
I am sorry but i don't i think i understand exactly what to do. I boot up with the disc in. It shows:

Try Ubuntu without any change to your computer
Install Ubuntu
Check CD for defects
Test memory
Boot from first hard disk

Is this where I edit or do I load ubuntu and try to edit there?
 
Old 11-19-2008, 06:53 PM   #10
billymayday
LQ Guru
 
Registered: Mar 2006
Location: Sydney, Australia
Distribution: Fedora, CentOS, OpenSuse, Slack, Gentoo, Debian, Arch, PCBSD
Posts: 6,678

Rep: Reputation: 122Reputation: 122
Select "Try Ubuntu without any change to your computer"

In "Applications->Accessories", select Terminal

Type "sudo fdisk -l" (that's a lower case "L") and post the results.

Now, I'm not sure where your boot partition is, and we may need to play around a bit to find it. look at the output ot the command above. Here's a snippet of what I get"
Code:
Disk /dev/sdb: 300.0 GB, 300090728448 bytes
255 heads, 63 sectors/track, 36483 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x2d085d58

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1               1          12       96358+  83  Linux
/dev/sdb2              13       28707   230492587+   f  W95 Ext'd (LBA)
/dev/sdb3           28708       36483    62460720   83  Linux
/dev/sdb5              13         205     1550241   82  Linux swap / Solaris
/dev/sdb6             206        1225     8193118+  83  Linux
/dev/sdb7            1226        2245     8193118+  83  Linux
/dev/sdb8            2246        3265     8193118+  83  Linux
/dev/sdb9   *        3266        4285     8193118+  83  Linux
/dev/sdb10           4286        5305     8193118+  83  Linux
/dev/sdb11           5306        6325     8193118+  83  Linux
/dev/sdb12           6326        7345     8193118+  83  Linux
/dev/sdb13           7346        8875    12289693+  83  Linux
/dev/sdb14           8876        9895     8193118+  83  Linux
Now I know where my grub is set up, it's on /dev/sdb1. To find that, I could do:

Code:
ubuntu@ubuntu:~$ sudo mount /dev/sdb1 /mnt
ubuntu@ubuntu:~$ sudo ls /mnt/boot/grub
device.map     ffs_stage1_5	 jfs_stage1_5	 reiserfs_stage1_5  ufs2_stage1_5
e2fs_stage1_5  grub.conf	 menu.lst	 stage1		    vstafs_stage1_5
fat_stage1_5   iso9660_stage1_5  minix_stage1_5  stage2		    xfs_stage1_5
In which case, do
Code:
sudo cat /mnt/boot/grub/menu.lst
select the output, copy it and past it here with the output of fdisk above.

If the result of "sudo ls /mnt/boot/grub" had been file not found, I'd then have gone
Code:
ubuntu@ubuntu:~$ sudo umount /mnt
ubuntu@ubuntu:~$ sudo mount /dev/sdb3 /mnt
ubuntu@ubuntu:~$ sudo ls /mnt/boot/grub
ls: cannot access /mnt/boot/grub: No such file or directory
See what happens when it's the wrong partition?

Note that you would only bother with partitions that fdisk told you were linux partitions (so not /dev/sdb2 in my case, or sdb5).

See how you go on that. Keep working through any linux partitions you have - it's likely to be a low numbered one, and you probably don't have more than a couple anyway.

Note - sounds complicated - is actually easy. Don't worry.

Last edited by billymayday; 11-19-2008 at 06:56 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
Conmpile error wen compile php:configure: error: libpng.(a|so) not found tanveer Linux - Software 5 02-03-2009 07:13 AM
Inkscape compilation error: *** [extension/internal/pdfinput/pdf-parser.o] Error 1 w1k0 Slackware 12 10-25-2008 10:53 AM
compilation error : /tmp/cczC6Kc3.s:7368: Error: unknown pseudo-op: `.ltorg' nankie Red Hat 0 08-19-2008 11:15 AM
Suse CUPS error: cups(File)DoRequest error:client-error-bad-request smdonelan Linux - Hardware 6 04-17-2007 07:46 PM
updating new installation of 9.3 ERROR...ERROR...ERROR Morbid SUSE / openSUSE 3 08-16-2005 12:22 AM


All times are GMT -5. The time now is 07:08 AM.

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