MultiOS-USB icon indicating copy to clipboard operation
MultiOS-USB copied to clipboard

Future apply : support ubuntu

Open RottenLeader opened this issue 3 months ago • 3 comments

I plan use multiOS-USB boot Dragon OS

https://sourceforge.net/projects/dragonos-focal/

thanks

RottenLeader avatar Oct 14 '25 06:10 RottenLeader

You will need a partition on the USB formatted with a filesystem that Ubuntu(-derivative) live images support. I have had success with NTFS, but ext2/ext3/ext4 will presumably also work. Ubuntu unfortunately does not yet support exFAT in their live images, so an exFAT-formatted MultiOS-USB will not boot Ubuntu (yet).

The easiest solution is to format the MultiOS-USB as ext2/ext3/ext4, but you can only do that if you do not need to:

  1. Use a Windows computer to open/edit files on the USB
  2. Install Windows from a Windows ISO on the USB.

The second solution would be to format the main MultiOS-USB partition as FAT32, and add a third partition formatted as either NTFS (if you plan on putting a Windows.iso file on it) or ext2/ext3/ext4 (if you plan on only putting Ubuntu-based distro's on the USB).

Why FAT32 and not exFAT as the main MultiOS-USB partition? FAT32 can be resized with gparted, exFAT can not.

You can either add a loopback or Ubuntu detection private config to MultiOS-USB/config_priv.

MultiOS-USB/config_priv/loopback/loopback_3rd-partition.cfg:

# detect loopback.cfg compatible ISO's on the third partition

for isofile in ($dev,3)$iso_dir/*.iso; do
	if [ -e "$isofile" ]; then
		regexp --set=isoname "$iso_dir/(.*)" "$isofile"

		LOOPBACK "$isofile"
		if [ -e "(loop)/boot/grub/loopback.cfg" ]; then
			grub=grub
		elif [ -e "(loop)/boot/grub2/loopback.cfg" ]; then
			grub=grub2
		else
			continue
		fi

		submenu "$isoname (loopback) ->" "$isofile" "$grub" "$iso_dir/$isoname" {
			iso_path="$4"
			export iso_path
			LOOPBACK "$2"
			root=(loop)
			configfile /boot/$3/loopback.cfg
		}
	fi
done

MultiOS-USB/config_priv/ubuntu/ubuntu_3rd-partition.cfg:

# Ubuntu
# https://ubuntu.com/download

#
# Ubuntu on third partition!
#

iso_pattern="*ubuntu-*-amd64.iso"									# If ISO directory path = /ISO_dir

for isofile in ($dev,3)$iso_dir/$iso_pattern; do					
	if [ -e "$isofile" ]; then
		regexp --set=isoname "$iso_dir/(.*)" "$isofile"				

		submenu "$isoname [config_priv] ->" "$isofile" "$iso_dir/$isoname" {
			LOOPBACK "$2"
			isocfg="iso-scan/filename=$3"									
			bootoptions=""
			linux_path="(loop)/casper/vmlinuz"
			initrd_path="(loop)/casper/initrd"

			menuentry "Try or Install Ubuntu" {
				set gfxpayload=keep
				echo Loading kernel...
				linux $linux_path $isocfg $bootoptions --- quiet splash
				echo Loading initrd...
				initrd $initrd_path
			}
			menuentry "Ubuntu (safe graphics)" {
				set gfxpayload=keep
				echo Loading kernel...
				linux $linux_path $isocfg $bootoptions nomodeset --- quiet splash
				echo Loading initrd...
				initrd $initrd_path
			}
			menuentry "OEM Install (for manufacturers)" {
				set gfxpayload=keep
				echo Loading kernel...
				linux $linux_path $isocfg $bootoptions --- quiet splash oem-config/enable=true
				echo Loading initrd...
				initrd $initrd_path
			}
		}
	fi
done

both these configs still expect the Ubuntu files to be inside an ISOs/ folder!

ebbez avatar Dec 13 '25 15:12 ebbez

how about Fedora ? it can't read too

RottenLeader avatar Dec 13 '25 19:12 RottenLeader

how about Fedora ? it can't read too

Mexit added a config for Fedora >=42 three months ago, but the current release was 7 months ago, so it isn't included yet if you downloaded the release instead of the Git repo. The new config is needed because there were some changes since Fedora 42.

So if you need to create a new MultiOS-USB (and it'll wipe everything on it!):

$ git clone https://github.com/Mexit/MultiOS-USB.git
$ cd MultiOS-USB
$ sudo ./multios-usb.sh -l
$ sudo ./multios-usb.sh <DRIVE>
### -u (update) won't work since the config version hasn't been bumped

But if you already have an existing MultiOS-USB drive you can manually add it to MultiOS-USB/config/fedora/:

MultiOS-USB/config/fedora/fedora-42-live.cfg:

# Fedora Live, Workstation, Fedora Spins (KDE, Xfce, ...)
# https://fedoraproject.org

iso_pattern="Fedora-*-Live-*.x86_64.iso"

for isofile in $iso_dir/$iso_pattern; do
	if [ -e "$isofile" ]; then
		regexp --set=isoname "$iso_dir/(.*)" "$isofile"

		submenu "$isoname ->" "$isofile" {
			iso_path="$2"
			LOOPBACK "$iso_path"
			probe --label --set=cd_label (loop)
			isocfg="iso-scan/filename=$iso_path"
			bootoptions="root=live:CDLABEL=$cd_label rd.live.image quiet rhgb"
			linux_path="(loop)/boot/x86_64/loader/linux"
			initrd_path="(loop)/boot/x86_64/loader/initrd"

			menuentry "Start Fedora Live" {
				echo Loading kernel...
				linux $linux_path $isocfg $bootoptions
				echo Loading initrd...
				initrd $initrd_path
			}
			menuentry "Test this media & start Fedora Live" {
				echo Loading kernel...
				linux $linux_path $isocfg $bootoptions rd.live.check
				echo Loading initrd...
				initrd $initrd_path
			}
			menuentry "Start Fedora Live in basic graphics mode" {
				echo Loading kernel...
				linux $linux_path $isocfg $bootoptions nomodeset
				echo Loading initrd...
				initrd $initrd_path
			}
		}
	fi
done

ebbez avatar Dec 13 '25 20:12 ebbez