Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
How to mount ubifs image in Linux Debian Stretch.
# Install mtd-utils
# $UBIFS is a ubifs image file
# make sure $UBIFS is a ubifs image file
blkid $(UBIFS)
$(UBIFS): ... TYPE="ubifs"
# size of created mtd is 256.0 MiB
/usr/sbin/modprobe nandsim first_id_byte=0x2c second_id_byte=0xda third_id_byte=0x90 fourth_id_byte=0x95
/usr/sbin/flash_erase /dev/mtd0 0 0
/usr/sbin/ubiformat /dev/mtd0 -s 2048 -O 2048
/usr/sbin/modprobe ubi
/usr/sbin/ubiattach -m 0 -d 0 -O 2048
# set $(SIZE) (ex. 200MiB) to value more than size of the ubifs filesystem
/usr/sbin/ubimkvol /dev/ubi0 -N volname -s $(SIZE)
/usr/sbin/ubiupdatevol /dev/ubi0_0 $(UBIFS)
mount -t ubifs /dev/ubi0_0 /mnt
# (taken from: http://lists.infradead.org/pipermail/linux-mtd/2013-October/049229.html )
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.