LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Laptop and Netbook (http://www.linuxquestions.org/questions/linux-laptop-and-netbook-25/)
-   -   GRUB loading, please wait... Error 22 (http://www.linuxquestions.org/questions/linux-laptop-and-netbook-25/grub-loading-please-wait-error-22-a-525028/)

rajuvegesna 02-02-2007 12:50 PM

GRUB loading, please wait... Error 22
 
Hello,

I have installed SuSE linux 10.1 in my laptop. I have windows OS aswell. Installation was perfect, as i have 2GB of RAM i have deleted the Linux SWAP partition.

The problem occurred now, when booting with GRUB i am getting the message

GRUB loading, please wait...
Error 22

nothing happens from there

I booted with linux installation CD and went to Rescue system mode. I logged in as root and tried to execute

mkdir mnt
mount -t reiserfs /dev/sda7 mnt
nano mnt/etc/fstab

look for line having word 'swap' and put # sign before that line. save file and reboot.

but i got error as

cannot create directory 'mnt' : Read-only file system.

What can i do now?

Please suggest me.

Thank you in advance!!

pljvaldez 02-02-2007 01:26 PM

look in the / filesystem for a directory that's empty. For example, try just mounting your filesystem on /mnt, /opt, or /tmp if they already exist and are empty directories... mount -t reiserfs /dev/sda7 /tmp

pljvaldez 02-02-2007 01:33 PM

Also, you might check the output of fdisk -l to make sure your / partition is still /dev/sda7. I feel like that usually means your partitions changed order (like when you deleted the swap partition maybe?). So you might need to modify /etc/fstab to point at the new partition designations (i.e. /dev/sda6 instead of 7).

rajuvegesna 02-02-2007 01:56 PM

Quote:

Originally Posted by pljvaldez
Also, you might check the output of fdisk -l

dosent show /dev/sda7. what can i do now?

pljvaldez 02-02-2007 02:19 PM

What does it show?

rajuvegesna 02-02-2007 02:49 PM

Quote:

Originally Posted by pljvaldez
What does it show?

[EDIT]

Disk /dev/sda: 120.0 GB

255 heads, 63 sectors/tracks, 14593 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device
/dev/sda1
/dev/sda2
/dev/sda3
/dev/sda4
/dev/sda5
/dev/sda6
/dev/sda7

Boot
*
Start
1
6625
7954
8085
8085
13010
14331

End
6624
7953
8084
14593
13009
14330
14593

Blocks
53207248+
10675192+
1052257+
52283542+
39560028
10610900
2112516

Id
7
83
d7
5
7
83
82

System
HPFS/NTFS
Linus
Unknown
Extended
HPFS/NTFS
Linux
Linux swap / Solaris
[/EDIT]
So i think, /dev/sda2 and /dev/sda6 belongs to Linux

pljvaldez 02-02-2007 03:31 PM

I would agree. But it looks like you're using ext3, not rieserfs. So I would try mount -t ext3 /dev/sda2 /tmp Then try nano /tmp/etc/fstab and make sure it looks okay.

rajuvegesna 02-02-2007 03:42 PM

Quote:

Originally Posted by pljvaldez
I would agree. But it looks like you're using ext3, not rieserfs. So I would try mount -t ext3 /dev/sda2 /tmp Then try nano /tmp/etc/fstab and make sure it looks okay.

i am sure they are rieserfs

pljvaldez 02-02-2007 04:23 PM

Quote:

Originally Posted by rajuvegesna
i am sure they are rieserfs

You're correct. For some reason I thought the different linux filesystems had a different ID number, but they don't...

rajuvegesna 02-03-2007 05:21 AM

Quote:

Originally Posted by pljvaldez
You're correct. For some reason I thought the different linux filesystems had a different ID number, but they don't...

[EDIT]

/dev/sda6 / reiserfs acl,user_xattr 11
/dev/sda2 /home reiserfs acl,user_xattr 12
/dev/sda1 /windows/C ntfs ro,users,gid=users,umask=0$
/dev/sda5 /windows/D ntfs ro,users,gid=users,umask=0$
/dev/sda7 swap swap defaults 00
Proc /proc proc defaults 00
Sysfs /sys sysfs noauto 00
Debugfs /sys/kernel/debug debugfs noauto 00
Usbfs /proc/bus/usb usbfs noauto 00
Devpts /dev/pts devpts mode=0620,gid=5 00
[/EDIT]
this is th o/p of the fstab file, any comments on this?

saikee 02-03-2007 05:45 AM

I see a basic problem here that the partition references are indiscriminately altered while Grub's complaint is

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.
In my opinion the alteration of fstab here is totally unnecessary because Grub complained as it either could not find the root partition or the kernel to Load. If there is no kernel available it is a waste of time to fiddle with fstab, a file that instructs the kernel what partitions it must load. In other word fstab is only relevant when the Kernal is being loaded.

I am also confused by why it is necessary to remove the swap in order to cure Grub Error 22.

It would be helpful if the OP posts the Suse's /boot/grub/menu.lst.

It is possible once the Grub error 22 is overcome we could face a kernel panic because its fstab has been altered for other reasons.

rajuvegesna 02-03-2007 06:10 AM

Quote:

Originally Posted by saikee
I am also confused by why it is necessary to remove the swap in order to cure Grub Error 22.

After deleting SWAP partion GRUB shows the problem, before it is fine.

Shall i install Linux again? But i am sure how the partitions will be allocated.

saikee 02-03-2007 06:32 AM

I don't think you need a re-install. It is a feature in the new Suse that it "resume" to a swap.

I have a swap in hda5 used by all the Linux and my Suse 10 is booted by Grub as follow
Code:

title SUSE LINUX 10.0
    root (hd0,42)
    kernel /boot/vmlinuz root=/dev/hda43 vga=0x31a selinux=0  splash=silent resume=/dev/hda5  splash=silent showopts
    initrd /boot/initrd

Thus I think it is more relevant that you post your Suse's /boot/grub/menu.lst.

If something is wrong with fstab then it will be reported a "kernel" error. By such time Grub would have buggered off for it lunch break.

My diagnosis is that you could have physically deleted the swap. The action causes the entire logical partition set to shift upward by one position. In a panic you tried to slavage the position by amending the fstab. Your action could still work but I think you need a swap to satisfy Suse.

To me to quickest way to get out of the hot water is to recreate the swap back in its origical position even if it is smaller than the original size and restore the original fstab.

It is not a big deal to alter Linux partition references. I do it sometimes for the entire disk with over 60 distros inside.

rajuvegesna 02-03-2007 06:50 AM

Quote:

Originally Posted by saikee
Thus I think it is more relevant that you post your Suse's /boot/grub/menu.lst.

where can i execute the code, in rescue mode i got error no such file or directory.

Quote:

To me to quickest way to get out of the hot water is to recreate the swap back in its origical position even if it is smaller than the original size and restore the original fstab.
How can i do that, i have GParted Live CD do you have any idea about that!!

Re-installing GRUB will do? If so, How can i??

saikee 02-03-2007 07:38 AM

When you are in a rescue mode you are operating Suse from a boot-up Linux. Therefore /boot/grub of the boot-up CD Linux is not the one in the hard disk.

The Suse that is of interest to you is in the hard disk. Your fstabtells us that the root of Suse is currently sda6 (but should have been sda7 according to you). Swap is always Type 82 as there ins't one in your current partition table and you did say to have deleted it. Therefore I predicted the deletion could have been the physical kind as against just an entry in fstab. You also suggested the sda6 was originally sda7. Logical partitions must work like a continuous chain with one logical partition following another in a consecutive order. If one logical partition is deleted the the space is dead and the logical partitions afterward will "automatically" shifted upward to maintain the continuity.

If you have used gparted to aborb the dead space then it may be expedient just to do a re-install.

If you haven't touch the dead space then run "cfdisk /dev/sda" at root terminal (by "su" first followed by root password to become the superuser). You will find the empty space from the deletion of your swap partition currently waiting for you between partition sda5 and sda6. Just use the same space to create a logical partition, select Type 82, highlight "write", hit return, quit cfdisk program and you should be in business again. You should also see with your own eye how cfdisk automatically shift the logical partition sda6 downward to become sda7, back to its original refrence, without any intervention from you.

At this point you should have no Grub error but your Suse may panic until you edit fstab back to its original order, which is sda7 is "/" and no "#" in front of the line /dev/hda6.

Good luck.


All times are GMT -5. The time now is 01:25 PM.