Welcome to the most active Linux Forum on the web.
Go Back > Forums > Linux Forums > Linux - Software
User Name
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.


  Search this Thread
Old 03-07-2008, 03:22 AM   #1
Registered: Mar 2004
Location: Antwerp, Belgium
Distribution: Gentoo
Posts: 65

Rep: Reputation: 15
ext2 partition screwed up after windows install

I just installed windows on a laptop that already had ubuntu running. Here's what I did:
convert ext3 partition to ext2 and resize it so I have 10Gb left for windows. After I did this I tried booting ubuntu, which only worked after a fsck -y on the root partition. At this point I can boot ubuntu and all my files are still present.
Then I boot from windows install cd and install windows in the free space. Windows installs and the computer boots in windows. As expected, grub is nowhere to be found, so I can't boot ubuntu at this point.
Now I boot with an ubuntu livecd, I go into the shell and do sudo grub, where I set "root (hd0,0)". When I try to reboot I get grub, but ubuntu can't mount its root partition, so I boot knoppix again to find the error.

Here's what I found:
fsck /dev/hda1
Group descriptors look bad... trying backup blocks... 
fsck.ext2: Bad magic number in super-block while trying to open /dev/hda1
fsck -b 32768 /dev/hda1
same error. I also tried all the other superblocks... all the same error.

dmesg |tail:
EXT2-fs error (device hda1): ext2_check_descriptors: Inode bitmap for group 384 not in group (block 2147483647)!
EXT2-fs: group descriptors corrupted!
I then made a copy of the partition to an external disk (with dd_rescue), and I tried
mke2fs -S /dev/hda1
fsck -y /dev/hda1
This made the partition mountable again, but the directory structure is gone. All the files seemed to be present in "lost and found" in numbered directories, but the filenames were all wrong, so it's not very useful.
I then put back the backed up partition and did some more searching around the internet, but without good effect.

Any filesystem experts around who know what might have happened to my partition, and what I can do about it?
Old 03-07-2008, 12:03 PM   #2
Registered: Jan 2003
Location: EU (UK)
Distribution: Ubuntu 14.x, Raspbian, Kali
Posts: 226

Rep: Reputation: 30
I'm not an expert here (so just throwin' up thoughts until the cavalry arrives) but I have had a smiliar experience with an old RH box.

Could the windows installation be somewhat of a coincidence and you have experienced a drive failure? Losing all the super-blocks (which happened to me) is unusual.

I'm sure that you know that using mke2fs will recreate your filestructure and move anything that it can't allocate to the lost and found folders.

Have you tried using Helix to look at your drive? If you have never used it, it is a suite of forensic tools on a bootable Knoppix based disk that has saved me on a myriad of occasions.

Good luck!
Old 03-08-2008, 09:12 AM   #3
Registered: Jan 2004
Posts: 307

Rep: Reputation: 33
After you converted ext3 to ext2 to resize it, did you convert it back to ext3 again? Ext2 is not a very reliable filesystem...I have had experiences where it could not cope with something as simple as partition 100% full.

Fsck reports it is "trying" backup blocks. You could try them manually...."mke2fs -n /dev/hda1" will report where the backup blocks are located.
Old 03-08-2008, 11:08 AM   #4
Senior Member
Registered: Sep 2003
Posts: 3,171

Rep: Reputation: 116Reputation: 116
what is the output of fdisk -l ?


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: Mount an ext2 or ext3 partition in Windows LXer Syndicated Linux News 0 03-28-2007 07:46 AM
windows and linux sharing an ext2/3 partition Marc L. Linux - Software 5 12-05-2005 09:44 AM
Ubuntu screwed up my second Windows (/dev/hda5 HPFS/NTFS) partition howyen Ubuntu 5 04-12-2005 12:11 PM
program for viewing ext2 partition on windows tintilin Linux - Software 1 12-05-2004 07:09 AM
ext2 partition screwed? LGBR Linux - General 4 08-03-2003 08:27 PM > Forums > Linux Forums > Linux - Software

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

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration