Create a temporary Linux filesystem environment

How to do things, solutions, recipes, tutorials
Post Reply
Message
Author
User avatar
nic007
Posts: 3408
Joined: Sun 13 Nov 2011, 12:31
Location: Cradle of Humankind

Create a temporary Linux filesystem environment

#1 Post by nic007 »

Editing of sfs files, remastering need to be done in a running Linux filesystem environment. With a frugal install this is normally done by either using RAM (if you have sufficient), using a Linux partition (if you have one and it's big enough) or enlarging your save file for this purpose. In my case however I do not have enough RAM or a Linux partition and I don't want to fiddle around with my existing save file (most of the time I do not even use a save file). A "pseudo save file" can be used as alternative. In the following example I will create a file called builder.2fs (750MB in size) in my /mnt/home directory: Change the path, file name and size accordingly to your needs.

Code: Select all

dd if=/dev/zero of=/mnt/home/builder.2fs bs=1k count=750000
followed by

Code: Select all

mke2fs -q -m 0 -F /mnt/home/builder.2fs
or use a little bash script like this:

Code: Select all

#!/bin/sh
dd if=/dev/zero of=/mnt/home/builder.2fs bs=1k count=750000
sleep 5
mke2fs -q -m 0 -F /mnt/home/builder.2fs
To make an extension 3 file, change name of file to .3fs and use mkfs.ext3 instead of mke2fs



So, whenever I want to do editing, etc. I will mount this file and use it as my linux filesystem environment. After using it, you can delete the contents and unmount.

Post Reply