Boot ISO image with Kaspersky antivirus via Grub

0

I have difficulties when trying to boot ISO image provided by Kasperky. I have tried two options:

A. Boot by loading kernel:

menuentry "Kaspersky Rescue" {
    # Taken from http://rescuedisk.kaspersky-labs.com/rescuedisk/updatable/kav_rescue_10.iso
    set isofile="/iso/kav_rescue_10.iso"
    echo "Booting from $isofile. Wait for a minute..."
    loopback loop $isofile
    set root=(loop)
    # From $isofile/boot/grub/i386-efi/cfg/kav_menu.cfg
    linux /boot/rescue root=live:CDLABEL=BOOT rootfstype=auto vga=791 init=/init kav_lang=ru udev liveimg splash quiet doscsi nomodeset
    initrd /boot/rescue.igz
}

Tried options below but nothing worked:

  • root=live:CDLABEL=BOOT (as above; BOOT is USB disk label, as seen by e.g. file manager)
  • root=live:CDLABEL=KRD10
  • root=live:UUID=A1234-1234

B. Boot by loading the whole ISO into memory:

menuentry "Kaspersky Rescue" {
    set isofile="/iso/kav_rescue_10.iso"
    set memdisk=/image/memdisk-5.10.bin
    echo "Booting from $isofile. Wait for a minute..."
    linux16 $memdisk
    initrd16 $isofile
}

2nd try goes a bit further because I was able to see ISO boot loader options, but both of them at certain moment crash with the following error:

dracut Warning: Can't mount root filesystem
dracut Warning: dracut: FATAL: Failed to mount block device of live image
dracut Warning: dracut: Refusing to continue
mount: special device /dev/sr* does not exist
mount: special device /dev/mapper/live-rw does not exist

Kernel panic - not syncing: Attempt to kill init! exitcode=0x00000100

Pid: 1, comm: init Not tainted 3.4.24-krd10 #1
Call Trace:
[<c090b902>] panic+0x7d/0x171
[<c0429481>] do_exit+0x325/0x6c9
[<c042988b>] do_group_exit+0x66/0x8f
[<c04298c7>] sys_exit_group+0x13/0x17
[<c0912d93>] sys_enter_do_call+0x12/0x22

I see that system loader cannot find/mount root partition. Is there any workaround?

boot
iso-image
grub2
dracut
asked on Super User Nov 23, 2017 by dma_k

1 Answer

0

Ubuntu ISOboot by Grub2 hints me, you may need to specify the storage device where your ISO is located. In your first example, loopback loop $isofile might need to be changed to loopback loop (hd0,5)$isofile or any other drive where the ISO is actually stored. This hd0,5 portion is not the Linux notation but rather the way Grub is able to see most storage devices.

I never tried booting an ISO directly from Grub but the need to specify the harddisk location as seen by Grub might be necessary. I also assume you don't want to or are able to burn the ISO to a (re)writable disk, or want/able to boot it from a external USB device.

Hope this might help you figure out why the files can't be located by the bootloader of the ISO itself or by Grub in the first example.

answered on Super User Nov 23, 2017 by CodeAsm • edited Nov 23, 2017 by (unknown user)

User contributions licensed under CC BY-SA 3.0