PXEBoot efi

[LEFT] Hi,
We have been using BIOS PXEBoot for awhile now to backup and restore disk images with Clonezilla.
New machines require efi/ufi and though I can get it to boot I can’t figure out the Cloezilla commmand line.

This works from /pxelinux.cfg/default:

label Create Image
MENU LABEL Clonezilla Backup to Image
KERNEL /images/clonezilla/vmlinuz
INITRD /images/clonezilla/initrd.img
APPEND boot=live config union=overlay nolocales locales=en_US.UTF-8 keyboard-layouts=“NONE” noprompt ocs_daemonon=“ssh” ocs_live_batch=“n” ocs_live_extra_param="" ocs_prerun=“mount -t cifs //pxeboot/$IMG /home/partimag -o user=Admin,password=password” ocs_live_run="/usr/sbin/ocs-sr -q2 -c -j2 -z1p -i 4096 -sfsck -senc -p choose savedisk ask_user ask_user" vga=normal i915.blacklist=yes radeonhd.blacklist=yes nouveau.blacklist=yes vmwgfx.enable_fbdev=1 fetch=tftp://pxeboot/$IMG/clonezilla/filesystem.squashfs

If I copy this to grub it can’t find append:

menuentry “Clonezilla Backup to an Image” {
set gfxpayload=keep
linuxefi /$IMG/clonezilla/vmlinuz
initrdefi /$IMG/clonezilla/initrd.img
append boot=live config union=overlay nolocales locales=en_US.UTF-8 keyboard-layouts=“NONE” noprompt ocs_daemonon=“ssh” ocs_live_batch=“n” ocs_live_extra_param="" ocs_prerun=“mount -t cifs //pxeboot/$IMG /home/partimag -o user=Admin,password=password” ocs_live_run="/usr/sbin/ocs-sr -q2 -c -j2 -z1p -i 4096 -sfsck -senc -p choose savedisk ask_user ask_user" vga=normal i915.blacklist=yes radeonhd.blacklist=yes nouveau.blacklist=yes vmwgfx.enable_fbdev=1 fetch=tftp://pxeboot/$IMG/clonezilla/filesystem.squashfs
}

What am I missing?

Thanks

             [/LEFT]

grub does not have “append” command, kernel parameters go on linuxefi line.

I stumbled across the answer just after I posted this. It turns out that:

linuxefi /$IMG/clonezilla/vmlinuz
APPEND boot=live config union=overlay nolocales locales=en_US.UTF-8 keyboard-layouts=“NONE” noprompt ocs_daemonon=“ssh” ocs_live_batch=“n” ocs_live_extra_param="" ocs_prerun=“mount -t cifs //pxeboot/$IMG /home/partimag -o user=Admin,password=password” ocs_live_run="/usr/sbin/ocs-sr -q2 -c -j2 -z1p -i 4096 -sfsck -senc -p choose savedisk ask_user ask_user" vga=normal i915.blacklist=yes radeonhd.blacklist=yes nouveau.blacklist=yes vmwgfx.enable_fbdev=1 fetch=tftp://pxeboot/$IMG/clonezilla/filesystem.squashfs

Becomes:
linuxefi /$IMG/clonezilla/vmlinuz boot=live config union=overlay nolocales locales=en_US.UTF-8 keyboard-layouts=“NONE” noprompt ocs_daemonon=“ssh” ocs_live_batch=“n” ocs_live_extra_param="" ocs_prerun=“mount -t cifs //pxeboot/$IMG /home/partimag -o user=Admin,password=password” ocs_live_run="/usr/sbin/ocs-sr -q2 -c -j2 -z1p -i 4096 -sfsck -senc -p choose savedisk ask_user ask_user" vga=normal i915.blacklist=yes radeonhd.blacklist=yes nouveau.blacklist=yes vmwgfx.enable_fbdev=1 fetch=tftp://pxeboot/$IMG/clonezilla/filesystem.squashfs

So thanks.

I hope the title includes this question also:

I am trying to boot from an ISO. When I choose this menu item:
menuentry “Clonezilla Live 64” {
set gfxpayload=text
set ISO=’/images/clonezilla/clonezilla-live-2.7.0-10-amd64.iso’
set DEV="${devroot}${ISO}"
export ISO
loopback loop “(${root})${ISO}”
linux ‘(loop)/live/vmlinuz’ boot=‘live’ union=‘overlay’ username=‘user’ config components noswap edd=‘on’ nomodeset nodmraid noeject locales=’’ keyboard-layouts=’’ ocs_live_run=‘ocs-live-general’ ocs_live_extra_param=’’ ocs_live_batch=‘no’ ip=’’ acpi='off’irqpoll noapic noapm nodma nomce nolapic nosmp nomodeset nosplash findiso="${ISO}"
initrd ‘(loop)/live/initrd.img’
loopback --delete loop
}

I get:
can’t find command ‘loopback’
disk ‘loop’ not found
you need to load the kernel first.
can’t find command ‘loopback’

So where does ‘loopback’ come from?
Thanks again.

Post computer text in tags [noparse]

...

[/noparse], it is hard to read your posts.

You mean like this?


menuentry "Clonezilla Live 64" {
   set gfxpayload=text
   set ISO='/images/clonezilla/clonezilla-live-2.7.0-10-amd64.iso'
   set DEV="${devroot}${ISO}"
   export ISO
   loopback loop "(${root})${ISO}"
   linux '(loop)/live/vmlinuz' boot='live' union='overlay'  username='user' config components noswap edd='on' nomodeset nodmraid  noeject locales='' keyboard-layouts='' ocs_live_run='ocs-live-general' ocs_live_extra_param='' ocs_live_batch='no' ip='' acpi='off'irqpoll  noapic noapm nodma nomce nolapic nosmp nomodeset nosplash  findiso="${ISO}"
   initrd '(loop)/live/initrd.img'
   loopback --delete loop
}

So where does ‘loopback’ come from?

Most grub commands are implemented as loadable modules which are loaded from $prefix location. So you either need to include necessary modules into binary loaded by PXE or make sure they are present on boot server. Actually grub2-mknetdir should prepare directory.

If secure boot is active loading of external modules is disabled and you need to include everything in main binary.

grub2-mknetdir helped.

Ok. We made it to the next set of errors:

error: …/…/grub-core/net/tftp.c:254:File not found.
error: …/…/grub-core/net/net.c:1475:disk ‘loop’ not found.
error: …/…/grub-core/loader/i386/efi/linux.c:207:You need to load the kernel first.

I can’t find grub-core.
Thanks

So now it apparently fails to find your ISO image.

So it looks like I was using the variables wrong.
I had:


        set ISO='$IMG/clonezilla/clonezilla-live-2.7.0-10-amd64.iso'

instead of:


        set ISO="${IMG}/clonezilla/clonezilla-live-2.7.0-10-amd64.iso"

I’m back in business.
Thanks Guys.