Livemedia-creator –make-pxe-live CentOS 7

Home » CentOS » Livemedia-creator –make-pxe-live CentOS 7
CentOS 3 Comments

Hello,

I am trying to build a PXE boot image for CentOS 7.

livemedia-creator –make-pxe-live –ks=ks –no-virt

It runs the entire process and then it says:

losetup: /dev/: detach failed: Inappropriate ioctl for device
2019-12-26 11:49:47,293: Disk Image install successful
2019-12-26 11:49:47,293: working dir is /var/tmp/tmpKwqC77
mount: /dev/loop0 is write-protected, mounting read-only mount: unknown filesystem type ‘(null)’
2019-12-26 11:49:52,301: Command ‘[‘mount’, ‘-o’, ‘loop’, ‘/var/tmp/diskJVpsJd.img’, ‘/var/tmp/lorax.imgutils.OtV8Yh’]’ returned non-zero exit status 32

I then tried it on CentOS 8 and had the same problem until I installed the dracut-live package but that package doesn’t exist on CentOS 7.

I will point out that it seems to work fine with make-iso, just not make-pxe-live. So there is probably a package it needs that I don’t know about. Has anyone gotten this to work at all?

Since it is a disk/image issue this is the part of the ks relevant to disks:

# Disk partitioning information reqpart part / –fstype=”ext4″ –size@00
part swap –size00
zerombr clearpart –all bootloader –location=mbr

Below is my packages part of my kickstart:

%packages
# Packages needed by anaconda, but not directly required.
# Includes all of the grub2 and shim packages needed, except
# for the grub2-efi-*-cdboot package
@anaconda-tools –optional
@core anaconda isomd5sum kernel memtest86+
syslinux
-dracut-config-rescue dell-system-update
# This package is needed to boot the iso on UEFI
grub2-efi-*-cdboot grub2-efi-ia32
%end

Thanks,
-Drew

3 thoughts on - Livemedia-creator –make-pxe-live CentOS 7

  • I have “issues” with later versions of CentOS/RHEL 7 also.

    PXE boot seems to work, but after the new kernel kexec’s, it seems to drop the NICS and

    further in the process for some reason, the nics never come up, which leads to all kindsof issues of course

    (trying to boot a cluster that way). I also have the impression that it is a dracut issue, however, I have not pinpointed it yet.

    Ron

  • Oh, alright my specific issue is just about creating the actual pxe image.. not what happens after

    —–Original Message—

  • ah ok,  I do that different, I use VNFS and Perceus, however it works basically the same, initially.

    You would need to create a ramdisk, and the best way to do that is by using an existing one, unpack it, stick

    the stuff you need in it, and pack it again. (I have notes about the details there, but not them with me right now)

    The way a ramdisk is (un)packacked has changed. After you have that ramdisk, you mount the “rest” using NFS.

    (so things like mount etc needs to be on your ramdisk.) Typically you want the kernel from your netboot/tftp to

    start the PXE process, simply because it is smaller, and use it to load your ramdisk and kernel, as configured in

    pxeconfig  (check the default file).

    Ron