LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
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 08-14-2004, 01:20 AM   #1
wolfbeast2
LQ Newbie
 
Registered: Aug 2004
Posts: 11

Rep: Reputation: 0
HELP resized partition and lost all data


I was resizing a fat32 storage partition on my laptop. I resized using YAST2 in Suse. Originally it was ~39GB and I resized it to ~37GB to make more space for the linux parition. However, after the resize, I could not add the extra space to the linux partition. What is worse is that I could not longer mount the drive. Also, when I boot into windows, it is no longer recognized as a formatted drive.

Most of my important data is on this partition and I need to get it back. How can I recover the data? YAST2 will not let me resize the partition back to its original size. When I try to use parted, it says the partition table is incorrect. How do I fix this?

Please help!

Thanks in advance!

Neil
 
Old 08-14-2004, 01:23 AM   #2
ToniT
Senior Member
 
Registered: Oct 2003
Location: Zurich, Switzerland
Distribution: Debian/unstable
Posts: 1,357

Rep: Reputation: 47
gpart and sfdisk are your first level friends. If those don't help, use lde. Remember to take backups from every bit you overwrite when you do your recovering attemps. This way you can't make the situation worse.
 
Old 08-14-2004, 01:25 AM   #3
wolfbeast2
LQ Newbie
 
Registered: Aug 2004
Posts: 11

Original Poster
Rep: Reputation: 0
Here is my /etc/fstab

/dev/hda6 / reiserfs acl,user_xattr 1 1
/dev/hda1 /windows/C ntfs ro,users,gid=users,umask=0002,nls=utf8 0 0
/dev/hda3 swap swap pri=42 0 0
devpts /dev/pts devpts mode=0620,gid=5 0 0
proc /proc proc defaults 0 0
usbfs /proc/bus/usb usbfs noauto 0 0
sysfs /sys sysfs noauto 0 0
/dev/cdrecorder /media/cdrecorder subfs fs=cdfss,ro,procuid,nosuid,nodev,exec,iocharset=utf8 0 0
 
Old 08-14-2004, 01:26 AM   #4
wolfbeast2
LQ Newbie
 
Registered: Aug 2004
Posts: 11

Original Poster
Rep: Reputation: 0
fdisk -l

Disk /dev/hda: 60.0 GB, 60011642880 bytes
16 heads, 63 sectors/track, 116280 cylinders
Units = cylinders of 1008 * 512 = 516096 bytes

Device Boot Start End Blocks Id System
/dev/hda1 * 1 20321 10241406 7 HPFS/NTFS
/dev/hda2 20321 116265 48355650 f W95 Ext'd (LBA)
/dev/hda3 116266 116280 7560 82 Linux swap
/dev/hda5 20322 99147 39728304 c W95 FAT32 (LBA)
/dev/hda6 * 101587 116150 7340224+ 83 Linux
 
Old 08-14-2004, 01:39 AM   #5
ToniT
Senior Member
 
Registered: Oct 2003
Location: Zurich, Switzerland
Distribution: Debian/unstable
Posts: 1,357

Rep: Reputation: 47
Oh, and I would recommend turning into local linux/filesystems guru from the neibourhood to get him/her to help you. If there is none available, I might be willing to help with the issue.

If your job/ass/life/over a monts work is dependant on those files, it might be better to use some professionals to do the job.
 
Old 08-14-2004, 01:39 AM   #6
wolfbeast2
LQ Newbie
 
Registered: Aug 2004
Posts: 11

Original Poster
Rep: Reputation: 0
Gpart output


Begin scan...
Possible partition(Windows NT/W2K FS), size(10001mb), offset(0mb)
Possible partition(DOS FAT), size(39997mb), offset(10001mb)
Possible partition(Linux swap), size(7mb), offset(57224mb)
End scan.

Checking partitions...
Partition(OS/2 HPFS, NTFS, QNX or Advanced UNIX): primary
Partition(DOS or Windows 95 with 32 bit FAT): primary
Partition(Linux swap or Solaris/x86): primary
Ok.

Guessed primary partition table:
Primary partition(1)
type: 007(0x07)(OS/2 HPFS, NTFS, QNX or Advanced UNIX)
size: 10001mb #s(20482808) s(63-20482870)
chs: (0/1/1)-(1023/15/63)d (0/1/1)-(20320/4/59)r

Primary partition(2)
type: 011(0x0B)(DOS or Windows 95 with 32 bit FAT)
size: 39997mb #s(81915372) s(20482938-102398309)
chs: (1023/15/63)-(1023/15/63)d (20320/6/1)-(101585/9/63)r

Primary partition(3)
type: 130(0x82)(Linux swap or Solaris/x86)
size: 7mb #s(15120) s(117195120-117210239)
chs: (1023/15/63)-(1023/15/63)d (116265/0/1)-(116279/15/63)r

Primary partition(4)
type: 000(0x00)(unused)
size: 0mb #s(0) s(0-0)
chs: (0/0/0)-(0/0/0)d (0/0/0)-(0/0/0)r
 
Old 08-14-2004, 01:41 AM   #7
wolfbeast2
LQ Newbie
 
Registered: Aug 2004
Posts: 11

Original Poster
Rep: Reputation: 0
parted gives me this output;

Warning: Unable to align partition properly. This probably means that another
partitioning tool generated an incorrect partition table, because it didn't have
the correct BIOS geometry. It is safe to ignore,but ignoring may cause
(fixable) problems with some boot loaders.
 
Old 08-14-2004, 01:43 AM   #8
wolfbeast2
LQ Newbie
 
Registered: Aug 2004
Posts: 11

Original Poster
Rep: Reputation: 0
If I fix the partition table back to what it was before the resize, will the original partition be intact?
 
Old 08-14-2004, 01:43 AM   #9
wolfbeast2
LQ Newbie
 
Registered: Aug 2004
Posts: 11

Original Poster
Rep: Reputation: 0
btw... dont know any linux gurus around here
 
Old 08-14-2004, 01:45 AM   #10
ToniT
Senior Member
 
Registered: Oct 2003
Location: Zurich, Switzerland
Distribution: Debian/unstable
Posts: 1,357

Rep: Reputation: 47
Hmm.. the partition table looks quite sane. Is it this hda5, that is not working?
I see no mount directives in fstab for it.
 
Old 08-14-2004, 01:59 AM   #11
wolfbeast2
LQ Newbie
 
Registered: Aug 2004
Posts: 11

Original Poster
Rep: Reputation: 0
yes hda5 is the one i tried to resize. The Gpart output shows the correct size (39997mb). However, now the partition goes from cylinder 20322 to 99147. If i resize it back to the original size of 20322-101586 will that cause any problems? Also, how do i do that?

Thanks for all your help
 
Old 08-14-2004, 02:01 AM   #12
wolfbeast2
LQ Newbie
 
Registered: Aug 2004
Posts: 11

Original Poster
Rep: Reputation: 0
also hda5 is not in /etc/fstab because i umounted before resizing. I dont remember exactly how it was mounted. It was a fat32 drive. I tried remounting the resized drive but I cant remember the type and i get an error
 
Old 08-14-2004, 02:04 AM   #13
ToniT
Senior Member
 
Registered: Oct 2003
Location: Zurich, Switzerland
Distribution: Debian/unstable
Posts: 1,357

Rep: Reputation: 47
I don't think that helps. If there is a problem accessing some files or directories, that might help, but a mounting problem sounds more like the starting offset is out of track. Could you give the output of "fdisk -l -u /dev/hda"?


PS. I sent you email about how contacting me in realtime, so we could have more dynamic conversation.

Last edited by ToniT; 08-14-2004 at 02:07 AM.
 
Old 08-14-2004, 02:20 AM   #14
wolfbeast2
LQ Newbie
 
Registered: Aug 2004
Posts: 11

Original Poster
Rep: Reputation: 0
fdisk -l -u /dev/hda

Disk /dev/hda: 60.0 GB, 60011642880 bytes
16 heads, 63 sectors/track, 116280 cylinders, total 117210240 sectors
Units = sectors of 1 * 512 = 512 bytes

Device Boot Start End Blocks Id System
/dev/hda1 * 63 20482874 10241406 7 HPFS/NTFS
/dev/hda2 20482875 117194174 48355650 f W95 Ext'd (LBA)
/dev/hda3 117195120 117210239 7560 82 Linux swap
/dev/hda5 20483568 99940175 39728304 c W95 FAT32 (LBA)
/dev/hda6 * 102398751 117079199 7340224+ 83 Linux
 
Old 08-14-2004, 11:11 AM   #15
ToniT
Senior Member
 
Registered: Oct 2003
Location: Zurich, Switzerland
Distribution: Debian/unstable
Posts: 1,357

Rep: Reputation: 47
Issue resolved.
 
  


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
help! lost data... mount and new partition puhdy2005 Linux - General 3 11-07-2005 03:28 AM
Recovery of lost data from FAT32 partition... devis Linux - Software 1 07-11-2005 08:10 AM
Data lost on other partition sonicspeedway Linux - Newbie 2 05-01-2004 02:49 PM
disk druid refuses to acknowlege my resized partition overhols Red Hat 7 02-17-2004 07:17 AM
Partition formatted, mount points, data lost eneko Linux - Newbie 7 11-16-2003 08:46 PM


All times are GMT -5. The time now is 09:39 PM.

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