Doesn't allow forcing file systems to 255 heads
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
dosfstools (Ubuntu) |
New
|
Undecided
|
Unassigned |
Bug Description
Binary package hint: dosfstools
Hi
Very old OMAP3 (e.g. BeagleBoard) boot ROMs and the QEMU emulation thereof don't support anything else than 255 heads in the boot partition from which the first bootloader is read (x-loader / MLO).
Apparently, using a mapper loop device (major 252 here) causes mkdosfs to select a different default (255 heads) than the default when writing to a plain file (63 heads).
15:20 < lool> for files, it checks the size and defaults to 32 sectors and 64
heads
15:21 < lool> for unknown devices, it assumes hard disk and checks the
Running file -s on the loop-mounted device before and after the change results in:
Current images:
/dev/mapper/
After mkdosfs on a loop device:
/dev/mapper/
which clearly indicates the difference in number of heads.
When creating the fs on the mapper device, I see:
unable to get drive geometry, using default 255/63
So I think there are some dosfstools issues here:
a) I think dosfstools tries to be a bit too clever about what the size of the FS means, if the FS is on a loop device or in a regular file, and if the size is one of a standard floppy, dosfstools will assume the geometry of the corresponding floppy
b) dosfstools fails to identify loop devices from the device mapper devices as loop devices
c) dosfstools doesn't allow for any override in sectors/heads
I'd personally rather see a) and b) go away by removing the tests altogether and just doing something clever when on real devices with a geometry (either a real floppy devices with a size which means something in this case, or a hard disk drive with a reported disk geometry; all other cases are guesses). But I guess it's too late to strip that away, as scripts and such might rely on this (well, perhaps nobody uses floppies anymore, but who knows).
So there are two ways to fix this for Ubuntu OMAP(3) images, either by patching the dosfstools defaults, or by allowing overrides and passing these.
Cheers,
ProblemType: Bug
DistroRelease: Ubuntu 10.10
Package: dosfstools 3.0.9-1
ProcVersionSign
Uname: Linux 2.6.35-14-generic x86_64
Architecture: amd64
Date: Tue Aug 10 15:59:50 2010
ProcEnviron:
LANGUAGE=
PATH=(custom, user)
LANG=fr_FR.UTF-8
SHELL=/bin/zsh
SourcePackage: dosfstools
tags: | added: patch |
Updated patch which tweaks the manpage slightly and adds the new flags to usage() output.