weldr / lorax

Tools for creating images, including the Anaconda boot.iso, live disk images, iso's, and filesystem images.
GNU General Public License v2.0
294 stars 160 forks source link

mkksiso fails due to operation on an read-only filesystem #896

Closed apollo13 closed 5 years ago

apollo13 commented 5 years ago

I currently get the following error when running mkksiso using rpms generated from the latest master. My operating system is Fedora 31:

sudo mkksiso  vm_base.cfg ~/Downloads/CentOS-7-x86_64-NetInstall-1908.iso centos.iso --debug
DEBUG:make tmp mountdir /tmp/lorax.imgutils.0wlx036i
INFO:Running... mount -o loop /home/florian/Downloads/CentOS-7-x86_64-NetInstall-1908.iso /tmp/lorax.imgutils.0wlx036i
INFO:mount: /tmp/lorax.imgutils.0wlx036i: WARNING: device write-protected, mounted read-only.
DEBUG:Return code: 0
INFO:Volume Id = CentOS 7 x86_64
INFO:ISO files = ['EFI', 'images', 'isolinux', 'LiveOS']
DEBUG:x86_64 is not supported by this tool
DEBUG:x86_64 is not supported by this tool
DEBUG:x86_64 is not supported by this tool
INFO:Using xorrisofs to create the new iso
WARNING:No boot/grub/grub.cfg file found
WARNING:No images/generic.prm file found
DEBUG:mkefiboot --label=ANACONDA --debug /tmp/mkksiso-74uyej7h/EFI/BOOT /tmp/mkksiso-74uyej7h/images/efiboot.img
DEBUG:root:Namespace(bootdir='/tmp/mkksiso-74uyej7h/EFI/BOOT', disk=False, diskname=None, icon=None, imgtype='default', label='ANACONDA', loglevel=10, outfile='/tmp/mkksiso-74uyej7h/images/efiboot.img', product=None)
INFO:pylorax.imgutils:Size of 2048 block msdos fs at None estimated to be 9179136
INFO:program:Running... losetup --find --show /tmp/mkksiso-74uyej7h/images/efiboot.img
INFO:program:/dev/loop1
DEBUG:program:Return code: 0
INFO:program:Running... udevadm settle --timeout 300
DEBUG:program:Return code: 0
INFO:program:Running... losetup -j /tmp/mkksiso-74uyej7h/images/efiboot.img
INFO:program:/dev/loop1: [0047]:2903458 (/tmp/mkksiso-74uyej7h/images/efiboot.img)
DEBUG:program:Return code: 0
INFO:program:Running... mkfs.msdos -n ANACONDA /dev/loop1
INFO:program:mkfs.fat 4.1 (2017-01-24)
DEBUG:program:Return code: 0
DEBUG:pylorax.imgutils:make tmp mountdir /tmp/lorax.imgutils.4bnnytg3
INFO:program:Running... mount -o shortname=winnt,umask=0077 /dev/loop1 /tmp/lorax.imgutils.4bnnytg3
DEBUG:program:Return code: 0
DEBUG:pylorax.imgutils:copytree /tmp/mkksiso-74uyej7h/EFI/BOOT /tmp/lorax.imgutils.4bnnytg3/EFI/BOOT
INFO:program:Running... cp -R -L --preserve=timestamps /tmp/mkksiso-74uyej7h/EFI/BOOT/. /tmp/lorax.imgutils.4bnnytg3/EFI/BOOT
DEBUG:program:Return code: 0
INFO:program:Running... df /tmp/lorax.imgutils.4bnnytg3
INFO:program:Filesystem     1K-blocks  Used Available Use% Mounted on
INFO:program:/dev/loop1          8926  8456       470  95% /tmp/lorax.imgutils.4bnnytg3
DEBUG:program:Return code: 0
INFO:program:Running... umount /tmp/lorax.imgutils.4bnnytg3
DEBUG:program:Return code: 0
DEBUG:pylorax.imgutils:remove tmp mountdir /tmp/lorax.imgutils.4bnnytg3
INFO:program:Running... losetup --detach /dev/loop1
DEBUG:program:Return code: 0
INFO:program:Running... sync
DEBUG:program:Return code: 0
INFO:Running... umount /tmp/lorax.imgutils.0wlx036i
DEBUG:Return code: 0
DEBUG:remove tmp mountdir /tmp/lorax.imgutils.0wlx036i
Traceback (most recent call last):
  File "/usr/sbin/mkksiso", line 644, in <module>
    main()
  File "/usr/sbin/mkksiso", line 639, in main
    app.run()
  File "/usr/sbin/mkksiso", line 599, in run
    self.remove_generated_files(self.grafts)
  File "/usr/sbin/mkksiso", line 460, in remove_generated_files
    os.unlink(os.path.join(src, f))
OSError: [Errno 30] Read-only file system: '/tmp/lorax.imgutils.0wlx036i/LiveOS/TRANS.TBL'
bcl commented 5 years ago

Thanks, looks like I need to just make a copy of everything instead of trying to use the source iso for parts of it.

apollo13 commented 5 years ago

Yeah, the graft list contained one file from the original iso. I fixed it locally by just skipping errors during deletion, but I do not know if that is the proper fix. Let me know if you need more details or when I should test a fixed commit.

bcl commented 5 years ago

@apollo13 does commit 95fd12e1f0847950a2a7049d179bf6a42982c72c fix mkksiso for you?

apollo13 commented 5 years ago

@bcl Jupp, thank you very much!