Simulate ubifs on PC

Here is a step by step way of simulate UBIFS on PC,

We use nandsim on UBUNTU 14.04

sudo rmmod nandsim
cat /proc/mtd

Create 256M Flash in PC’s RAM
sudo modprobe nandsim first_id_byte=0x20 second_id_byte=0xaa third_id_byte=0x00 fourth_id_byte=0x15

Check mtd0 created!

cat /proc/mtd

Attach Ubi0 to mtd0!

sudo modprobe ubi mtd=0

Make a volume on ubi0, with volume name myos!

sudo ubimkvol /dev/ubi0 -N myos -s 200MiB

check /dev/ubi0 created!

ls /dev

If no /dev/ubi0, attach it!!

sudo ubiattach -p /dev/mtd0

Check again!!

ls /dev
sudo ubimkvol /dev/ubi0 -N myos -s 200MiB

mkdir /mnt/ubifs
sudo mkdir /mnt/ubifs
sudo mount -t ubifs ubi0:myos /mnt/ubifs/

sudo cp ~/test.ini /mnt/ubifs/
touch test.ini
sudo cp ~/test.ini /mnt/ubifs/

Now you have it, ubifs on your PC, read and write to it.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

Blog at

Up ↑

%d bloggers like this: