China DOS Union

-- Unite DOS · Advance DOS · Grow DOS --

Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum
DOS stands for freedom, openness and progress. Let us work hard, learn from the openness and GNU spirit of FreeDOS and Linux, and together build and grow a free GNU GPL world!

中国DOS联盟论坛
The time now is 2026-06-30 06:14
中国DOS联盟论坛 » DOS开发编程 & 发展交流 (开发室) » Disk sector reading and writing, partition information management tool Dsptw (updated on 2008.11.29) View 112,559 Replies 565
Floor 46 Posted 2006-12-23 11:44 ·  中国 贵州 遵义 电信
新手上路
Credits 18
Posts 9
Joined 2006-07-28 00:20
19-year member
UID 59399
Status Offline
Great! But I have already made a one-click recovery program based on HPA. It just uses GURB and the one-click recovery GHOST from the Internet, which is the one from DOS Home, combined with Tsinghua Tongfang's HPA. Strictly speaking, I didn't use a program to access the HPA area. And there are detailed introductions about this aspect in Wuyou Boot, but it's a bit different from mine, but the idea is the same!
Floor 47 Posted 2006-12-24 05:15 ·  中国 江苏 南京 联通
高级用户
★★
Credits 525
Posts 222
Joined 2006-08-28 21:07
19-year member
UID 61476
Status Offline
Originally posted by cba-xyz at 2006-12-19 09:32:
If the original poster has time, it would be great to write a software for creating and managing HPA partitions under DOS. I think many people would be interested. Hehe.


I don't think this is necessary. First, HPA is used by few people. And there are already built-in management programs.
Also, the original poster's own time is limited.
Instead of spending time researching how many programs manage it, it's better to develop more useful programs.
When it reaches a relatively stable state, it's time to release a final version.
Floor 48 Posted 2006-12-24 05:28 ·  中国 浙江 宁波 电信
中级用户
★★
Credits 295
Posts 70
Joined 2003-07-24 00:00
22-year member
UID 7462
Gender Male
Status Offline
Creating HPA is okay, but deleting HPA is not very easy because there are many HPAs created by different vendors themselves. It's troublesome to find the corresponding tools when you need to delete them, and some can't even be found. DPIT seems to be able to delete them too. I hope it can be more user-friendly.
Floor 49 Posted 2006-12-25 03:35 ·  中国 浙江 宁波 电信
中级用户
★★
Credits 295
Posts 70
Joined 2003-07-24 00:00
22-year member
UID 7462
Gender Male
Status Offline
1 The first partition entry in the MBR is an extended partition, followed by a primary partition;
2 The first partition entry in the MBR is a primary partition, the second partition entry is an extended partition, followed by a primary partition;
Only tested /FIND:ALL and /FIND:ALL NOEXT, and the results are correct.
Floor 50 Posted 2006-12-26 06:28 ·  中国 贵州 遵义 电信
新手上路
Credits 18
Posts 9
Joined 2006-07-28 00:20
19-year member
UID 59399
Status Offline
DPITW
Disk: 0-First Hard disk, 1-Second Hard Disk, ...
/S: Save Disk Partition Info to File.
/R: Restore Disk Partiton Info from File.
/C: Compare Disk Partiton Info with File.
FileName: Disk Partition Info File.
I want to ask, for DPITW 0 /C: What is the return value when all are the same after comparison? What is the return value when they are different?
Floor 51 Posted 2006-12-26 23:26 ·  中国 北京 华北计算技术研究所
高级用户
★★
流落街头
Credits 570
Posts 272
Joined 2005-10-17 10:51
20-year member
UID 43609
Gender Male
From 北京
Status Offline
Originally posted by xuxuezeng at 2006-12-26 06:28:
DPITW
Disk: 0 - First Hard disk, 1 - Second Hard Disk, ...
/S: Save Disk Partition Info to File.
/R: Restore Disk Partiton Info from File.
/C: C ...


Compare and return 0 if the same; if not the same, it will be displayed on the screen and the return result is 100
Floor 52 Posted 2006-12-26 23:29 ·  中国 北京 华北计算技术研究所
高级用户
★★
流落街头
Credits 570
Posts 272
Joined 2005-10-17 10:51
20-year member
UID 43609
Gender Male
From 北京
Status Offline
Final test version, two functions are integrated together (diskrw / dpit)
diskrw adds a disk sector copy function.

Please help with testing. If there are no issues, the official version will be released on New Year's Day.

[ Last edited by 19951001 on 2006-12-28 at 01:46 AM ]
Floor 53 Posted 2006-12-27 10:55 ·  中国 浙江 宁波 电信
中级用户
★★
Credits 295
Posts 70
Joined 2003-07-24 00:00
22-year member
UID 7462
Gender Male
Status Offline
Top, the software is getting more and more perfect.
Floor 54 Posted 2006-12-28 01:47 ·  中国 北京 中移铁通
高级用户
★★
流落街头
Credits 570
Posts 272
Joined 2005-10-17 10:51
20-year member
UID 43609
Gender Male
From 北京
Status Offline
The new version is released, please see the first floor.
Floor 55 Posted 2006-12-28 20:49 ·  美国 北达科他州立大学
中级用户
★★
Credits 316
Posts 152
Joined 2006-06-18 13:01
20-year member
UID 57204
Gender Male
Status Offline
Floor 56 Posted 2006-12-29 04:23 ·  中国 北京 鹏博士BGP
新手上路
Credits 10
Posts 4
Joined 2006-12-27 03:23
19-year member
UID 74660
Gender Male
Status Offline
dspt 0 /act:* operation can only switch the Active flag between several partitions. But I want to set two partitions on the same hard drive as Active at the same time. I wonder if the landlord can provide such a function. (Reason: When partitioning a USB flash drive, I found that using the ordinary way, that is, one primary partition (Active) and one logical partition. After partitioning, only the primary partition is shown in the XP system, and the logical partition can only be seen in "Disk Management" but has no drive letter assigned, and it can't be assigned manually. Later, a USB flash drive was partitioned with iFormat, and both partitions were normally shown in XP, and both partitions of this USB flash drive were set as primary partitions (Active) seen in "Disk Management". But I tried FDISK, PQ, all can only set one active flag, it's frustrating!)
Floor 57 Posted 2006-12-29 04:32 ·  中国 北京 华北计算技术研究所
高级用户
★★
流落街头
Credits 570
Posts 272
Joined 2005-10-17 10:51
20-year member
UID 43609
Gender Male
From 北京
Status Offline
Originally posted by xuserynamez at 2006-12-29 04:23:
dspt 0 /act:* operation can only switch the Active flag between several partitions, but I want to set two partitions of the same hard drive as Active at the same time. I wonder if the landlord can provide this function. (Original reason: In Nv...


There can be four primary partitions, but there can be only one active partition. This active partition must first be a primary partition. The active partition is the boot partition. If there are two active partitions, the system will not know which partition to boot from.
Floor 58 Posted 2006-12-29 04:37 ·  美国 缅因州
中级用户
★★
Credits 316
Posts 152
Joined 2006-06-18 13:01
20-year member
UID 57204
Gender Male
Status Offline
Tested in VMWare, the unformatted partition was misidentified as a DOS FAT16 partition, and not tested on actual hardware.
Floor 59 Posted 2006-12-29 04:46 ·  中国 北京 华北计算技术研究所
高级用户
★★
流落街头
Credits 570
Posts 272
Joined 2005-10-17 10:51
20-year member
UID 43609
Gender Male
From 北京
Status Offline
Originally posted by amao at 2006-12-29 04:37:
Tested in VMWare, unformatted partitions are mistaken for DOS FAT16 partitions, not tested on actual machine.


I tested that on the actual machine, using Windows Disk Management to partition an unformatted partition also shows DOS FAT16. This is because when Windows Disk Management partitions, it sets the unformatted partition flag to DOS FAT16, which is Windows' way of handling it.


ID Name
== ====
00h empty

01h DOS 12-bit FAT

02h XENIX root file system

03h XENIX /usr file system (obsolete)

04h DOS 16-bit FAT (up to 32M)

05h DOS 3.3+ extended partition

06h DOS 3.31+ Large File System (16-bit FAT, over 32M)

07h QNX
07h OS/2 HPFS

07h Windows NT NTFS

07h Advanced Unix
08h OS/2 (v1.0-1.3 only)

08h AIX bootable partition, SplitDrive

08h Commodore DOS
08h DELL partition spanning multiple drives

09h AIX data partition

09h Coherent filesystem

0Ah OS/2 Boot Manager

0Ah OPUS
0Ah Coherent swap partition

0Bh Windows 95 with 32-bit FAT

0Ch Windows 95 with 32-bit FAT (using LBA-mode INT 13 extensions)

0Eh LBA VFAT (same as 06h but using LBA-mode INT 13)

0Fh LBA VFAT (same as 05h but using LBA-mode INT 13)

10h OPUS
11h OS/2 Boot Manager hidden 12-bit FAT partition

12h Compaq Diagnostics partition

14h (using Novell DOS 7.0 FDISK to delete Linux Native part)

14h OS/2 Boot Manager hidden sub-32M 16-bit FAT partition

16h OS/2 Boot Manager hidden over-32M 16-bit FAT partition

17h OS/2 Boot Manager hidden HPFS partition

18h AST special Windows swap file

1Bh Hidden Windows 95 with 32-bit FAT

1Ch Hidden Windows 95 with 32-bit LBA FAT

1Eh Hidden Windows 95 with LBA BIGDOS

21h officially listed as reserved

23h officially listed as reserved

24h NEC MS-DOS 3.x
26h officially listed as reserved

31h officially listed as reserved

33h officially listed as reserved

34h officially listed as reserved

36h officially listed as reserved

38h Theos
3Ch PowerQuest PartitionMagic recovery partition

40h VENIX 80286
41h Personal RISC Boot

42h SFS (Secure File System) by Peter Gutmann

4Fh Oberon
50h OnTrack Disk Manager, read-only partition

51h OnTrack Disk Manager, read/write partition

51h NOVELL
52h CP/M
52h Microport System V/386
53h OnTrack Disk Manager, write-only partition???

54h OnTrack Disk Manager (DDO)
56h GoldenBow VFeature
61h SpeedStor
63h Unix SysV/386, 386/ix
63h Mach, MtXinu BSD 4.3 on Mach
63h GNU HURD
64h Novell NetWare 286
65h Novell NetWare (3.11)
67h Novell
68h Novell
69h Novell
70h DiskSecure Multi-Boot
71h officially listed as reserved

73h officially listed as reserved

74h officially listed as reserved

75h PC/IX
76h officially listed as reserved

80h Minix v1.1 - 1.4a
81h Minix v1.4b+
81h Linux
81h Mitac Advanced Disk Manager
82h Linux Swap partition

82h Prime
82h Solaris
83h Linux native file system (ext2fs/xiafs)

84h OS/2-renumbered type 04h partition (hiding DOS C: drive)
86h officially listed as reserved

87h HPFS Fault-Tolerant mirrored partition

93h Amoeba file system

94h Amoeba bad block table

A1h officially listed as reserved

A3h officially listed as reserved

A4h officially listed as reserved

A5h FreeBSD, BSD/386
A6h officially listed as reserved

B1h officially listed as reserved

B3h officially listed as reserved

B4h officially listed as reserved

B6h officially listed as reserved

B7h BSDI file system (secondarily swap)

B8h BSDI swap partition (secondarily file system)

C1h DR DOS 6.0 LOGIN.EXE-secured 12-bit FAT partition

C4h DR DOS 6.0 LOGIN.EXE-secured 16-bit FAT partition

C6h DR DOS 6.0 LOGIN.EXE-secured Huge partition

C7h Syrinx Boot
D8h CP/M-86
DBh CP/M, Concurrent CP/M, Concurrent DOS
DBh CTOS (Convergent Technologies OS)
E1h SpeedStor 12-bit FAT extended partition

E3h DOS read-only

E3h Storage Dimensions
E4h SpeedStor 16-bit FAT extended partition

E5h officially listed as reserved

E6h officially listed as reserved

EBh BeOS partition
F1h Storage Dimensions
F2h DOS 3.3+ secondary partition

F3h officially listed as reserved

F4h SpeedStor
F4h Storage Dimensions
F6h officially listed as reserved

FEh LANstep
FEh IBM PS/2 IML
FFh Xenix bad block table


[ Last edited by 19951001 on 2006-12-29 at 05:04 AM ]
Floor 60 Posted 2006-12-29 05:04 ·  美国 缅因州
中级用户
★★
Credits 316
Posts 152
Joined 2006-06-18 13:01
20-year member
UID 57204
Gender Male
Status Offline
Originally posted by 19951001 at 2006-12-29 04:46:


When actually using the disk management of Windows to partition an unformatted partition, it also shows DOS FAT16. I have tested this. This is because the disk management sets the flag of the unformatted partition to...

Please refer to PQ Magic, maybe you can draw some inspiration.
Also, there is a post by大侠 xusen in this forum that might inspire you. I forgot the title.
Daxia xusen also posted the same post in the Deep Forum, with a title like "DeepDOS personal edition" or something. I don't remember exactly. I'm abroad now, and it's very slow to access domestic websites these days (all because of the earthquake). I can't give you the link. You can go and see for yourself.
Once this problem is solved, I think the official version can be released. Of course, the premise is that the file size doesn't increase too much.
It's midnight here now. I hope there will be good news in a few days.
Forum Jump: