Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/meithecatte/cursedfs
Make a disk image formatted with both ext2 and FAT at once
https://github.com/meithecatte/cursedfs
Last synced: 4 days ago
JSON representation
Make a disk image formatted with both ext2 and FAT at once
- Host: GitHub
- URL: https://github.com/meithecatte/cursedfs
- Owner: meithecatte
- License: wtfpl
- Created: 2020-01-14T22:53:14.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2023-05-05T17:47:07.000Z (over 1 year ago)
- Last Synced: 2024-12-16T21:12:05.047Z (11 days ago)
- Language: Shell
- Size: 1.95 KB
- Stars: 377
- Watchers: 9
- Forks: 12
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# cursedfs
Make a disk image formatted with both ext2 and FAT, at once.
```bash
~/cursedfs% wget 'https://github.com/meithecatte/cursedfs/releases/download/v1.0/cursed.img'
~/cursedfs% sudo mount -o loop -t ext2 cursed.img mountpoint/
~/cursedfs% ls mountpoint/
mkfs.cursed
~/cursedfs% sudo umount mountpoint/
~/cursedfs% sudo mount -o loop -t msdos cursed.img mountpoint/
~/cursedfs% ls mountpoint/
gudnuse.ogg
```# Why?
[I got nerd-sniped](https://twitter.com/Foone/status/1217162186130198529?s=20)
# How?
It turns out this is surprisingly simple to do: just create a FAT volume with a
lot of reserved sectors and put the ext2 into the reserved sectors. This works
because the filesystems choose different places to put their superblock: FAT
uses the very first sector, while ext2 leaves the first kilobyte unused.# Can I write to the filesystems?
Yes! When I first decided to do this, I thought writing to the image would
surely break everything, but as it turns out, the method I've found means
the filesystems don't conflict.