
# For an easier way to get persistent updates, see http://rmprepusb.blogspot.co.uk/2014/04/adding-kaspersky-rescue-iso-to.html

# Kaspersky Rescue with Updates on USB drive
# You can use kav_rescue_10.iso  http://support.kaspersky.com/viruses/rescuedisk#downloads
# Copy this .mnu and ISO file to \_ISO\MainMenu\MNU folder (or \_ISO\ANTIVIRUS\MNU)
# Make a new ext2 file in root of E2B USb drive using RMPrepUSB - Filename=\kaspersky-rw Volumename=Kaspersky Size=600
# On first boot using this menu, download the updates. They will be stored on internal Hard Disk C:
# When updates are finished, cut and paste whole "\Kaspersky Rescue Disk 10.0" folder from (sda1) internal HDD to (sdb3) USB drive partition
# IMPORTANT: Ensure \Kaspersky Rescue Disk 10.0 folder does NOT exist on the Target hard disk in any volume
# On next boot, updates should be found already present on USB partition 3
# Ensure any target system you test does not already have the \Kaspersky Rescue Disk 10.0 folder on HDD - if so delete it and reboot from USB
# Always shutdown Kaspersky linux nicely or updates may not be saved!

# E2B USB Drive
# ===========================================
#
# \kaspersky-rw  (ext2 file you create using RMPrepUSB)
# \_ISO\MAINMENU\MNU\Kaspersky_Rescue_10.mnu  (this file)
# \_ISO\MAINMENU\MNU\kav_rescue_10.iso

iftitle [if exist $HOME$/kav_rescue_10.iso] Kaspersky Rescue ISO
set ISO=kav_rescue_10.iso
set Updates=/kaspersky-rw
if "%E2BDEV%"=="" set E2BDEV=hd0 && pause E2BDEV forced to hd0!
if exist CD echo WARNING: Cannot use partnew command! && pause && configfile (bd)/menu.lst
#enable parttype output
debug 1
# check table entry in 3rd position in ptn table
parttype (%E2BDEV%,2) | set check=
debug off
set check=%check:~-5,4%
if "%check%"=="0x00" partnew (%E2BDEV%,2) 0 0 0
if not "%check%"=="0x00" echo WARNING: PTN TABLE 3 IS ALREADY IN USE - UPDATES MAY NOT WORK! && pause
debug 1
if not exist %Updates% echo WARNING: The Updates storage ext2 file %Updates% was not found! && pause
errorcheck off
if "%check%"=="0x00" partnew (%E2BDEV%,2) 0x0 %Updates%
errorcheck on

/%grub%/QRUN.g4b $HOME$/%ISO%
boot

