LinuxForum.Fans
Тема

Смонтировать *.img

Автор: BashOrgRu 3 сообщений 2190 просмотров
#272519

Здравствуйте, есть образ *.img файловая система jffs2, хочу смонтировать содержимое образа в папку /mnt/ltm, как мне это сделать?
Пробовал:

text
mount 0o loop -t jffs2 /home/jacuba/image/image-ltm.img /mnt/ltm

В ответ получаю:

mount: wrong fs type, bad option, bad superblock on /dev/loop0,
missing codepage or helper program, or other error
In some cases useful info is found in syslog - try
dmesg | tail or so

Заранее спасибо за помощь.

#272520
"BashOrgRu" написал:
mount 0o loop -t jffs2 /home/jacuba/image/image-ltm.img /mnt/ltm

Вероятнто, опи́ска, должно быть mount -o loop ...
...и ещё, man mount ничего не знает о файловой системе jffs2.

#272522
"Lupo Alberto" написал:
...и ещё, man mount ничего не знает о файловой системе jffs2.

http://www.linux-mtd.infradead.org/faq/jffs2.html#L_loopback
Хотя должна знать :(


I cannot loop mount a JFFS2 image

JFFS2 images can not be loop mounted. The loop device is essentially a driver which represents files as block devices. But JFFS2 works on top of MTD devices which are different. So an "mtdloop" device would be needed for this, but nobody implemented it yet.

The only way to manipulate JFFS2 images is by copying them into a mtdram device and mounting the device with JFFS2.

Also, if you are desperate, then fix jffs2_dump to recreate the filesystem from the image. It's not hard. All the basics are done already.


Do I need to use mtdblock to mount my JFFS2 filesystem?

In general, mtdblock is not required to mount JFFS2 filesystems. One can use the MTD device name or minor number to specify the MTD device that contains the JFFS2 filesystem. For example, both:
text

mount -t jffs2 mtd2 /foo

mount -t jffs2 mtd:name_of_device /foo

should both work assuming the device specified actually contains a valid JFFS2 filesystem.

There are two cases where this does not work. The first is when JFFS2 is used as a root filesystem. For now, this requires the mtdblock device to be specified for root= on the kernel command line. The second case is when the mount binary that is being used does not play nicely with the above format. The BusyBox version of mount is known to not work without the mtdblock device.

Войдите или зарегистрируйтесь, чтобы ответить.