Multi-booting USB drive

Technical issues/questions of an intermediate or advanced nature.
User avatar
Ed_P
Contributor
Contributor
Posts: 8341
Joined: 06 Feb 2013, 22:12
Distribution: Cinnamon 5.01 ISO
Location: Western NY, USA

Multi-booting USB drive

Post#1 by Ed_P » 04 Dec 2020, 23:32

For anyone interested in multi-booting systems on a flash drive this is a config that I have on a 4Gb Cruzer Blade. Porteus 3.01 is installed and the rest just kept getting added on.

Code: Select all

guest@porteus:~$ ls  /mnt/sdb1/
BOOTEX.LOG*                                  System\ Volume\ Information/
Data/                                        Temp/
Dell/                                        USB_INSTALLATION.txt*
Dell-hd/                                     boot/
EFI/                                         grldr*
Guest301/                                    grub2/
HPnotebook.txt*                              menu.lst*
ISOs/                                        porteus/
Modsavedat/                                  porteus3.2/
Modules/                                     porteus3.x/
My_Webpages/                                 porteus4.0/
Optional/                                    usbporteuskernelupdt.cmd*
guest@porteus:~$ 
grub4dos menu

Code: Select all

# jaclaz http://www.911cd.net/forums//index.php?showtopic=25876&pid=176067&st=0&#entry176067
color white/blue black/white white/blue yellow/blue

timeout 30

#map --unhook

set ISOx=Porteus-CINNAMON-v3.2.2-i586.iso
set ISOy=porteus-nemesis-v3.5-lxde-x86_64.iso

# menu entries

title Porteus 3.2.2 Cinnamon i586 ISO  \n279MB\n %ISOx%
find --set-root                       /ISOs/%ISOx%
map --heads=0 --sectors-per-track=0   /ISOs/%ISOx% (0xff) 
map --hook
root (0xff)
kernel /boot/syslinux/vmlinuz    from=/ISOs/%ISOx%  extramod=UUID:931F-8716/porteus3.2/Modules;/porteus3.2/Modsavedat volume=40 reboot=cold ramsize=80%  
initrd /boot/syslinux/initrd.xz

title Porteus 3.2.2 Cinnamon x86_64    \n \n Installed
find --set-root                       /boot/syslinux/vmlinuz
kernel /boot/syslinux/vmlinuz     extramod=UUID:931F-8716/Modules;/Modsavedat volume=40 reboot=cold ramsize=80%  
initrd /boot/syslinux/initrd.xz

title Porteus 3.5 nemesis ISO     \n248MB\n %ISOy% 
find --set-root                       /ISOs/%ISOy%
map --heads=0 --sectors-per-track=0   /ISOs/%ISOy% (0xff) 
map --hook
root (0xff)
kernel /boot/syslinux/vmlinuz    from=/ISOs/%ISOy% changes=UUID:931F-8716/porteus3.x/porteussave.dat volume=40 reboot=cold ramsize=80% 3
initrd /boot/syslinux/initrd.xz

title   \n
root ()

title uuid test
#find --set --root /This_is_mah_stick_no_not_that_other_one
find --set-root /USB_INSTALLATION.txt
#find --set-root /autorun.inf
uuid ()
debug 0
uuid ()
echo %?%
debug 1
pause
root ()

title   \n
root ()

title Reboot
reboot
grub2 menu

Code: Select all

#
#       Created at 13:22:57  on  Wednesday   February 05, 2020
#
# Generated by Grub2Win      Version 1.0.0.2 from directory J:\grub2
#              Stamp  2017 - 1111 - 015542
#
# The grub menu theme is - basic
#
#
#  Grub2Win generated 1 menu entry.   12 user menu entries were preserved.
#
#  The Grub default boot OS is menu entry 1  -  Porteus 3.2.2 - installed
#  The Grub default timeout is 90 seconds
#  The Grub locale language is English   The locale code is - en
#


set default=2
set grub2win_chosen='2  -  Porteus 3.2.2 - installed'
set timeout=90
set lang=en
set grub2win_version=1.0.0.2
set pager=1
set icondir=$prefix/themes/icons
set locale_dir=$prefix/locale
set grub2win_procbits=32
if [ cpuid -l ] ; then set grub2win_procbits=64 ; fi
set grub2win_bootmode=BIOS
if [ $grub_platform = efi ] ; then set grub2win_bootmode=EFI ; fi 
set grub2win_custmode=BIOS
set grub2win_lastbooted=no
set gfxmode=800x600,auto
set theme=$prefix/themes/custom.config
if [ $grub2win_bootmode = EFI ] ; then set theme=$theme.efi.txt ; else set theme=$theme.bios.txt ; fi
export theme
set gfxpayload=text
export icondir
insmod png
insmod all_video
loadfont $prefix/fonts/unicode.pf2
insmod gfxterm
terminal_output gfxterm
insmod gfxmenu


# start-grub2win-auto-menu-section  ***************************************************
#

#
#  Menu Entry 0       Windows Boot Loader
#
menuentry   'Windows Boot Loader'       --class other   --class icon-windows  {
#
set reviewpause=120
# start-custom-code
# end-custom-code
sleep -i -v $reviewpause ; echo
savelast 0 'Windows Boot Loader'
echo Grub is now loading  Windows Boot Loader
}

#
# display any error messages         ***************************************************
#

function g2werror {
     echo
     echo
     echo *** $1 $2 $3 $4 $5
     echo *** Press the ESC key to continue
     echo
     sleep -v -i 120
     configfile $prefix/grub.cfg
}

#
# end-grub2win-auto-menu-section     ***************************************************

# start-grub2win-savelast-section   ****************************************************
#
function savelast {
     set      default=$1
     save_env default
     if [ $grub2win_bootlast = yes ] ; then
          set grub2win_chosen=$default'  -   '$2
     fi
     save_env grub2win_chosen
     if [ ! -z $subdefault ] ; then set default=$subdefault ; fi
}
#
# end-grub2win-savelast-section     ****************************************************

# start-grub2win-user-section   ********************************************************
#

menuentry "Porteus CINNAMON 4.0 - i586 ISO" --class slackware   --class icon-porteus  {
     echo "Boot disk address is: "$root
     echo "Prefix is:            "$prefix
     echo "The boot mode is:     "$grub2win_bootmode

     set linux_folder="/porteus4.0"
     set iso="/ISOs/Porteus-CINNAMON-v4.0-i586.iso"

     search -f /boot/syslinux/vmlinuz --set=root

     echo "ISO root is:          "$root
     echo "ISO is:               "$iso
     echo "Porteus folders:      "$linux_folder

     set porteus_parms="volume=33 reboot=cold extramod=$linux_folder/Modules;$linux_folder/Modsavedat noload=save.dat "

     echo "Porteus parms are:    "$porteus_parms
     echo
     loopback loop $iso
     sleep -v -i 5

     linux (loop)/boot/syslinux/vmlinuz from=$iso $porteus_parms
#     linux        /porteus3.2/vmlinuz from=$iso $porteus_parms
     initrd (loop)/boot/syslinux/initrd.xz
     echo "Booting Porteus"
}

menuentry "Porteus 3.2.2 - installed" --class slackware   --class icon-porteus  {
     echo "Boot disk address is: "$root
     echo "Prefix is:            "$prefix
     echo "The boot mode is:     "$grub2win_bootmode

     search -f /boot/syslinux/vmlinuz --set=root

     echo "USB root is:          "$root
     echo "ISO is:               n/a"
     echo "Porteus folders:      /"

     set porteus_parms="volume=33 reboot=cold extramod=/Modules changes=EXIT:/porteus/changes/porteussave.dat "

     echo "Porteus parms are:    "$porteus_parms
     echo
     sleep -v -i 5

     linux /boot/syslinux/vmlinuz $porteus_parms
     initrd /boot/syslinux/initrd.xz
     echo "Booting Porteus"
}

menuentry "Porteus 3.2.2 - installed - AF+" --class slackware   --class icon-porteus  {
     echo "Boot disk address is: "$root
     echo "Prefix is:            "$prefix
     echo "The boot mode is:     "$grub2win_bootmode

     search -f /boot/syslinux/vmlinuz --set=root

     echo "USB root is:          "$root
     echo "ISO is:               n/a"
     echo "Porteus folders:      /"

     set porteus_parms="volume=33 reboot=cold extramod=/Modules;/Modsavedat noload=save.dat"

     echo "Porteus parms are:    "$porteus_parms
     echo
     sleep -v -i 5

     linux /boot/syslinux/vmlinuz $porteus_parms
     initrd /boot/syslinux/initrd.xz
     echo "Booting Porteus"
}

menuentry "Porteus 3.2.2 - i586 ISO AF+" --class slackware   --class icon-porteus  {
     echo "Boot disk address is: "$root
     echo "Prefix is:            "$prefix
     echo "The boot mode is:     "$grub2win_bootmode

     set linux_folder="/porteus3.2"
     set iso="/ISOs/Porteus-CINNAMON-v3.2.2-i586.iso"

     search -f /boot/syslinux/vmlinuz --set=root

     echo "ISO root is:          "$root
     echo "ISO is:               "$iso
     echo "Porteus folders:      "$linux_folder

     set porteus_parms="volume=33 reboot=cold extramod=$linux_folder/Modules;$linux_folder/Modsavedat noload=save.dat "

     echo "Porteus parms are:    "$porteus_parms
     echo
     loopback loop $iso
     sleep -v -i 5

     linux (loop)/boot/syslinux/vmlinuz from=$iso $porteus_parms
#     linux        /porteus3.2/vmlinuz from=$iso $porteus_parms
     initrd (loop)/boot/syslinux/initrd.xz
     echo "Booting Porteus"
}

menuentry "Porteus 3.2.2 - hard drive ISO - AF+" --class slackware   --class icon-porteus  {

     set linux_folder=/porteus3.2
     set iso=/ISOs/Porteus-CINNAMON-v3.2.2-x86_64.iso
     set boot_parms="volume=33 reboot=cold extramod=$linux_folder/Modules;$linux_folder/Modsavedat noload=save.dat"

     search -f /ISOs/FIRADISK.IMG --set=root

     echo "ISO root is:          "$root
     echo "ISO is:               "$iso
     echo "Porteus folders:      "$linux_folder
     sleep -v -i 5

     loopback loop $iso
     linux        /porteus3.2/vmlinuz from=$iso $boot_parms
     initrd (loop)/boot/syslinux/initrd.xz
     echo "Booting hard drive Porteus"
}

menuentry "Porteus Nemesis 3.5 - ISO" --class slackware   --class icon-linux  {
     echo "Boot disk address is: "$root
     echo "Prefix is:            "$prefix
     echo "The boot mode is:     "$grub2win_bootmode

     set linux_folder=porteus3.x
     set iso=/ISOs/porteus-nemesis-v3.5-lxde-x86_64.iso
     search -f $iso --set=root

     set linux_drv=/mnt/sda5/$linux_folder
     if [ -f (hd1,1)/USB_INSTALLATION.txt ]; then
         set linux_drv=/mnt/sdb1/$linux_folder
     fi
     if [ -f (hd0,1)/USB_INSTALLATION.txt ]; then
         set linux_drv=/mnt/sdb1/$linux_folder
     fi
     echo "ISO root is:          "$root
     echo "ISO is:               "$iso

     set porteus_parms="changes=$linux_drv/porteussave.dat volume=33 reboot=cold 3"

     echo "Porteus changes:      "$linux_drv/porteussave.dat
     echo "Porteus parms are:    "$porteus_parms
     echo " "
     loopback loop $iso
     echo " "; echo "* Save.dat can load _very_ slowly on some machines."
     sleep -v -i 15
     linux (loop)/boot/syslinux/vmlinuz from=$iso $porteus_parms
     initrd (loop)/boot/syslinux/initrd.xz
     echo "Booting Linux"
}

menuentry "GParted - ISO" --class slackware   --class icon-linux  {
     echo "Boot disk address is: "$root
     echo "Prefix is:            "$prefix
     echo "The boot mode is:     "$grub2win_bootmode

     set iso=/ISOs/gparted-live-0.30.0-1-i686.iso
     search -f $iso --set=root

     echo "ISO root is:          "$root
     echo "ISO is:               "$iso
     echo " "
     loopback loop $iso
     sleep -v -i 8
     linux (loop)/live/vmlinuz findiso=$iso boot=live union=overlay username=user config components quiet noswap  ip= net.ifnames=0 nosplash
     initrd (loop)/live/initrd.img
     echo "Booting GParted"
}

menuentry "BartPE - ISO" --class slackware   --class icon-linux  {
     echo "Boot disk address is: "$root
     echo "Prefix is:            "$prefix
     echo "The boot mode is:     "$grub2win_bootmode

     set iso=/ISOs/pebuilder.iso
     search -f $iso --set=root

     echo "ISO root is:          "$root
     echo "ISO is:               "$iso
     echo " "
     loopback loop $iso
     sleep -v -i 8
     linux FIRADISK.IMG
     initrd (loop)/I386/SETUPLDR.BIN
     echo "Booting BartPE"
}

#title 1. BartPE\n 744MB\n Takes a moment to initiate.
#find --set-root /ISOs/pebuilder.iso
#map --mem /ISOs/FiraDisk.gz (fd0)
#map --mem /ISOs/pebuilder.iso (0xff)
#map --hook
#root (0xff)
#chainloader (0xff)/I386/SETUPLDR.BIN

menuentry "Grub4DOS" --class slackware   --class icon-linux  {
     set iso=/ISOs/pebuilder.iso
     search -f $iso --set=root
     linux /grub.exe
}

menuentry   'Reboot' --class slackware --class icon-reboot  {
     reboot
}

menuentry   'Shutdown' --class slackware --class icon-shutdown  {
     halt
}

menuentry   'Exit' --class slackware --class icon-shutdown  {
     halt
}

menuentry   'UUID tests' --class other --class icon-linux  {

     USB_drv="/boot/syslinux/vmlinuz"

     echo "Boot drive: "$root
     search -f $USB_drv --set=root
     echo "USB drive:  "$root
     probe -u $root --set=USBuuid
     echo "UUID: "$USBuuid
     echo " "
     echo " "
     sleep -v -i 90
}

#
# end-grub2win-user-section     ********************************************************
Ed

User avatar
Rava
Contributor
Contributor
Posts: 5401
Joined: 11 Jan 2011, 02:46
Distribution: XFCE 5.01 x86_64 + 4.0 i586
Location: Forests of Germany

Multi-booting USB drive

Post#2 by Rava » 14 Dec 2020, 01:31

Thanks for sharing.

Why choose Port 3.01 as main install and not the most recent finale version 4.0?
Cheers!
Yours Rava

User avatar
Ed_P
Contributor
Contributor
Posts: 8341
Joined: 06 Feb 2013, 22:12
Distribution: Cinnamon 5.01 ISO
Location: Western NY, USA

Multi-booting USB drive

Post#3 by Ed_P » 14 Dec 2020, 14:09

When I made that USB drive 3.01 was the current finale version.
Ed

User avatar
Rava
Contributor
Contributor
Posts: 5401
Joined: 11 Jan 2011, 02:46
Distribution: XFCE 5.01 x86_64 + 4.0 i586
Location: Forests of Germany

Multi-booting USB drive

Post#4 by Rava » 14 Dec 2020, 22:23

Ed_P wrote:
14 Dec 2020, 14:09
When I made that USB drive 3.01 was the current finale version.
Thought so, but updating e.g. to 4.0 would be piece of cake.
Replace kernel, initrd, Porteus base modules and the porteus version# cfg file and its done.
Cheers!
Yours Rava

User avatar
Ed_P
Contributor
Contributor
Posts: 8341
Joined: 06 Feb 2013, 22:12
Distribution: Cinnamon 5.01 ISO
Location: Western NY, USA

Multi-booting USB drive

Post#5 by Ed_P » 15 Dec 2020, 05:13

Adding 4.0 to the drive, so I have 2 systems works also. ;)

Code: Select all

# start-grub2win-user-section   ********************************************************
#

menuentry "Porteus CINNAMON 4.0 - i586 ISO" --class slackware   --class icon-porteus  {
     echo "Boot disk address is: "$root
     echo "Prefix is:            "$prefix
     echo "The boot mode is:     "$grub2win_bootmode

     set linux_folder="/porteus4.0"
     set iso="/ISOs/Porteus-CINNAMON-v4.0-i586.iso"

     search -f /boot/syslinux/vmlinuz --set=root

     echo "ISO root is:          "$root
     echo "ISO is:               "$iso
     echo "Porteus folders:      "$linux_folder

     set porteus_parms="volume=33 reboot=cold extramod=$linux_folder/Modules;$linux_folder/Modsavedat noload=save.dat "

     echo "Porteus parms are:    "$porteus_parms
     echo
     loopback loop $iso
     sleep -v -i 5

     linux (loop)/boot/syslinux/vmlinuz from=$iso $porteus_parms
#     linux        /porteus3.2/vmlinuz from=$iso $porteus_parms
     initrd (loop)/boot/syslinux/initrd.xz
     echo "Booting Porteus"
}
Ed

Kulle
Warlord
Warlord
Posts: 594
Joined: 28 Jan 2017, 10:39
Distribution: v4.0 64bit Xfce
Location: Berlin

Multi-booting USB drive

Post#6 by Kulle » 05 Jan 2021, 12:39

ventoy: Multi-booting USB drive

Has anyone tried Ventoy?
I haven't had time for it yet.

https://www.ventoy.net/en/index.html

A list of Ventoy’s test support for 275 (!) distros:
https://www.ventoy.net/en/distrowatch.html

Also included in the list: Porteus, KolibriOS (!)
Brief instructions:
https://www.ventoy.net/en/doc_start.html
Persistence is supportet:
https://www.ventoy.net/en/plugin_persistence.html

User avatar
Ed_P
Contributor
Contributor
Posts: 8341
Joined: 06 Feb 2013, 22:12
Distribution: Cinnamon 5.01 ISO
Location: Western NY, USA

Multi-booting USB drive

Post#7 by Ed_P » 05 Jan 2021, 20:34

FWIW ez2boot supports making multiboot USB drives also.

A Windows app that includes a script for creating E2B boot USB drives in Linux. (I've never tried the Linux script.)

And it's list of supported ISOs includes Porteus. https://rmprepusb.blogspot.com/2014/02/ ... un-it.html
Ed

Kulle
Warlord
Warlord
Posts: 594
Joined: 28 Jan 2017, 10:39
Distribution: v4.0 64bit Xfce
Location: Berlin

Multi-booting USB drive

Post#8 by Kulle » 06 Jan 2021, 09:45

Hi Ed_P,
I have now tried Ventoy.
Ventoy creates an exFat partition (for the iso files)

But I cannot use this partition !
Error message:
Error mounting system-managed device /dev/sdb1: Command-line `mount "/mnt/sdb1"' exited with non-zero exit status 32: mount: /mnt/sdb1: unknown filesystem type 'exfat'.

I am using Porteus 4.0 Xfce.
Isn't exfat supported?

User avatar
Ed_P
Contributor
Contributor
Posts: 8341
Joined: 06 Feb 2013, 22:12
Distribution: Cinnamon 5.01 ISO
Location: Western NY, USA

Multi-booting USB drive

Post#9 by Ed_P » 06 Jan 2021, 13:04

The question is what is issuing the mount msg. Grub, grub2, rEFInd? What does Ventoy use?
Ed

Post Reply