0

I am a linux and windows user, and I'm going to build up a USB drive(/dev/sda, got 3 partition already) which contains a windows PE and a linux livecd. I have got two iso files, and I'm trying a new way: dd them into two partitions:

sudo dd if=kali-live.iso of=/dev/sda2
sudo dd if=winPE.iso of=/dev/sda3

and I have just installed grub2 on my USB drive by following the Arch wiki:

sudo mount /dev/sda1 /mnt/mobile
sudo grub-install --target=x86_64-efi --removable --boot-directory=/mnt/mobile/boot --efi-directory=/mnt/mobile

I'm showing what my USB drive like in GParted:

my USB drive like

and then, how should I config the file /mnt/mobile/boot/grub/grub.cfg to boot them? I have not got any idea from the web, including that arch wiki page.

For each or the iso files, if I just do: dd if=xxx.iso of=/dev/sda and it will normally boot.

Note this is not what I am asking:

  • make a filesystem on /dev/sda2 and put a iso file into that filesystem. That's easy to boot.

I've not found amy page to solve my question.

I know someone have done that, but I do not know how to contact with. I'm gonna to try that way, which means one ISO file allocating one partition.

Please forgive me if wrong language expression occurs, because my native language is not English. I'll apologize if this question is not appropriate here and I'm just a freshman here.

3
  • Writing to the whole device works because each image contains structures expected by UEFI (legitimately or by a "hack", see this answer). What you are trying to do is to add one more layer in a stack of filesystems. It's not that different from this question: Is this possible to boot an OS from some kind of a file? My answer there explains what I mean by "a stack of filesystems". I really don't know if it's easier to do it the way you want, or by storing the isos as regular files in a "real" filesystem. Commented Jan 4 at 14:43
  • 1
    An humble suggestion: Don't reinvent the wheel, use Ventoy: ventoy.net/en/index.html Commented Jan 4 at 16:08
  • I know how to use ventoy. I just want to try this way, for I know somebody realized thw way I described and I can't find how to reach thay. Anyway, the way I issued is not the same as ventoy. anyway, thank for your suggestion.
    – kz25t
    Commented Jan 5 at 1:17

0

You must log in to answer this question.

Browse other questions tagged .