-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
LABEL does not update the volume name in the BPB #130
Comments
The label in the BPB is actually written directly by the kernel when a label file is created. At least this is the MS-DOS behaviour. This is a comment of mine over at the LABEL Gitlab repo. I cross post here in case an account es needed to read it:
|
I think that TREE should be updated to use the volume file insted of the BPB. But should be double checked how the MS TREE behaves. |
Are you saying this should be filled as an EDR bug? :)
Possibly. It was the original pdTree behaviour btw. I changed it at some point because I used int 21h,ah=69h to read the BPB's serial number, and getting the label at the same time is essentially free. |
The canonical location is the volume file. Both the EDR and the FreeDOS kernel currently lack the ability to update the BPB volume id when the volume file is created. Indeed this should be created as an issue. |
There is a bunch of tools that display or set the volume name: vol, dir, tree, label, format, fdisk... maybe more (diskcopy?). it would probably be good to check them all and verify what they read/write. It's confusing to have this info in two different places, esp since the BPB one is more tolerant than the volume file (since it allows to use a name that is already taken by a file entry in the root directory) |
We can remove FDISK from the list. It does not handle BPBs at all. |
Sorry, volume files... It has no knowledge of file systems. |
Strategy should be: let tools use label file when possible, and let the kernel sync the BPB when label file is changes. FreeDOS FORMAT sets both, according to Eric Auer. |
As far as I know, a label with the same name as an ordinary file can be created, at least under MS-DOS. But I will check a few things in the next days... |
Corresponding kernel issue: SvarDOS/edrdos#118 |
True. Tested and confirmed on MS-DOS 5, MS-DOS 6 and SvarDOS (EDR). |
I did some tests with MS-DOS 6.22 and have to correct myself: even Microsoft FDISK shows the volume label, and not the BPB volume id for initialized FAT partitions. So the Microsoft tools indeed seem to make use only of the volume label apart from keeping the BPB field in sync. I tested by using DEBUG to patch the bootsector with an altered volume ID:
This sets the first three letters of the volume id to Confirmed to use the volume label:
|
Corresponding Free FDISK issue: FDOS/fdisk#88 |
Further tests revealed that the above listed tools ONLY use the volume label file, and do not revert to the BPB volume id if no file is found. |
So we know now that the EPBP volume string is only a nuisance. I wonder what was Microsoft's rationale behind introducing it in DOS 4. And who the int 21h,ah=69h call was destined for. |
TREE 20241011 uses a "findfirst" lookup for a VOLID file to display the volume label. |
Label updates only the "volume file" in the root directory of the drive, but not the volume string in the BPB. I do not know why the volume name appears in two different places but surely the information should be the same in both places.
I suppose LABEL should call INT 0x21,AH=0x69 on top of creating the volume file.
It's easy to spot because SvarDOS TREE displays the BPB volume, while DIR shows the volume file.
Also checked on MS-DOS 5 - there LABEL updates the BPB correctly.
The text was updated successfully, but these errors were encountered: