LinuxQuestions.org
Visit the LQ Articles and Editorials section
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices

Reply
 
Search this Thread
Old 04-17-2008, 01:12 PM   #1
Mark_in_Hollywood
Member
 
Registered: Jan 2006
Location: USA
Distribution: Ubuntu - Precise Pangolin
Posts: 121

Rep: Reputation: 15
Using testdisk to recover a partition


I wanted to make a separate partition for /home.

I fired up GParted LiveCd and tried to make a new partition by shrinking the existing /dev/sda1 and creating another sdaX-numbered partition.

After 20 minutes I thought GParted got stuck or something bad. I cancelled the operation (oooooooooppppppppssssssss)

Now I can't get the OS (Gutsy Gibbon ver. 7.10) to run.

This is kernel 2.6.22-14. Power up shows I get past Grub, past: starting up and into the Ubuntu splash where the progress bar get to about 25% completed, and the splash is replaced by ascii text and due to

errors /dev/sda1, boot (both normal and recovery) call fsck, which runs and runs and then dies, the last message being about multiple-blocks trying to access inode number: xxxxxxxxxxxxxxx

the keyboard locks, until I so: SysReq REISUB, which causes a safe shutdown.

ubuntu@ubuntu:/home$ sudo fdisk -l

Disk /dev/sda: 320.0 GB, 320072933376 bytes
255 heads, 63 sectors/track, 38913 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x00000080

Device Boot Start End Blocks Id System
/dev/sda1 * 1 38536 309540388+ 83 Linux
/dev/sda2 38537 38913 3028252+ 5 Extended
/dev/sda5 38537 38913 3028221 82 Linux swap / Solaris

Anybody have some experience as to how to fix this?

Last edited by Mark_in_Hollywood; 04-17-2008 at 01:12 PM. Reason: added info
 
Old 04-17-2008, 01:28 PM   #2
jailbait
Guru
 
Registered: Feb 2003
Location: Blue Ridge Mountain
Distribution: Debian Wheezy, Debian Jessie
Posts: 7,474

Rep: Reputation: 155Reputation: 155
Isn't this the same question that you asked yesterday?

http://www.linuxquestions.org/questi...1/#post3123361

-------------------
Steve Stites
 
Old 04-17-2008, 02:15 PM   #3
Mark_in_Hollywood
Member
 
Registered: Jan 2006
Location: USA
Distribution: Ubuntu - Precise Pangolin
Posts: 121

Original Poster
Rep: Reputation: 15
Yes, with the exception that I have the "testdisk" ready to go, I just don't know what to do.
 
Old 04-17-2008, 10:32 PM   #4
Junior Hacker
Senior Member
 
Registered: Jan 2005
Location: North America
Distribution: Debian testing Mandriva Ubuntu
Posts: 2,687

Rep: Reputation: 59
In a maximised shell from a live session using the Ubuntu CD, type sudo testdisk and hit enter. And see what comes up, play with it. You can also type man testdisk and hit enter to view the testdisk manual pages if you are still "iffy".
 
Old 04-18-2008, 12:14 AM   #5
jay73
Guru
 
Registered: Nov 2006
Location: Belgium
Distribution: Ubuntu 11.04, Debian testing
Posts: 5,019

Rep: Reputation: 130Reputation: 130
Launch testdisk (from a livecd, for example), choose intel partition, select your drive, let it scan for partitions. If it doesn't come up with what you were looking for, go for an advanced scan.
Now here is the crux: it is going to present you with all or most of the partitions that were ever carved out of that drive - it is up to you to find out which one you are looking for. If you know, take note of the start and the end of the partition in question. Those be seen here in the second and the third columns:

/dev/sdc1 1 1045 8393931 7 HPFS/NTFS
/dev/sdc2 * 1046 7571 52420095 bf Solaris
/dev/sdc3 7573 9595 16249747+ 83 Linux
/dev/sdc4 9596 60801 411312195 5 Extended
/dev/sdc5 9596 13250 29358756 7 HPFS/NTFS
/dev/sdc6 13251 19124 47182873+ 83 Linux
/dev/sdc7 19125 60801 334770471 83 Linux

Partition one in this example starts at 1 and ends at 1045.

You can restore the partition directly from testdisk although I have always just jotted the numbers down on a piece of paper and then used that info to restore through an fdisk from the terminal. If you prefer the latter option, bear in mind that testdisk counts differently from fdisk. Testdisk starts from 0, fdisk from 1 so you'll need to add 1 to the information reported by your scan.
Whatever you do, do not reformat!

Last edited by jay73; 04-18-2008 at 12:15 AM.
 
Old 04-18-2008, 05:11 AM   #6
marquardl
Member
 
Registered: Apr 2008
Posts: 100

Rep: Reputation: 15
new system on other HDD

This is going to be extremely difficult. If your data is important than you might need to get some pro support from some local Linux expert in a nearby computer shop.

I would rather install a new system on a new hard disk, and then recovering data from the re-partitioned drive by mounting the visible partitions. You can also create a copy of the disk with dd and parse it for file patterns, but that's going to take a lot of time and efforts. The data must be worth of it.

GWN

Last edited by marquardl; 05-01-2008 at 03:52 AM.
 
Old 04-18-2008, 07:54 PM   #7
Junior Hacker
Senior Member
 
Registered: Jan 2005
Location: North America
Distribution: Debian testing Mandriva Ubuntu
Posts: 2,687

Rep: Reputation: 59
Nice post jay73.
 
  


Reply


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
Using testdisk to recover deleted lvm2 partition sstendal Linux - General 2 04-02-2008 09:30 AM
testdisk can't fix my partition table :( dmedhora Linux - General 7 11-28-2007 03:02 AM
how to fix when testdisk cant recover ext2/ext3? frenchn00b Linux - Newbie 3 07-19-2007 04:46 PM
Recover Partition??? HELP!!!! villusion Linux - Hardware 7 10-11-2005 04:34 PM
testdisk stuff with adding a recovered reiserfs partition wini_g Linux - Software 2 11-07-2003 07:45 PM


All times are GMT -5. The time now is 07:59 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