Re: *Help!* Where is device partition info stored by the kernel?

Mike A. Harris (
Wed, 11 Jun 1997 22:08:18 -0400 (EDT)

On Wed, 11 Jun 1997, Dave Cinege wrote:

> I was playing in fdisk, and like an idiot deleted an extended partition.
> This is a brand new set-up that I just finished, and I didn't save a map of
> the partitioning yet, so I need o layout to build rebuild.
> Where does the kernel keep the partition info? I looked all in /proc and
> couldn't find it.
> The system HAS NOT been rebooted. I can still mount all of my partitions,
> but the second it goes down everything will vanish. The kernel still knows
> the old (correct) layout, or else it would not be mounting things. Where is
> it hidden?
> Note, I had a copy of my MBR, and thats fine. It's just the logical
> partitions that reside in the extened that I need to rebuild...

In both DOS and Linux, I have at one time or another accidentally
fdisk'd and removed a partition by accident. (Don't ask how, it
just happened... :o) In almost ALL cases, simply running FDISK
and recreating the partition with EXACTLY the same parameters as
it had before had the effect of UN-partitioning, in other words,
the partitions were completely restored. The drives mountable,
bootable, etc...

If you don't have backups of the partition tables for your disk,
and you don't know the raw data, you're not entirely out of luck.
If it was only a single partition, you can derive the info by
looking at the other partitions sometimes.

If the partition contained any majorly important data, then I
would dump the entire disk to backup tape or another drive,
ZIP/JAZ disk, etc... before experimenting. A few hours and you
should be back to normal.

Good luck.

Mike A. Harris |
Computer Consultant | Coming soon: dynamic-IP-freedom...
My dynamic address:
Email: mharris at <-- Spam proof address

4DOS is a very powerful COMMAND.COM replacement with over 80 commands!