How can I boot into an ISO file in GRUB? The ISO file is on a reiserfs partition and GRUB can access it (already tested that).
Albert
AlbertAlbert
2 AnswersThe biggest problem with booting an ISO file is that ISOs that are designed to be booted are almost always designed to be booted from a CD. As explained on Marco's blog regarding Grub 2 (emphasis mine): GRUB can read ISO9660 (”iso”) images. It can for example load the first few sectors and boot it. But most people do not realize is “what then?”. What would the loaded operating system do? It will most likely look for a CDROM, which it won’t find, and fail. So the dead-simple-est way to boot from some random ISO file is to load it into a virtual machine (VirtualBox, VMware, or Virtual PC) as a virtual CD and boot it there. That should almost always work, because to the VM, it's not an ISO file -- it's a real CD on real CD hardware. Free fairy tail anime clip art. Booting from an ISO file on bare metal is much harder. How you do this depends on which version of Grub you're using, and results can differ depending on what ISO you're using and how it was configured to boot. This is why most boot-ISO-from-USB tools (Unetbootin, WinToFlash, etc) usually extract the ISO contents to the drive -- because that way they can be accessed directly, without confusing the OS being booted. Grub 1.. not sure. If possible, menu entries will probably look a lot like Grub4DOS, though I think the 'map --hook' command is a Grub4DOS enhancement. On the plus side, Grub has wider filesystem support than Grub4DOS. A note on Grub with reiserfs (unconfirmed) indicates you 'have to mount your partition with Memdisk is an option; see below. Grub4DOSGrub4DOS offers some experimental 'CD emulation' that works with some ISOs. Unfortunately, Grub4DOS only reads FAT32/NTFS filesystems. Download Grub4DOS. Here's a sample entry (source): Supposedly the Win7 ISO can be booted with this entry: Other ISOs can be booted with Memdisk: You can also use a menu configurator like MultiBootISOs.exe from PenDriveLinux. Place ISOs on the flash drive, and run the utility to install the bootloader and configure the boot menu. Here's a Hak5 episode on installing Grub4DOS. Grub 2Here's a couple of example Grub2 entries. chainloader doesn't work to boot an ISO at present, so these entries must (1) use loopback to 'mount' the ISO, and (2) add something like iso-scan or findiso to the linux line that specifies the ISO file. Unfortunately, there's no generic way to do this. Each different boot entry must be customized to the target ISO's contents. Most Linux LiveCDs use ISOLINUX as a bootloader; find the isolinux.cfg and examine that boot entry to see what it usually boots. Example entries (source): If you're trying to boot a non-Linux LiveCD, you may be out of luck. Again, Memdisk may help:
quack quixotequack quixote
You can use dd from the terminal to write an iso file to a partition. Just be careful, if you use dd wrong you can wipe everything. It should look something like this:dd if=Desktop/LinuxCDFile.iso of=/Path/To/Partition
Naos parthNaos parth
Not the answer you're looking for? Browse other questions tagged bootgrubiso-image or ask your own question.
Linux’s GRUB2 boot loader can boot Linux ISO files directly from your hard drive. Boot Linux live CDs or even install Linux on another hard drive partition without burning it to disc or booting from a USB drive. We performed this process on Ubuntu 14.04 — Ubuntu and Ubuntu-based Linux distributions have good support for this. Other Linux distributions should work similarly. Get a Linux ISO FileRELATED:How to Configure the GRUB2 Boot Loader’s Settings This trick requires you have a Linux system installed on your hard drive. Your computer must be using the GRUB2 boot loader, which is a standard boot loader on most Linux systems. Sorry, you can’t boot a Linux ISO file directly from a Windows system using the Windows boot loader. Download the ISO files you want to use and store them on your Linux partition. GRUB2 should support most Linux systems. if you want to use them in a live environment without installing them to your hard drive, be sure to download the “live CD” versions of each Linux ISO. Many Linux-based bootable utility discs should also work. Check the Contents of the ISO FileYou may need to look inside the ISO file to determine exactly where specific files are. For example, you can do this by opening the ISO file with the Archive Manager/File Roller graphical application that comes with Ubuntu and other GNOME-based desktop environments. In the Nautilus file manager, right-click the ISO file and select Open with Archive Manager. Locate the kernel file and the initrd image. If you’re using a Ubuntu ISO file, you’ll find these files inside the casper folder — the vmlinuz file is the Linux kernel and the initrd file is the initrd image. You’ll need to know their location inside the ISO file later. Determine the Hard Drive Partition’s PathGRUB uses a different “device name” scheme than Linux does. On a Linux system, /dev/sda1 is the first partition on the first hard disk — a means the first hard disk and 1 means its first partition. In GRUB, (hd0,1) is equivalent to /dev/sda0. The 0 means the first hard disk, while the 1 means the first partition on it. In other words, in a GRUB device name, the disk numbers start counting at 0 and the partition num6ers start counting at 1 — yes, it’s unnecessarily confusing. For example, (hd3,6) refers to the sixth partition on the fourth hard disk. You can use the fdisk -l command to view this information. On Ubuntu, open a Terminal and run the following command: sudo fdisk -l Free iso games for psp. You’ll see a list of Linux device paths, which you can convert to GRUB device names on your own. For example, below we can see the system partition is /dev/sda1 — so that’s (hd0,1) for GRUB. Create the GRUB2 Boot EntryThe easiest way to add a custom boot entry is to edit the /etc/grub.d/40_custom script. This file is designed for user-added custom boot entries. After editing the file, the contents of your /etc/defaults/grub file and the /etc/grub.d/ scripts will be combined to create a /boot/grub/grub.cfg file — you shouldn’t edit this file by hand. It’s designed to be automatically generated from settings you specify in other files. You’ll need to open the /etc/grub.d/40_custom file for editing with root privileges. On Ubuntu, you can do this by opening a Terminal window and running the following command: sudo gedit /etc/grub.d/40_custom Grub4dos Iso BootFeel free to open the file in your favorite text editor. For example, you could replace “gedit” with “nano” in the command to open the file in the Nano text editor. Unless you’ve added other custom boot entries, you should see a mostly empty file. You’ll need to add one or more ISO-booting sections to the file below the commented lines. Here’s how you can boot an Ubuntu or Ubuntu-based distribution from an ISO file. We tested this with Ubuntu 14.04: menuentry “Ubuntu 14.04 ISO” { Customize the boot entry to contain your desiredmenu entry name, the correct path to the ISO file on your computer, and the device name of the hard disk and partition containing the ISO file. If the vmlinuz and initrd files have different names or paths, be sure to specify the correct path to those files, too. (If you have a separate /home/ partition, omit the /home bit, like so: set isofile=”/name/Downloads/${isoname}”). Important Note: Different Linux distributions require different boot entries with different boot options. The GRUB Live ISO Multiboot project offers a variety of menu entries for different Linux distributions. You should be able to adapt these example menu entries for the ISO file you want to boot. You can also just perform a web search for the name and release number of the Linux distribution you want to boot along with “boot from ISO in GRUB” to find more information. If you want to add more ISO boot options, add additional sections to the file. Save the file when you’re done. Return to a Terminal window and run the following command: sudo update-grub The next time you boot your computer, you’ll see the ISO boot entry and you can choose it to boot the ISO file. You may have to hold Shift while booting to see the GRUB menu. If you see an error message or a black screen when you attempt to boot the ISO file, you misconfigured the boot entry somehow. Even if you got the ISO file path and device name right, the paths to the vmlinuz and intird files on the ISO file may not be correct or the Linux system you’re booting may require different options. Just like previous versions, you can boot Kaspersky Rescue Disk 2018 ISO from Grub2 and Grub4dos. It supports booting in both UEFI and Legacy modes.Kaspersky Rescue Disk 2018What is Kaspersky Rescue Disk? As the name implies, this is a rescue disk released by Kaspersky. It is a Linux based operating system, its previous version is based on Gentoo and the 2018 version is based on SystemRescueCd. Just like the Linux and WinPE operating systems, you can use the built-in tools to diagnose and rescue your computer. I used Kaspersky Rescue Disk 10 before, everything works fine. At version 2018, it supports booting in UEFI mode, but I have encountered a major problem. I have access to all the partitions, but there are not any partitions in the list so I can select and scan. I have tested and this problem does not happen on the virtual machine. Update: I have updated to the latest version and it looks like everything works. There are many manufacturers of antivirus software also have their own rescue disk, see the list of packages supported by AIO Boot.
I personally encourage you to use these packages. When you suspect the current operating system is infected, simply shutdown, plug in and boot USB to scan. AIO Boot now supports integration for both versions, just run AIOCreator.exe to integrate. Here I will guide you to boot Kaspersky Rescue Disk 2018 from Grub2 and Grub4dos using ISO file. You can also extract ISO files to any folder you want. Download Kaspersky Rescue Disk 2018 here. Boot directly from ISO fileIf you already have Grub2 or Grub4dos installed on your computer, you can add the Grub2 menu directly without having to create a USB boot.
Extract ISOYou can also extract the ISO file to whatever path you want. Here I will extract the KasperskyRescueDisk2018 folder on the root of the drive. Then add the menu.
Kaspersky Rescue Disk 2018 is based on SystemRescueCd, which has a very nice feature that is backing-store. It allows you to save changes including browser data to somewhere that it supports. For Ubuntu it is called persistent mode. But there is a big problem that has arisen when I use this feature, that is, I can not update Kaspersky’s virus database. Currently they do not support this feature, but may in the future. If you want to try this feature, simply add the parameter backstore=alldev,data.img to the linux command (or kernel). Then copy the data.img file (EXT3 format) into the data directory. The data.img file can be found in the AIOToolsDATA.IMG directory of AIO Boot. I tried to boot Kaspersky Rescue Disk 2018 via iPXE but failed. Update definitions offlineAntivirus programs can define new viruses by updating the database without updating the program. Virus definitions can be easily updated through its program, but it requires an Internet connection. Kaspersky Rescue Disk is an operating system that can run on USB and CD/DVD… And you can boot it on many other computers. Virus definitions in the ISO file you downloaded may be out of date. When you start the program, thanks to a network connection it can update the new definitions. But it does not update the file that it previously used, it will save the definition to the KRD2018_Data folder for future use. But if you boot it on a new computer that you have not updated or updated the latest database before. You need to update it again, or you will not be able to update if you do not have an Internet connection. I tried copying the KRD2018_Data folder to the USB drive but it did not work for me. Grub4dos Linux Iso BootWe will update the definitions manually for Kaspersky Rescue Disk 2018 by replacing its latest 005-bases.srm file. For AIO Boot users, you can find the data directory after the integration at /AIO/Files/Antivirus/krd/data.
You now have the most up-to-date virus database. Do not forget to manually update to make sure you always use the latest version even on offline computers. You can update and repackage ISO files using mkisofs and xorriso to burn to CDs and DVDs, but the database will soon be outdated. You should attach ISOs to VirtualBox and VMware and test to make sure everything works well before burning. Grub4dos Iso BootsGood luck! Comments are closed.
|