LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
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.

Notices

Reply
 
Search this Thread
Old 06-11-2007, 12:38 PM   #1
iZmu
LQ Newbie
 
Registered: Jun 2007
Location: Portugal
Distribution: Ubuntu 7.04 Feisty Fawn, Gentoo
Posts: 5

Rep: Reputation: 0
expanding an ext3 partition using knoppix


ok, i'm kind of desperate here...
I'm using knoppix to expand my 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 quoted below.

Quote:
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>
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
 
Old 06-11-2007, 12:49 PM   #2
Emerson
Senior Member
 
Registered: Nov 2004
Location: Saint Amant, Acadiana
Distribution: Gentoo ~
Posts: 3,177

Rep: Reputation: Disabled
Welcome to LQ!

Your hope is testdisk.
It should be on Knoppix CD. Next time use parted to manipulate partitions.
 
Old 06-11-2007, 01:05 PM   #3
iZmu
LQ Newbie
 
Registered: Jun 2007
Location: Portugal
Distribution: Ubuntu 7.04 Feisty Fawn, Gentoo
Posts: 5

Original Poster
Rep: Reputation: 0
Thanks for the quick reply
I did try to use parted, but while reading about it, it came to my understanding that it wasn't able to resize ext3 type partitions. Maybe i got it wrong...
Well, i'll try testdisk right away.
I'll post the results briefly.

iZmu
 
Old 06-11-2007, 02:27 PM   #4
iZmu
LQ Newbie
 
Registered: Jun 2007
Location: Portugal
Distribution: Ubuntu 7.04 Feisty Fawn, Gentoo
Posts: 5

Original Poster
Rep: Reputation: 0
Well, life sucks right now.
I ran testdisk on knoppix and found the first problem:
Code:
sh-3.1# testdisk
testdisk: error while loading shared libraries: libntfs.so.9: cannot open shared object file: No such file or directory
This one turned out to be quite easily solved, by executing
Code:
ln -s /usr/lib/libntfs.so.10.0.0 /usr/lib/libntfs.so.9
It's a library problem on the knoppix 5.1 cd.
After correcting that it ran fine. Under the 'Advanced Filesystem Utils' there it was. The answer to all my prayers, 'Advanced Find EXT2 EXT3 Backup SuperBlock'. I executed it and a wonderful scan started. In the end, it didn't find anything. As I said, life sucks. Is there any other util that I may use to find the damned backup superblock?
Thanks

[edit]here's a screenshot, that's what i get at the end of the scan.

Last edited by iZmu; 06-11-2007 at 02:47 PM.
 
Old 06-11-2007, 02:34 PM   #5
Emerson
Senior Member
 
Registered: Nov 2004
Location: Saint Amant, Acadiana
Distribution: Gentoo ~
Posts: 3,177

Rep: Reputation: Disabled
Hmm... You may want to restore your partition table (=previous partitions) before starting fiddling with filesystem. Try that testdisk again.
 
Old 06-11-2007, 04:05 PM   #6
iZmu
LQ Newbie
 
Registered: Jun 2007
Location: Portugal
Distribution: Ubuntu 7.04 Feisty Fawn, Gentoo
Posts: 5

Original Poster
Rep: Reputation: 0
I was hoping I didn't have to ask this, but could you be a little more specific? I've been playing around with the menus and I can't seem to find any option to restore my partition table. On the contrary, through the scans I've been doing I get the most impressive and weird partition tables
 
Old 06-11-2007, 04:35 PM   #7
Emerson
Senior Member
 
Registered: Nov 2004
Location: Saint Amant, Acadiana
Distribution: Gentoo ~
Posts: 3,177

Rep: Reputation: Disabled
Well, the testdisk is not a program one uses on daily basis. I do not remember! All I remember the write function was hard to find, not intuitive at all. Try man pages and testdisk web site, come back if totally stuck, I'll try to boot Knoppix myself then.
Do you have any important data on that disk you haven't backed up? If yes then you may want to take an image of that disk with dd and store it in a safe place.
 
Old 06-11-2007, 04:39 PM   #8
lambchops468
Member
 
Registered: Mar 2007
Location: New Jersey, USA
Distribution: Archlinux
Posts: 165

Rep: Reputation: 30
Tip

Knoppix's Gparted/parted is horribly outdated

it can't do many things

For all my hard drive-whatever related problems, I use system rescue CD (it's a live linux CD, and it can resize ext3 using gparted.(i think)).

So, you could try that at www.sysresccd.org

or you can get the gparted live cd (which i have never used, no garuntees from me, but i would assume it has every feature the latest version has).
 
Old 06-12-2007, 06:34 AM   #9
iZmu
LQ Newbie
 
Registered: Jun 2007
Location: Portugal
Distribution: Ubuntu 7.04 Feisty Fawn, Gentoo
Posts: 5

Original Poster
Rep: Reputation: 0
Hi guys, what an odyssey i spent all night around my partitions and, long story short, it didn't worked. I mean, something must have worked, I managed to restore the partition table to its original form, kind of, because by doing that my vista partition disappeared...

Like I said, I managed to restore the partition table (found the write function) without the windows partition, wihich turned into unallocated space. Finally 'testdisk' gave me some superblocks, 10 to be more precise. So I ran
Code:
/sbinfsck.ext3 -b superblock -B blocksize /dev/sda1
I was then finally able to execute e2fsck...but guess what, now there's a new problem I can't boot into Ubuntu because when I turn the pc on the (in)famous Grub's error 17 comes up... My patience is not what it used to be, and I think the only real solution will be to start partitioning from scratch. But hey, please prove me wrong

Thanks
 
  


Reply

Tags
cd, code, denied, error, expand, ext3, knoppix, ln, partition, permission, same, statement, sub, superblock, tried


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
expanding root partition... DaVenom Linux - General 4 09-11-2005 01:19 AM
Expanding an NTFS partition nonoitall Linux - Newbie 3 05-20-2005 03:58 PM
Expanding root partition? biniar Linux - Newbie 1 04-07-2004 01:59 PM
Expanding a partition echid Linux - General 1 08-12-2002 10:21 AM
need help expanding a partition linuxmaster Linux - General 2 12-01-2001 03:25 PM


All times are GMT -5. The time now is 01:26 AM.

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