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 07:21
中国DOS联盟论坛 » DOS开发编程 & 发展交流 (开发室) » Disk sector reading and writing, partition information management tool Dsptw (updated on 2008.11.29) View 112,573 Replies 565
Floor 241 Posted 2007-06-17 22:58 ·  中国 北京 鹏博士宽带
高级用户
★★
流落街头
Credits 570
Posts 272
Joined 2005-10-17 10:51
20-year member
UID 43609
Gender Male
From 北京
Status Offline
I found the problem according to the errorlevel value, and it has been uploaded, please test
Floor 242 Posted 2007-06-18 06:02 ·  中国 安徽 马鞍山 电信
金牌会员
★★★★
Credits 3,946
Posts 1,884
Joined 2006-01-20 13:00
20-year member
UID 49283
Gender Male
Status Offline
The test results are normal, thank you. Hehe. It seems that we just need to wait for the official version to be released and then modify the batch script.
Windows 一键还原
http://www.yjhy.com
Floor 243 Posted 2007-06-18 07:24 ·  中国 安徽 马鞍山 电信
金牌会员
★★★★
Credits 3,946
Posts 1,884
Joined 2006-01-20 13:00
20-year member
UID 49283
Gender Male
Status Offline
I see the new function of directly modifying disk sectors, which is great. In this way, it's more convenient to write sectors, and there's no need to write the entire sector.
Windows 一键还原
http://www.yjhy.com
Floor 244 Posted 2007-06-18 14:22 ·  中国 广东 深圳 福田区 电信
高级用户
★★
Credits 525
Posts 222
Joined 2006-08-28 21:07
19-year member
UID 61476
Status Offline
The DOS version of dspt 02.16 will have an error when using the function of backing up to the last sector of the disk in the presence of a USB mobile hard disk or USB flash drive (the MBR partition table entries of the USB flash drive or mobile hard disk will become those of the first hard disk and be exactly the same). Please check if there is this problem in the source code.

[ Last edited by cchessbd on 2007-6-18 at 02:27 PM ]
Floor 245 Posted 2007-06-18 19:19 ·  中国 北京 鹏博士宽带
高级用户
★★
流落街头
Credits 570
Posts 272
Joined 2005-10-17 10:51
20-year member
UID 43609
Gender Male
From 北京
Status Offline
Originally posted by cchessbd at 2007-6-18 14:22:
In the DOS version of dspt 02.16, when there are USB mobile hard drives or USB flash drives present,

there will be an error when using the function to back up to the last sector of the disk (the partition table entry of the USB flash drive or mobile hard drive will become that of the first hard drive, and ...


The 0208 version was released on 2007.02.26. I have never released the dspt 02.16 version.
I use a USB flash drive to boot and use the 0208 version of dspt to back up the partition table of the USB flash drive to the last sector of the USB flash drive, which is completely fine, and the situation you described did not occur.

Could there be a virus on your machine?
Floor 246 Posted 2007-06-20 08:34 ·  中国 广东 深圳 南山区 电信
高级用户
★★
Credits 525
Posts 222
Joined 2006-08-28 21:07
19-year member
UID 61476
Status Offline
Non-toxic.
Maybe I remembered the version wrong. It's the version you released on 02.26. I don't know if it's a problem with the USB drive or I used the wrong command.

The new version looks pretty good. Is the DOS version the same?
Don't send any test versions. If there are problems with the compiled version, I will report them in time. Just send the one without time restrictions directly.
Floor 247 Posted 2007-06-20 20:29 ·  中国 北京 鹏博士宽带
高级用户
★★
流落街头
Credits 570
Posts 272
Joined 2005-10-17 10:51
20-year member
UID 43609
Gender Male
From 北京
Status Offline
Originally posted by cchessbd at 2007-6-20 08:34:
Non-toxic.
Maybe I remembered the version wrong. It's the version you released on 02.26. I don't know if it's a USB drive problem or I used the command incorrectly.

The new version looks pretty good. Is the DOS version the same?
Don't send ...


Backing up the disk partition table entries to the last sector depends on the motherboard's BIOS. If the motherboard doesn't support large hard drives, this function should not be used.

I used a USB drive to boot and made backups on the unit's machines without any problems.

This function uses the last 4 sectors. The last sector backs up the master boot sector (MBR). The last 3 sectors, totaling 1563 bytes, are used to back up the partition table chain excluding the MBR. Each partition table entry is 68 bytes (4-byte address, 64-byte partition table). 1536 bytes can back up 1536/68 = 22 partition table entries. The last byte of 1536 stores the total number of backed-up partition tables. So up to 22 + 1 = 23 partition tables can be backed up in total.

Generally, the number of partitions on a single hard drive does not exceed 23, so it only occupies 2K bytes, and it is usually sufficient.

In the program code, the operation of backing up a certain hard drive to the last sector will never read or write to other hard drives.



The reason for releasing the Win32 test version is to make the program more stable after a period of testing to avoid losses to everyone. Because I was on a business trip for the past period, and after returning, I sorted out this program in a hurry. Although I checked the code myself, there may still be problems.

The purpose of releasing the test version is to prevent problematic versions from spreading for too long.


Release a version without a time limit. If everyone finds problems during testing, please feed back immediately

[ Last edited by 19951001 on 2007-6-20 at 08:53 PM ]
Floor 248 Posted 2007-06-20 21:34 ·  中国 江苏 常州 溧阳市 电信
银牌会员
★★★
Credits 2,404
Posts 946
Joined 2005-09-08 13:44
20-year member
UID 42345
Status Offline
When will there be a tool under DOS that can handle multiple hard drives (I remember you posted about this before) and the drive letters after loading ISF? That would be perfect! Now I'm using MINITO. Although there are some shortcomings, it's still good for handling the drive letters after loading ISF.
Floor 249 Posted 2007-06-20 23:25 ·  中国 北京 鹏博士宽带
高级用户
★★
流落街头
Credits 570
Posts 272
Joined 2005-10-17 10:51
20-year member
UID 43609
Gender Male
From 北京
Status Offline
Originally posted by terse at 2007-6-20 21:34:
When will there be one that can handle multiple hard drives under DOS (I remember you posted before) and the drive letters after loading ISF? That would be perfect! Now I'm using MINITO. Although there are some shortcomings, it's still good for handling drive letters after loading ISF.



I've been wanting to solve the drive letter problem of DOS when loading NTFS4DOS and IFS. My idea is to judge in the program whether these two programs are loaded by myself. I haven't solved this problem all the time. Gotomsdos used two parameters to solve it, while my original idea was to complete it automatically without providing parameters. Since Gotomsdos has solved this problem and everyone has recognized this method at present, I wonder if doing more work by me is redundant?
Floor 250 Posted 2007-06-21 07:19 ·  中国 安徽 马鞍山 电信
金牌会员
★★★★
Credits 3,946
Posts 1,884
Joined 2006-01-20 13:00
20-year member
UID 49283
Gender Male
Status Offline
minito has compatibility issues on my machine. The problem was posted after his post, but unfortunately there was no answer. So now I have to give up using it.
------------------------------
Last time I reported that the Lenovo machine has 4 partitions, but minitow only detected one partition problem. Today I tested again, removed /nohp, and the result is still the same. I wanted to back up the MBR in Windows, but it failed and stopped running. I suspect whether there is a Lenovo protection program working.
Enter DOS, run minito, and there is no result.
Switched to dspt, the detected hard disk data is correct. Backed up the first sector data. Found that the partition part of the data is a bit different from the conventional one, not sure if it is the reason for minito's detection error. Posted the partition table part of the data for reference.
8001010007FEFFFF3F00000081142A01
00000000000000000000000000000000
0000C1FF0FFEFFFFC0142A013E219D03
00000000000000000000000000000000
55AA
Windows 一键还原
http://www.yjhy.com
Floor 251 Posted 2007-06-21 07:25 ·  中国 安徽 马鞍山 电信
金牌会员
★★★★
Credits 3,946
Posts 1,884
Joined 2006-01-20 13:00
20-year member
UID 49283
Gender Male
Status Offline
Ask, what is the difference between diskrw and dsptw? In previous versions, dspt included the functions of diskrw and dpit, but now in the test version there are only two files, and there is no win32 version of dpit. So I want to ask if there is any difference in the new version.

[ Last edited by lianjiang2004 on 2007-6-21 at 07:27 AM ]
Windows 一键还原
http://www.yjhy.com
Floor 252 Posted 2007-06-21 09:00 ·  中国 广东 深圳 福田区 电信
高级用户
★★
Credits 525
Posts 222
Joined 2006-08-28 21:07
19-year member
UID 61476
Status Offline
Originally posted by 19951001 at 2007-6-20 23:25:



I've been trying to solve the problem of DOS drive letters when loading NTFS4DOS and IFS. My idea is to determine in the program whether these two programs are loaded by myself. I haven't solved this problem yet. Gotomsdos uses two...

I support automatic detection of this situation. Consider the drive letter arrangement of GOTOmsdos (divided into win/dos)
Personally, I think under Windows, use the Windows arrangement, and under DOS, use the DOS arrangement (no need to divide into two).
If you use this parameter without loading the driver, then the retrieved drive letter may be incorrect,
and may cause misoperation. So I didn't use the GOTOmsdos program.

mi.com can view memory information, and the general judgment is based on this.
(This is actually not 100% reliable. IFS sometimes has multiple loads or unloads, and there may still be this information in memory even if it is unloaded. NTFS4dos has not been tested)
If automatic detection is performed, I think it can be like this: FAT partitions must have drive letters in DOS.
As for hidden partitions and NTFS partitions, if there are other drive letters (excluding floppy drives, optical drives, memory disks), it can be determined that the NTFS driver is loaded. The accuracy of this should be relatively high.

There is another detection method, which is to judge whether the interrupt has been changed. But it may require the original address.
The idea comes from escape. I don't know how to implement it.

I don't know what the logic of GOTOmsdos is. You might as well look at its program source code.
I can't understand it...

[ Last edited by cchessbd on 2007-6-21 at 09:10 AM ]
Floor 253 Posted 2007-06-21 11:52 ·  中国 安徽 马鞍山 电信
金牌会员
★★★★
Credits 3,946
Posts 1,884
Joined 2006-01-20 13:00
20-year member
UID 49283
Gender Male
Status Offline
There are some machines with FAT partitions that have no drive letters under DOS (non-hidden partitions, which have drive letters under Windows). This can be seen in the user error reports of one - key Ghost. The following is an example.
-----------------------------
Key[1] 1.1:
Key[2] 1:1
Path 1.1:
Desc 1.1: []
Type NTFS
Disk 0
Offset 63

Key[1] 1.2:
Key[2] 1:2
Key[3] C:
Path C:
Desc C: 1.2: [DISK1_VOL2]
Type FAT
Disk 0
Offset 9783648

Key[1] 1.3:
Key[2] 1:3
Path 1.3:
Desc 1.3: [DISK1_VOL3]
Type FAT
Disk 0
Offset 23471028
Windows 一键还原
http://www.yjhy.com
Floor 254 Posted 2007-06-21 13:17 ·  中国 广东 深圳 福田区 电信
高级用户
★★
Credits 525
Posts 222
Joined 2006-08-28 21:07
19-year member
UID 61476
Status Offline
Indeed, sometimes partition table issues can cause this situation. IFS loading can recognize some NT partitions, but GHOST can only recognize the first two partitions (1:1, 1:2), and the others are recognized as local drives (after loading IFS). At this time, the recovery speed is only a few tenths of the original (in Windows), and in DOS, it is only one thousandth of the original (showing a time of more than 90 hours...). This situation can generally be fixed with diskgen or PTDD. For special cases, only the partition table can be restored from the backup.

Refer to a topic I posted on Dos Home (that is the special case above): http://doshome.net/bbs/dispbbs.asp?boardID=19&ID=21468

The standard partition table does not have this problem.
Floor 255 Posted 2007-06-21 13:42 ·  中国 广东 汕头 电信
初级用户
Credits 108
Posts 38
Joined 2006-05-07 10:16
20-year member
UID 55078
Status Offline
Thanks, I'll bookmark it first.
‹ Prev 1 15 16 17 18 19 38 Next ›
Forum Jump: