summaryrefslogtreecommitdiff
path: root/arch/x86/boot/mtools.conf.in
diff options
context:
space:
mode:
authorH. Peter Anvin (Intel) <hpa@zytor.com>2021-09-10 17:39:06 -0700
committerBorislav Petkov <bp@suse.de>2021-09-29 11:06:47 +0200
commit067595d728179219c120dd50b4dc711e92f1eb16 (patch)
treef9aa4e40c099a93fbaf88fae4bbc3cb51f79ec4a /arch/x86/boot/mtools.conf.in
parent5816b3e6577eaa676ceb00a848f0fd65fe2adc29 (diff)
x86/boot: Fix make hdimage with older versions of mtools
Some versions of mtools (fixed somewhere between 4.0.31 and 4.0.35) generate bad output for mformat when used with the partition= option. Use the offset= option instead. An mtools.conf entry is *also* needed with partition= to support mpartition; combining them in one entry does not work either. Don't specify the -t option to mpartition; it is unnecessary and seems to confuse mpartition under some circumstances. Also do a few minor optimizations: Use a larger cluster size; there is no reason for the typical 4K clusters when we are dealing mainly with comparatively huge files. Start the partition at 32K. There is no reason to align it more than that, since the internal FAT filesystem structures will at best be cluster-aligned, and 32K is the maximum FAT cluster size. [ bp: Remove "we". ] Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com> Signed-off-by: Borislav Petkov <bp@suse.de> Link: https://lkml.kernel.org/r/20210911003906.2700218-1-hpa@zytor.com
Diffstat (limited to 'arch/x86/boot/mtools.conf.in')
-rw-r--r--arch/x86/boot/mtools.conf.in5
1 files changed, 3 insertions, 2 deletions
diff --git a/arch/x86/boot/mtools.conf.in b/arch/x86/boot/mtools.conf.in
index 9e2662d01364..174c60508766 100644
--- a/arch/x86/boot/mtools.conf.in
+++ b/arch/x86/boot/mtools.conf.in
@@ -14,7 +14,8 @@ drive v:
drive w:
file="@OBJ@/fdimage" cylinders=80 heads=2 sectors=36 filter
-# Hard disk
+# Hard disk (h: for the filesystem, p: for format - old mtools bug?)
drive h:
+ file="@OBJ@/hdimage" offset=32768 mformat_only
+drive p:
file="@OBJ@/hdimage" partition=1 mformat_only
-