Доработка файловой системы на NAND накопителе
Версия от 14:21, 6 февраля 2023; TaushkanovKV (обсуждение | вклад) (Новая страница: «Форматирование раздела: ubiformat /dev/mtd10 -s 2048 -O 2048 Создание тома на разделе с максимально дос...»)
Форматирование раздела:
ubiformat /dev/mtd10 -s 2048 -O 2048
Создание тома на разделе с максимально доступным размером:
ubimkvol /dev/ubi1 -N optfs -m
Смонтируем два раздела одновременно.
root@agava6432_30:~# ubiattach /dev/ubi_ctrl -m 9 -O 2048 [ 155.104000] ubi0: attaching mtd9 [ 155.957456] ubi0: scanning is finished [ 155.975810] ubi0: attached mtd9 (name "NAND.file-system", size 214 MiB) [ 155.982484] ubi0: PEB size: 131072 bytes (128 KiB), LEB size: 126976 bytes [ 156.024324] ubi0: min./max. I/O unit sizes: 2048/2048, sub-page size 512 [ 156.041109] ubi0: VID header offset: 2048 (aligned 2048), data offset: 4096 [ 156.073123] ubi0: good PEBs: 1712, bad PEBs: 0, corrupted PEBs: 0 [ 156.089556] ubi0: user volume: 1, internal volumes: 1, max. volumes count: 128 [ 156.102847] ubi0: max/mean erase counter: 1/0, WL threshold: 4096, image sequence number: 1174463929 [ 156.114658] ubi0: available PEBs: 0, total reserved PEBs: 1712, PEBs reserved for bad PEB handling: 40 [ 156.125597] ubi0: background thread "ubi_bgt0d" started, PID 828 UBI device number 0, total 1712 LEBs (217382912 bytes, 207.3 MiB), available 0 LEBs (0 bytes), LEB size 126976 bytes (124.0 KiB)
mount -t ubifs ubi0:rootfs /media/ram
root@agava6432_30:~# ubiattach /dev/ubi_ctrl -m 10 -O 2048 [ 159.661425] ubi1: attaching mtd10 [ 159.793666] ubi1: scanning is finished [ 159.808003] ubi1: attached mtd10 (name "NAND.opt-fs", size 32 MiB) [ 159.814239] ubi1: PEB size: 131072 bytes (128 KiB), LEB size: 126976 bytes [ 159.853010] ubi1: min./max. I/O unit sizes: 2048/2048, sub-page size 512 [ 159.869891] ubi1: VID header offset: 2048 (aligned 2048), data offset: 4096 [ 159.880333] ubi1: good PEBs: 256, bad PEBs: 0, corrupted PEBs: 0 [ 159.887885] ubi1: user volume: 0, internal volumes: 1, max. volumes count: 128 [ 159.896402] ubi1: max/mean erase counter: 6/4, WL threshold: 4096, image sequence number: 411538511 [ 159.906678] ubi1: available PEBs: 212, total reserved PEBs: 44, PEBs reserved for bad PEB handling: 40 [ 159.917388] ubi1: background thread "ubi_bgt1d" started, PID 831 UBI device number 1, total 256 LEBs (32505856 bytes, 31.0 MiB), available 212 LEBs (26918912 bytes, 25.7 MiB), LEB size 126976 bytes (124.0 KiB)
mount -t ubifs ubi1:optfs /opt