| Technical Other Linux related questions that do not quite fit into the other forums. |

02-10-2003, 09:58 AM
|
|
Registered User
|
|
Join Date: Feb 2003
Posts: 18
|
|
|
recovering a partition table
*sigh* ok, here goes...
I had a single hard drive with Win98se installed on it, set up as one partition for the entire 40 GB disk. i installed Mandrake 9.0 on the drive, using DiskDrake to partition my drive so that it was set up with Windows as the first partition, then the Linux partitions (boot, root, home...i think) and then two partitions for data and storage. ok, other than a few probs getting Mandrake configured to suit me, everything went fine with the partitioning, formatting, and installation. Mandrake worked wonderfully for several weeks (which automatically kicks the @ss of windows), up until yesterday. when i started my computer, i went into windows, and noticed that the two partitions containing my data were no longer listed in Explorer's folder list. major suck. no clue how to recover from that. so i rebooted into Mandrake, but got the error during boot that the Linux system's root was not found, indicating that my filesystems and partitions had been mangled somehow. the only thing of ANY significance that occurred between the last successful boots of Mandrake and Windows was that, the night before the problems started, Win98se ran scandisk and defragmented the partition it was on (drive C  . did defragmenting corrupt my partition table? is there any way to recover those partitions and the data that was on them?
so far, i've tried using the Mandrake install CD to reload the boot manager, which didn't work. i also went back in to DiskDrake from the install to see how it recognized my partitions and, surprise surprise, it showed only my windows partition and a partition that represented all my other partitions, combined into one, and empty. talk about a slap in the face.
is there ANY way to recover that partition table and restore it so that my data isn't lost?
please help. this is urgent!
__________________
http://www.divstivs.plus.com/iconwar/
Last edited by krashtd; 02-12-2003 at 04:00 PM.
|

02-10-2003, 10:22 AM
|
 |
Moderator
|
|
Join Date: Oct 2002
Location: Republic of Texas
Posts: 5,837
|
|
|
I think you're hosed.
The only thing I can think of is if you know how many blocks were in each partition and what the layout was. You MIGHT be able to restore by repartitioning with Partition Magic (or similar.) I doubt that's the case, though.
Sorry.
|

02-10-2003, 10:26 AM
|
|
Wrong Labels Suck
|
|
Join Date: Jul 1999
Posts: 4,035
|
|
|
Good old Windows. It did that to me once.
I doubt that you wrote down the exact numbers you used in partitioning, did you? If you have those on hand, you can use the Linux fdisk and re-write the partition table as it was before Windows detected it, you can recover (as I did the second time Windows did it) and not loose it.
If you can recover, save what you want, use the Linux fdisk or cfdisk and make primary partitions for Linux use. Let Windows have the first primary partition on the master hard drive and it will be happy and not notice the primary partitions that Linux uses.
Occasionally Windows will detect the extended partitions and screw with them, so I recommend you only use extended partitions as Windows partitions.
If you need Linux extended partitions, run a Linux only box or know your partition tables and watch Windows' actions carefully and be ready to cancel anything it wants to do.
Last edited by fancypiper; 02-10-2003 at 10:29 AM.
|

02-10-2003, 10:52 AM
|
|
Registered User
|
|
Join Date: Feb 2003
Posts: 18
|
|
|
partitions
well, as far as the Linux partitions go, when i go into DiskDrake, and it brings up the disk partitioning window, if i go into 'Options' there is a command to recover partition table. I tried that, and it was able to show me how the Linux partitions were defined (ie where it started and stopped), but couldn't show me anything about the other two partitions that contained my data (they were FAT32 partitions while the Linux partitions were set up as ext3). there is a possibility that i wrote the numbers down for all the partitions, because i know that i DID write some of them down, but i'm not sure if they were the numbers i ended up using when all was said and done, and i don't even know if i held on to them.
also, i didn't know Linux could also be set up on a primary partition on the same drive as a Windows install that is also a primary partition. i thought Windows had to be the primary and Linux and all other partitions had to be extended partitions?
another question... if i DON'T have the actual numbers of the start and end block for the other partitions, would those partitions be destroyed if i guessed at the numbers? would it try to reformat them, or would they just become corrupted because of the invalid block numbers?
this sucks. everything went so smoothly during install.
__________________
http://www.divstivs.plus.com/iconwar/
|

02-10-2003, 11:03 AM
|
|
Wrong Labels Suck
|
|
Join Date: Jul 1999
Posts: 4,035
|
|
Quote:
|
also, i didn't know Linux could also be set up on a primary partition on the same drive as a Windows install that is also a primary partition. i thought Windows had to be the primary and Linux and all other partitions had to be extended partitions?
|
A disk can have up to 4 primary partitions or up to 3 primary and one extended which can have a bunch (I can't remember the limit off-hand) of logical partitions.
You can change the partition table as many times as you want without changing/losing data. It will be lost, however, if the partition is formatted.
If the partition table doesn't conform to where the actual data on the disk resides, however, you can't see the data.
|

02-10-2003, 11:08 AM
|
|
Wrong Labels Suck
|
|
Join Date: Jul 1999
Posts: 4,035
|
|
Quote:
|
another question... if i DON'T have the actual numbers of the start and end block for the other partitions, would those partitions be destroyed if i guessed at the numbers? would it try to reformat them, or would they just become corrupted because of the invalid block numbers?
|
If the partition table doesn't correspond to where the data is, Linux will assume it is a bad filesystem and Windows won't see it but may be able to detect some error and try to fix it.
As long as you don't tell Linux to mkfs, the partition won't be formatted but be ready to cancel anything Windows wants to do.
|

02-10-2003, 11:27 AM
|
|
Registered User
|
|
Join Date: Feb 2003
Posts: 18
|
|
|
thanks!
thank you VERY VERY much for your replies and your help. i was worried that i wouldn't get much of a response, especially after reading some of the other posts in this forum that go without reply.
don't know if it makes a difference or not, but here is now my hard drive was partitioned (not EXACT, as i'm not sitting at my desk at home to double check for 100% accuracy)
Windows98se - first partition, apx 12 GB FAT 32
Linux root - second partition, apx 3 GB ext3
Linux boot - 3rd partition, apx 250 MB ??
Linux home - 4th partition, apx 3 GB ext3
Data - 5th partition, apx 10 GB, FAT 32
Storage - 6th partition, apx 10 GB, FAT 32
Windows was set as the primary, and I think Linux was extended (pretty sure), with the other partitions being logical ones. if i can recover the partitions, i will change the Linux to primary as you suggested.
here's a question... since both of the two data partitions were FAT 32, if set the partition table to group the blocks that these two partitions contained as ONE partition, would the data still be inaccessible from Linux and Windows? i must admit that i'm at an utter loss for a solution to recovering my data. really doesn't help my frustration and desperation knowing that my family/friends consider me a computer guru. guess gurus are entitled to screw up too, though....right? right?!?
__________________
http://www.divstivs.plus.com/iconwar/
|

02-10-2003, 11:49 AM
|
|
Wrong Labels Suck
|
|
Join Date: Jul 1999
Posts: 4,035
|
|
You can tell your current partitioning scheme like this:
Code:
[phil@uilleann phil]$ su -
Password:
[root@uilleann root]# fdisk /dev/hda -l
Disk /dev/hda: 255 heads, 63 sectors, 4865 cylinders
Units = cylinders of 16065 * 512 bytes
Device Boot Start End Blocks Id System
/dev/hda1 * 1 1244 9988933+ c Win95 FAT32 (LBA)
/dev/hda2 1244 1881 5120167+ 83 Linux
/dev/hda3 1882 2519 5124735 83 Linux
/dev/hda4 2520 4865 18844245 5 Extended
/dev/hda5 2520 2532 104391 83 Linux
/dev/hda6 2533 2549 136521 82 Linux swap
/dev/hda7 2550 3187 5124703+ 83 Linux
/dev/hda8 3188 3825 5124703+ 83 Linux
/dev/hda9 3826 4463 5124703+ 83 Linux
/dev/hda10 4464 4865 3229033+ 83 Linux
[root@uilleann root]#
/dev/hda1 (possibly through /dev/hda3) will be primary partions. One partition will be an extended partition such as my /dev/hda4
The extend partition holds logical partitions, not filesystems. The logical partitions can hold filesystems. They will be shown as /dev/hda5 on up.
I don't know how Windows would react to your proposed situation, probably try to repair it automatically and screw it up as usual.
Code:
gurus are entitled to screw up too, though....right? right?!?
I thought they were expected to screw up.
|

02-11-2003, 09:38 AM
|
|
Registered User
|
|
Join Date: Feb 2003
Posts: 18
|
|
|
partition table
ok, i was able to find the partition block/sector information for all the partitions except my two data partitions (gee...that WOULD be the case, huh?). fortunately, the two data partitions were taking up the last 24 GB of the drive, and i have the block/sector information for that 24 GB. what i DON'T have is the block/sector information for where those two partitions are divided. I know each drive was 12 GB, both formatted FAT 32. i SHOULD be able to divide that block/sector information in half and that will give the info for where they are divided. now what I need to know is, how do i re-write the partition table with fdisk? my computer doesn't recognize that Linux is installed at all, so i can't log in as root to make any changes. i assume i need to use the install CD and use it to get to a console? where do i go from there?
__________________
http://www.divstivs.plus.com/iconwar/
|

02-11-2003, 01:27 PM
|
|
Registered User
|
|
Join Date: Feb 2003
Posts: 18
|
|
|
anyone?
can anyone help with my last post?
__________________
http://www.divstivs.plus.com/iconwar/
|

02-11-2003, 03:24 PM
|
 |
Moderator
|
|
Join Date: Oct 2002
Location: Republic of Texas
Posts: 5,837
|
|
|
You're walking on thin ice...
If your partition table's messed up, how are you going to use a bootdisk or setupDisk to boot linux? HDo you have a valid Linux partition? If not, I guess your only option is to try with dos fdisk. Have you got a dos disk?
|

02-11-2003, 03:36 PM
|
|
Registered User
|
|
Join Date: Feb 2003
Posts: 18
|
|
|
that's the problem...
that's exactly what i'm trying to figure out... is there any way to re-create the partition table from the Linux install CD? if not, does that mean i need to do it in windows/dos? HOW would i do it in DOS? these are the questions i'm trying to find answers to. the situation is this... both Windows 98 and Mandrake 9.0 are installed, but the partition with Windows 98 is the only one recognized at all, either in Windows or from DiskDrake in the Mandrake setup. what i'm trying to determine is whether it's possible to use fdisk in Linux without the Linux partition being recognized (ie, use fdisk from the Mandrake setup console), or will i have to try it from windows/dos, or what? if i go through the Mandrake setup, and get as far as DiskDrake, the only partition that is recognized is Windows, and the rest of the drive is recognized as an empty partition. BUT, i can click on 'More' in DiskDrake and it gives me the option to recover the partition table. after trying this, DiskDrake recognizes the 'root' and 'home' partitions, recognizes the swap partition in between 'root' and 'home' (though it still thinks it's empty), and then DOES NOT recognize my windows partition OR my data partitions. they are considered empty. so, what i'm wondering is, should i go through and recover the partition table that recognizes Linux, and then from there use fdisk to re-create my partition table, or is there an easier, less risky method?
__________________
http://www.divstivs.plus.com/iconwar/
|

02-11-2003, 06:20 PM
|
 |
Moderator
|
|
Join Date: Oct 2002
Location: Republic of Texas
Posts: 5,837
|
|
|
So...
I guess your install disk will automatically start to install after diskDrake lays down the partition table?
Can you write a partition table (without formatting) then exit the install cd? I'm just suggesting things, as I do not have any mandrake CD's to try it out on.
|

02-12-2003, 09:10 AM
|
|
Registered User
|
|
Join Date: Feb 2003
Posts: 18
|
|
|
install CD
well, when i first installed it, it didn't automatically start formatting after i used DiskDrake to partition, i had to confirm that i wanted it formatted. i SHOULD be able to cancel the format, but retain the partition table, but i'm not familiar enough with partitioning and Mandrake to know that for sure. if i can get the partitions set back up (and i may just have to use DiskDrake and forget about fdisk), there is the option to save the partition table to a file on a rescue disk (why on earth i didn't look for that option the first time around is beyond me...), and if i can get that far, and then cancel the formatting of those partitions, i can use the rescue disk to rescue the partition table. i think. i hope.
__________________
http://www.divstivs.plus.com/iconwar/
|

02-12-2003, 04:08 PM
|
|
Registered User
|
|
Join Date: Feb 2003
Posts: 18
|
|
|
recovering a partition table
does anyone know if Partition Magic can recover or repair a partition table that wasn't created in Partition Magic? the problem i'm having is in this thread...
http://justlinux.com/forum/showthrea...threadid=89607
now my question is this... i don't have Partition Magic installed at the moment. will any of the unrecognized partitions be damaged or overwritten if i install Partition Magic on the Windows partition, which is the only one being recognized in the partition table? if i CAN install it without damaging the missing partitions, is it possible to RECOVER them with Partition Magic? if it is possible to use Partition Magic to recover the table, what info do i need to make it happen? will PM automatically discover the partitions on my hard drive without me telling it where they are supposed to be?
let me take a moment to stress how important it is to save your partition table information to disk, or at least print a hard copy... wish i had discovered that the first time around...
__________________
http://www.divstivs.plus.com/iconwar/
|
| Thread Tools |
|
|
| Display Modes |
Rate This Thread |
Linear Mode
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -4. The time now is 09:47 PM.
|


|