Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can it be more cursed? #1

Open
jamesdwilson opened this issue Jan 15, 2020 · 5 comments
Open

Can it be more cursed? #1

jamesdwilson opened this issue Jan 15, 2020 · 5 comments

Comments

@jamesdwilson
Copy link

Is it possible to integrate other filesystems? ZFS? ext3? Reiser?

@aerth
Copy link

aerth commented Jan 15, 2020

looks like it! here is 8M fat and 28M ext3

#!/bin/bash

SIZE_EXT2=64000 # sectors, max is 65535
PATH=$PATH:/usr/sbin:/sbin
set -euo pipefail
EXT2_TMP="$(mktemp)"
trap "rm $EXT2_TMP" EXIT

test "$1"

truncate -s 40M "$1" 
truncate -s "$((512*$SIZE_EXT2))" $EXT2_TMP
mkfs.ext3 $EXT2_TMP
mkfs.fat -R $SIZE_EXT2 "$1"
dd if=$EXT2_TMP of="$1" bs=512 skip=1 seek=1 conv=notrunc

@meithecatte
Copy link
Owner

meithecatte commented Jan 15, 2020

All things considered, the parameter that matters the most is probably the superblock position. This is how it looks so far:

  • +0K: FAT12, FAT16, FAT32, HPFS, NTFS, XFS, BFS
  • +1K: ext2, ext3, ext4, HFS, HFS+, minix, EROFS
  • +4K: bcachefs
  • +32K: ISO9660, UDF, JFS
  • +64K: ReiserFS, btrfs

It should be possible to construct a volume with one filesystem from each group.

@meithecatte
Copy link
Owner

ZFS is interesting - it has some important looking structures starting at 16K, up to 256K, but maybe it's possible to fudge in a "comment" in "Name/Value Pairs" (16-128K) so that the 32K and 64K filesystems can fit...

@meithecatte
Copy link
Owner

Also interesting is FreeDOS's LEAN filesystem: "The superblock must be stored in one of any sector in range from 1 to 32, inclusive."

@fstirlitz
Copy link

(That's FreeDOS-32, not FreeDOS per se; it's a separate project. Neither LEAN nor FD32 seems to have gotten any traction anyway; I don't think LEAN was even implemented in FD32 itself, where the idea originated. The only implementation I'm aware of is the spec author's demo program.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants