Hi, On 5/24/25 11:24 PM, Thomas Schmitt wrote:
Just to be sure: Was there any difference in the arguments of your grub-mkrescue run in your initial post and the grub-mkrescue run which produced /tmp/grub.hAhUTa, except the -o paths ?
no difference, the faulty iso with duplicates was the result of "grub-mkrescue -o grub.iso", while the temporary directory without duplicates was the result of "grub-mkrescue -o /does_not_exist/output.iso"
If there was no significant difference in the arguments then the creation of the .mo~ files would have to happen while xorriso is already running. Quite unlikely ... normally. Back to source code studying. I see that grub_install_copy_files() is called multiple times if more than one of GRUB_INSTALL_PLATFORM_I386_PC, GRUB_INSTALL_PLATFORM_I386_EFI, or GRUB_INSTALL_PLATFORM_X86_64_EFI is configured. So can it be that your /tmp filesystem has the habit to keep backup copies when files are overwritten ? (But why would that not have happened with the interrupted run ?)
Check this - tried stracing grub-mkrescue: renergy ~ # strace -o gentoo-grub-mkrescue.strace grub-mkrescue -o grub.iso xorriso 1.5.6 : RockRidge filesystem manipulator, libburnia project. Drive current: -outdev 'stdio:grub.iso' Media current: stdio file, overwriteable Media status : is blank Media summary: 0 sessions, 0 data blocks, 0 data, 129g free Added to ISO image: directory '/'='/tmp/grub.Y1wajm' xorriso : UPDATE : 982 files added in 1 seconds xorriso : UPDATE : 982 files added in 1 seconds xorriso : NOTE : Copying to System Area: 512 bytes from file '/usr/lib/grub/i386-pc/boot_hybrid.img' ISO image produced: 13984 sectors Written to medium : 13984 sectors at LBA 0 Writing to 'stdio:grub.iso' completed successfully. renergy ~ # grep de.mo~ gentoo-grub-mkrescue.strace rename("/tmp/grub.Y1wajm/boot/grub/locale/de.mo", "/tmp/grub.Y1wajm/boot/grub/locale/de.mo~") = 0 unlink("/tmp/grub.Y1wajm/boot/grub/locale/de.mo~") = 0 rename("/tmp/grub.Y1wajm/boot/grub/locale/de.mo", "/tmp/grub.Y1wajm/boot/grub/locale/de.mo~") = 0 newfstatat(AT_FDCWD, "/tmp/grub.Y1wajm/boot/grub/locale/de.mo~", {st_mode=S_IFREG|0644, st_size=150650, ...}, AT_SYMLINK_NOFOLLOW) = 0 newfstatat(AT_FDCWD, "/tmp/grub.Y1wajm/boot/grub/locale/de.mo~", {st_mode=S_IFREG|0644, st_size=150650, ...}, 0) = 0 unlink("/tmp/grub.Y1wajm/boot/grub/locale/de.mo~") = 0 renergy ~ # So it is grub-mkrescue that is creating the .mo~ files, but then deletes them; this cycle (which I do not like, but should be ok) repeats twice, or rather should repeat twice - but the actual result is the file is there, despite last syscall regarding it being "unlink" renergy ~ # mount grub.iso /mnt/iso -o ro renergy ~ # ls -l /mnt/iso/boot/grub/locale/de.mo~ -r--r--r-- 1 root root 150650 May 25 05:55 /mnt/iso/boot/grub/locale/de.mo~ renergy ~ # Best regards, Adam