2019-07-24 01:59:55 +00:00
|
|
|
### Tiny Ext(2/3/4) Images
|
2019-07-12 00:16:27 +00:00
|
|
|
|
2019-07-24 01:59:55 +00:00
|
|
|
The images are of size 64Kb which supports 64 1k blocks and 16 inodes. This is
|
|
|
|
the smallest size mkfs.ext(2/3/4) works with.
|
2019-07-12 00:16:27 +00:00
|
|
|
|
2019-07-24 01:59:55 +00:00
|
|
|
These images were generated using the following commands.
|
2019-07-12 00:16:27 +00:00
|
|
|
|
|
|
|
```bash
|
2019-07-24 01:59:55 +00:00
|
|
|
fallocate -l 64K tiny.ext$VERSION
|
|
|
|
mkfs.ext$VERSION -j tiny.ext$VERSION
|
2019-07-12 00:16:27 +00:00
|
|
|
```
|
|
|
|
|
2019-07-24 01:59:55 +00:00
|
|
|
where `VERSION` is `2`, `3` or `4`.
|
|
|
|
|
2019-07-12 00:16:27 +00:00
|
|
|
You can mount it using:
|
|
|
|
|
|
|
|
```bash
|
2019-07-24 01:59:55 +00:00
|
|
|
sudo mount -o loop tiny.ext$VERSION $MOUNTPOINT
|
2019-07-12 00:16:27 +00:00
|
|
|
```
|
|
|
|
|
|
|
|
`file.txt`, `bigfile.txt` and `symlink.txt` were added to this image by just
|
|
|
|
mounting it and copying (while preserving links) those files to the mountpoint
|
|
|
|
directory using:
|
|
|
|
|
|
|
|
```bash
|
2019-07-24 01:59:55 +00:00
|
|
|
sudo cp -P {file.txt,symlink.txt,bigfile.txt} $MOUNTPOINT
|
2019-07-12 00:16:27 +00:00
|
|
|
```
|
|
|
|
|
|
|
|
The files in this directory mirror the contents and organisation of the files
|
|
|
|
stored in the image.
|
2019-07-24 01:59:55 +00:00
|
|
|
|
|
|
|
You can umount the filesystem using:
|
|
|
|
|
|
|
|
```bash
|
|
|
|
sudo umount $MOUNTPOINT
|
|
|
|
```
|