1

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.

A.A.
  • 125
  • 1
  • 11

1 Answers1

1

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.

justinsg
  • 738
  • 6
  • 11
  • Thanks @Justin for the reply, I tried to build an .hddimg and it fails, I added hddimg to IMAGE_FSTYPES and inherit image-live class but I got a do_bootimg error. The error link: https://stackoverflow.com/questions/70755964/yocto-failed-to-buid-hddimg-error-do-bootimg – A.A. Jan 18 '22 at 13:25