Two Debian Distros on One Multi-boot USB

Archived topics about LMDE 1 and LMDE 2
hbcogil

Two Debian Distros on One Multi-boot USB

Post by hbcogil »

Having successfully customized isos and created multi-boot usbs for my own use, I would like to be able to create a multi-boot usb with various distros and utilities for distribution to those who express an interest in Linux.

Objective: two (or more) live Debian isos on a multi-boot usb. E.g., the 32 and 64 bit versions of the same distro; or Linuxmint Debian and Solydxk (which is Debian); and/or Solydx 32/64 and Solydk 32/64 (i.e., 4 isos total).

I can achieve the objective with various *buntu distros, and with *buntu and one Debian distro. But I can not get a handle on how to include multiple Debian distros.

I have attempted both loop mounting and chainloading. The problem is that when I attempt to boot the Debian iso on sdc8 it either fails, or loads the Debian iso on sdc1 - and then freezes. I have tried every append to both grub and syslinux which I can find, but can not find the right configuration to make the second iso boot if it is a Debian iso.

Present test usb configuration (8GB Sandisk Cruzer):

Code: Select all

NAME   FSTYPE   SIZE LABEL
sdc             7.5G 
├─sdc1 vfat     1.4G LMDECIN
├─sdc2            1K 
├─sdc5 ext2     1.1G UBUNTU
├─sdc6 vfat     1.1G UTILITIES (which includes SysRescueCD and Pmagic)
├─sdc7 ext2     2.7G MYDATA
└─sdc8 ext2     1.3G SOLYDX32
Bootloader: syslinux
/dev/sdc1 syslinux.cfg menu entries:

Code: Select all

label live
  menu label Start Linux Mint
  kernel /live/vmlinuz
  append boot=live config initrd=/live/initrd.img live-media-path=/live quiet splash --

menu default
label xforcevesa
  menu label Start Linux Mint (compatibility mode)
  kernel /live/vmlinuz
  append boot=live config xforcevesa initrd=/live/initrd.img live-media-path=/live ramdisk_size=1048576 root=/dev/ram rw noapic noapci nosplash irqpoll --

label check
  menu label Integrity Check
  kernel /live/vmlinuz
  append boot=live verify-checksums initrd=/live/initrd.img live-media-path=/live

label ubuntu
  menu label Start Ubuntu 14.04 LTS amd64
  COM32 chain.c32
  append boot 5

label solydx32
 menu label Start Solydx 32bit
 COM32 chain.c32
 append boot 8

label sysresq
  menu label SystemRescueCD + PMAGIC 32/64
  COM32 chain.c32
  append boot 6

label local
  menu label Boot from local drive
  COM32 chain.c32
  append boot hd1 1

label reboot
  menu label Reboot
  COM32 reboot.c32
Directory structure of individual partitions:

Code: Select all

sdc1:

/media/LMDECIN/
├── boot
│   └── grub
│       └── x86_64-efi
├── dists
│   └── testing
│       ├── contrib
│       │   └── binary-amd64
│       ├── main
│       │   └── binary-amd64
│       └── non-free
│           └── binary-amd64
├── EFI
│   └── BOOT
├── live
├── pool
│   ├── contrib
│   │   ├── g
│   │   │   └── glx-alternatives
│   │   └── n
│   │       └── nvidia-support
│   ├── main
│   │   ├── e
│   │   │   └── efibootmgr
│   │   ├── f
│   │   │   └── firefox
│   │   ├── g
│   │   │   └── grub2
│   │   ├── h
│   │   │   ├── hunspell-an
│   │   │   ├── hunspell-ar
│   │   │   ├── hunspell-be
│   │   │   ├── hunspell-br
│   │   │   ├── hunspell-dict-ko
│   │   │   ├── hunspell-en-med
│   │   │   ├── hunspell-gl-es
│   │   │   ├── hunspell-kk
│   │   │   ├── hunspell-ml
│   │   │   ├── hunspell-ru
│   │   │   ├── hunspell-se
│   │   │   └── hunspell-sv
│   │   ├── i
│   │   │   └── igerman98
│   │   ├── l
│   │   │   └── linux-wlan-ng
│   │   ├── libr
│   │   │   └── libreoffice
│   │   ├── m
│   │   │   └── mouseemu
│   │   ├── o
│   │   │   └── openoffice.org-dictionaries
│   │   ├── s
│   │   │   └── setserial
│   │   ├── t
│   │   │   └── thunderbird
│   │   ├── u
│   │   │   └── uzbek-wordlist
│   │   └── x
│   │       └── xuxen-eu-spell
│   └── non-free
│       ├── f
│       │   └── fglrx-driver
│       └── n
│           └── nvidia-graphics-drivers
└── syslinux
    ├── com32
    │   └── include
    │       ├── bitsize
    │       ├── gplinclude
    │       │   ├── acpi
    │       │   ├── disk
    │       │   ├── dmi
    │       │   ├── vpd
    │       │   └── zzjson
    │       ├── klibc
    │       ├── netinet
    │       ├── sys
    │       └── syslinux
    ├── diag
    └── dosutil

sdc5:

/media/UBUNTU/
├── boot
│   └── grub
│       └── x86_64-efi
├── casper
├── dists
│   ├── stable -> trusty
│   ├── trusty
│   │   ├── main
│   │   │   ├── binary-amd64
│   │   │   ├── binary-i386
│   │   │   └── source
│   │   └── restricted
│   │       ├── binary-amd64
│   │       ├── binary-i386
│   │       └── source
│   └── unstable -> trusty
├── EFI
│   └── BOOT
├── install
├── lost+found [error opening dir]
├── pics
├── pool
│   ├── main
│   │   ├── b
│   │   │   └── b43-fwcutter
│   │   ├── d
│   │   │   └── dkms
│   │   ├── e
│   │   │   └── efibootmgr
│   │   ├── f
│   │   │   └── fakeroot
│   │   ├── g
│   │   │   ├── grub2
│   │   │   └── grub2-signed
│   │   ├── l
│   │   │   └── lupin
│   │   ├── m
│   │   │   └── mouseemu
│   │   ├── s
│   │   │   ├── secureboot-db
│   │   │   ├── setserial
│   │   │   ├── shim
│   │   │   └── shim-signed
│   │   ├── u
│   │   │   ├── ubiquity
│   │   │   ├── ubiquity-slideshow-ubuntu
│   │   │   └── user-setup
│   │   └── w
│   │       ├── wvdial
│   │       └── wvstreams
│   └── restricted
│       └── b
│           └── bcmwl
├── preseed
├── syslinux
└── ubuntu -> .

sdc6:

/media/UTILITIES/
├── boot
│   └── grub
│       └── x86_64-efi
├── bootdisk
├── bootprog
├── efi
│   └── boot
├── ntpasswd
├── pmagic
│   └── pmodules
│       └── scripts
├── syslinux
│   └── maps
└── usb_inst

sdc8:

/media/SOLYDX32/
├── boot
│   └── grub
├── live
├── lost+found [error opening dir]
├── offline
└── syslinux
(The above listings do not show the hidden .dist directory in those distros which include it.)
Faced with dropping the project after hours of research and experimentation with the conclusion that the technology is simply above my "paygrade", if anyone has succeeded in booting two or more live Debian distros on one usb flash drive, I will be grateful to be shown by example how you did it. Thanks for your attention and assistance.

--
Regards,
hbcogjil
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
Distro-Don

Re: Two Debian Distros on One Multi-boot USB

Post by Distro-Don »

I have a 64GB thumb drive with both 32 bit & 64 bit versions of Linux Mint 13, 14, 15, 16, 17 and DE ISOs. Some are MATE, Cinnamon etc. I still have room for more. I have done many installs with it. I built this using:

https://sites.google.com/a/rmprepusb.co ... orials/114.

I have also made many smaller Thumb drives with it. An 8GB drive will hold about 10 ISOs,
wayne128

Re: Two Debian Distros on One Multi-boot USB

Post by wayne128 »

Distro-Don wrote:I have a 64GB thumb drive with both 32 bit & 64 bit versions of Linux Mint 13, 14, 15, 16, 17 and DE ISOs. Some are MATE, Cinnamon etc. I still have room for more. I have done many installs with it. I built this using:

https://sites.google.com/a/rmprepusb.co ... orials/114.

I have also made many smaller Thumb drives with it. An 8GB drive will hold about 10 ISOs,
+++

Easy2Boot

My 8G usb flash has 9 iso , used more than one year.
Boot most computers, I use it to test on site when used computers are on sales at very low price.

After I use Easy2Boot successful I no longer spend time learning other methods, which usually need upgrading when new distros iso are release.
hbcogil

Re: Two Debian Distros on One Multi-boot USB

Post by hbcogil »

Thanks Distro-Don and wayne128. I'm looking into using easy2boot (at the moment having difficulty installing grub4dos to the mbr; bootlace.com commands are returning an error code, so I am reading up on it). See my post on linuxquestions.org for credit to you and further info on my objective. Thanks again for your time and attention! :)
hbcogil

Re: Two Debian Distros on One Multi-boot USB

Post by hbcogil »

Easy2boot looks very promising for my purposes. However, perhaps you will advise me on what I need to do to get easy2boot on /dev/sdc3 to boot. If so, the present setup is as follows:

Code: Select all

8GB Sandisk Cruzer:
NAME   FSTYPE   SIZE LABEL     MOUNTPOINT
sdc             7.5G           
├─sdc1 vfat   187.7M SYSTEM    
├─sdc2 vfat     1.1G UTILITIES 
└─sdc3 vfat     6.2G E2B       /media/bill/e2b
############################################################
sdc1 - boot partition; bootloader: syslinux; grub.exe on root;
grub.exe
syslinux

syslinux.cfg:
default menu.c32
timeout 100

menu title Utility & Distro Demo Boot Menu
label utilities
  menu label SysRescueCD + PMAGIC
  COM32 chain.c32
  append boot 2

label easy2boot
  menu label Easy2Boot (live distro demo)
  kernel /grub.exe
############################################################
sdc3 - easy2boot partition; file structure:
total 540
drwxr-xr-x   4 root root   4096 Dec 31  1969 .
drwxr-x---+  7 root root   4096 Jul 30 06:57 ..
-rwxr-xr-x   1 root root     72 Jul 29 22:42 autorun.inf
-rwxr-xr-x   1 root root 101855 Jul 29 22:39 autounattend.xml
-rwxr-xr-x   1 root root   7358 Jul 29 22:39 e2b.ico
drwxr-xr-x   3 root root   4096 Jul 29 22:42 EFI
-rwxr-xr-x   1 root root 308643 Jul 29 22:42 grldr
drwxr-xr-x  15 root root   4096 Jul 29 22:42 _ISO
-rwxr-xr-x   1 root root    551 Jul 29 22:39 menu.lst
-rwxr-xr-x   1 root root    151 Jul 29 22:39 ReadMe.txt
-rwxr-xr-x   1 root root 101855 Jul 29 22:39 unattend.xml

isos on /dev/sdc3/_ISO/MAINMENU/:
linuxmint-201403-cinnamon-dvd-64bit.iso
solydx32_201405.iso
ubuntu-14.04-desktop-amd64.iso
With the above configuration, grub.exe is executed but issues several "can not find" messages before dropping to grub. I.e., it will not boot sdc3.

If I change the sdc1 syslinux entry to chainload (hd0,3), it gives a missing kernel message. I.e., it will not boot sdc3.

Do I need to install grub4dos or syslinux to the pbr of sdc3? If so, I can not get the "bootlace.com --time-out=0 /dev/sdc3" to work; it returns a segment fault error.

Following the guidelines on grub4dos, it appears that putting grub.exe on the device boot partition with the recommended entry should work, but it does not.

I will keep researching and experimenting with it. Any advice will be appreciated. Thanks!
User avatar
darethehair
Level 4
Level 4
Posts: 239
Joined: Sun Mar 08, 2009 2:22 pm
Location: Morden Manitoba Canada
Contact:

Re: Two Debian Distros on One Multi-boot USB

Post by darethehair »

Not sure if you are interested in using a different approach, but I have used the technique of using GRUB2 'loopback' to directly boot from (multiple) ISO files stored on my USB sticks. This works great, the only hassle being to find out the working syntax/style of GRUB2 'menuentry' code for the Linux distro in question. Fortunately, over time I have figured out (with others' help) how to do most of the ones that I want.

For example, here are two of my 'Mint' entries:

Code: Select all

menuentry "Mint Debian Edition" {
    # only 'by-label' seems to work now so 'darelinux' (or whatever) needs to be stated explicitly
    set isofile="/boot/isos/LMDE"

    loopback loop $isofile
    linux (loop)/live/vmlinuz fromiso=/dev/disk/by-label/DARELINUX/$isofile boot=live config noeject --
    initrd (loop)/live/initrd.img
}
menuentry "Mint" {
    set isofile="/boot/isos/linuxmint-16-cinnamon-dvd-32bit.iso"

    loopback loop $isofile
    linux (loop)/casper/vmlinuz boot=casper iso-scan/filename=$isofile quiet splash noprompt --
    initrd (loop)/casper/initrd.lz
}
There is nothing more dangerous than a bored cat.
hbcogil

Re: Two Debian Distros on One Multi-boot USB

Post by hbcogil »

darethehair wrote:Not sure if you are interested in using a different approach, but I have used the technique of using GRUB2 'loopback' to directly boot from (multiple) ISO files stored on my USB sticks. This works great, the only hassle being to find out the working syntax/style of GRUB2 'menuentry' code for the Linux distro in question. Fortunately, over time I have figured out (with others' help) how to do most of the ones that I want.

For example, here are two of my 'Mint' entries:

Code: Select all

menuentry "Mint Debian Edition" {
    # only 'by-label' seems to work now so 'darelinux' (or whatever) needs to be stated explicitly
    set isofile="/boot/isos/LMDE"

    loopback loop $isofile
    linux (loop)/live/vmlinuz fromiso=/dev/disk/by-label/DARELINUX/$isofile boot=live config noeject --
    initrd (loop)/live/initrd.img
}
menuentry "Mint" {
    set isofile="/boot/isos/linuxmint-16-cinnamon-dvd-32bit.iso"

    loopback loop $isofile
    linux (loop)/casper/vmlinuz boot=casper iso-scan/filename=$isofile quiet splash noprompt --
    initrd (loop)/casper/initrd.lz
}
Thanks, eh? I am interested in any approach that works for the disk I want to create. I have successfully used the grub2 loopback approach on other usbs. I began with grub2 in this project, and found that it would not work. So I employed syslinux, and find that it will not work (at least not yet).

Have you tried two or more Debian distros using grub2 and the loop procedure? E.g., have you tried including both LMDE Cinnamon and Mate on the same usb? If so, I would greatly appreciate seeing your menu entries. (I have not seen the "fromiso=/dev/disk/by-label..." parameter used.) If your approach works with two or more Debian isos, I will take that approach.
User avatar
darethehair
Level 4
Level 4
Posts: 239
Joined: Sun Mar 08, 2009 2:22 pm
Location: Morden Manitoba Canada
Contact:

Re: Two Debian Distros on One Multi-boot USB

Post by darethehair »

hbcogil wrote:Thanks, eh? I am interested in any approach that works for the disk I want to create. I have successfully used the grub2 loopback approach on other usbs. I began with grub2 in this project, and found that it would not work. So I employed syslinux, and find that it will not work (at least not yet).

Have you tried two or more Debian distros using grub2 and the loop procedure? E.g., have you tried including both LMDE Cinnamon and Mate on the same usb? If so, I would greatly appreciate seeing your menu entries. (I have not seen the "fromiso=/dev/disk/by-label..." parameter used.) If your approach works with two or more Debian isos, I will take that approach.
No, I don't think I have, but I would have very high confidence that it would work, since this technique boots from ISO files directly -- there are no potentially troublesome 'overlapping directories' or whatever to get in the way. Again, I think the only (small?) challenge is knowing the correct GRUB2 'menuentry' setting for the distro. One could perhaps assume that the 'cinnamon' and 'mate' entries would look identical, except for the name of the distro file itself. I suggest trying it and getting back to us :)

I even cobbled together a small bit of code to make the generation of a complete 'grub.cfg' file a bit easier, if you are interested. I also like to have a custom boot splash screen :) One wrinkle that my script has to accommodate is that both the 'regular' and 'debian' versions of the Mint ISO names start with 'linuxmint', so I have to do an override so that the names are differentiated from each other...
There is nothing more dangerous than a bored cat.
wayne128

Re: Two Debian Distros on One Multi-boot USB

Post by wayne128 »

hbcogil wrote:Easy2boot looks very promising for my purposes. However, perhaps you will advise me on what I need to do to get easy2boot on /dev/sdc3 to boot.
I will keep researching and experimenting with it. Any advice will be appreciated. Thanks!

hi hbcogil

I keep thing simple by creating only ONE fat32 partition on USB flash.
As I am going to keep using, I post a 'how i did it' on the forum.
http://forums.linuxmint.com/viewtopic.php?f=42&t=174570

perhaps you may like to read and see if it helps
hbcogil

Re: Two Debian Distros on One Multi-boot USB

Post by hbcogil »

wayne128 wrote:hi hbcogil

I keep thing simple by creating only ONE fat32 partition on USB flash.
As I am going to keep using, I post a 'how i did it' on the forum.
http://forums.linuxmint.com/viewtopic.php?f=42&t=174570

perhaps you may like to read and see if it helps
Thank you for the helpful information.

While it is helpful to know about easy2boot and its potential, my purpose is a bit more specific than simply having many distros on a flash disk. You and Distro-Don also encouraged me to learn more about grub4dos than I have previously had need to know.

So far as I have found for my purpose, syslinux is the best bootloader. My focus is on what is needed to get three or four specific isos (Debian and *buntu) to boot on one flash disk which also contains some helpful utilities and a bit of storage. I want to be able to recreate (and modify as needed) this disk for family and friends, including some Windows techs/shop-keepers I know. I have a Linux demo/utility disk in mind, which I need to understand how to create and modify as desired.

I have all but decided that one Debian and several *buntus is the only and best way to go. Getting two or more live Debians to boot on the same flash drive has simply become a challenge that I am not sure I need at this time. (Which Debian distro to showcase becomes the issue.)

Thanks again.
SteveSi

Re: Two Debian Distros on One Multi-boot USB

Post by SteveSi »

My http://www.Easy2Boot.com solution can boot pretty much any LiveCD linux ISO directly - just drag-and-drop the ISO onto the USB drive. Any amount of ISOs you like.
By using a menu (.mnu file) you can also run about a dozen or so different ISOs all with persistence from the same USB drive (sample .mnu files are included).
If you have a working single-partition USB Flash drive that you want to add to a multiboot USB drive, you can make an image file from it (using the Windows MakePartImage tool, sorry - no linux tool) and just add the file to your E2B drive.
If you want to UEFI-boot say 12 different OS's (e.g. linux distros, Windows 7/8 installers, memory test utilities, KonBoot, etc.) from a multiboot USB drive, again just add an image file of each one to your E2B USB drive.
All this uses just one partition. You can have two partitions (or one primary + any number of logical partitions) if you wish and use the 2nd partition for other purposes (or put E2B on the 2nd partition).
If you want to add your own files to the E2B drive then just copy them on.
If you want to remove ISOs, etc, - just delete them.
You can configure the menus, change backgrounds, change font, etc. and make it how you want.

There are a few issues for pure linux users however that Windows users don't have. There is no linux program to defrag files on an NTFS drive (AFAIK) so you need to use FAT32 for the E2B partition. The MakePartImage tool (which is used to make partition image files from ISOs or USB drives or folders) is a cmd script which only runs on a Windows system.
HTH
Steve
hbcogil

Re: Two Debian Distros on One Multi-boot USB

Post by hbcogil »

SteveSi wrote:My http://www.Easy2Boot.com solution can boot pretty much any LiveCD linux ISO directly - just drag-and-drop the ISO onto the USB drive. Any amount of ISOs you like. [...] HTH
Steve
You seem to be convinced that easy2boot is the solution for which I am looking, so I am going to give it another whirl.

This becomes more of a business transaction in my view, so rather than using the forums to conduct business I may pm or contact you from your website. I am assuming that you are the creator of easy2boot? Regardless, I expect to "donate" if I use the software. And regardless of that, I admire you as one who can create such an application. Hell, I admire those who can use it effectively - Distro-Don & wayne128, e.g., let alone create it!) And I mean not to imply that you are using the forums solely for financial gain.

That not-withstanding, I want to understand why I can not boot two live Debian isos on the same usb drive using syslinux.
hbcogil

Re: Two Debian Distros on One Multi-boot USB

Post by hbcogil »

Well, my question as to the ability to multi-boot Debian isos is answered. SteveSi has settled that for me with Easy2Boot, which is, btw, the amazing product of a gifted individual! Having experimented with several multi-boot products, I dare to say that Easy2Boot should be, and may become, the go-to solution for those desiring multi-boot flash drives. (Are you working on porting your product to Linux SteveSi?)

However, I am still curious to know if the same end can be accomplished using syslinux and/or grub.
User avatar
darethehair
Level 4
Level 4
Posts: 239
Joined: Sun Mar 08, 2009 2:22 pm
Location: Morden Manitoba Canada
Contact:

Re: Two Debian Distros on One Multi-boot USB

Post by darethehair »

hbcogil wrote:However, I am still curious to know if the same end can be accomplished using syslinux and/or grub.
I am glad that the 'Easy2Boot' approach worked for you! However, since you put me up to the challenge, I proved to myself that I could use the GRUB2 direct-ISO loopback technique to boot both LMDE cinnamon 64-bit *and* Solydx 64-bit on one of my USB thumbdrives :)

I ran into two silly glitches:

- USB drive I was attempting to use looks corrupted/unreliable, so I had to switch to another (brand new) one
- Trying to boot on one of my netbooks did not work -- presumably since they are not 64-bit machines

Anyways, here are the instructions I made from this (heavily condensed):

Code: Select all

1) Insert USB thumbdrive and wait for the auto-mount to complete.

It will possibly/probably need to be re-formatted, depending on its previous use and/or manufacturer.

2A) Use 'gparted' to delete all partitions on the drive before starting.
Then create a new single partition the full size of the drive in 'fat32' format.
Pick a label name e.g. DARELINUX (for examples below)

	or

2B) Try CLI approach instead (/dev/sdb1 is the device name for this example):

umount /dev/sdb1
sudo mkfs -t vfat -n DARELINUX /dev/sdb1

3) remount USB stick and take note of /media/(mountpoint) name.

4) Install grub on the USB thumbdrive:

sudo grub-install --root-directory=/media/darren/DARELINUX /dev/sdb

5) Create a directory on the thumbdrive to contain the ISO files:

sudo mkdir /media/darren/DARELINUX/boot/isos

6) Copy the 'unicode' font from your current Linux machine to the thumbdrive:

sudo cp /usr/share/grub/unicode.pf2 /media/darren/DARELINUX/boot/grub/unicode.pf2

7) Copy a custom spash screen to the thumbdrive (not sure if it MUST be a 'tga' file?):

sudo cp ~/Downloads/m31.tga /media/darren/DARELINUX/boot/grub/m31.tga

8) Copy the desired ISO files to the thumbdrive intended directory:

cp daremultiboot/*iso /media/darren/DARELINUX/boot/isos

9A) Copy custom 'grub.cfg' file to the thumbdrive:

cp grub.cfg /media/darren/DARELINUX/boot/grub/grub.cfg

	or
9B) Run my custom grub.cfg generator script to do this instead:

bash daremultiboot.sh > /media/darren/DARELINUX/boot/grub/grub.cfg

NOTE: Here is a sample 'grub.cfg' script that worked in this case:

###########, LINUXMINT, linuxmint-201403-cinnamon-dvd-64bit.iso
###########, SOLYDX64, solydx64_201407.iso
if loadfont /boot/grub/unicode.pf2 ; then
  set gfxmode="640x480"
  insmod gfxterm
  insmod vbe
  terminal_output gfxterm
  if terminal_output gfxterm; then true ; else
    terminal gfxterm
  fi
fi
insmod tga
background_image /boot/grub/m31.tga

menuentry "Mint Debian Edition" {
    # only 'by-label' seems to work now so 'darelinux' (or whatever) needs to be stated explicitly
    set isofile="/boot/isos/linuxmint-201403-cinnamon-dvd-64bit.iso"

    loopback loop $isofile
    linux (loop)/live/vmlinuz fromiso=/dev/disk/by-label/DARELINUX/$isofile boot=live config noeject --
    initrd (loop)/live/initrd.img
}
menuentry "Solydx" {
    set isofile="/boot/isos/solydx64_201407.iso"

    loopback loop $isofile
    linux (loop)/live/vmlinuz fromiso=/dev/disk/by-label/DARELINUX/$isofile boot=live config noeject --
    initrd (loop)/live/initrd.img
}
menuentry "Memory test (memtest86+ 4.10)" {
 linux16 /boot/isos/memtest86+-4.10.bin
}
menuentry "Reboot" {
    reboot
}

menuentry "Halt" {
    halt
}

NOTE: Not strictly an ISO file, but the 'memtest86' binary is so small that I often put it on
my USB thumbdrives for those cases where I might want to use it.
There is nothing more dangerous than a bored cat.
hbcogil

Re: Two Debian Distros on One Multi-boot USB

Post by hbcogil »

darethehair wrote:However, since you put me up to the challenge, I proved to myself that I could use the GRUB2 direct-ISO loopback technique to boot both LMDE cinnamon 64-bit *and* Solydx 64-bit on one of my USB thumbdrives :)
It would be wrong to me not to say, "Absolutely amazing!" I stand in awe of you people (i.e., those who have participated in this forum, as well as at linuxquestions.org and solydxk.com). :mrgreen:

I'm going to have to experiment with this, and not having the aptitude for these things that you do, will most likely have more questions.

I appreciate everyone's patience with this remedial student. :oops:
User avatar
darethehair
Level 4
Level 4
Posts: 239
Joined: Sun Mar 08, 2009 2:22 pm
Location: Morden Manitoba Canada
Contact:

Re: Two Debian Distros on One Multi-boot USB

Post by darethehair »

hbcogil wrote:I'm going to have to experiment with this, and not having the aptitude for these things that you do, will most likely have more questions. I appreciate everyone's patience with this remedial student. :oops:
Ask whatever you want :) The instructions are actually not very complicated. It would be nice to have a complete script to do the whole thing, but what I have is 'good enough' for me...

Had something new and strange happen to me while 'proving' this technique. I used a brand-new Lexar 16GB 'jumpdrive' for this, and noticed that it was pre-formatted with 'fat32', so I didn't bother to format it myself (why bother?). However, when I ran 'grub-install' onto it, I got some bizarre errors I had never seen before.

So I went ahead and re-formatted the partition myself. Same error!

I finally decided to *delete* the partitition completely and started over again. Then I had no problems :)

Conclusion: Don't assume that a USB stick has been prepared properly for this GRUB2 purpose just because a FAT32 partition might already exist on the drive...
There is nothing more dangerous than a bored cat.
hbcogil

[Solved] Re: Two Debian Distros on One Multi-boot USB

Post by hbcogil »

darethehair wrote:The instructions are actually not very complicated.
So far as it goes to my initial question, the simplicity of it in the end was the "fromiso" parameter. I could not find what parameter to pass to grub or syslinux to boot the second Debian iso. Everything else I already knew.

For my purposes, if it exists I need the syslinux equivalent to "fromiso". Either that, or I need to know precisely how to transfer control of the boot process from grub to syslinux (without grub4dos, two mules, three chickens, five ribbons and a fifth of Jack Daniels). Perhaps that is the subject of another thread?

When all is said and done, I've been reminded of old things and introduced to new (and as is always true for me, humbled by how little I know). So I'm thankful for everyone's participation in my little project.

(BTW, I did not use your script in my experimentation, but can tell from what you provided that it is "slick". I am more interested in function than form at this time, so I just went with the stock grub look.)

Cheers to all!
SteveSi

Re: Two Debian Distros on One Multi-boot USB

Post by SteveSi »

The characters that follow the vmlinuz kernel name are linux kernel parameters or 'cheat codes'. These are passed as a 'string' to the linux kernel when it boots.
So all of the parameters such as fromiso= boot=live noeject config quiet vga -- etc etc are nothing to do with grub4dos, grub. grub2, syslinux or isolinux - they are parameters that are understood only by the linux distro kernel.
To grub4dos, syslinux. grub2 etc they are just meaningless words!
In other words, the fromiso= cheat code will work in your syslinux menu just as well as in grub2 or any other menu.

The thing that is different is the menu syntax that is used to load the kernel file and initrd (initial ramdrive) file. There may also be differences if variables for strings are used in the cheatcodes

e.g. grub4dos might use a isofile variable like this
set isofile=/boot/isos/linuxmint-201403-cinnamon-dvd-64bit.iso
kernel /live/vmlinuz fromiso=/dev/disk/by-label/DARELINUX/%isofile% boot=live config noeject --

whereas grub would use
set isofile="/boot/isos/linuxmint-201403-cinnamon-dvd-64bit.iso"
/live/vmlinuz fromiso=/dev/disk/by-label/DARELINUX/$isofile boot=live config noeject --

HTH
Steve
hbcogil

Re: Two Debian Distros on One Multi-boot USB

Post by hbcogil »

SteveSi wrote:The characters that follow the vmlinuz kernel name are linux kernel parameters or 'cheat codes'. These are passed as a 'string' to the linux kernel when it boots.
So all of the parameters such as fromiso= boot=live noeject config quiet vga -- etc etc are nothing to do with grub4dos, grub. grub2, syslinux or isolinux - they are parameters that are understood only by the linux distro kernel. To grub4dos, syslinux. grub2 etc they are just meaningless words!
The only thing I have sought from the start was the "cheat code" which would enable me to boot extracted Debian isos on separate partitions of the same usb using syslinux (as the device bootloader).

If I am understanding you, then the whole of the problem with the project I have in view is that what I want requires different and incompatible boot loaders (namely grub and syslinux in this case) due solely to different kernels. I need to use two things which can not be used together as I am trying to use them.
SteveSi wrote:In other words, the fromiso= cheat code will work in your syslinux menu just as well as in grub2 or any other menu.
I believe you, but have not found this to be true.

Yesterday evening, I created a separate syslinux boot partition (hd0,1) on an 8GB usb. I then created two more partitions (hd0 2 and 3) and extracted two different Debian isos, each to one of the partitions. I changed the isolinux directories to syslinux and generated ldlinux.sys in each one, changed isolinux.bin and isolinux.cfg to syslinux, and added "fromiso..." to each label in the respective syslinux.cfg files. In the hd0,1 syslinux.cfg I chainloaded to hd0 2 and 3. hd0,2 boots as expected. hd0,3 boots and loads the hd0,2 file system.

Knowing what I now know, if I could chainload grub from syslinux, then I would have exactly what I had in mind to start with. (And with the hope of being clear, I want to showcase the distributions and utilities as if they were stand-alone, single boot, live cds/dvds/usbs.) This project has become my first in depth exposure to chainloading.

Easy2boot, unnetbootin, yumi and other universal and multi-booting programs are good (and in my opinion, Easy2Boot has the others beat hands down). But none of them are good for what I want.

So again, if it can be done and I can learn to chainload from syslinux to grub - again, from syslinux to grub, then i will be happy. Doing so seems like the topic of another discussion here; a discussion which was initiated here by the one I began on the Solydxk forums (Promotional Multi-boot Solydxk USB w/Utilities and Storage).

I'm debating on beginning another thread; and debating because I am not sure that what I initially wanted is worth having to learn what I need to know.

Your input is helpful. Thank you for it!
SteveSi

Re: Two Debian Distros on One Multi-boot USB

Post by SteveSi »

There are some things I don't understand about what you are trying to achieve?

You say you extracted the ISOs - but then say you used fromiso= ?? This is confusing me because if you extract the contents of each ISO, then the fromiso= entry is obviously invalid/useless because that specifies the location of the ISO file which presumably does not exist on the drive. If it does exist then why did you extract the contents of the ISO?

Also, you say that E2B is good, but not what you are trying to achieve... I don't understand how booting the livecd files using syslinux (or grub or whatever) is any different from booting the livecd using E2B as an ISO?

a 'livecd' means that you boot to linux in RAM and that you cannot make any permanent changes to the OS or store files, etc.

Now you can have a livcd with persistence which means you can boot to the OS and make changes (e,g, wallpaper, configuration settings, etc.) and add files to the persistent storage area, but this is not the same as a fully installed OS, where you can make changes to system files and those changes will be preserved across reboots.

if you want to demo different, fully installed versions of Debian, (which will be susceptible to user corruption, etc,) then you need to install Debian into each partition.

So maybe you could explain what you are trying to achieve, rather than asking about the intricacies of various bootloaders, etc.?
Locked

Return to “LMDE Archive”