flat assembler
Message board for the users of flat assembler.

Index > Heap > Boot from .iso within DVD/Stick etc.

Author
Thread Post new topic Reply to topic
Furs



Joined: 04 Mar 2016
Posts: 1469
Furs
I'd like to know if such a thing is possible these days, been looking but I find stuff I am not looking for or other crap like directly writing an iso to a USB stick. I don't care of that stuff.

What I want is simple:

1) Place .iso files (yes, ISO files, not write them directly to a DVD) on a DVD or USB Stick or whatever.
2) Have some sort of boot loader installed that will simply chainload the iso, with option to choose amongst them.

Example:

I place "Linux 1.iso" and "Linux 2.iso" on a DVD. So the DVD has two files each 1GB+. I then install this magic bootloader, so I select which one to boot. Then each boots manually from this "virtual" disc (iso) just as if that iso was written directly to the DVD.

Is this even possible or am I dreaming?

Bonus if it can chainload Windows iso or arbitrary OSes, but not needed, can be just chainloading Linux-only if the others aren't possible. Oh and I am not looking for "memdisk" solution that places the entire iso into memory! I want a normal "boot", not placing it in RAM.

It can be (U)EFI only, not necessarily compatible with BIOS too. If it works only on USB Stick but not on optical media, that's fine too (or the other way around).
Post 15 Dec 2016, 13:35
View user's profile Send private message Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 17270
Location: In your JS exploiting you and your system
revolution
I think you would also have to tell the code inside the ISO file where to find itself. If the ISO file uses BIOS interrupts to grab disk data then you can insert a shim there, but if the ISO code directly accesses the drive (maybe for PM mode or something) then things become much more tricky. Essentially you want to have a file system inside a file system. Not impossible, but normal ISO code is not expecting that.
Post 15 Dec 2016, 14:02
View user's profile Send private message Visit poster's website Reply with quote
Furs



Joined: 04 Mar 2016
Posts: 1469
Furs
Well yes of course, that's the "proper" way to do it to work on "any OS" (that uses BIOS to load itself anyway). That would be just the bonus to me if it exists (maybe I'm unaware of some magic in newer EFI BIOS, I don't know), but my main solution would be fine just to work with Linux-based OSes.

For example, GRUB2 can indeed chainload from an .iso file, as long as the iso hosts a Linux OS (or other similar OS that knows how to do this) of course, because Linux OS has support for that stuff easily. (mounting filesystem within filesystem, transparently etc). The way it works is by loading the Linux kernel and an initial ramdisk from the iso (GRUB can parse iso files), and then the kernel itself does the rest of the loading from the iso (it knows it was loaded from the iso, because GRUB gives it as a parameter)

The problem is that GRUB2 is not a bootloader used for "live CDs" like I want, but for "installed" OSes. I need a system similar that is installed/placed inside the DVD/USB Stick itself. I don't know if Syslinux is able to, couldn't find such functionality on wiki but maybe i overlooked something, hence the thread... Smile

I mean yeah I can put GRUB on the live CD but it seems, to me at least, when I looked on resources about it, that it needs "hardcoded" information about the system, like hard disks and so on. I don't know if there's a way to detect the drive "it is itself placed on" (like the stick or DVD), and then use relative stuff from that.
Post 15 Dec 2016, 14:50
View user's profile Send private message Reply with quote
sleepsleep



Joined: 05 Oct 2006
Posts: 8885
Location: ˛                             ⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣Posts: 334455
sleepsleep
Post 15 Dec 2016, 15:55
View user's profile Send private message Reply with quote
Furs



Joined: 04 Mar 2016
Posts: 1469
Furs
Sadly no, that method requires installing GRUB2 on the hard disk (and the .iso file, but that doesn't matter, you can place the iso anywhere), also needs hardcoding the path to the iso (by that I mean on a specific device etc).

I'm looking for something (like GRUB) to place/install on the removable media itself, so that I can take it on any PC and it works, even if it has no hard disk etc. Just like a normal "Live CD" except I can place more OS there each into an iso.

PS: why people call them "Live CD" when they're not even CDs anymore lol.
Post 15 Dec 2016, 16:30
View user's profile Send private message Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Copyright © 1999-2020, Tomasz Grysztar.

Powered by rwasa.