通过 Grub 使用卡巴斯基防病毒软件启动 ISO 映像

通过 Grub 使用卡巴斯基防病毒软件启动 ISO 映像

我在尝试启动时遇到困难卡巴基提供的 ISO 映像。我尝试了两种方法:

A.通过加载内核启动:

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
}

尝试了以下选项但没有任何效果:

  • root=live:CDLABEL=BOOT(如上;BOOT是 USB 磁盘标签,例如文件管理器所见)
  • root=live:CDLABEL=KRD10
  • root=live:UUID=A1234-1234

B. 通过将整个 ISO 加载到内存中进行启动:

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
}

第二次尝试更进一步,因为我能够看到 ISO 引导加载程序选项,但它们都在某个时刻崩溃并出现以下错误:

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

我发现系统加载器无法找到/挂载根分区。有什么解决方法吗?

答案1

通过 Grub2 启动 Ubuntu ISO提示我,您可能需要指定 ISO 所在的存储设备。在您的第一个示例中,loopback loop $isofile可能需要更改为loopback loop (hd0,5)$isofile或实际存储 ISO 的任何其他驱动器。这个 hd0,5 部分不是 Linux 符号,而是 Grub 能够看到大多数存储设备的方式。

我从未尝试过直接从 Grub 启动 ISO,但可能需要指定 Grub 看到的硬盘位置。我还假设您不想或无法将 ISO 刻录到(可重写)磁盘,或者想/无法从外部 USB 设备启动它。

希望这可以帮助您弄清楚为什么在第一个示例中 ISO 本身的引导加载程序或 Grub 无法找到这些文件。

相关内容