3 ms·
How does that work? I once asked about how to boot an ISO (in Grub) here: https://superuser.com/questions/154133/grub-boot-from-iso https://superuser.com/quest
by albertzeyer 6y ago
How does that work?
I once asked about how to boot an ISO (in Grub) here: https://superuser.com/questions/154133/grub-boot-from-iso https://superuser.com/questions/154133/grub-boot-from-iso
And one quote from there:
> 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.
- Macha 6y agoI wonder how true that is nowadays - that answer is 10 years old and I remember some Linux distro those days having seperate images for liveusb/livecd/netinstall etc., But most distros these days have a single image for both usb boot and cd boot.
- jaclaz 6y agoThose are normally iso-hybrid files. I.e. files that are at the same time a valid .iso and a valid disk image. Basically you can add to a normal bootable .iso a MBR taking advantage of the fact that the MBR is first absolute (512 bytes) sector of the device whilst the CD/DVD bootsector is the 17th sector (2048 bytes). A BIOS will chainload the MBR on hd-like devices (including USB sticks) or the CD/DVD bootsectors (on optical media), then Syslinux/Isolinux, or grub4dos or GRUB2 (among others) will do the rest (chainloading the kernel and initrd and boot the Linux.
- nl 6y ago> What would the loaded operating system do? It will most likely look for a CDROM, which it won’t find, and fail. This answer doesn't seem right to me at all. I'm not a OS expert, but I've spent some time booting weird hardware. Generally, the boot process will load a kernel into memory, which has drivers for (hopefully!) the hardware needed to load the rest of the OS. The boot instructions (from GRUB or whatever) will specify the root partition (in linux) and enough information on how to load it. That might be on a local drive, a CD/DVD or a network device, but provided the kernel has the driver available it doesn't really matter.
- jaclaz 6y agoOf course it depends on the OS but generally speaking Linuxes will auto-recognize/automount .iso files, as long as they have an entry in the MBR (that - just as an example - can be done on-the-fly by grub4dos using its partnew command): http://reboot.pro/topic/9916-grub4dos-isohybrided/?p=88531 http://reboot.pro/topic/9916-grub4dos-isohybrided/?p=88531 Since all in all that happens is that a contiguous extent on disk is mapped as a partition, there is the requirement for the .iso image to be contiguous in the hosting filesystem. Ventoy goes beyond this as it virtualizes the .iso blocklist , thus allowing non-contiguous images: http://reboot.pro/topic/22277-ventoy-open-source-usb-boot-utility-for-both-bios-and-uefi/?p=214380 http://reboot.pro/topic/22277-ventoy-open-source-usb-boot-ut...
- Hello71 6y agofrom the home page: > A "Ventoy Compatible" concept is introduced by ventoy, which can help to support any ISO file. from the "Ventoy Compatible" page: > From the document you can see that ventoy will create a virtual disk from the iso file and boot it. But the virtual disk is only on BIOS(Legacy or UEFI) level. In most case it works only in bootloader period. Most of the morden OS's kernels will use their driver to access hardware after boot, so the virtual disk will not be visible to them. In normal case, the OS will search all the hardware storage media(CDROM/USB/HD ...) to find the source medium. But with ventoy they will not find such medium because there is no such physical media and they don't know that they were booted from a virual disk. In order to support that ventoy must do some hook before boot. But the hook is really a hard work because there are so many different OS distros and so many special cases.
- Klasiaster 6y agoYou can work around it by telling where to look for the ISO. A while ago I used this to boot a Debian live system: menuentry "Debian Sid LXDE Live" { insmod ext2 loopback loop /isos/debian-sid-lxde.iso linux (loop)/live/vmlinuz-3.14-1-amd64 initrd=/live/initrd.img-3.14-1-amd64 quiet boot=live config fromiso=/dev/sda1/isos/debian-sid-lxde.iso toram=filesystem.squashfs noeject quickreboot hostname=debian username=liveuser locales=de_DE.UTF-8 keyboard-layouts=de nopersistence initrd (loop)/live/initrd.img-3.14-1-amd64 }