Restoring a Deleted Partition

Goofed last night with a Win2K installation, deleted
a partition on a drive I didn’t want to. Does anyone
know how to restore that? All I did was just delete
the partition, nothing more (didn’t create a new one
yet).

Partition setup on the drive is this:

  • First partition is QNX 1999MB
  • Second partition is FAT32 -----> till end of the drive

Any ideas?

Thanks

E.

Did you delete first(QNX) partition?
Did it start at the beginning of HDD?

If so, you should start fdisk, then create QNX partition (type 77 or 79)
and enter 0 as start cylinder, and fdisk will offer you the end cylinder
(just before FAT32)

Pavol Kycina


“Erick Muis” <emuis@qnx.com> wrote in message
news:9ode17$48h$1@nntp.qnx.com

Goofed last night with a Win2K installation, deleted
a partition on a drive I didn’t want to. Does anyone
know how to restore that? All I did was just delete
the partition, nothing more (didn’t create a new one
yet).

Partition setup on the drive is this:

  • First partition is QNX 1999MB
  • Second partition is FAT32 -----> till end of the drive

Any ideas?

Thanks

E.

Hi Pavol,

No, I deleted the Dos Fat32 partition :frowning: I still have the QNX partition :slight_smile:
(thank goodness).

I did try the suggestion though, but for the FAT partition it didn’t work,
I tried our (QNX’s) Fdisk but it didn’t work :frowning:

Any other ideas?

E.


Pavol Kycina <kycina@microstep-hdo.sk> wrote:

Did you delete first(QNX) partition?
Did it start at the beginning of HDD?

If so, you should start fdisk, then create QNX partition (type 77 or 79)
and enter 0 as start cylinder, and fdisk will offer you the end cylinder
(just before FAT32)

Pavol Kycina



“Erick Muis” <> emuis@qnx.com> > wrote in message
news:9ode17$48h$> 1@nntp.qnx.com> …
Goofed last night with a Win2K installation, deleted
a partition on a drive I didn’t want to. Does anyone
know how to restore that? All I did was just delete
the partition, nothing more (didn’t create a new one
yet).

Partition setup on the drive is this:

  • First partition is QNX 1999MB
  • Second partition is FAT32 -----> till end of the drive

Any ideas?

Thanks

E.

Hi Erick,

I know only one way - by hand. I mean low-level disk editor, something like Norton’s diskedit. Look
at MBR’s partition table. If you are lucker then fdisk (or other program you deleted partition
which) simply write 0xAA55 after end of first partition entry record. Be careful the 0xAA55 is the
final two byte of sector too. If I’m right then you need just restore first two byte in the second
partition entry: boot flag and begin head. Boot flag is 0x0. Begin head you can calculate because
you know long value (4 byte) (offset is +8) of absolute sector and you know geometry of disk.
Under QNX you could write mbr to a file
#dd if=/dev/hd0 of=/damaged.mbr count=1 bs=512
and look at it by hex viewer. If there is not the trails of second partition entry in the file then
you have very difficult problem.

Regards,
Eduard.



Hardware Support Account <hw@qnx.com> wrote in article <9ofir9$ele$1@nntp.qnx.com>…

Hi Pavol,

No, I deleted the Dos Fat32 partition > :frowning: > I still have the QNX partition > :slight_smile:
(thank goodness).

I did try the suggestion though, but for the FAT partition it didn’t work,
I tried our (QNX’s) Fdisk but it didn’t work > :frowning:

Any other ideas?

E.

Hi Eduard,

Would I have to restore the boot flag if the QNX partition was the one set to boot?

Erick.


ed1k <ed1k@yahoo.com> wrote:

Hi Erick,

I know only one way - by hand. I mean low-level disk editor, something like Norton’s diskedit. Look
at MBR’s partition table. If you are lucker then fdisk (or other program you deleted partition
which) simply write 0xAA55 after end of first partition entry record. Be careful the 0xAA55 is the
final two byte of sector too. If I’m right then you need just restore first two byte in the second
partition entry: boot flag and begin head. Boot flag is 0x0. Begin head you can calculate because
you know long value (4 byte) (offset is +8) of absolute sector and you know geometry of disk.
Under QNX you could write mbr to a file
#dd if=/dev/hd0 of=/damaged.mbr count=1 bs=512
and look at it by hex viewer. If there is not the trails of second partition entry in the file then
you have very difficult problem.

Regards,
Eduard.



Hardware Support Account <> hw@qnx.com> > wrote in article <9ofir9$ele$> 1@nntp.qnx.com> >…
Hi Pavol,

No, I deleted the Dos Fat32 partition > :frowning: > I still have the QNX partition > :slight_smile:
(thank goodness).

I did try the suggestion though, but for the FAT partition it didn’t work,
I tried our (QNX’s) Fdisk but it didn’t work > :frowning:

Any other ideas?

E.

Well I don’t have a concrete suggestion, but…

If it was an important partition, first thing I’d do is make a disk image
copy of the HD, so that if you goof up trying to restore things, you have
a means of restarting again with a different approach.

Also keep in mind that the partition numbering under DOS/WIN is opposite to
the QNX numbering: partition #1 under QNX == partition #4 under DOS/WIN
(Well at least it was like that under QNX4)

BTW, according to your post you’re from QSSL. I’m sure you have access to
a vast amount of expert techie support??? (Perhaps the person who wrote
the fdisk util?)

good luck,
rick

Erick Muis <emuis@qnx.com> wrote:

Goofed last night with a Win2K installation, deleted
a partition on a drive I didn’t want to. Does anyone
know how to restore that? All I did was just delete
the partition, nothing more (didn’t create a new one
yet).

Partition setup on the drive is this:

  • First partition is QNX 1999MB
  • Second partition is FAT32 -----> till end of the drive

Any ideas?

Thanks

E.

Rick Lake <rwlake@spamfree.domain.invalid> wrote:
[…]

Also keep in mind that the partition numbering under DOS/WIN is opposite to
the QNX numbering: partition #1 under QNX == partition #4 under DOS/WIN
(Well at least it was like that under QNX4)

hmmm… I just checked and NTO seems to be compatible with DOS/WIN, so
disregard the above. sorry.

[…]

“Rick Lake” <rwlake@spamfree.domain.invalid> wrote in message
news:9oho52$os2$1@inn.qnx.com

Also keep in mind that the partition numbering under DOS/WIN is opposite
to
the QNX numbering: partition #1 under QNX == partition #4 under DOS/WIN
(Well at least it was like that under QNX4)

Hey QSSL

Why is that?

Rick Lake <rwlake@spamfree.domain.invalid> wrote in article <9ohpb9$pcq$1@inn.qnx.com>…

Rick Lake <> rwlake@spamfree.domain.invalid> > wrote:
[…]
Also keep in mind that the partition numbering under DOS/WIN is opposite to
the QNX numbering: partition #1 under QNX == partition #4 under DOS/WIN
(Well at least it was like that under QNX4)

hmmm… I just checked and NTO seems to be compatible with DOS/WIN, so
disregard the above. sorry.

I believe almost all OSes are compatible at this point. Indeed, partition numbering is from last
mbr’s entry in QNX. (I’m unable to get accustomed). I missed it in my previous post, I’m sorry.

Eduard

[…]

Hi Erick,

I’m sorry for some misstakes in my previous post. I miss the qnx’s partition entry is fourth mbr’s
entry, perhaps. So, you need restore all fields mbr’s entry for fat partition. About boot flag -
yes of course, you need restore this too. For qnx partition this flag is 0x80, for fat partition
this flag was 0x00. Please remember 0x00 is a number too.
Send me the damaged.mbr and info what bios says about your drive (size, heads, cyls, sects…),
maybe I’m able to help you. Please write, did you have two primary partitions? Are you familiar
with a disk editor? I think e-mail would be better.

Regards,
Eduard.


Hardware Support Account <hw@qnx.com> wrote in article <9ofuk8$lgg$1@nntp.qnx.com>…

Hi Eduard,

Would I have to restore the boot flag if the QNX partition was the one set to boot?

Erick.

Erick,

This way is dangerous, I agree. So, you need small OS with disk editor (to be able to boot from
floppy) or you need to connect drive to other system as slave (secondary). You need to be able to
boot from other drive in other words. MBR is only 512 bytes, so you can return stuff back if you
note all your actions, I think pen and paper are enough in order to keep a protocol (sorry if I
look old-fashioned :wink:).

Eduard.

QSSL = QNX Software Systems Ltd. :slight_smile:

E.


“Bill Caroselli (Q-TPS)” <qtps@earthlink.net> wrote:

“Rick Lake” <> rwlake@spamfree.domain.invalid> > wrote in message
news:9oho52$os2$> 1@inn.qnx.com> …
Also keep in mind that the partition numbering under DOS/WIN is opposite
to
the QNX numbering: partition #1 under QNX == partition #4 under DOS/WIN
(Well at least it was like that under QNX4)

Hey QSSL

Why is that?

Rick Lake <rwlake@spamfree.domain.invalid> wrote:

Well I don’t have a concrete suggestion, but…

If it was an important partition, first thing I’d do is make a disk image
copy of the HD, so that if you goof up trying to restore things, you have
a means of restarting again with a different approach.

First thing I did :slight_smile: thanks.

E.


Also keep in mind that the partition numbering under DOS/WIN is opposite to
the QNX numbering: partition #1 under QNX == partition #4 under DOS/WIN
(Well at least it was like that under QNX4)

BTW, according to your post you’re from QSSL. I’m sure you have access to
a vast amount of expert techie support??? (Perhaps the person who wrote
the fdisk util?)

good luck,
rick

Erick Muis <> emuis@qnx.com> > wrote:
Goofed last night with a Win2K installation, deleted
a partition on a drive I didn’t want to. Does anyone
know how to restore that? All I did was just delete
the partition, nothing more (didn’t create a new one
yet).

Partition setup on the drive is this:

  • First partition is QNX 1999MB
  • Second partition is FAT32 -----> till end of the drive

Any ideas?

Thanks

E.

Erick,

You could read your files on damaged fat partition by Easy Recovery (old name is Tiramizu)

I did not try this program,
but, maybe, it helps .

Regards,
Eduard.

Hardware Support Account <hw@qnx.com> wrote in article <9ofir9$ele$1@nntp.qnx.com>…

Hi Pavol,

No, I deleted the Dos Fat32 partition > :frowning: > I still have the QNX partition > :slight_smile:
(thank goodness).

I did try the suggestion though, but for the FAT partition it didn’t work,
I tried our (QNX’s) Fdisk but it didn’t work > :frowning:

Any other ideas?

E.


Pavol Kycina <> kycina@microstep-hdo.sk> > wrote:
Did you delete first(QNX) partition?
Did it start at the beginning of HDD?

If so, you should start fdisk, then create QNX partition (type 77 or 79)
and enter 0 as start cylinder, and fdisk will offer you the end cylinder
(just before FAT32)

Pavol Kycina


“Erick Muis” <> emuis@qnx.com> > wrote in message
news:9ode17$48h$> 1@nntp.qnx.com> …
Goofed last night with a Win2K installation, deleted
a partition on a drive I didn’t want to. Does anyone
know how to restore that? All I did was just delete
the partition, nothing more (didn’t create a new one
yet).

Partition setup on the drive is this:

  • First partition is QNX 1999MB
  • Second partition is FAT32 -----> till end of the drive

Any ideas?

Thanks

E.

That’s good for a chuckle. I knew that!

What I meant is "Why did QNX 4 count the partitions 4 to 1 as compared to
everyone else’s 1 to 4?

BTW, I remember when it stood for Quantum Software Systems Ltd.

“Hardware Support Account” <hw@qnx.com> wrote in message
news:9onh6f$bq1$1@nntp.qnx.com

QSSL = QNX Software Systems Ltd. > :slight_smile:

E.


“Bill Caroselli (Q-TPS)” <> qtps@earthlink.net> > wrote:
“Rick Lake” <> rwlake@spamfree.domain.invalid> > wrote in message
news:9oho52$os2$> 1@inn.qnx.com> …
Also keep in mind that the partition numbering under DOS/WIN is
opposite
to
the QNX numbering: partition #1 under QNX == partition #4 under DOS/WIN
(Well at least it was like that under QNX4)

Hey QSSL

Why is that?

“Bill Caroselli (Q-TPS)” <qtps@earthlink.net> wrote:

That’s good for a chuckle. I knew that!

What I meant is "Why did QNX 4 count the partitions 4 to 1 as compared to
everyone else’s 1 to 4?

Sorry, actually I do recognize your name, just so many times I have responded
to that question it becomes second nature :slight_smile:

Re: Partition numbers, I have no idea. David Gibbs, told me once, but I
forgotten why it was again. :frowning:

E.


BTW, I remember when it stood for Quantum Software Systems Ltd.

“Hardware Support Account” <> hw@qnx.com> > wrote in message
news:9onh6f$bq1$> 1@nntp.qnx.com> …
QSSL = QNX Software Systems Ltd. > :slight_smile:

E.


“Bill Caroselli (Q-TPS)” <> qtps@earthlink.net> > wrote:
“Rick Lake” <> rwlake@spamfree.domain.invalid> > wrote in message
news:9oho52$os2$> 1@inn.qnx.com> …
Also keep in mind that the partition numbering under DOS/WIN is
opposite
to
the QNX numbering: partition #1 under QNX == partition #4 under DOS/WIN
(Well at least it was like that under QNX4)

Hey QSSL

Why is that?

Previously, Bill Caroselli (Q-TPS) wrote in qdn.public.qnxrtp.installation:

What I meant is "Why did QNX 4 count the partitions 4 to 1 as compared to
everyone else’s 1 to 4?

Well I can’t answer as to why everyone else does it opposite, but I can
say that what QNX calls Partition 1, is the first entry in the partition
table.


Mitchell Schoenbrun --------- maschoen@pobox.com

Hi Eduard,

Excellent suggestion. I downloaded the trial version which picked up the
important files without any problems.

Thank you VERY much everyone for your help.

Erick.


ed1k <ed1k@yahoo.com> wrote:

Erick,

You could read your files on damaged fat partition by Easy Recovery (old name is Tiramizu)

I did not try this program,
but, maybe, it helps .

Regards,
Eduard.

Hardware Support Account <> hw@qnx.com> > wrote in article <9ofir9$ele$> 1@nntp.qnx.com> >…
Hi Pavol,

No, I deleted the Dos Fat32 partition > :frowning: > I still have the QNX partition > :slight_smile:
(thank goodness).

I did try the suggestion though, but for the FAT partition it didn’t work,
I tried our (QNX’s) Fdisk but it didn’t work > :frowning:

Any other ideas?

E.


Pavol Kycina <> kycina@microstep-hdo.sk> > wrote:
Did you delete first(QNX) partition?
Did it start at the beginning of HDD?

If so, you should start fdisk, then create QNX partition (type 77 or 79)
and enter 0 as start cylinder, and fdisk will offer you the end cylinder
(just before FAT32)

Pavol Kycina


“Erick Muis” <> emuis@qnx.com> > wrote in message
news:9ode17$48h$> 1@nntp.qnx.com> …
Goofed last night with a Win2K installation, deleted
a partition on a drive I didn’t want to. Does anyone
know how to restore that? All I did was just delete
the partition, nothing more (didn’t create a new one
yet).

Partition setup on the drive is this:

  • First partition is QNX 1999MB
  • Second partition is FAT32 -----> till end of the drive

Any ideas?

Thanks

E.

Hi Mitchell,

Mitchell Schoenbrun <maschoen@pobox.com> wrote in article
<Voyager.010924111108.239A@schoenbrun.com>…

Previously, Bill Caroselli (Q-TPS) wrote in qdn.public.qnxrtp.installation:

What I meant is "Why did QNX 4 count the partitions 4 to 1 as compared to
everyone else’s 1 to 4?

Well I can’t answer as to why everyone else does it opposite, but I can say

Could you be more precision?

that what QNX calls Partition 1,

For example, could it be the QNX boot loader prompt:
Boot partition:1

is the first entry in the partition table.

Master boot record:
Offset Sixe
0x0 0x1be - master boot executable code
0x1be 0x10 - 1st entry
0x1ce 0x10 - 2nd entry
0x1de 0x10 - 3rd entry
0x1ee 0x10 - 4th entry
0x1fe 0x2 - signature 0xaa55

Is it Ok?

In my system I have entry for QNX partition at offset 0x1ee (4th entry). I clearly remember the
message during boot up (it was with QNX RTP 6.0):
Boot partition:1
It caused boot to QNX. I did not recognize that message as a prompt, I was unaware why 1, because
1st entry in mbr is for FAT partition in my system. I removed QNX boot loader from mbr (I’m afraid
the things which I don’t understand) and I’m using own boot loader. Later I’ve read in docs the
last mbr’s entry correspond to the first partition, it fully explained my misunderstanding at first
time.

But now you are sowing my doubts. Do you have any comments?

Best regards,
Eduard.

Mitchell Schoenbrun --------- > maschoen@pobox.com

Hi Erick,

You’re welcom. If you read files without any problems then you have not damaged FAT’s boot sectot
and file allocation tables. So, pointer to FAT’s boot sector is a half of mbr’s entry (I guess it’s
lBeginSect+lTotalSects of QNX’s entry). The next half is a partition length in sectors, it is not a
problem because you know the drive size. I guess you do not wish to spend time for it :wink:. Anyway,
I’m glad to help you.

Best regards,
Eduard.

Hardware Support Account <hw@qnx.com> wrote in article <9ooctt$rtf$2@nntp.qnx.com>…

Hi Eduard,

Excellent suggestion. I downloaded the trial version which picked up the
important files without any problems.

Thank you VERY much everyone for your help.

Erick.