FedoraForum.org - Fedora Support Forums and Community
Page 1 of 3 1 2 3 LastLast
Results 1 to 15 of 37
  1. #1
    Join Date
    Jun 2008
    Posts
    4

    losetup fails when trying to create a remix using livemedia-creator under mock

    I am trying to build a fedora 26 remix using livemedia-creator in a mock environment. livemedia-creator fails with an error indicating that losetup failed to find a loop device. When I try running losetup directly, it returns an error as shown below:

    <mock-chroot> sh-4.4# losetup -f --show /var/lmc/lmc-disk-u_nhsp_c.img
    losetup: cannot find an unused loop device

    running the same command on the same file from outside mock works just fine as shown below:

    [root@stingray ~]# losetup -f --show /var/lib/mock/fedora-26-x86_64/root/var/lmc/lmc-disk-u_nhsp_c.img
    /dev/loop0

    Does anybody know what exactly is required to be able to run losetup correctly under mock?

  2. #2
    Join Date
    Jan 2013
    Location
    Ventura, CA
    Posts
    155

    Re: losetup fails when trying to create a remix using livemedia-creator under mock

    I am having the same problem with fedora 26 and livemedia-creator (losetup cannot find an unused loop device).

    I wonder if the fact that fedora 26 was only recently released has anything to do with the problem. On fedora 25 I had no problem creating a generic iso based on fedora.

  3. #3
    Join Date
    Jan 2013
    Location
    Ventura, CA
    Posts
    155

    Re: losetup fails when trying to create a remix using livemedia-creator under mock

    I flattened a xfce live ks and made no changes. I still get the losetup error. I wonder if this is a bug with livemedia-creator.
    Last edited by donatom; 21st July 2017 at 03:48 PM.

  4. #4
    Join Date
    Dec 2013
    Location
    United Kingdom
    Posts
    5,276

    Re: losetup fails when trying to create a remix using livemedia-creator under mock

    well something is broken, I tried in mock as well. there's a known issue with url definition (meta url addresses don't work for repositories) but that has got nothing to do with your error message or the python ones I got under F25 either.

    I'm trying to learn how the process works and followed the instructions to the letter. It's frustrating to say the least but such is life. I'll try outside of mock next as I don't have any issues running different architecture VMs instead to achieve the same end goal. I also want to be able to edit the flattened kickstarts with an application I'm comfortable with other than vi which I don't like.

  5. #5
    Join Date
    Jan 2013
    Location
    Ventura, CA
    Posts
    155

    Re: losetup fails when trying to create a remix using livemedia-creator under mock

    antikythera, do you believe that there is a bug with mock in fedora 26 or do you think the problem lies somewhere else?

  6. #6
    Join Date
    Jul 2017
    Location
    Everywhere, Nowhere
    Posts
    1

    livemedia-creator failure

    Can somebody please offer some advice.

    In trying to make a custom f26 iso, I have followed this article to a tee:
    https://fedoraproject.org/wiki/Livem..._use_a_Live_CD


    However no matter what i do , I always get the exact same error very quickly:

    subprocess.CalledProcessError: Command '['losetup', '--find', '--show', '/var/lmc/lmc-disk-zypzsm2s.img']' returned non-zero exit status 1.



    What could I possibly be doing wrong?












    **here is the full command set that cause the error:

    <mock-chroot> sh-4.4# ksflatten -v, --config fedora-live-security.ks -o flat-fedora-live-security.ks --version F26
    /usr/lib/python3.6/site-packages/pykickstart/commands/partition.py:330: UserWarning: A partition with the mountpoint / has already been defined.
    warnings.warn(_("A partition with the mountpoint %s has already been defined.") % pd.mountpoint)


    livemedia-creator --ks flat-fedora-live-security.ks --no-virt --resultdir /var/lmc --project fedora-live-security --make-iso --volid Fedora-live-security-26 --iso-only --iso-name Fedora-live-security-26-x86_64.iso --releasever 26 --title Fedora-live-security --macboot

    /usr/lib/python3.6/site-packages/pykickstart/commands/partition.py:330: UserWarning: A partition with the mountpoint / has already been defined.
    warnings.warn(_("A partition with the mountpoint %s has already been defined.") % pd.mountpoint)
    2017-07-21 13:15:00,531: disk_img = /var/lmc/lmc-disk-zypzsm2s.img
    2017-07-21 13:15:00,532: Using disk size of 10242MiB
    Traceback (most recent call last):
    File "/usr/sbin/livemedia-creator", line 1476, in <module>
    main()
    File "/usr/sbin/livemedia-creator", line 1393, in main
    disk_img = make_image(opts, ks)
    File "/usr/sbin/livemedia-creator", line 1080, in make_image
    novirt_install(opts, disk_img, disk_size)
    File "/usr/sbin/livemedia-creator", line 747, in novirt_install
    mkext4img(None, disk_img, label=opts.fs_label, size=disk_size * 1024**2)
    File "/usr/lib/python3.6/site-packages/pylorax/imgutils.py", line 442, in mkext4img
    mkfsargs=["-L", label, "-b", "4096", "-m", "0"], graft=graft)
    File "/usr/lib/python3.6/site-packages/pylorax/imgutils.py", line 417, in mkfsimage
    with LoopDev(outfile, size) as loopdev:
    File "/usr/lib/python3.6/site-packages/pylorax/imgutils.py", line 297, in __enter__
    self.loopdev = loop_attach(self.filename)
    File "/usr/lib/python3.6/site-packages/pylorax/imgutils.py", line 154, in loop_attach
    dev = runcmd_output(["losetup", "--find", "--show", outfile])
    File "/usr/lib/python3.6/site-packages/pylorax/executils.py", line 347, in runcmd_output
    return execWithCapture(cmd[0], cmd[1:], **kwargs)
    File "/usr/lib/python3.6/site-packages/pylorax/executils.py", line 249, in execWithCapture
    reset_handlers=reset_handlers, reset_lang=reset_lang)[1]
    File "/usr/lib/python3.6/site-packages/pylorax/executils.py", line 201, in _run_program
    raise subprocess.CalledProcessError(proc.returncode, argv, output)
    subprocess.CalledProcessError: Command '['losetup', '--find', '--show', '/var/lmc/lmc-disk-zypzsm2s.img']' returned non-zero exit status 1.
    Last edited by octavius; 21st July 2017 at 08:49 PM. Reason: adding info

  7. #7
    Join Date
    Jan 2013
    Location
    Ventura, CA
    Posts
    155

    Re: livemedia-creator failure

    I submitted a bug report via redhat bugzilla (livemedia-creator halts with error in mock). Let's hope that redhat can get livemedia-creator up and running ASAP.

  8. #8
    Join Date
    Dec 2013
    Location
    United Kingdom
    Posts
    5,276

    Re: losetup fails when trying to create a remix using livemedia-creator under mock

    Any chance of the bug ID so we can subscribe and add additional corroborating evidence please?

    threads merged as it is clearly the same issue we are all facing here.

  9. #9
    Join Date
    Dec 2013
    Location
    United Kingdom
    Posts
    5,276

    Re: losetup fails when trying to create a remix using livemedia-creator under mock

    Quote Originally Posted by donatom
    antikythera, do you believe that there is a bug with mock in fedora 26 or do you think the problem lies somewhere else?
    lorax or the component of the media builder program set that handles the python script. I get the same in F25 so it isn't F26 specific either. I'm going to try outside of mock today and see what happens

  10. #10
    Join Date
    Dec 2013
    Location
    United Kingdom
    Posts
    5,276

    Re: losetup fails when trying to create a remix using livemedia-creator under mock

    the ISO is now building. The first time I attempted it, I got the same error. I have now replaced the urls with direct links to the local mirror hosting Fedora 25 packages for the ISO architecture I am attempting to build. It seems now to have started okay. However, I am also building outside of mock this time.

    the file to change the url information in is called fedora-repo-not-rawhide.ks

    mine now reads like this:

    Code:
    repo --name=fedora --http://mirrorservice.org/sites/dl.fedoraproject.org/pub/fedora/linux/releases/25/Everything/x86_64/os/
    repo --name=updates --http://mirrorservice.org/sites/dl.fedoraproject.org/pub/fedora/linux/updates/25/x86_64/
    #repo --name=updates-testing --mirrorlist=https://mirrors.fedoraproject.org/mirrorlist?repo=updates-testing-f$releasever&arch=$basearch
    url --http://mirrorservice.org/sites/dl.fedoraproject.org/pub/fedora/linux/release
    output so far:

    Code:
    [antikythera@vbox-aures fedora-kickstarts]$ sudo livemedia-creator --ks flat-fedora-live-mate_compiz.ks --no-virt --resultdir /var/lmc --project Fedora-MATE-Live --make-iso --volid Fedora-MATE-25 --iso-only --iso-name Fedora-MATE-25-x86_64.iso --releasever 25 --title Fedora-MATE-live --macboot
    /usr/lib64/python3.5/optparse.py:999: PendingDeprecationWarning: The KSOption class is deprecated and will be removed in pykickstart-3.  Use the argparse module instead.
      option = self.option_class(*args, **kwargs)
    /usr/lib/python3.5/site-packages/pykickstart/commands/partition.py:330: UserWarning: A partition with the mountpoint / has already been defined.
      warnings.warn(_("A partition with the mountpoint %s has already been defined.") % pd.mountpoint)
    2017-07-22 10:52:31,376: disk_img = /var/lmc/lmc-disk-qejvfcf2.img
    2017-07-22 10:52:31,379: Using disk size of 6146MiB
    2017-07-22 10:52:33,131: Running anaconda.
    2017-07-22 10:52:45,418: Processing logs from ('127.0.0.1', 32970)
    2017-07-22 10:52:45,758: Starting installer, one moment...
    2017-07-22 10:52:45,759: terminal size detection failed, using default width
    2017-07-22 10:52:45,760: anaconda 25.20.9-1 for Fedora-MATE-Live 25 (pre-release) started.

  11. #11
    Join Date
    Dec 2013
    Location
    United Kingdom
    Posts
    5,276

    Re: losetup fails when trying to create a remix using livemedia-creator under mock

    if this actually works for a standard flat ISO with no package modifications I'll start customising it again afterwards

    I believe the url issue is a known bug as it is mentioned in common issues for F26. that's what prompted me to try altering them.

    EDIT - It built an ISO but because I forgot to change the url in the flattened kickstart as well I've ended up with rawhide instead of F25.

  12. #12
    Join Date
    Jan 2013
    Location
    Ventura, CA
    Posts
    155

    Re: losetup fails when trying to create a remix using livemedia-creator under mock

    antikythera,

    Here is bug #: 1473880

    Sorry I didn't get it to you sooner; I subscribed to this thread but nothing is being forwarded to my email.

    You are right about error occurring on F25 as well. I tried using a ks that I successfully used before and I get the same error about losetup

  13. #13
    Join Date
    Jan 2013
    Location
    Ventura, CA
    Posts
    155

    Re: losetup fails when trying to create a remix using livemedia-creator under mock

    antikythera,

    I tried changing urls and repos as per your suggestion, but I get the same error as before -- in mock. Now I am using fedora 25 and not fedora 26 to run mock -- but I believe that that should not be an issue.

    Here are my (US) urls:
    Code:
      url --http://mirror.cc.vt.edu/pub/fedora/linux/releases/26/Everything/x86_64/os/
    repo --name="fedora" --http://mirror.cc.vt.edu/pub/fedora/linux/updates/26/x86_64/
    repo --name=rpmfusionfree --http://mirrors.rpmfusion.org/mirrorlist?repo=free-fedora-26&arch=x86_64
    repo --name=rpmfusionfreeup --http://http://mirrors.rpmfusion.org/mirrorlist?repo=free-fedora-updates-released-26&arch=x86_64
    repo --name=rpmfusionnonfree --http://http://mirrors.rpmfusion.org/mirrorlist?repo=nonfree-fedora-26&arch=x86_64
    repo --name=rpmfusionnonfreeup --http://http://mirrors.rpmfusion.org/mirrorlist?repo=nonfree-fedora-updates-released-26&arch=x86_64
    repo --name=google --baseurl=http://dl.google.com/linux/chrome/rpm/stable/x86_64

  14. #14
    Join Date
    Jan 2013
    Location
    Ventura, CA
    Posts
    155

    Re: losetup fails when trying to create a remix using livemedia-creator under mock

    I neglected to note other errors which pertain to urls: I did not enter the urls correctly since I doubled http (--http:http, etc). I will clean up ks and try to run livemedia-creator again.

  15. #15
    Join Date
    Jan 2013
    Location
    Ventura, CA
    Posts
    155

    Re: losetup fails when trying to create a remix using livemedia-creator under mock

    Apparently mock does not like the direct url format. Here are the errors that were thrown:
    Code:
       The following problem occurred on line 9 of the kickstart file:
    
    no such option: --http://mirror.cc.vt.edu/pub/fedora/linux/releases/26/Everything/x86_64/os/
    
    The following problem occurred on line 15 of the kickstart file:
    
    no such option: --http://mirror.cc.vt.edu/pub/fedora/linux/updates/26/x86_64/
    
    The following problem occurred on line 16 of the kickstart file:
    
    no such option: --http://mirrors.rpmfusion.org/mirrorlist?repo
    
    The following problem occurred on line 17 of the kickstart file:
    
    no such option: --http://mirrors.rpmfusion.org/mirrorlist?repo
    
    The following problem occurred on line 18 of the kickstart file:
    
    no such option: --http://mirrors.rpmfusion.org/mirrorlist?repo

Page 1 of 3 1 2 3 LastLast

Similar Threads

  1. Error Using LiveMedia-Creator
    By crokett in forum Fedora Spins & Remixes
    Replies: 2
    Last Post: 17th October 2016, 08:20 PM
  2. [SOLVED] Fedora 24 livecd-creator fails to create initrd
    By dbrazeau in forum Installation, Upgrades and Live Media
    Replies: 5
    Last Post: 12th May 2016, 01:02 AM
  3. Unable to create remix with livecd-creator : Transaction won't start
    By jfurmankiewicz in forum Installation, Upgrades and Live Media
    Replies: 0
    Last Post: 9th December 2015, 10:28 PM
  4. livemedia-creator
    By sea in forum Reviews, Rants & Things That Make You Scream
    Replies: 3
    Last Post: 5th August 2013, 06:34 PM
  5. livemedia-creator: parameters?
    By livecdOrNothing in forum Installation, Upgrades and Live Media
    Replies: 1
    Last Post: 20th April 2013, 01:54 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •