Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@robinsmidsrod
Last active August 22, 2019 13:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save robinsmidsrod/18a559af2680f85a72134a6d3093f62f to your computer and use it in GitHub Desktop.
Save robinsmidsrod/18a559af2680f85a72134a6d3093f62f to your computer and use it in GitHub Desktop.
BitDefender Rescue CD iPXE boot script (non-working because missing /bin/mount.nfs in initramfs)
:bitdefender
echo Booting BitDefender Rescue ${bitdefender-version} x86 for ${initiator-iqn}
set base-url bitdefender-rescue-${bitdefender-version}/
kernel ${base-url}boot/kernel.i386-pc root=/dev/nfs nfsroot=${nfs-server}:${nfs-root}${base-url} ip=dhcp real_root=/dev/nfs loop=/rescue/livecd.squashfs looptype=squashfs livecd.nfsif=${netX/mac} initrd udev cdroot
initrd ${base-url}boot/initfs.i386-pc
boot || goto failed
goto start
@truatpasteurdotfr
Copy link

truatpasteurdotfr commented Aug 22, 2019

according to https://forums.fogproject.org/topic/13407/pxe-boot-bitdefender-rescue-cd-fails, the bitdefender init ramdisk is missing some .ko

I could reproduce their findings with:

  • loop mount the iso
  • loop mount the livecd.squashfs file
  • extract the boot/initfs.i386-pc into a temporary place
  • copy from the squashfs the /lib/modules/4.19.8-gentoo-x86/kernel/fs/{nfs,nfs_common} into the temporary place
  • repack the new initfs
    find . -print0 | cpio --null --create --verbose --format=newc | xz -9 --format=lzma > /path/to/new.initfs and use that as replacement for the faulty initfs.i386-pc

ymmv :P

@truatpasteurdotfr
Copy link

truatpasteurdotfr commented Aug 22, 2019

login as livecd, add a missing link sudo ln -s /mnt/cdrom/rescue / and startxfce4, add a nameserver to /etc/resolv.conf (echo 'nameserver 9.9.9.9'| sudo tee /etc/resolv.conf and start the bdgui tool..

ymmv, you can prefer cloudflare 1.1.1.1 or google 8.8.8.8

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment