The ISO 9660 Standard
Posted: Thu Mar 15, 2012 2:29 pm
Hello,
I've been recently tinkering with the standard ISO 9660 filesystem for disk formatting (using a hex editor to create ISO images and then burning those images onto disks). The specification seemed relatively straightforward but Windows (the operating system I was using to test whether the disks were correctly formatted) was not registering the files that I had created on the disk. After changing things around and re-burning ISO images onto about ten disks, I decided to burn a disk using Windows' native disk burner application for comparison.
After doing some testing, I figured out that my problem was that the Logical Block Size I provided, 0x200 bytes (512 bytes, or 2^9, the minimum Logical Block Size as specified by the ISO 9660 Standard) differed from the Logical Block Size that Windows was using, 0x800 (2048 bytes, the typical Logical Sector Size). It seems that even though I provided a 512 Logical Block Size, Windows was still treating the Logical Block Numbers for the directory, path table and file extent base addresses as though my Logical Block Size was 2048 bytes and therefore my directories, path tables and files were not placed at the correct addresses on the disk. In other words, I believe that Windows was taking my Logical Block Numbers and multiplying them by 2048 to get the physical address of the data rather than multiplying the Logical Block Numbers by 512 as specified.
Is this a bug on Windows' part (doubt it because I couldn't get El Torito to work either using a Logical Block Size of 512 bytes) or am I misinterpreting the standard and the way that the Logical Block Size provided affects the usage of Logical Block Numbers?
Is a Logical Block always 2048 bytes regardless of what the Logical Block Size is in the primary volume descriptor? If so, then why does the ISO 9660 Standard make a distinction between Logical Sectors and Logical Blocks and what is the Logical Block Size used for?
I've been recently tinkering with the standard ISO 9660 filesystem for disk formatting (using a hex editor to create ISO images and then burning those images onto disks). The specification seemed relatively straightforward but Windows (the operating system I was using to test whether the disks were correctly formatted) was not registering the files that I had created on the disk. After changing things around and re-burning ISO images onto about ten disks, I decided to burn a disk using Windows' native disk burner application for comparison.
After doing some testing, I figured out that my problem was that the Logical Block Size I provided, 0x200 bytes (512 bytes, or 2^9, the minimum Logical Block Size as specified by the ISO 9660 Standard) differed from the Logical Block Size that Windows was using, 0x800 (2048 bytes, the typical Logical Sector Size). It seems that even though I provided a 512 Logical Block Size, Windows was still treating the Logical Block Numbers for the directory, path table and file extent base addresses as though my Logical Block Size was 2048 bytes and therefore my directories, path tables and files were not placed at the correct addresses on the disk. In other words, I believe that Windows was taking my Logical Block Numbers and multiplying them by 2048 to get the physical address of the data rather than multiplying the Logical Block Numbers by 512 as specified.
Is this a bug on Windows' part (doubt it because I couldn't get El Torito to work either using a Logical Block Size of 512 bytes) or am I misinterpreting the standard and the way that the Logical Block Size provided affects the usage of Logical Block Numbers?
Is a Logical Block always 2048 bytes regardless of what the Logical Block Size is in the primary volume descriptor? If so, then why does the ISO 9660 Standard make a distinction between Logical Sectors and Logical Blocks and what is the Logical Block Size used for?