LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Grub error 22 on netbook(no cd drive) (https://www.linuxquestions.org/questions/linux-newbie-8/grub-error-22-on-netbook-no-cd-drive-754620/)

sarick22 09-12-2009 07:32 AM

Grub error 22 on netbook(no cd drive)
 
i "tried" booting ubuntu from usb but i messed around with partition and now i get the error 22...and i somehow messed up the usb as well and now i cant boot linux too. anyway before i write wall of text i will try to make it clear what my problem is and what i tried to do.

problem:
1.booting up with no usb(booting to windows)
grub error 22

2.booting up with usb(trying to boot to linux)
on screen it says "boot:" i used UNetbootin. i was able to boot to linux until i messed around with partition even more...

my "solution"
after searching on google i read that i should make freedos boot on usb and enter fixmbr or fdsk /mbr because mbr need to reset or something... so i got freedos on usb and booted it. after booting it asked me for date and time and i get "C:\>". when i type something it says "bad command or filename -"

so my question is is there any other alternative way of fixing it? or what is wrong with my solution?

thanks for help!

ajlewis2 09-12-2009 08:54 AM

When you try to boot the computer, do you get the grub menu at all? If you do, then you can try the grub commandline.

http://linuxbasics.org/tutorials/adv...b_command_line

You say you messed with the partitions. Did you delete something? What did you use to mess with the partitions?

You say you are using UNetbootin - what have you put on it? It looks like it is designed to put a distro or something like Super Grub on it.

yancek 09-12-2009 09:03 AM

Which version of windows do you have?
Did you have it installed and working before trying to install (which distribution of) Linux?
What did you do with the partitions?
The solution you tried is to put windows in the master boot record and would not help boot Linux without several more steps.

saikee 09-12-2009 09:23 AM

My guess when the USB Linux was installed the boot loader was accidentally installed in the MBR of the internal hard disk where the MS Windows resides.

Freedos "fdisk" fixes only the older systems up to Xp. Vista and Win7 requires a different cure.

When using the Freedos one should check first if the fdisk.exe is inside in the C:\. The error obviously telling the user the requested command isn't inside C:\ or it cannot be used. The other possibility of the error is the fdisk command may try to repair the MBR in the c:\ drive but this is a USB device that a Dos by default does not support as a booting medium. This problem can be overcome by putting the Freedos on a floppy or a CD.

sarick22 09-12-2009 11:06 AM

thank you guys for the replies!

Quote:

Originally Posted by ajlewis2 (Post 3679972)
When you try to boot the computer, do you get the grub menu at all?
Did you delete something? What did you use to mess with the partitions?
You say you are using UNetbootin - what have you put on it?

no there is no grub menu. when i try to boot linux (eeebuntu distro) from usb i get "boot:" thats all. to be more exact it says
"SYSLINUX 3.63 Debian-2008-07-15 EBIOS Copyright (c) 1994-2008 H. Peter Anvin

Boot:(cursor here)"
when i type something it says "Could not find kernel image:(what i type)"
and then after few secs the screen turns grey which is suppose to be unetbootin menu but without the menu. i cant do anything.
On USB i installed EEEbuntu with Unetbootin. I tried to delete my previous linux partition with Gparted and then try to merge it to winxp but screen froze so i restarted by taking out the battery...then my partition that i was merging to got deleted/corrupted. whenever i try to use Gparted my laptop froze and after few times i started getting the error.

Quote:

Originally Posted by yancek (Post 3679985)
Which version of windows do you have?
Did you have it installed and working before trying to install (which distribution of) Linux?
What did you do with the partitions?

I have Windows XP and yes, it was installed on my laptop and i was trying to boot LInux from USB because i did not want to dual boot. i use EEEbuntu.

Quote:

Originally Posted by saikee (Post 3680011)
My guess when the USB Linux was installed the boot loader was accidentally installed in the MBR of the internal hard disk where the MS Windows resides.

Freedos "fdisk" fixes only the older systems up to Xp. Vista and Win7 requires a different cure.

When using the Freedos one should check first if the fdisk.exe is inside in the C:\. The error obviously telling the user the requested command isn't inside C:\ or it cannot be used. The other possibility of the error is the fdisk command may try to repair the MBR in the c:\ drive but this is a USB device that a Dos by default does not support as a booting medium. This problem can be overcome by putting the Freedos on a floppy or a CD.

hmm maybe i messed up installing freedos from USB. FYI, i used http://www.bensbits.com/2007/08/21/b...sb_flash_drive guide. im a newbie so maybe i didnt do it right. i dont have internal cd drive on my laptop so my last resort is buy an external drive...but im so poor >.> college textbook ate all my money -.-

ajlewis2 09-12-2009 11:55 AM

Quote:

Originally Posted by sarick22 (Post 3680113)
thank you guys for the replies!


no there is no grub menu. when i try to boot linux (eeebuntu distro) from usb i get "boot:" thats all. to be more exact it says
"SYSLINUX 3.63 Debian-2008-07-15 EBIOS Copyright (c) 1994-2008 H. Peter Anvin

Boot:(cursor here)"
when i type something it says "Could not find kernel image:(what i type)"
and then after few secs the screen turns grey which is suppose to be unetbootin menu but without the menu. i cant do anything.

Usually when it says "boot" you just press ENTER key and it boots. You should not type anything.

sarick22 09-12-2009 12:36 PM

Quote:

Originally Posted by ajlewis2 (Post 3680152)
Usually when it says "boot" you just press ENTER key and it boots. You should not type anything.

it says "boot: " and when i hit enter i just get another boot: l dont know how that frown face got there... but anyway, i put supergrubdisk on usb using unetbootin and try to boot it. i see the menu but i cant seem to click on any. i hit enter but nothing happens.

yancek 09-12-2009 01:22 PM

Are you not able to boot from your hard disk with xp?
Are you not able to boot from whichever distro of Linux you installed on the USB?
Do you have a Linux Live CD and a CD drive?
I don't think FreeDOS is the best way to go, can you download SuperGrubDisk and try that?
It seems you don't have the stage1 Grub file in mbr of USB as noted in an earlier post. Do you remember where you installed Grub?

If you can boot any Live CD and run the "fdisk -l" command as root (lower case Letter L) and post it here someone may be able to help with that partition information avaialble.

sarick22 09-12-2009 02:45 PM

Quote:

Originally Posted by yancek (Post 3680221)
1.Are you not able to boot from your hard disk with xp?
2.Are you not able to boot from whichever distro of Linux you installed on the USB?
3.Do you have a Linux Live CD and a CD drive?
4.I don't think FreeDOS is the best way to go, can you download SuperGrubDisk and try that?
5.It seems you don't have the stage1 Grub file in mbr of USB as noted in an earlier post. Do you remember where you installed Grub?

If you can boot any Live CD and run the "fdisk -l" command as root (lower case Letter L) and post it here someone may be able to help with that partition information avaialble.

1. Nope. i get the grub error.
2. Nope. i get broken grey screen and when i hit enter i get black screen with "Boot: " on. whenever i type stufff on it it say kernel image not found.
3. nope. no internal drive. i have to buy external one. it will be my last resort....
4. i did try supergrubdisk. read my last post.
5. i dont even know what grub is so i dont know where i installed it.

ajlewis2 09-12-2009 03:01 PM

I had good luck running Ubuntu remix on a usb stick for my netbook. If you get that on the stick, you can boot it and then run 'fdisk -l' to see what partitions you actually have. If you have a partition already made for Linux, you could then install this version on it and it should give you a new grub in the mbr so you can boot windows.

I would suggest that you do not repartition with it, though, because I had a bigger problem than I think you do after repartitioning. I can explain it later, but I don't want to muddy things now. First just let us see what you actually have for partitions, assuming you can get this on your usb stick. Be sure to read the instructions for how to put it on the stick. It is not a simple copy.

http://www.ubuntu.com/GetUbuntu/download-netbook

29t88 09-12-2009 03:29 PM

Restoring Windows Master Boot records will get rid of grub so you couldnt boot from linux < Only windows. I had a error with this once before.... I restored MBR's Then i created a linux boot disk and in my bios told it to boot from USB Drive, then from there i reinstalled grub.
I know these steps dont explain how to do it, but it kind of explains what to do

sarick22 09-13-2009 07:17 AM

Quote:

Originally Posted by ajlewis2 (Post 3680296)
I had good luck running Ubuntu remix on a usb stick for my netbook. If you get that on the stick, you can boot it and then run 'fdisk -l' to see what partitions you actually have. If you have a partition already made for Linux, you could then install this version on it and it should give you a new grub in the mbr so you can boot windows.

I would suggest that you do not repartition with it, though, because I had a bigger problem than I think you do after repartitioning. I can explain it later, but I don't want to muddy things now. First just let us see what you actually have for partitions, assuming you can get this on your usb stick. Be sure to read the instructions for how to put it on the stick. It is not a simple copy.

http://www.ubuntu.com/GetUbuntu/download-netbook

thank you! it worked. i installed unbuntu remix thro usb before but i didnt know that was the solution! but now how do i uninstall ubuntu without getting the grub error again? i want to dual boot windows with different linux distro.

linus72 09-13-2009 07:40 AM

What other distro's you wanna install?

You boot many distros besdies windows
you can also boot frugal distros from the ubuntu partition too

sarick22 09-13-2009 08:14 AM

i want to uninstall unbuntu linux. i only want to have windows on my laptop and boot EEEbuntu linux from SD card or USB.

ajlewis2 09-13-2009 08:40 AM

Quote:

Originally Posted by sarick22 (Post 3680870)
thank you! it worked. i installed unbuntu remix thro usb before but i didnt know that was the solution! but now how do i uninstall ubuntu without getting the grub error again? i want to dual boot windows with different linux distro.

Glad to hear it worked. I'm assuming that you installed it, or are you just running it on the usb stick? To install another distro you need to get something on the usb stick like you did for ubuntu remix. If you installed ubuntu on the hard drive, do not delete that partition or ubuntu just yet.

First, please do 'sudo fdisk -l > partition.txt' (that is an ell, not a one). Then post the partition.txt here so we can see what you are working with.

ajlewis2 09-13-2009 08:47 AM

Here are the instructions for installing eeebuntu. You can use your running ubuntu remix to make the usb install disk. Then you can install it on the same partition that you have ubuntu remix on. So create the install usb drive, then put it in and run it. There should be a place where it asks what partition you are going to put it on. After you have checked what the number of your linux partition is with the fdisk command I gave you, you can choose that same partition for eeebuntu. Request that it format that partition. There is usually a check block for that. That way it will clear it of the old system. Don't use that netbootin thing that didn't work well for you before. :-)

http://eeebuntu.org/wiki/index.php/Usbcreator

sarick22 09-13-2009 08:35 PM

1 Attachment(s)
thanks again. here is the partition.txt. my comp came with 160GB. it was orginally divided into 2 with 4GB of windows image for easy system restore(which didnt work with grub error). then i dual booted ubuntu netbook remix and it partitioned 13GB. then i put unbootin + eeebuntu on USB and erased the ubuntu partition. and then i tried to combine the 13GB with the other one but screen keep freezing . i took out the battery and tried it over again few times and the partition i tried to resize got corrupted and the stuff on it got erased then i started getting the error.

ajlewis2 09-14-2009 05:59 AM

Code:

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

  Device Boot      Start        End      Blocks  Id  System
/dev/sda1              1        4382    35198383+  7  HPFS/NTFS
/dev/sda2            4383      18422  112776300    7  HPFS/NTFS
/dev/sda3  *      18814      19457    5172930    c  W95 FAT32 (LBA)
/dev/sda4          18423      18813    3140707+  5  Extended
/dev/sda5          18423      18788    2939863+  83  Linux
/dev/sda6          18789      18813      200781  82  Linux swap / Solaris

You have about 5Gb of Windows FAT32 (sda3) and about 3Gb for Linux on the extended partition (sda4) divided into two logical partitions for swap and the system. 3Gb is quite small. You could just combine the FAT32 with the Linux to make 8Gb, but even that may not suit you in the log term. If you just want to try Linux out and then make more space later, that would be fine, but it might be good to make this a little bigger now. Are you using that extra Windows FAT32 partition for anything? I think not, because with what you have described, I think that is the result of your attempt to put the partitions back together. So, here is my recommendation:

Start up the usb and run the installer that you originally used to repartition. Use this one, because you already know that it is not going to give you problems. The problem is one I've had twice and it is caused by a mix of kernel, parted, and the way your BIOS has your hard drive set. Your setup is probably ok since you didn't have the problem before, but I'd hate to see you try a new installer that had the bad combination. I know that folks who have not experienced this will think I'm nuts, but I was surprised to have it happen the second time to me using remix and a toshiba nt205 a month ago. The fix required getting the restore disk and an external cdrom in order to restore windows so that the windows boot sector could be rewritten. It is a royal pain on a netbook and for me was costly. Plus you overwrite windows. All that would have been needed was fixboot, but the restore disk does not have it. An XP install disk does have it; so it is an easy fix with that. Lots of words here, but I do not want to be the cause of trouble. So, if you feel secure, you can just go with the eeebuntu installer, or you can take the extra care and use the one you originally used.

When it gets to the partitioner highlight partition 6 and delete it. Do the same with 5, 4, and 3. Then resize 2 and take another 10-20 Gb off that. Then you will have 18-28 Gb of free space. Make all of that into an extended partition so that you can make 2 logical partitions on it. Then make the swap like you did before and the rest of it into the Linux partition.

Install on the new partition with eeebuntu. If you have only one usb stick you would have to first continue with the install of remix, and then put eeebuntu on the usb stick and install over remix.

sarick22 09-14-2009 06:29 AM

i think the win fat32 is the system restore partition. when i press F9 at boot it restores windows to original state so i dont need CD to reinstall windows. i will try what you said after classes today. thanks!

ajlewis2 09-14-2009 08:41 AM

I think the restore part might be sda1. sda2 is your windows main partition. You can check by looking in Linux at /boot/grub/menu.lst, because it will show two places to boot Windows. One will be the actual system and the other will be the restore setup. You should see both of them when you boot listed on the grub menu at the bottom, but I don't think it lists the partition number there.

The sections should be toward the bottom of menu.lst and will look something like this. This example shows sda1 -- hd0,0 means first drive, first partition. hd0,1 would be sda2.

Code:

title        Windows 95/98/NT/2000
root          (hd0,0)
makeactive
chainloader  +1

On my netbook, that is the way it is set up. The restore portion is ntfs and not fat32. (Edit: This is incorrect. See next post for correction)

Another thing you can do is to mount that fat32 partition while in linux to see if there is anything on it. I think you might find that you can't even mount it, because there is no filesystem on it. That would be the case if you made it while trying to put space back from the linux partition. To try to mount it:

Code:

sudo mount -t vfat /dev/sda3 /mnt
If you get no error message, then have a look with:

Code:

ls /mnt
Partition 1 does look like about the right size for restore, and not for the system. The second partition is over 100Gb and likely your system.

ajlewis2 09-14-2009 08:59 AM

Quote:

Originally Posted by ajlewis2 (Post 3682243)
I think the restore part might be sda1. sda2 is your windows main partition.
<snip>

On my netbook, that is the way it is set up. The restore portion is ntfs and not fat32.

Correction: My restore is indeed fat32 and is only 7Gb; so it looks like you are right and you do not want to remove that partition sda3. I don't know what sda1 is on your drive. Do you?

You could still delete 6, 5, and 4 and resize sda2 for a little more room.

pramodhrai 09-14-2009 09:13 AM

I am trying to install Tomcat. For that I have installed jre-6u16-linux-i586.rpm
I ahve installed it in data directory. And in home directory my user is Pramod.
For that i have set the enfirnment but at the time of installation of Tomcat it
did not get the jre enviornment.
Please send me the the installation steps and commannds regards to that.
Thank You for regards.

sarick22 09-15-2009 07:49 AM

how do i remove linux completely? i still got grub error 22 after i removed linux partition with Gparted. So i had to reinstall ubuntu. this comp is for doing my school work so i cant risk getting errors anymore....

oh and sda1 is windows main partition and sda2 is just for storage.

yancek 09-15-2009 09:30 AM

The Grub bootloader puts one of its files in the master boot record and the remaining files on the partition of the distribution (Ubuntu in your case). If you delete the partition with Ubuntu, you need to make a change to the master boot record so the Grub file there is not pointing to a non-existent partition.

You can search here at LQ as there are numerous post with solutions to repair xp master boor record.

sarick22 09-15-2009 03:00 PM

Quote:

Originally Posted by yancek (Post 3683663)
The Grub bootloader puts one of its files in the master boot record and the remaining files on the partition of the distribution (Ubuntu in your case). If you delete the partition with Ubuntu, you need to make a change to the master boot record so the Grub file there is not pointing to a non-existent partition.

You can search here at LQ as there are numerous post with solutions to repair xp master boor record.

thank you for putting in words i acutally understand! no wonder i kept getting the same error. its so much more clear now.

and thank you ajlewis2 as always.


All times are GMT -5. The time now is 03:16 AM.