LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices


Reply
  Search this Thread
Old 03-09-2006, 02:12 AM   #1
PsypherPunk
Member
 
Registered: Jul 2005
Posts: 109

Rep: Reputation: 15
Partitions have disappeared!


i woke up this morning to find that all the logical partitions on my second hard drive have vanished! fdisk -l for this drive now turns up:

Code:
Disk /dev/hdb: 163.9 GB, 163928604672 bytes
255 heads, 63 sectors/track, 19929 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/hdb1               1        2611    20972826   93  Amoeba
/dev/hdb2            2612        7833    41945715   93  Amoeba
/dev/hdb3            7834       19928    97153087+  1f  Unknown
/dev/hdb4           19929       19929        8032+   e  W95 FAT16 (LBA)
However, prior to shutting down last night hdb4 didn't exist and hdb3 was an extended partition containing hdb5-9 (and several distros!). Thankfully there was nothing particularly important on any of the partitions but what's happened!?

Is there any way to recover the data?
 
Old 03-09-2006, 03:23 AM   #2
J.W.
LQ Veteran
 
Registered: Mar 2003
Location: Boise, ID
Distribution: Mint
Posts: 6,642

Rep: Reputation: 87
Can you describe what kind of work was being done on the machine immeidately prior to this morning? Were you making any system changes and/or installing a new distro and/or doing partitioning work last night? Does anyone else use this same machine, and could he/she have made some changes? Overall, it seems fairly unlikely that some sort of random system problem would happen to target one specific partition and mess with it. Similarly, if it's a hardware issue such as a dying drive, you'd probably be seeing a lot more other random misbehavior such as unusual clicking noises, etc.

Anyway from your description, it sounds like the issue could have been the result of installing a new distro, and letting an automatic partitioner tool decide how to partition the drive. For machines that already contain other Linux installations, that's always a risky move, and I would recommend only choosing the Manual partitioning option in that scenario. (Obviously this is just speculation on my part.)

In terms of recovering the data, as long as hdb3 has not been reformatted, you could try using a tool such as cfdisk to repartition the space but in my experience the success of such an attempt will depend on recreating the *exact* same partitioning layout as you had before (meaning each re-created partition must use the same starting and ending cylinder number as before) If you redefine each partition just as it was in the past, you have a pretty decent chance of making a recovery. Good luck with it in any case
 
Old 03-09-2006, 03:34 AM   #3
PsypherPunk
Member
 
Registered: Jul 2005
Posts: 109

Original Poster
Rep: Reputation: 15
i *did* install Windows 98 on a partition (hda2) earlier yesterday. However, the machine had been rebooted several times after this (including a complete power-down) and i was working in SuSE (email, surfing) before it was shut down for the last time.

Grub was directed at the SuSE 10 partition on hdb6 and was booting normally all evening; only when i came to boot this morning Grub reports an 'Error 22' due to the missing partition.

Last edited by PsypherPunk; 03-09-2006 at 03:36 AM.
 
Old 03-09-2006, 04:54 AM   #4
PsypherPunk
Member
 
Registered: Jul 2005
Posts: 109

Original Poster
Rep: Reputation: 15
i've just spotted something - hdb3 (which was supposed to be an Extended partition in which the other Logical partitions existed) is showing as type '1f' whereas it should be type '5', shouldn't it?

If anyone could confirm this, that'd be great. Or suggest any way to change the type without formatting.
 
Old 03-09-2006, 05:12 AM   #5
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,133

Rep: Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121
Hmmmm - Suse 10.
You sure you weren't in it's partitioner at any time ????.

All those partition type are invalid - at least they would be in any sane installation.
 
Old 03-09-2006, 05:26 AM   #6
PsypherPunk
Member
 
Registered: Jul 2005
Posts: 109

Original Poster
Rep: Reputation: 15
Nope, definitely no partitioning yesterday. In fact the only alteration i made all day was to change hda1 from NTFS to FAT32.

Both hdb1 and hdb2 mount correctly though (they're both reiserfs at /home and /usr/local/games respectively) so i don't think any data have been altered.

Is it possible to amend the types without losing the data?
 
Old 03-09-2006, 05:39 AM   #7
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,133

Rep: Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121
Changing type is a doddle so long as the partitions align correctly - just use {c}fdisk.
While you're at it, take the hidden flag off hdb3 - change it from x'1f' to x'f'.
You just might get lucky and find all your logical partitions magically reappear.

Me, I'd be exercising a backup strategy. Soon, and often.

God knows what hdb4 is - I'd pretend it doesn't exist for now. But leave it there until your second backup completes ...

Last edited by syg00; 03-09-2006 at 05:40 AM.
 
Old 03-09-2006, 05:52 AM   #8
PsypherPunk
Member
 
Registered: Jul 2005
Posts: 109

Original Poster
Rep: Reputation: 15
Cheers. All the logical partitions are just different distros to play with so no worries there. /home gets backed up often (or my girlfriend would kill me), the games are no biggie.

Off to cfdisk, i go...
 
Old 03-10-2006, 03:35 AM   #9
PsypherPunk
Member
 
Registered: Jul 2005
Posts: 109

Original Poster
Rep: Reputation: 15
Okay, it did it again.

i couldn't change the ID via cfdisk ("cannot change a partition into and extended partition"); i just deleted the awry extended partition and added back in the other drives on hdb - this time they've stayed put and all's well.

This time it's happened to hda and my main OS is now offline. Exactly the same thing - the extended partition now ID's itself as 1F and subsequently hides the logical partitions therein.

Thankfully i've still got everything backed up. Unless anyone knows a cunning way of altering that ID or fixing this i guess i'll just have to delete the partition.
 
Old 03-10-2006, 03:39 PM   #10
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,133

Rep: Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121
Just delete if and redefine it starting at the same sector (cylinder these days) and the same size. This is one of the times I prefer fdisk over cfdisk.
Deletion of the part entry doesn't affect the data, although extended partitions can get a lot messier as the definitions for any logicals are imbedded in the space itself rather than the partition table.
Just make sure the type is extended.
 
Old 03-10-2006, 03:43 PM   #11
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,133

Rep: Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121
Presuming you don't run as root on Linux, I'd be looking to (virus) scan that Windows system.
Pronto.
 
  


Reply



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
/etc disappeared Fonk Linux - Software 7 11-18-2008 05:34 PM
/proc/partitions showing wrong partitions netstv Linux - General 1 07-10-2006 01:11 PM
partitions disappeared sycamorex Linux - Newbie 22 02-11-2006 09:07 AM
Linux Partitions Disappeared!!! Chomper Linux - General 6 03-22-2005 04:25 PM
ipchains Disappeared? Ju Deddo Koinu Linux - Networking 7 08-19-2003 11:36 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware

All times are GMT -5. The time now is 09:34 AM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration