install from iso on usb stick

If none of the more specific forums is the right place to ask

install from iso on usb stick

Postby morgon » 2020-12-10 12:43


I've tried this before but gave up, so now I am having another go at it.

I have an usb-stick that is ext2-formatted and has a subdirectory "/iso".

In that iso-directory I have several bootable iso-image (tails, knoppix etc).

The stick itself has grub installed and has entries in grub.cfg for all the images I want to boot, so when I boot from this stick, grub loads and presents me with a menu, from which I can then select the iso I want to boot.

Now I also want to incorporate a debian install iso to this scheme, but this proves to be more complicated than I thought as for reasons that are beyond me you cannot use the initrd that is in the installer-image but you need to download an extra one, but whatever.

Here is what I try as the moment:

Code: Select all
menuentry "debian testing install" {
 insmod ext2
 set iso="/iso/deb/debian-testing-amd64-netinst.iso"
 loopback loop $iso
 linux (loop)/install.amd/vmlinuz iso-scan/filename=$iso iso-scan/ask_second_pass=true
 initrd /iso/deb/initrd.gz

But this does not work.

I does boot, I can select the language etc but then the installer tries to mount the iso-image and cannot find it (even though I am using the kernel from this very image).

The problem seems to be with the iso-scan machinery that I don't understand at all.

So does anybody know how to do this?

Many thanks!
Posts: 183
Joined: 2010-08-28 03:04

Re: install from iso on usb stick

Postby sgosnell » 2020-12-10 13:41

The easiest way to do this is with ventoy. Download ventoy, install it on the USB drive, and it takes care of GRUB and booting. All you need to do is copy the .iso files you want to the drive, just a normal copy. It presents a menu at boot time for choosing the .iso to boot. You don't need to futz with editing menus or anything else. It just works.
Take my advice, I'm not using it.
Posts: 974
Joined: 2011-03-14 01:49

Re: install from iso on usb stick

Postby morgon » 2020-12-10 14:39

Interesting tool. I did not know that...

But still, I don't want to start over with my stick, the grub-entries are normally not that hard for the iso (and you learn something when you write them).

It's just this debian installer that is finicky....
Posts: 183
Joined: 2010-08-28 03:04

Re: install from iso on usb stick

Postby brian_p » 2020-12-11 10:11

Where did you download the extra initrd from?
Posts: 104
Joined: 2015-11-05 10:32

Re: install from iso on usb stick

Postby MagicPoulp » 2020-12-11 11:52

You should rename your thread, because you do not install debian on a usb. You want to put an iso installer on the usb in a sub folder.

Maybe create a partition on the usb, using gparted on ext4? then you copy the debian isntaller with dd according to the co dumentation.
And in the bios boot, you can force booting on a certain partition.

I am not sure it will work since the iso contains both the efi partition and the installer.

I don't know much about ext2, but maybe debian works better on a new partition with ext4.
Posts: 423
Joined: 2018-11-05 21:30

Return to General Questions

Who is online

Users browsing this forum: No registered users and 14 guests