Closed ruzickap closed 7 years ago
Try it without --qcow2
qcow2 only makes sense in some cases, --make-disk
for example. It cannot be mounted by the host so it isn't possible to make any further changes to the image once it has been installed in the qemu session.
I should add a check for this situation to make it clearer when you can and cannot use qcow2.
Thank you.
Without the --qcow2
parameter I can move "further", but it ends with error:
2017-06-29 18:30:45,616: dracut args = ['--xz', '--add', 'livenet dmsquash-live convertfs pollcdrom qemu qemu-net', '--omit', 'plymouth', '--no-hostonly', '--debug', '--no-early-microcode']
2017-06-29 18:30:45,630: rebuilding initramfs-4.8.6-300.fc25.x86_64.img
2017-06-29 18:30:46,088: failed to unmount /var/tmp/a/lorax.imgutils.ebqfx61_. retrying (1/3)...
2017-06-29 18:30:47,186: failed to unmount /var/tmp/a/lorax.imgutils.ebqfx61_. retrying (2/3)...
Traceback (most recent call last):
File "/usr/sbin/livemedia-creator", line 1167, in make_live_images
rebuild_initrds_for_live(opts, joinpaths(mnt_dir, sys_root), work_dir)
File "/usr/sbin/livemedia-creator", line 507, in rebuild_initrds_for_live
runcmd(cmd, root=sys_root_dir)
File "/usr/lib/python3.5/site-packages/pylorax/executils.py", line 341, in runcmd
return execWithRedirect(cmd[0], cmd[1:], **kwargs)
File "/usr/lib/python3.5/site-packages/pylorax/executils.py", line 228, in execWithRedirect
env_add=env_add, reset_handlers=reset_handlers, reset_lang=reset_lang)[0]
File "/usr/lib/python3.5/site-packages/pylorax/executils.py", line 201, in _run_program
raise subprocess.CalledProcessError(proc.returncode, argv, output)
subprocess.CalledProcessError: Command '['dracut', '--nomdadmconf', '--nolvmconf', '--xz', '--add', 'livenet dmsquash-live convertfs pollcdrom qemu qemu-net', '--omit', 'plymouth', '--no-hostonly', '--debug', '--no-early-microcode', '/results/initramfs-4.8.6-300.fc25.x86_64.img', '4.8.6-300.fc25.x86_64']' returned non-zero exit status 1
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/sbin/livemedia-creator", line 1476, in <module>
main()
File "/usr/sbin/livemedia-creator", line 1454, in main
result_dir = make_live_images(opts, work_dir, disk_img)
File "/usr/sbin/livemedia-creator", line 1169, in make_live_images
umount(joinpaths(mnt_dir, sys_root, "boot"), delete=False)
File "/usr/lib/python3.5/site-packages/pylorax/imgutils.py", line 318, in __exit__
umount(self.mnt)
File "/usr/lib/python3.5/site-packages/pylorax/imgutils.py", line 211, in umount
rv = runcmd(cmd)
File "/usr/lib/python3.5/site-packages/pylorax/executils.py", line 341, in runcmd
return execWithRedirect(cmd[0], cmd[1:], **kwargs)
File "/usr/lib/python3.5/site-packages/pylorax/executils.py", line 228, in execWithRedirect
env_add=env_add, reset_handlers=reset_handlers, reset_lang=reset_lang)[0]
File "/usr/lib/python3.5/site-packages/pylorax/executils.py", line 201, in _run_program
raise subprocess.CalledProcessError(proc.returncode, argv, output)
subprocess.CalledProcessError: Command '['umount', '/var/tmp/a/lorax.imgutils.ebqfx61_']' returned non-zero exit status 32
I can see the mounted filesystem:
# mount | grep '/var/tmp/a/lorax.imgutils.ebqfx61_'
/var/tmp/a/lmc-work-4fmobxf3/squashfs_root/LiveOS/rootfs.img on /var/tmp/a/lorax.imgutils.ebqfx61_ type ext4 (rw,relatime,seclabel,data=ordered)
/dev/mapper/fedora-root on /var/tmp/a/lorax.imgutils.ebqfx61_/results type ext4 (rw,relatime,seclabel,data=ordered)
/dev/mapper/fedora-root on /var/tmp/a/lorax.imgutils.ebqfx61_/var/tmp type ext4 (rw,relatime,seclabel,data=ordered)
It looks like the script is trying to unmount /var/tmp/a/lorax.imgutils.ebqfx61_
without unmounting the /var/tmp/a/lorax.imgutils.ebqfx61_/results
and /var/tmp/a/lorax.imgutils.ebqfx61_/var/tmp
first.
Here is the proper "unmount" sequence:
# umount /var/tmp/a/lorax.imgutils.ebqfx61_
umount: /var/tmp/a/lorax.imgutils.ebqfx61_: target is busy
(In some cases useful info about processes that
use the device is found by lsof(8) or fuser(1).)
# umount /var/tmp/a/lorax.imgutils.ebqfx61_/results
# umount /var/tmp/a/lorax.imgutils.ebqfx61_/var/tmp
# umount /var/tmp/a/lorax.imgutils.ebqfx61_
#
Any idea how I can get over it? Is it a bug or do I have something misconfigured?
I have no idea why something would be mounted on /results or /var/tmp inside the rootfs. Check the logs (especially from anaconda) for anything relating to those paths.
In the program.log
I can see:
Running... mount -o loop /var/tmp/a/lmc-work-qb7g_g4m/squashfs_root/LiveOS/rootfs.img /var/tmp/a/lorax.imgutils.4y6h5lss
Return code: 0
Running... mount -o bind /var/tmp/a/lorax.imgutils.4y6h5lss/boot /var/tmp/a/lorax.imgutils.4y6h5lss//boot
Return code: 0
Running... mount -o bind /var/tmp/a/lmc-work-qb7g_g4m /var/tmp/a/lorax.imgutils.4y6h5lss//results
Return code: 0
Running... mount -o bind /var/tmp /var/tmp/a/lorax.imgutils.4y6h5lss//var/tmp
Return code: 0
Running... dracut --nomdadmconf --nolvmconf --xz --add livenet dmsquash-live convertfs pollcdrom qemu qemu-net --omit plymouth --no-hostonly --debug --no-early-microcode /results/initramfs-4.8.6-30
0.fc25.x86_64.img 4.8.6-300.fc25.x86_64
and then it's not properly "unmounted".
Full log attached: logs.zip
I saw some weird issues with mounting\unmounting when using a virtual esx guest and passing certain disks through to the guest. A reboot of the guest and then running anaconda-cleanup before running livemedia-creator again seemed to fix it.
Oh, ha, I wrote that and totally forgot about it. I think the unmount problem is fallout from a dracut failure since there's a CalledProcessError there. Is there anything else in the logs that looks like a dracut error? Also, it's probably time to move this to bugzilla.redhat.com and file a bug against lorax with all the logs attached.
I created the Bug 1467506 then. All the details are there (including logs + kickstart + example command).
It looks like package dracut-live
is mandatory for successfully build.
Once I add dracut-live
to the %packages
section it started working...
Hello.
I have a Fedora 25 using "lorax-25.19-1.fc25.x86_64" package to build live pxe boot squashfs image.
I'm using the following command
The "fedora25-my.ks" is pretty basic:
Qemu did the job and generates the image, but then I got the error:
Do you have any idea why I'm getting it or what may be wrong? (I do have the same error with Fedora 26 Beta)
Thank you
PetrR