Find the answer to your Linux question:
Page 1 of 2 1 2 LastLast
Results 1 to 10 of 12
GRUB is not loading any menu; it just ends with the "error 17". I can edit it through a live knoppix, all the "normal" partitions are fine, I can access ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Linux Newbie
    Join Date
    Apr 2007
    Posts
    214

    [SOLVED] GRUB error 17, possibly due to damage in swap partition


    GRUB is not loading any menu; it just ends with the "error 17".

    I can edit it through a live knoppix, all the "normal" partitions are fine, I can access them.

    However, the swap partition is not recognized by gparted (says it's unknown); fdisk -l says

    FATAL ERROR: Bad primary partition 3: Partition ends before sector 0



    I don't know what to do. Can I just format the swap partition with gparted without losing the current linux installation? (well, if this is the solution, of course)




    The output of fdisk -l, as it will probably be asked:

    Code:
    Disk /dev/hda: 40.0 GB, 40020664320 bytes
    16 heads, 63 sectors/track, 77545 cylinders
    Units = cylinders of 1008 * 512 = 516096 bytes
    
       Device Boot      Start         End      Blocks   Id  System
    /dev/hda1               1        9690     4883728+  93  Amoeba
    Partition 1 does not end on cylinder boundary.
    /dev/hda2           74556       77536     1502077+  15  Unknown
    Partition 2 does not end on cylinder boundary.
    /dev/hda3            9691       74556    32692275   93  Amoeba
    Partition 3 does not end on cylinder boundary.
    /dev/hda4               1           1           0   10  OPUS
    Partition 4 does not end on cylinder boundary.
    
    Partition table entries are not in disk order




    hda1 - linux instalation

    hda2 AND hda4 - linux swap (for some reason (actually, more likely without any reason besides newbieness) I had the swap partition inside a FAT32 of the same size

    hda3 - /home


    Gparted does not see that there are two partitions (hda2 and hda4 are seen as one, unreconized format)






    A short summary of what lead possibly to that, perhaps someone with more expertise can spot something that is important, but it could have nothing to do with it:

    I had windows installed, but it was "seeing" the linux partitons, which I find particularly scary, since it does not recognize the format and asks if we want to format them.

    I've learnt that I should use the comand "hide" on the GRUB's menu.lst, but I don't quite know the syntax, so it may have started there. I've just set insert a "hide" command line referring to the whole linux HD, and went to test. It did work once, but when I rebooted the error 17 started.

    I tried many possible alternative syntaxes, combining "hide" commands for the windows option with "unhide" for linux, as I thought it may be needed to "undo" the hide of the previous boot. After many attempts, I decided to just reinstall GRUB, and then I noticed the problem with the swap partition.

  2. #2
    Administrator MikeTbob's Avatar
    Join Date
    Apr 2006
    Location
    Texas
    Posts
    7,864
    You could just Fire up Knoppix, Delete the offending partitions and create a new Swap, then edit /etc/fstab accordingly.
    Why are your partitions listed as Amoeba and OPUS?
    Last edited by MikeTbob; 03-29-2008 at 02:54 AM. Reason: Grammar!
    I do not respond to private messages asking for Linux help, Please keep it on the forums only.
    All new users please read this.** Forum FAQS. ** Adopt an unanswered post.

    I'd rather be lost at the lake than found at home.

  3. #3
    Linux Newbie
    Join Date
    Apr 2007
    Posts
    214
    Quote Originally Posted by MikeTbob View Post
    You could just Fire up Knoppix, Delete the offending partitions and create a new Swap, then edit /etc/fstab accordingly.
    Thanks. I'm gonna do that then. I was worried that somehow the current instalation would require the current swap for some reason.



    Why are your partitions listed as Amoeba and OPUS?
    I have no idea.... I thought it was supposed to be that way... gparted recognizes hda1 and hda3 as ext3, anyway...

  4. #4
    Linux Newbie
    Join Date
    Apr 2007
    Posts
    214
    Is it normal that partitions don't "end on cylinder boundary"? It does not sound like anything good.

  5. #5
    Administrator MikeTbob's Avatar
    Join Date
    Apr 2006
    Location
    Texas
    Posts
    7,864
    Is it normal that partitions don't "end on cylinder boundary"? It does not sound like anything good.
    I don't know if it's normal or not, but I doubt that it's the cause of your problem, I have seen it before with no apparent effects.
    I do not respond to private messages asking for Linux help, Please keep it on the forums only.
    All new users please read this.** Forum FAQS. ** Adopt an unanswered post.

    I'd rather be lost at the lake than found at home.

  6. #6
    Linux Newbie
    Join Date
    Apr 2007
    Posts
    214
    I've formatted the swap. Now I have a normal partition, not an "envelope" partition with another.

    I've edited the fstab, but I still have "error 17" on grub, either on actual boot and when running grub and entering the command "root (hd0,0)" and/or "root (hd0)".

    I think that this partition may be slightly damaged then.

    Perhaps that would explain why it's being recognized as "amoeba" and the other one was "opus" (by the way, this topic is already the first result in google for these words, what an honor).

    Would fsck.ext3 -f be reasonably safe? Or maybe I'm again missing the real point?

  7. #7
    Linux Newbie
    Join Date
    Apr 2007
    Posts
    214
    Well... after searching a bit I didn't found nothing much scary about the command, but it didn't solved anyway, if the problem is this misrecognition (if that is really a word) of the partition type...

    I'm reading in some places about cfisk.... I know that I can theoretically go and actually tell it to write in the partition table the correct partition type.... I thought it would format as well... but apparently it's a separate process...

    [Type]With this option you can MARK any partition as a certain format type. THIS DOES NOT FORMAT THE PARTITION!! That is a seperate process to be completed later AFTER writing your partition table AND confirming the re-read of your partition table which may involve a reboot.
    from [knoppix.net]Partitioning and cfdisk how-to and how to ungoof your MBR

    ... I'll read a bit more about it in more places before doing anything, anyway... the messages on cfdisk are so scary that it may even give me some nightmares... I'll wake up screaming "nooo! Don't format it! Don't!", soaked in my own sweat...

  8. #8
    Super Moderator devils casper's Avatar
    Join Date
    Jun 2006
    Location
    Chandigarh, India
    Posts
    24,729
    I would suggest you to try GParted or PartedMagic LiveCD for managing partitions.
    Is it normal that partitions don't "end on cylinder boundary"? It does not sound like anything good.
    Yeah, its normal.
    It is amazing what you can accomplish if you do not care who gets the credit.
    New Users: Read This First

  9. #9
    Linux Newbie
    Join Date
    Apr 2007
    Posts
    214
    The problem is that gparted at least does not have the function I suspect I need... as it recognizes the partiton correctly already. With cfdisk I think maybe I can rewrite just the partition table without formatting, so it would be recognized by GRUB as ext3 again.... I think I'll try only with the system partition, as the /home isn't required to be acessed by GRUB. If anything happens, I'll have to reinstall anyway, but the /home will probably be safe all the time. Compiling the kernel isn't so much of a trouble anyway.

  10. #10
    Linux Newbie
    Join Date
    Apr 2007
    Posts
    214
    Great. Cfdisk does not the have "ext3" option. :/

Page 1 of 2 1 2 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •