linuximageyoctoddrootfs

Read-only file system issue when convert and copy file to a hard drive


I am using yocto to built .iso image for x86-64 target(laptop), my problem is that I can't write anything in the target, it's "Read-only file system". There is nothing provides the "read-only-rootfs" feature from yocto. When I test the same image for qemux86-64 target, it works fine.

I am using sudo dd if=image.iso of=/dev/sdb to create the files on the hard drive of the laptop.

Any idea how to fix this issue.


Solution

  • The .iso format (ISO 9660) is read-only by design, and doesn't have a system for allocating space for new files.

    Instead, you can configure Yocto to bulid a .hddimg file instead, which will be writable. It's described in image-live.bbclass:

    A .hddimg file which is an msdos filesystem containing syslinux, a kernel, an initrd and a rootfs image. These can be written to harddisks directly and also booted on USB flash disks (write them there with dd).

    To bulid this format, add hddimg to IMAGE_FSTYPES.