中国DOS联盟论坛

China DOS Union

-- Unite DOS · Advance DOS · Grow DOS --
Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum
Guest | Log in | Register | Members | Search | China DOS Union
中国DOS联盟论坛
The time now is 2026-10-02 22:51
47,813 topics / 349,918 posts / today 0 new / 48,279 members
DOS开发编程 & 发展交流 (开发室) » Disk sector reading and writing, partition information management tool Dsptw (updated on 2008.11.29)
Printable Version  123,509 / 565
Floor91 19951001 Posted 2007-01-16 21:11
高级用户 Posts 272 Credits 570 From 北京
Originally posted by amao at 2007-1-16 09:45:
Same result as the one above
But the volume label of the unformatted DOS FAT16 volume is garbled


Thanks! I will find a way to handle it.
Floor92 lianjiang2004 Posted 2007-01-16 22:59
金牌会员 Posts 1,884 Credits 3,946
Looking forward to getting it soon. Hehe.
Floor93 cchessbd Posted 2007-01-18 06:25
高级用户 Posts 222 Credits 525
Originally posted by 19951001 at 2007-1-16 21:11:


Thanks! I will find a way to handle it.

The /ghost parameter, I feel, is not very useful now. If you can represent the size of each partition, remaining space, ID, and format using environment variables, it would be the most convenient.
It would be best if this could be done, and perhaps it could be made into a command-line partition and disk tool that surpasses aefdisk or pqmagic.
I think this is your direction. For your reference.

aefdisk is actually also very small. Actually, the detection parameters should not be too large, because there is no need to take up space.
Floor94 cchessbd Posted 2007-01-18 11:44
高级用户 Posts 222 Credits 525
There are serious problems from the 12th to the 28th!!!!!

I tested in a virtual machine and a real machine.
Using dspt.com 1 /l only shows done! No partition information.
Using dspt.com 1 /s gets a file of 0 bytes!

Please be sure to test carefully by yourself for the versions released later, and release them after confirming that they are correct!
Thank you!
Floor95 lianjiang2004 Posted 2007-01-18 20:55
金牌会员 Posts 1,884 Credits 3,946
It's not 1, it should be 0. Only the ghost version starts with 1.
Floor96 19951001 Posted 2007-01-19 01:41
高级用户 Posts 272 Credits 570 From 北京
Thanks, everyone's testing.

I also found this problem. I set the error code to 0 at the beginning of the program. When detecting that the disk does not exist, I directly exit and print the error code. Actually, when detecting that the disk does not exist, I should reset the error code again.

When the disk does not exist, it displays done! Actually, no operation is performed.
Floor97 cchessbd Posted 2007-01-19 01:49
高级用户 Posts 222 Credits 525
Originally posted by lianjiang2004 at 2007-1-18 20:55:
It's not 1, it should be 0.
Only the ghost version starts with 1.


Hehe, I got a bit too excited.
In a hurry
Floor98 19951001 Posted 2007-01-19 05:55
高级用户 Posts 272 Credits 570 From 北京
to darkradx :


1. Problem occurrence: The same XP GHOST image is restored to two hard drives of the same machine, and as a result, it cannot boot up.
2. Solution: First disable one of them, then issue the "FDISK /MBR" command.
3. Root cause: XP does not allow hard drives with the same DiskGUID to appear.
(DiskGUID is in the 0x1B8 to 0x1BB bytes of the MBR)
4. Requirement: A program smaller and more flexible than FDISK (FDISK takes up space, and when there are two or more hard drives, FDISK /MBR doesn't work).
Example:
View: DISKGUID 80
Random modification:
DISKGUID 80 /RAMDOM
DISKGUID 80 /CHANGE
Specified modification:
DISKGUID 80 0x12345678
DISKGUID 80 "78 56 34 12"
(80, 81... or 0, 1... it's all the same meaning as per the programmer's intention)


The program made according to your functional requirements.

2007.1.22
According to the requirement of building 100, add displaying the GUID before and after the change.

[ Last edited by 19951001 on 2007-1-22 at 09:45 PM ]

Attachments
diskguid.rar (9.03 KiB)
Floor99 darkradx Posted 2007-01-19 14:17
高级用户 Posts 420 Credits 972
Tested for a while, all the required functions are implemented. Thank you very much.

Then ask a few questions:
1. Which step is the prompt OK: a. Write back buffer; b. Write back buffer and return no error; c. Write back buffer and then read back no error
2. Can't see before and after
3. The parameter is 0x1234568, the result is to write "12 34 56 78", can it be changed to write "78 56 34 12"
Floor100 cchessbd Posted 2007-01-19 23:01
高级用户 Posts 222 Credits 525
Originally posted by 19951001 at 2007-1-19 05:55:
to darkradx :



The program made according to your functional requirements.


I think you didn't add the -pmbr parameter (to keep the original MBR) when using Ghost.
Floor101 lianjiang2004 Posted 2007-01-19 23:53
金牌会员 Posts 1,884 Credits 3,946
Can you provide a Windows version with the /noext parameter? Thanks.
Floor102 19951001 Posted 2007-01-19 23:59
高级用户 Posts 272 Credits 570 From 北京
Originally posted by darkradx at 2007-1-19 14:17:
Tested for a while, all the required functions are implemented, really very grateful.
Ask a few more points:
1. What step is the prompt OK: a. Write back buffer; b. Write back buffer and return value is error-free; c. Write back buffer and read back error-free
2. before and after are not visible
3. Parameter 0x1234568, the result is writing "12 34 56 78", can it be changed to writing "78 56 34 12"


1. First read the MBR from the hard disk to the buffer, and then write the buffer back to the MBR after modification.
Of course, if it is only displayed, it will not be written back. Both reading and writing require correct without error.
2. The diskguid 0 shows the current one. After you change it, then display it, the new one will be shown,
so both befor and after will be available
3. The parameter format is defined as 0xhhhhhhhh in the program, and it cannot be written in other forms. Other forms will display the usage.

[ Last edited by 19951001 on 2007-1-20 at 12:07 AM ]
Floor103 19951001 Posted 2007-01-20 00:02
高级用户 Posts 272 Credits 570 From 北京
Originally posted by lianjiang2004 at 2007-1-19 23:53:
Can you provide a Windows version with the /noext parameter? Thanks.


Sure, I've been busy these days. Can you wait a few days? Leave me an email address and I'll send it to you
Floor104 19951001 Posted 2007-01-20 00:04
高级用户 Posts 272 Credits 570 From 北京
Originally posted by cchessbd at 2007-1-19 23:01:


I think you didn't add the parameter -pmbr when using ghost (to keep the original MBR)


??? I don't know what you're talking about?
Floor105 demotool Posted 2007-01-20 00:10
新手上路 Posts 5 Credits 9
Haha. Support good stuff. Thanks.
Prev  1 … 4 5 6 7 8 9 10 … 38  Next
[ Contact the Union admin team - 中国DOS联盟 - Standard version ]
Sponsored by ifanr Inc | © 2001–2023