Problem resizing ext3 partition

Discussion in 'HOWTO-Related Questions' started by iZm, Jun 11, 2007.

  1. iZm

    iZm New Member

    I was trying to expand my ext3 partition and I followed the howto . Everything was going well until I had to reboot in order to resize the filesystem. When typing
    $ e2fsck -f /dev/sda2
    the output is not the expected:
    ----------------
    e2fsck 1.40-WIP (14-Nov-2006)
    Couldn't find ext2 superblock, trying backup blocks...

    e2fsck: Bad magic number in super-block while trying to open /dev/sda2

    The superblock could not be read or does not describe a correct ext2 filesystem. If the device is valid and it really contains an ext2 filesystem (and not swap or ufs or something else), then the superblock is corrupt, and you might try running e2fsck with an alternate superblock:
    e2fsck -b 8193 <device>
    ----------------

    any suggestions?they'll be much appreciated...
    Thanks
     
  2. iZm

    iZm New Member

    ok, i'm kind of desperate here...
    I'm using knoppix to expand the ext3 partition..
    i ran fsck on sda2 (the partition i want to expand), and removed the journal to change its type to ext2..
    Then, i used fdisk to delete the partition and to create a new one, specifying the first and last cylinder, so it would enclose the free space i had behind the partition and the partition itself.I finally wrote the partition table on disk (using w) and quit fdisk. So far, so good... Here's when the problems started. I rebooted and went back on Knoppix.then I tried to run e2fsck /dev/sda2 and the output was the error posted above.
    anyway, here it is:
    So now i can't resize the filesystem, can't undo what i've changed in the partition table, and obviously can't boot with ubuntu nor windows because grub won't work (gives error 17).

    Is there any hope for me?
    Please help
    Thanks
     
  3. falko

    falko Super Moderator Howtoforge Staff

  4. igster

    igster New Member

    I have the same problem after following your howto to the letter.

    Has it worked for other people and I'm just unlucky?

    I feel stupid having trusted it and deleting my partition. There's no way to recover it at this point?
     
  5. igster

    igster New Member

    Just in case anyone else has experiences the same problem I did...

    I was able to recover my partition table with TestDisk. I still haven't found a way to resize my partition but at least I got my data back. :)
     
  6. iZm

    iZm New Member

    your hope is testdisk, it didn't quite work for me but it is a very powerful tool and it as worked for others :rolleyes:


    [edit] sorry, didn't see your second post lol :) (replied automatically from the notification mail link) anyways, i'm glad it worked!
     
  7. igster

    igster New Member

    FYI - I was able to resize my ext3 partition with the GParted LiveCD. It took about 5 hours to grow it from 50 GB to 120 GB.
     

Share This Page