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 05:22
中国DOS联盟论坛 » DOS开发编程 & 发展交流 (开发室) » Disk sector reading and writing, partition information management tool Dsptw (updated on 2008.11.29) View 112,551 Replies 565
Floor 406 Posted 2008-11-23 18:07 ·  中国 安徽 马鞍山 联通
金牌会员
★★★★
Credits 3,946
Posts 1,884
Joined 2006-01-20 13:00
20-year member
UID 49283
Gender Male
Status Offline
After modifying the partition ID, there is a problem of how to return to the original state of the partition after uninstallation.
I also thought about adding an option to GGhost one-click recovery before, which could choose whether to change the last partition to a hidden partition with ID 12.
Later, I thought about giving up and still needed to hide it myself.

(Of course, a way to save the original partition ID in some form can be considered.)
Windows 一键还原
http://www.yjhy.com
Floor 407 Posted 2008-11-23 19:42 ·  中国 广西 河池 电信
中级用户
★★
Credits 252
Posts 97
Joined 2006-09-17 12:00
19-year member
UID 62869
Gender Male
Status Offline
Originally posted by lianjiang2004 at 2008-11-23 18:07:
After modifying the partition ID, there is a problem of how to return to the original state of the partition after uninstallation.
I also thought about adding an option to GGhost one-click recovery before, which can choose whether to change the last partition to a hidden partition with ID 12. ...


Yes, how to save (view) the original ID?
Floor 408 Posted 2008-11-23 20:15 ·  中国 安徽 马鞍山 联通
金牌会员
★★★★
Credits 3,946
Posts 1,884
Joined 2006-01-20 13:00
20-year member
UID 49283
Gender Male
Status Offline
Generally, the machines are either NTFS or FAT, and the problem is not too big. However, from the perspective of security and compatibility, the issue of restoring to the original state must be considered. You can consider saving to a file or saving to the reserved sector. I wonder if there are any more reliable, secure, and simple methods.
Windows 一键还原
http://www.yjhy.com
Floor 409 Posted 2008-11-23 21:40 ·  中国 安徽 马鞍山 联通
金牌会员
★★★★
Credits 3,946
Posts 1,884
Joined 2006-01-20 13:00
20-year member
UID 49283
Gender Male
Status Offline
Below is the recognition result of different tools after changing an NTFS partition to 12.

dsptw just shows it as a standard Log HIDE_FAT,
while omnifs can accurately show the original partition format.
Of course, different tools have different functions, and they cannot be simply compared in this way.
----------------------------------------------------------
No. Dr Tag FileSystem Volume Act StartPos Sectors MBytes FreeMB
1 C: Pri Win95_FAT32 WINXP Yes 63 3807342 1859 770
2 Pri Hide_FAT16 3807405 289170 141
3 D: Log Win95_FAT32 PRO 4096638 385497 188 94
4 Log HIDE_FAT 4482198 2056257 1004

Disk: 1 (16GB) M:
1.1: ( 1.82GB) Active Volume FAT32 l:
1.2: ( 141.20MB) Hidden Volume FAT16 l:
1.3: ( 188.23MB) Volume FAT32 l:
1.4: (1004.03MB) Diag Hidden Volume NTFS l:
Windows 一键还原
http://www.yjhy.com
Floor 410 Posted 2008-11-23 21:42 ·  中国 安徽 马鞍山 联通
金牌会员
★★★★
Credits 3,946
Posts 1,884
Joined 2006-01-20 13:00
20-year member
UID 49283
Gender Male
Status Offline
This is the result before modification.

No. Dr Tag FileSystem Volume Act StartPos Sectors MBytes FreeMB
1:1 C: Pri Win95_FAT32 WINXP Yes 63 3807342 1859 769
1:2 Pri Hide_FAT16 3807405 289170 141
1:3 D: Log Win95_FAT32 PRO 4096638 385497 188 100
1:4 E: Log HPFS/NTFS DATA 4482198 2056257 1004 540

1.1: ( 1.82GB) [C:\] Active Volume FAT32 l:[WINXP]
1.2: ( 141.20MB) Hidden Volume FAT16 l:[DOS]
1.3: ( 188.23MB) [D:\] Volume FAT32 l:[PRO]
1.4: (1004.03MB) [E:\] Volume NTFS l:[DATA]
Windows 一键还原
http://www.yjhy.com
Floor 411 Posted 2008-11-24 00:28 ·  中国 广西 桂林 电信
中级用户
★★
Credits 252
Posts 97
Joined 2006-09-17 12:00
19-year member
UID 62869
Gender Male
Status Offline
Yes, ID=12 has many advantages. The file system (ntfs/fat32/fat) has not changed, and there is no meaning for omnifs to identify it.

Even if it is ID=12, it is not difficult to see that the file system is ntfs/fat32/fat. The key point is:
ntfs/fat32/fat also has a hidden corresponding ID, which is important.

Speaking of which, since you can write the ID, you should be able to read the ID. 19951001 should know this parameter (to be honest, I can't find the changetype parameter), wait for him.

If the original ID can be read, all problems will be easily solved!

Ah, you are Marshal lianjiang, I am Geli, please give me more advice.
Floor 412 Posted 2008-11-24 09:45 ·  中国 安徽 马鞍山 联通
金牌会员
★★★★
Credits 3,946
Posts 1,884
Joined 2006-01-20 13:00
20-year member
UID 49283
Gender Male
Status Offline
The identification by omnifs is also meaningless.
-----------------------------
Its meaning is that without saving the original ID, you can know the original partition format to restore it to the original state. If this can be achieved, isn't it enough? Hehe.
Windows 一键还原
http://www.yjhy.com
Floor 413 Posted 2008-11-24 16:21 ·  中国 广西 河池 电信
中级用户
★★
Credits 252
Posts 97
Joined 2006-09-17 12:00
19-year member
UID 62869
Gender Male
Status Offline
Originally posted by lianjiang2004 at 2008-11-24 09:45:
The identification of omnifs is also meaningless
-----------------------------
The significance lies in that without saving the original ID, you can know the original partition format to restore it to the original state. If this can be achieved, isn't it enough? Hehe.


I understand it this way: The partition ID and the file system (the so-called partition format) should be different. That is, no matter what the partition ID is, the file system (such as NTFS) will not change unless it is reformatted. For NTFS, there are multiple ID partitions corresponding to it. The simplest is the difference between hidden and non-hidden. (In addition, through practical applications, it is found that the NTFS in Vista format is not completely the same as that in XP, proving that under DOS, the recognition rates of the two systems' NTFS are different)

Therefore, it is necessary to save or identify the partition ID, and many software can do the file system recognized by omnifs (dspt can also recognize it with a little modification), for example, XP can correctly recognize it.

What software was used to get this picture?

[ Last edited by qwe123456 on 2008-11-24 at 16:42 ]
Attachments
20080914_79b1a522feea54028c97cOaR20nZpFOb.jpg
Floor 414 Posted 2008-11-24 18:41 ·  中国 安徽 马鞍山 联通
金牌会员
★★★★
Credits 3,946
Posts 1,884
Joined 2006-01-20 13:00
20-year member
UID 49283
Gender Male
Status Offline
The above picture was obtained with the grub tool.

In addition, dspt seems to identify completely based on the id, regardless of what kind of file system it actually is.

[ Last edited by lianjiang2004 on 2008-11-24 at 18:44 ]
Windows 一键还原
http://www.yjhy.com
Floor 415 Posted 2008-11-24 18:59 ·  中国 安徽 马鞍山 联通
金牌会员
★★★★
Credits 3,946
Posts 1,884
Joined 2006-01-20 13:00
20-year member
UID 49283
Gender Male
Status Offline
For example, I changed the ID of the final NTFS partition to 0b, dsptw shows it as FAT32, and omnifs shows it as NTFS.
Windows 一键还原
http://www.yjhy.com
Floor 416 Posted 2008-11-25 10:57 ·  中国 广西 河池 电信
中级用户
★★
Credits 252
Posts 97
Joined 2006-09-17 12:00
19-year member
UID 62869
Gender Male
Status Offline
Originally posted by lianjiang2004 at 2008-11-24 18:59:
For example, I changed the ID of the final NTFS partition to 0b. DSPTW shows it as FAT32, and OMNIFS shows it as NTFS.



I tried it, and it's indeed like that.
It seems that DSPT needs to be improved. The ID and the file system should be extracted and recognized separately.

In addition, the ID extracted by GRUB seems not to be usable in WINDOWS, and the given partition number does not correspond to the actual one.

Wait for the owner to come, see if he can extract the partition ID.
Floor 417 Posted 2008-11-25 11:03 ·  中国 安徽 马鞍山 联通
金牌会员
★★★★
Credits 3,946
Posts 1,884
Joined 2006-01-20 13:00
20-year member
UID 49283
Gender Male
Status Offline
Originally posted by qwe123456 at 2008-11-25 10:57:

I tried, and it's indeed like this.
It seems that DSPT needs to be improved. The ID and the file system need to be extracted and identified separately.

In addition, the ID extracted by GRUB seems to be unusable in WINDOWS, and the partition number given does not correspond to the actual one.

Wait for the owner to come, see if he can extract the partition ID.

The partition identification number given by GRUB is the partition identification number of the GRUB itself. It needs to be converted to become the general - meaning partition number.
Windows 一键还原
http://www.yjhy.com
Floor 418 Posted 2008-11-25 11:27 ·  中国 广西 河池 电信
中级用户
★★
Credits 252
Posts 97
Joined 2006-09-17 12:00
19-year member
UID 62869
Gender Male
Status Offline
If you can't do otherwise, you can use the following table to get the corresponding ID. For Windows, only the corresponding hidden IDs for fat/fat16/fat32/ntfs are needed, totaling 4 + "hide". Although this is not very accurate, it should be able to preserve the original ID. Where did the original poster go?

ID Partition Type
0x01 DOS_FAT12
0x05 Extended
0x04 DOS_FAT16
0x06 DOS_FAT16
0x07 HPFS/NTFS
0x0b Win95_FAT32
0x0c Win95_FAT32
0x0e Win95_FAT16
0x0f Extended_LBA
0x82 Linux_Swap
0x83 Linux_Native
0x85 Linux_Extended
0x11 Hide_FAT12
0x14 Hide_FAT16
0x16 Hide_FAT16
0x17 Hide_HPFS/NTFS
0x27 Hide_HPFS/NTFS
0x1b Hide_FAT32
0x1c Hide_FAT32
0x1e Hide_FAT16
0x42 Dynamic_Disk
0x93 Hide_Linux
0xd7 HIDE_DELL
0xdd HIDE_DELL
0xdb HIDE_DELL
x0de HIDE_DELL
0x12 HIDE_FAT
0xbc ATI_SEC_ZONE
0xa5 FreeBSD
Floor 419 Posted 2008-11-25 11:29 ·  中国 广西 河池 电信
中级用户
★★
Credits 252
Posts 97
Joined 2006-09-17 12:00
19-year member
UID 62869
Gender Male
Status Offline
Originally posted by lianjiang2004 at 2008-11-25 11:03:

The GRUB gives the hard disk partition identification number of GRUB itself. It needs to be converted to become the general partition number.


lianjiang2004, I often see you. Are you a network administrator, not working or this is your job, heh heh, just curious, just asking casually.
Floor 420 Posted 2008-11-25 11:44 ·  中国 广西 河池 电信
中级用户
★★
Credits 252
Posts 97
Joined 2006-09-17 12:00
19-year member
UID 62869
Gender Male
Status Offline
Since when encountering a partition that dspt doesn't recognize, it will give an ID, so adding a parameter (or already exists?), it's very easy to get the ID.
‹ Prev 1 26 27 28 29 30 38 Next ›
Forum Jump: