On Mon, 2019-07-01 at 14:32 -0700, James Bottomley wrote: [...] > Empirically, I've found that as long as the badblocks don't include > any block from 0-250 ext2/3 seems to be happy creating a valid > filesystem. Unfortunately with the label being 64k (so even if the > palo partition is first it starts at an offset of 64k) and our > alignment being on 256k absolute, we usually end up starting the > badblocks at around block 224. Based on this observation, this fixes palo for me ... at least I can create and check a palo ext2 partition after this. James --- diff --git a/palo/palo.c b/palo/palo.c index 68b85cf..ce36612 100644 --- a/palo/palo.c +++ b/palo/palo.c @@ -443,8 +443,9 @@ do_cdrom(int media, int kernel32, int kernel64, #define EXT2_HOLE ((MAXBLSIZE + 1) / EXT2_BLOCKSIZE) /* offset in bytes before start of hole, ext2 doesn't allow holes at - * to cover the first four blocks of the filesystem */ -#define EXT2_OFFSET (4*EXT2_BLOCKSIZE) + * to cover the first four blocks of the filesystem + * FIXME: a problem in mke2fs doesn't allow bad block under 250 */ +#define EXT2_OFFSET (251*EXT2_BLOCKSIZE) int do_formatted(int init, int media, const char *medianame, int partition,