Skip to content

Instantly share code, notes, and snippets.

@robot9706
Created August 15, 2018 20:48
Show Gist options
  • Save robot9706/c048e98a45ac0b40d18f3ae071bad3d9 to your computer and use it in GitHub Desktop.
Save robot9706/c048e98a45ac0b40d18f3ae071bad3d9 to your computer and use it in GitHub Desktop.
How to mount an UBI image
#http://www.linux-mtd.infradead.org/faq/ubi.html
#sudo apt-get install mtd-tools
#sudo -i
#UBI mount
mknod /dev/mtd0 c 90 0
modprobe nandsim first_id_byte=0x2c second_id_byte=0xac third_id_byte=0x00 fourth_id_byte=0x15
dd if=ubi.img of=/dev/mtd0 bs=2048
modprobe ubi
ubiattach --dev-path=/dev/mtd0 -O 2048
#Block device
modprobe ubi mtd=/dev/mtd0 block=/dev/ubi0_0
#Mount block device
mkdir /mnt/ub
mount -t ubifs /dev/ubi0_0 /mnt/ub
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment