beauty in struggle

Mounting UBI file system(image) using nandsim 본문

After-work/linux

Mounting UBI file system(image) using nandsim

dgdeus 2023. 6. 21. 15:05
728x90
SMALL

- Check target NAND device parameters to simulate it on your RAM

sudo modprobe nandsim first_id_byte=0x2c second_id_byte=0xdc third_id_byte=0x00 fourth_id_byte=0x55

 

- Check the device

cat /proc/mtd

 

- Flash the target UBI image into the device

sudo dd if=ubi_img.bin of=/dev/mtd0 bs=2048

 

- Attach UBI tranlation layer

sudo modprobe ubi
sudo ubiattach -p /dev/mtd0 -O 2048

 

- Check the UBI and mount the device

ubinfo /dev/ubi0
ubinfo /dev/ubi0_0
sudo mount -t ubifs /dev/ubi0_0 ./mnt

 

- To remove the mounted UBI filesystem and device

sudo umount ./mnt
sudo rmmod ubifs ubi nandsim
728x90
LIST
Comments