How can i setup installation media manually in the installer?

Ask for help with issues regarding the Installations of the Debian O/S.
Post Reply
Message
Author
Borg
Posts: 38
Joined: 2024-02-16 22:49
Has thanked: 3 times
Been thanked: 3 times

How can i setup installation media manually in the installer?

#1 Post by Borg »

I use a USB stick in multiboot configuration as the installation medium. This means that there are several Debian ISO images as well as ISO files from other Debian-based distributions in one folder.

Booting from certain ISO images via GRUB also works, but the Debian installer's auto-detection of the installation medium cannot handle this. For example, it uses the first Debian-like ISO file that it can find in the folder.

This can be an old Debian version or an image of Ubuntu, for example, but not necessarily the exact Debian version for which the installer was written and which was just booted.

The two screenshots show the problem and the point where the auto-detection of the installation medium fails.

My grub.cfg for the multiboot USB stick looks like this in short. It's for grub version 2:

Code: Select all

set timeout=10
set default=0

# path to the partition holding ISO images (using UUID)
probe -u $root --set=rootuuid
set imgdevpath="/dev/disk/by-uuid/$rootuuid"

menuentry "Debian 12.7.0 i386 netinst" {
  set isofile="/images/debian-12.7.0-i386-netinst.iso"
  search --no-floppy --set=root --file $isofile
  loopback loop $isofile
  linux (loop)/install.386/vmlinuz findiso=$isofile boot=install.386 components locales=de_DE.UTF-8 vconsole.keymap=de-latin1 noeject noprompt noplymouth nopersistent --
  initrd (loop)/install.386/initrd.gz
}

menuentry "kubuntu-20.04.1 Desktop 64 Bit" {
  set isofile=/images/kubuntu-20.04.1-desktop-amd64.iso
  loopback loop $isofile
  linux (loop)/casper/vmlinuz boot=casper iso-scan/filename=$isofile locale=de_DE console-setup/layoutcode=de noeject noprompt noplymouth nopersistent --
  initrd (loop)/casper/initrd
}

menuentry "TinyCore Linux - CorePlus (248 MiB) Current 15" {
  set isofile="/images/CorePlus-current.iso"
  search --no-floppy --set=root --file $isofile
  loopback loop $isofile
  linux (loop)/boot/vmlinuz findiso=$isofile boot=boot components locales=de_DE.UTF-8 vconsole.keymap=de-latin1 noeject noprompt noplymouth nopersistent --
  initrd (loop)/boot/core.gz
}

menuentry "Plop Boot Manager" {
    set root=(hd0,1)
    linux16 /images/plpbt.bin
}

menuentry "Memtest 86+" {
 linux16 /images/memtest86+-5.01.bin
}

menuentry "Windows Installer starten" {
 echo "Booting Windows-Boot-Manager (bootmgr) ..."
 ntldr /bootmgr
 echo "Booting Windows-Boot-Manager (bootmgr) ..."
}
What i need is a workaround for the autodetection. I just want to tell the installer to use ISO image file /images/debian-12.7.0-i386-netinst.iso
Attachments
debian_media_problem_1.png
debian_media_problem_2.png

User avatar
sunrat
Site admin
Site admin
Posts: 7365
Joined: 2006-08-29 09:12
Location: Melbourne, Australia
Has thanked: 133 times
Been thanked: 649 times

Re: How can i setup installation media manually in the installer?

#2 Post by sunrat »

IIRC I've run into this issue too using Ventoy. I ended up just using another USB stick dedicated to only the installer image, copying the image to the whole stick using cp.
“ computer users can be divided into 2 categories:
Those who have lost data
...and those who have not lost data YET ”
Remember to BACKUP!

Borg
Posts: 38
Joined: 2024-02-16 22:49
Has thanked: 3 times
Been thanked: 3 times

Re: How can i setup installation media manually in the installer?

#3 Post by Borg »

Yes, I used this workaround last time. But if I do it like this every time, I'll never be able to use my USB multiboot stick for Debian. That's why I wanted to know if there's a way to solve this by telling the installer the ISO image manually. Debian is currently the only distribution I've tested that won't boot from the multiboot stick because of this auto-detection.

EDIT:
Back then, I found another workaround instead of using an extra USB stick. To do this, I had to rename all the other Debian-based ISO files (including Ubuntu, Kubuntu, Linux Mint, old Debian versions etc.) in the multiboot stick, then the auto-detection recognized the only remaining Debian ISO image that should be booted.
However, this is a very unpleasant solution because it requires the ISO files to be constantly copied or renamed.

User avatar
Peter Zehnder
Posts: 15
Joined: 2024-05-16 22:03
Location: Boechout

Re: How can i setup installation media manually in the installer?

#4 Post by Peter Zehnder »

There are NO stupid questions, only stupid answers.

User avatar
Peter Zehnder
Posts: 15
Joined: 2024-05-16 22:03
Location: Boechout

Re: How can i setup installation media manually in the installer?

#5 Post by Peter Zehnder »

i have a stick with Debian,Mint,OpenSuSe and CentOS ISO's on, no problem to select one of them and to install it.

But i use NOT the NetInstall ISO's, i use the Full Versions
There are NO stupid questions, only stupid answers.

Borg
Posts: 38
Joined: 2024-02-16 22:49
Has thanked: 3 times
Been thanked: 3 times

Re: How can i setup installation media manually in the installer?

#6 Post by Borg »

Peter Zehnder wrote: 2024-10-25 16:06 i have a stick with Debian,Mint,OpenSuSe and CentOS ISO's on, no problem to select one of them and to install it.
Could you post a directory tree of your USB stick?

User avatar
Peter Zehnder
Posts: 15
Joined: 2024-05-16 22:03
Location: Boechout

Re: How can i setup installation media manually in the installer?

#7 Post by Peter Zehnder »

As I needed the stick for something else, I just made a usb-hd.

First thing to do,
download Ventoy and format your HD or stick with Ventoy

https://linuxkamarada.com/en/2020/07/29 ... ges-to-it/

How to install Ventoy to the USB drive

Start by downloading Ventoy for your operating system from the Ventoy releases page on GitHub:

https://github.com/ventoy/Ventoy/releases

How to install Ventoy using Linux

To show how to install Ventoy using Linux, I’m going to use Linux Kamarada 15.1.

Download the .tar.gz file corresponding to Ventoy for Linux.

When the download is complete, extract the contents of the archive

Enter the extracted folder and you will find the Ventoy2Disk.sh script

Before proceeding, you need to find out the device name of your USB drive. To do this, you can use the Disks app

We are ready to install Ventoy to the USB drive. Run the Ventoy2Disk.sh script as the administrator user (root), informing the device name as argument:

Code: Select all

# sh Ventoy2Disk.sh -i /dev/sdb

***********************************************************
*                Ventoy2Disk Script                       *
*             longpanda  admin@ventoy.net                 *
***********************************************************

Disk : /dev/sdb
Modelo:  USB DISK 2.0 (scsi)
Size : 7 GB
Style: MBR


Attention:
You will install Ventoy to /dev/sdb.
All the data on the disk /dev/sdb will be lost!!!

Continue? (y/n)

Ventoy warns you of the risk of data loss and asks if you want to continue.

Type y (from yes) and then hit Enter:

Continue? (y/n)y

All the data on the disk /dev/sdb will be lost!!!
Double-check. Continue? (y/n)

Ventoy warns you once more (think twice). Again, type y and hit Enter:

Double-check. Continue? (y/n)y

Create partitions on /dev/sdb by parted in MBR style ...
Done
mkfs on disk partitions ...
create efi fat fs /dev/sdb2 ...
mkfs.fat 4.1 (2017-01-24)
success
mkexfatfs 1.3.0
Creating... done.
Flushing... done.
File system created successfully.
writing data to disk ...
sync data ...
esp partition processing ...
umount: /home/linux/Downloads/ventoy-1.0.17-linux/ventoy-1.0.17/tmp_mnt: target is busy.
rm: cannot remove './tmp_mnt': Device or resource busy

Install Ventoy to /dev/sdb successfully finished.
After a few seconds or minutes, Ventoy finishes installing itself to the USB drive.

Now that your USB drive is ready, copy the ISO images you are going to use onto it

Code: Select all

peter@Medion-I7:/media/peter/Ventoy$ ls
archlinux-2024.10.01-x86_64.iso
CentOS-Stream-9-latest-x86_64-dvd1.iso
debian-12.7.0-amd64-DVD-1.iso
linuxmint-22-cinnamon-64bit.iso
openSUSE-Leap-15.6-DVD-x86_64-Build710.3-Media.iso
There are NO stupid questions, only stupid answers.

User avatar
sunrat
Site admin
Site admin
Posts: 7365
Joined: 2006-08-29 09:12
Location: Melbourne, Australia
Has thanked: 133 times
Been thanked: 649 times

Re: How can i setup installation media manually in the installer?

#8 Post by sunrat »

Please edit your post to include code, commands, and terminal text inside code tags.

There have been reports of installation failure using multiboot sticks such as Ventoy. It's more reliable to copy the install media to a whole dedicated stick as advised at https://www.debian.org/releases/stable/ ... 03.en.html
YMMV
“ computer users can be divided into 2 categories:
Those who have lost data
...and those who have not lost data YET ”
Remember to BACKUP!

Borg
Posts: 38
Joined: 2024-02-16 22:49
Has thanked: 3 times
Been thanked: 3 times

Re: How can i setup installation media manually in the installer?

#9 Post by Borg »

Peter Zehnder wrote: 2024-10-26 17:33
First thing to do,
I just need an output of tree.

Do this:

Code: Select all

# as root
apt install tree
# change dir to your USB stick
cd /media/etc...
# enter tree
tree
Peter Zehnder wrote: 2024-10-25 16:06 But i use NOT the NetInstall ISO's, i use the Full Versions
BTW i am using a netinstall ISO because the target machine is a x86 32 bit machine and there is sadly no full version for i386. Full versions are only available for x64, i.e. the platform that needs it the least.

If Debian 12 really is the last 32-bit version for x86, then in a few years it will no longer even be possible for old retro computers to install an old Debian system on them, because all the packages will no longer be accessible via netinstall.The official servers will probably delete the packages, as they did with previous versions. And you don't necessarily want to connect a computer with an old Debian version to the network. So a full image + source code image would have been ideal for offline use and old retro computers that never see the internet again.

User avatar
Peter Zehnder
Posts: 15
Joined: 2024-05-16 22:03
Location: Boechout

Re: How can i setup installation media manually in the installer?

#10 Post by Peter Zehnder »

Code: Select all

peter@Medion-I7:/media/peter/Ventoy$ tree
.
├── archlinux-2024.10.01-x86_64.iso
├── CentOS-Stream-9-latest-x86_64-dvd1.iso
├── debian-12.7.0-amd64-DVD-1.iso
├── linuxmint-22-cinnamon-64bit.iso
└── openSUSE-Leap-15.6-DVD-x86_64-Build710.3-Media.iso
There are NO stupid questions, only stupid answers.

User avatar
sunrat
Site admin
Site admin
Posts: 7365
Joined: 2006-08-29 09:12
Location: Melbourne, Australia
Has thanked: 133 times
Been thanked: 649 times

Re: How can i setup installation media manually in the installer?

#11 Post by sunrat »

@Peter Zehnder Code tags for commands and terminal text please! Fixed it for you this time.

How to set up Ventoy is not relevant to OP's question anyway.
“ computer users can be divided into 2 categories:
Those who have lost data
...and those who have not lost data YET ”
Remember to BACKUP!

Borg
Posts: 38
Joined: 2024-02-16 22:49
Has thanked: 3 times
Been thanked: 3 times

Re: How can i setup installation media manually in the installer?

#12 Post by Borg »

Peter Zehnder wrote: 2024-10-27 12:07

Code: Select all

peter@Medion-I7:/media/peter/Ventoy$ tree
.
├── archlinux-2024.10.01-x86_64.iso
├── CentOS-Stream-9-latest-x86_64-dvd1.iso
├── debian-12.7.0-amd64-DVD-1.iso
├── linuxmint-22-cinnamon-64bit.iso
└── openSUSE-Leap-15.6-DVD-x86_64-Build710.3-Media.iso
Thanks.

The ISO files also seem to be in the same directory. I was hoping that Ventoy puts each ISO in its own directory and that could have explained why the Debian installer finds its ISO. But that doesn't seem to be the case. So Ventoy seems to solve that in another way. Are the ISOs all still unchanged? Could you compare the Debian's ISO MD5 or SHA256 checksums with the official image file?
What happens if you add another Debian ISO, e.g. an older or newer Debian Version? Does the Debian installer still find its ISO of the correct Debian version?

User avatar
Peter Zehnder
Posts: 15
Joined: 2024-05-16 22:03
Location: Boechout

Re: How can i setup installation media manually in the installer?

#13 Post by Peter Zehnder »

Ventoy does the job.

This has nothing to do with Debian Installer.

I just tested with 3 different Debian versions, no problems.

If you format the drive with Ventoy, there is a FAT that boots, where the boot-manager is in.

After that boot, you get a window with a menu where all your ISO's are. you move the highlight to the one you want install.

(Unfortunately, I can't insert a pic from a screenshot from my PC,no clue why)
There are NO stupid questions, only stupid answers.

friendlysalmon88
Posts: 135
Joined: 2023-12-08 16:48
Location: Seattle,Wa USA
Has thanked: 6 times
Been thanked: 8 times

Re: How can i setup installation media manually in the installer?

#14 Post by friendlysalmon88 »

I too ran in to ta similar problem with my 2tb external sold state drive, where I'd first download the desired Debian image and then filemanaged >> home >> Downloads and select the cd or DVD image and left click for the context menu and select send to sub menu. Where i'd than select send to Ventoy. I started having issues where the installer would boot fine and get through the steps until it got to the installing base system segment where it would fall over with the following error message " fatal error missing critical files" or something to that key.

Post Reply