0

I am trying to build a new kernel (more details later) to use in a pxe boot. I ran the make, so now I am trying to run make isoimage so I can rip the need files. Here is my attempt with the error. Any thoughts on what the recipe needs?

bradmin@LinuxDebianLive:/home/kernelbuild/linux-4.12.2$ sudo make isoimage
  CHK     include/config/kernel.release
  CHK     include/generated/uapi/linux/version.h
  CHK     include/generated/utsrelease.h
  CHK     include/generated/bounds.h
  CHK     include/generated/timeconst.h
  CHK     include/generated/asm-offsets.h
  CALL    scripts/checksyscalls.sh
  CHK     scripts/mod/devicetable-offsets.h
  CHK     include/generated/compile.h
  SKIPPED include/generated/compile.h
  LD      arch/x86/boot/compressed/vmlinux
  ZOFFSET arch/x86/boot/zoffset.h
  AS      arch/x86/boot/header.o
  LD      arch/x86/boot/setup.elf
  OBJCOPY arch/x86/boot/setup.bin
  OBJCOPY arch/x86/boot/vmlinux.bin
  BUILD   arch/x86/boot/bzImage
Setup is 17692 bytes (padded to 17920 bytes).
System is 4079 kB
CRC 55a16ccf
Kernel: arch/x86/boot/bzImage is ready  (#2)
rm -rf arch/x86/boot/isoimage
mkdir arch/x86/boot/isoimage
for i in lib lib64 share end ; do \
        if [ -f /usr/$i/syslinux/isolinux.bin ] ; then \
                cp /usr/$i/syslinux/isolinux.bin arch/x86/boot/isoimage ; \
                if [ -f /usr/$i/syslinux/ldlinux.c32 ]; then \
                        cp /usr/$i/syslinux/ldlinux.c32 arch/x86/boot/isoimage ; \
                fi ; \
                break ; \
        fi ; \
        if [ $i = end ] ; then exit 1 ; fi ; \
done
arch/x86/boot/Makefile:160: recipe for target 'isoimage' failed
make[1]: *** [isoimage] Error 1
arch/x86/Makefile:286: recipe for target 'isoimage' failed
make: *** [isoimage] Error 2
bradmin@LinuxDebianLive:/home/kernelbuild/linux-4.12.2$

The more info .. I post a question on wrong forum ... Link to why I am trying to build a kernel I started with the live Clonezilla iso. It would not dhcp while pxe booting. Someone suggested the kernel might be the issue. So that is where I am. While making the make .config, I found parameters to enable dhcp support under the IP: kernel level autoconfiguration, so that may get me over the hump. So when I started to build the iso with make isoimage, that is when it failed, and that is where I current am.

Update: I added some echos into the script for some diagnostic. Look like it is not finding isolinux.bin or ldlinux.c32. if I was more experiance I might have seen what was happening, I thought since I saw the done, that part was finished. Now I see the logic and by hitting the end, that was throwing the exit 1 (error).

script change

isoimage: $(obj)/bzImage
    -rm -rf $(obj)/isoimage
    mkdir $(obj)/isoimage
    echo Start of loop
    for i in lib lib64 share end ; do \
        echo $$i; \
        if [ -f /usr/$$i/syslinux/isolinux.bin ] ; then \
            cp /usr/$$i/syslinux/isolinux.bin $(obj)/isoimage ; \
            if [ -f /usr/$$i/syslinux/ldlinux.c32 ]; then \
                cp /usr/$$i/syslinux/ldlinux.c32 $(obj)/isoimage ; \
            fi ; \
            break ; \
        fi ; \
        if [ $$i = end ] ; then echo "(isolinux.bin or ldlinux.c32) not found"; exit 1 ; fi ; \
    done
    echo start of copy
    cp $(obj)/bzImage $(obj)/isoimage/linux

Output :

Kernel: arch/x86/boot/bzImage is ready  (#2)
rm -rf arch/x86/boot/isoimage
mkdir arch/x86/boot/isoimage
echo Start of loop
Start of loop
for i in lib lib64 share end ; do \
    echo $i; \
        if [ -f /usr/$i/syslinux/isolinux.bin ] ; then \
                cp /usr/$i/syslinux/isolinux.bin arch/x86/boot/isoimage ; \
                if [ -f /usr/$i/syslinux/ldlinux.c32 ]; then \
                        cp /usr/$i/syslinux/ldlinux.c32 arch/x86/boot/isoimage ; \
                fi ; \
                break ; \
        fi ; \
        if [ $i = end ] ; then echo "(isolinux.bin or ldlinux.c32) not found"; exit 1 ; fi ; \
done
lib
lib64
share
end
(isolinux.bin or ldlinux.c32) not found
arch/x86/boot/Makefile:160: recipe for target 'isoimage' failed
make[1]: *** [isoimage] Error 1
arch/x86/Makefile:286: recipe for target 'isoimage' failed
make: *** [isoimage] Error 2
bradmin@LinuxDebianLive:/home/kernelbuild/linux-4.12.2$
0

I think it will likely work if you download and use syslinux instead of make isoimage. See "How Can I Make a Bootable CD With ISOLINUX?" for more info. Also depending on your distro you may want to use genisoimage instead of mkisofs (the options are quite the same though).

Your distro may have a customized syslinux which is different what's expected. Ubuntu is known to do such thing for example...

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.