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:20
中国DOS联盟论坛 » DOS开发编程 & 发展交流 (开发室) » Disk sector reading and writing, partition information management tool Dsptw (updated on 2008.11.29) View 112,572 Replies 565
Floor 91 Posted 2007-01-16 21:11 ·  中国 北京 中移铁通
高级用户
★★
流落街头
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 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.
Floor 92 Posted 2007-01-16 22:59 ·  中国 安徽 马鞍山 电信
金牌会员
★★★★
Credits 3,946
Posts 1,884
Joined 2006-01-20 13:00
20-year member
UID 49283
Gender Male
Status Offline
Looking forward to getting it soon. Hehe.
Windows 一键还原
http://www.yjhy.com
Floor 93 Posted 2007-01-18 06:25 ·  中国 江苏 南京 联通
高级用户
★★
Credits 525
Posts 222
Joined 2006-08-28 21:07
19-year member
UID 61476
Status Offline
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.
Floor 94 Posted 2007-01-18 11:44 ·  中国 江苏 南京 联通
高级用户
★★
Credits 525
Posts 222
Joined 2006-08-28 21:07
19-year member
UID 61476
Status Offline
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!
Floor 95 Posted 2007-01-18 20:55 ·  中国 安徽 马鞍山 电信
金牌会员
★★★★
Credits 3,946
Posts 1,884
Joined 2006-01-20 13:00
20-year member
UID 49283
Gender Male
Status Offline
It's not 1, it should be 0. Only the ghost version starts with 1.
Windows 一键还原
http://www.yjhy.com
Floor 96 Posted 2007-01-19 01:41 ·  中国 北京 中移铁通
高级用户
★★
流落街头
Credits 570
Posts 272
Joined 2005-10-17 10:51
20-year member
UID 43609
Gender Male
From 北京
Status Offline
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.
Floor 97 Posted 2007-01-19 01:49 ·  中国 江苏 南京 电信
高级用户
★★
Credits 525
Posts 222
Joined 2006-08-28 21:07
19-year member
UID 61476
Status Offline
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
Floor 98 Posted 2007-01-19 05:55 ·  中国 北京 中移铁通
高级用户
★★
流落街头
Credits 570
Posts 272
Joined 2005-10-17 10:51
20-year member
UID 43609
Gender Male
From 北京
Status Offline
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, Credits to download 1 pts, Downloads: 23)
Floor 99 Posted 2007-01-19 14:17 ·  中国 北京 联通
高级用户
★★★
Credits 972
Posts 420
Joined 2004-05-16 00:00
22-year member
UID 24467
Gender Male
Status Offline
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"
平生进退如飙风
Floor 100 Posted 2007-01-19 23:01 ·  中国 江苏 南京 联通
高级用户
★★
Credits 525
Posts 222
Joined 2006-08-28 21:07
19-year member
UID 61476
Status Offline
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.
Floor 101 Posted 2007-01-19 23:53 ·  中国 安徽 马鞍山 电信
金牌会员
★★★★
Credits 3,946
Posts 1,884
Joined 2006-01-20 13:00
20-year member
UID 49283
Gender Male
Status Offline
Can you provide a Windows version with the /noext parameter? Thanks.
Windows 一键还原
http://www.yjhy.com
Floor 102 Posted 2007-01-19 23:59 ·  中国 北京 中移铁通
高级用户
★★
流落街头
Credits 570
Posts 272
Joined 2005-10-17 10:51
20-year member
UID 43609
Gender Male
From 北京
Status Offline
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 ]
Floor 103 Posted 2007-01-20 00:02 ·  中国 北京 中移铁通
高级用户
★★
流落街头
Credits 570
Posts 272
Joined 2005-10-17 10:51
20-year member
UID 43609
Gender Male
From 北京
Status Offline
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
Floor 104 Posted 2007-01-20 00:04 ·  中国 北京 中移铁通
高级用户
★★
流落街头
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-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?
Floor 105 Posted 2007-01-20 00:10 ·  中国 江苏 无锡 联通
新手上路
Credits 9
Posts 5
Joined 2006-11-02 01:14
19-year member
UID 69227
Gender Male
Status Offline
Haha. Support good stuff. Thanks.
‹ Prev 1 5 6 7 8 9 38 Next ›
Forum Jump: