Public bug reported:
Binary package hint: dosfstools
Using mkdosfs and syslinux to generate an empty FAT filesystem that
boots into SYSLINUX works with dosfstools 2.11-2.3ubuntu1 and fails with
2.11-5. Simple test case:
[EMAIL PROTECTED]:~/tmp$ dd if=/dev/zero of=x.img bs=1024k count=1 ;
./mkdosfs-2.11-2.3ubuntu1 -v x.img ; syslinux x.img ; qemu -hda x.img
1+0 records in
1+0 records out
1048576 bytes (1.0 MB) copied, 0.00670704 s, 156 MB/s
mkdosfs-2.11-2.3ubuntu1 2.11 (12 Mar 2005)
x.img has 64 heads and 32 sectors per track,
logical sector size is 512,
using 0xf8 media descriptor, with 2048 sectors;
file system has 2 12-bit FATs and 4 sectors per cluster.
FAT size is 2 sectors, and provides 502 clusters.
Root directory contains 512 slots.
Volume ID is 490fffdc, no volume label.
[[ qemu shows a SYSLINUX boot: prompt ]]
[EMAIL PROTECTED]:~/tmp$ dd if=/dev/zero of=x.img bs=1024k count=1 ;
./mkdosfs-2.11-5 -v x.img ; syslinux x.img ; qemu -hda x.img
1+0 records in
1+0 records out
1048576 bytes (1.0 MB) copied, 0.00678806 s, 154 MB/s
mkdosfs-2.11-5 2.11 (12 Mar 2005)
x.img has 64 heads and 32 sectors per track,
logical sector size is 512,
using 0xf8 media descriptor, with 2048 sectors;
file system has 2 12-bit FATs and 4 sectors per cluster.
FAT size is 2 sectors, and provides 502 clusters.
Root directory contains 512 slots.
Volume ID is 490ffffa, no volume label.
[[ qemu shows a SYSLINUX "Boot error" message ]]
The offending code is this change to mkdosfs.c:
@@ -881,7 +899,7 @@
printf( "Using %d reserved sectors\n", reserved_sectors );
bs.fats = (char) nr_fats;
if (!atari_format || size_fat == 32)
- bs.hidden = CT_LE_L(hidden_sectors);
+ bs.hidden = bs.secs_track;
else {
/* In Atari format, hidden is a 16 bit field */
__u16 hidden = CT_LE_W(hidden_sectors);
Reverting that change makes mkdosfs work in the test case above.
** Affects: dosfstools (Ubuntu)
Importance: Undecided
Status: New
--
dosfstools generates unbootable disk image
https://bugs.launchpad.net/bugs/293489
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
--
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs