Note: if this tutorial doesn’t help you, possibly because fdisk reports your known Linux partition correctly as Linux, you might also try my Grub Error 13 with Grub Error 17 tutorial.
I just had an interesting time with trying to boot into Linux on my PC. Last night, I noticed my /boot/grub/menu.lst file had gotten overwritten when I performed some Ubuntu updates. This meant I had to add in configuration to allow Windows to boot, and since I didn’t have a backup of my old, working configuration (mistake number 1) I looked online. I found something that worked and ignored the use of Grub’s ‘hide’ and ‘unhide’ commands (mistake number 2) that were in the configuration. I rebooted and successfully got into Windows.
When I tried to boot Windows tonight, it wouldn’t work. In fact, the Grub boot menu wouldn’t even come up, so I couldn’t get into Linux either. It just said ‘Error 17′ and sat there. After digging around online, I found a message in some forum archives that explained the problem, and I’m repeating it here because it’s kind of obscure and this might help someone else in the future: do not use Grub’s ‘hide’ command on Linux partitions, because it sets their filesystem type to ‘93′ instead of ‘83′. ‘93′ = the Amoeba operating system, ‘83′ = Linux. Thus when you try to boot Linux, or when Grub is on your Linux partition and thus is trying to read from a Linux partition, Grub thinks it’s working with Amoeba and thus fails out because it’s actually Linux.
How to fix this:
- Using a live CD (I recommend Damn Small Linux because it’s great for quick fixes), you can edit your Linux partition. Download the live CD image (hopefully you have access to another computer with a disc burner) and burn it.
- Boot your messed-up computer with the live CD and open a terminal when it’s booted.
- You need to know which partition is your Linux partition. In the terminal, do the command
fdisk -l. If that doesn’t work, you might trysudo fdisk -lto act as the root superuser in order to use the Fdisk tool. You’re looking for, haha, a partition that claims to be ‘Amoeba’. You want the information that looks like ‘/dev/hda1′. - Once you know where the lying partition is, do
fdisk /dev/hda(orsudo fdisk /dev/hda) if your Linux was on /dev/hda1. You need to leave off the number at the end, so if your Linux was on /dev/hdb2, you would issue the commandfdisk /dev/hdb. This will allow you to work with that drive. - All we need to do is change the partition’s type from 93 to 83 so that it knows it’s Linux again. Fdisk’s commands are all one character long. You can use
mto get a command list if you need it. I would recommend issuing the commandpto list the partition table, so you can better see what you’re doing. - Now you can use the
tcommand to tell Fdisk you want to adjust the type of one of the partitions. It will ask you which partition you want to edit, and you should give it a number. My Linux partition is /dev/hda1, so I entered 1. - Now Fdisk will ask for a hex code. Here is where you need to enter 83 to represent a Linux device. If you’re unsure about this, you can type
Lto list all the operating system types it recognizes and their codes. - Once you’ve entered the hex type number, you’ll be returned to Fdisk’s command prompt. You should issue the command
wto write the partition table and exit.
That’s it! That should tell the Linux partition that it is indeed Linux and not Amoeba, so next time you reboot, things should work.
20 Comments
I was recently thinking of upgrading Ubuntu and since I always run into every strange problem that I could run into when messing with my computer, I’m going to keep this article in mind :D
I had bit similar kind of problems with Mandriva and Ubuntu. I have to keep this in my mind for the future :).
I would be interested in details about how your “/boot/grub/menu.lst file had gotten overwritten”. A Debian-based system should upgrade gracefully and make no configuration changes without your informed participation.
(I don’t use GRUB, but wouldn’t tolerate a system upgrade that trashed my lilo.conf).
Thank you so much for posting this.
It saved my computer.
I thought for sure I was forever cursed to boot Windows only, and only from the Super Grub CD. (Trust me, a Windows-only machine booting from a CD is not a fun thing to have.)
I was stuck with error 17 for three or four days, and I tried absolutely everything to get it fixed.
Your fix worked for me.
Thank you so much for posting it. I never would’ve found a way to fix Grub without it.
The Grub menu settings get upgraded whenever you upgrade your kernel (on debian). I’m not sure about any non-debian derivatives but i would expect it to act the same. What this means is that any settings in the “Auto-Magic Kernel List” get rewritten with what grub thinks should be there. If you don’t want any settings that you added manually to be rewritten, you should put them outside of the blocks denoting this section.
i followed your advice but at the time when i try to rewrite the table i get error 16 and i says that the writting will be done on the next restart wich never happens
any advice ???
thanks in advance
Drini: Hm… I would try doing a search online for ‘grub error 16′ because I’m unfamiliar with it. I would think it’s no longer a case of a Linux partition being recognized incorrectly as some other format (if it were, I think Grub would still give error 17), but I don’t know what error 16 represents.
Amazing! Finally I can boot again =) .
I’ve been wondering where this amoeba thing came from.
Great Stuff. Thanksx1000
I had installed Winders recently onto my Linux system and was trying to set up Grub for dual-boot before ending up with this problem. This totally fixed my problem. Thank you!
When I boot to Linux (single boot drive, so that’s my only option), I get GRUB error 17. However, I followed these instructions and opened the device table, but the boot device was marked as 83 before I modified anything. So it recognized itself as Linux, but it kept giving me Error 17.
Any ideas?
I found some bad news about it in: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/203537
I got this error after trying to suspend computer.
Thanks! Worked perfectly!
Thanks Worked great. I used hide on a linux partition trying to dual boot. Now am ok.
Thank you so much! This tip saved my computer… I’ll never mess with the
‘hide’ option in Grub again.
Now if only I could get Windows to stop trying to format my Ubuntu partition…
My eee 1000 had ubuntu-eee installed did an auto-update then went into sleep mode because I left it. I couldn’t wake it so had to kill the power. After that I got grub error 17.
Your instructions helped me fix it. My /dev/sda was corrupted and showing 2 partitions. I deleted /dev/sda2 and changed the type of /dev/sda1 to Linux (83). It then booted fine. Thank you so much. You saved my bricked machine!
Thank you – thank you – thank you! :)
This did it for me!
Thank you for taking the time to post this info. It was extremely helpful! It worked!
when i type t command …it shows
No partition is defined yet!
what shall i do now??
Here’s a good one. Loaded Linux Kubuntu last night on a seperate hard drive. But had 2 others hooked up. 1 had vista swagate 1.5 TB, 2 had WINXP WestDigi 80 gig, 3 Kubuntu IBM 16 gig. Now I did a full install to the IBM of Kubuntu. Not even near the Seafate HDD and i have the GRUB error 17 thing on the seagate HDD with Vista loaded. Now I can not get into
Vista. So tell me, how do I fix !THAT! why don’t ya…. I am going to try and make a boot disk for Vista from WINXP drive via the back door and see if that works. But if anyone has any ideas PALeeeease HEEELP!!
Thanks. This is exactly what I needed.
One Trackback
[...] grub started loading then stopped giving me the Error 17. I was able to resolve it after checking this site [...]