Page 1 of 1

Multiple MX's on one LiveUSB Stick

Posted: Mon Mar 25, 2019 9:43 am
by seaken64
Today I ran across this when I was searching for info on using my LiveUSB on a Windows computer:

https://download.tuxfamily.org/antix/do ... e_usb.html

That page indicates that it is possible to put more than one OS on the same USB stick. But it looks like the documentation was not finished.

I have been wanting to put more than one MX on my USB, one 32-bit and one 64-bit, and maybe also a 32-bit antiX and a 64-bit antiX. That way I could boot the appropriate OS for the machine I am working on without having to have more than one USB in my pocket.

Is this still possible? And is it included in the live-usb-maker program somewhere, or do I need to do this with a command line script?

Thanks for any tips you have pointing me in the right direction.

Seaken64

Re: Multiple MX's on one LiveUSB Stick

Posted: Mon Mar 25, 2019 10:39 am
by towwire
There are a number of programs to do it. Here is two to check:
Easy2Boot
Multibootusb

Both have posts here about them on the forum, do a search for them. I try to find links later.

Re: Multiple MX's on one LiveUSB Stick

Posted: Mon Mar 25, 2019 11:09 am
by seaken64
towwire wrote: Mon Mar 25, 2019 10:39 am There are a number of programs to do it. Here is two to check:
Easy2Boot
Multibootusb

Both have posts here about them on the forum, do a search for them. I try to find links later.
Ahh, yes, I have read in some of those threads. But I didn't think it was the right way to do this since those are not antiX or MX tools, right? So there is no antiX or MX tool or scripts for doing this?

Thanks,
Seaken64

Re: Multiple MX's on one LiveUSB Stick

Posted: Mon Mar 25, 2019 11:21 am
by towwire
You will have to decide what you want to try. I use Easy2Boot myself and "Richard" has a post on how to do it.
Mulitbootusb is in the stable repo. For my self while I use E2B for many ISO's i also have one for MX using MX tool.

Re: Multiple MX's on one LiveUSB Stick

Posted: Mon Mar 25, 2019 11:22 am
by skidoo
Visit the antiX / MX wiki, search "frugal install". Afterward, post back here to followup with any remaining questions.

Re: Multiple MX's on one LiveUSB Stick

Posted: Mon Mar 25, 2019 11:47 am
by seaken64
I re-read the wiki entries after searching "frugal install". I'm beginning to think that this particular operation may be beyond my current capabilities. I think I can make separate directories for separate frugal installs but I'm not sure I would know how to get the frugal install to use those directories. I think I could setup the grub entries.

I will look more into Easy2Boot and Multibootusb. I think those solutions are meant to make this type of project easier for a non-developer, correct?

Seaken64

Re: Multiple MX's on one LiveUSB Stick

Posted: Mon Mar 25, 2019 11:49 am
by seaken64
towwire wrote: Mon Mar 25, 2019 11:21 am You will have to decide what you want to try. I use Easy2Boot myself and "Richard" has a post on how to do it.
Mulitbootusb is in the stable repo. For my self while I use E2B for many ISO's i also have one for MX using MX tool.
Can you explain this further? Do you mean you created a Multiboot USB using MX Tool?

Seaken64

Re: Multiple MX's on one LiveUSB Stick

Posted: Mon Mar 25, 2019 11:59 am
by towwire
No, using MX does only one ISO. You have to use something else for making a boot-able usb with many ISO's. There are some that even work in Wine, but I found then hard to use. Search the net and then ask here, someone has most likely try to use them.

Re: Multiple MX's on one LiveUSB Stick

Posted: Mon Mar 25, 2019 12:04 pm
by seaken64
towwire wrote: Mon Mar 25, 2019 11:59 am No, using MX does only one ISO. You have to use something else for making a boot-able usb with many ISO's.
Ok, thanks for the clarification.

Seaken64

Re: Multiple MX's on one LiveUSB Stick

Posted: Mon Mar 25, 2019 12:05 pm
by Antediluvian
Have you seen the MultiBootUSB guide? It may answer many of your present and future questions.

Re: Multiple MX's on one LiveUSB Stick

Posted: Mon Mar 25, 2019 12:26 pm
by Antediluvian
Here is a link to an article that provides an overview for 5 Apps to Create Multiboot USB – Linux and Windows ISOs Supported.

Re: Multiple MX's on one LiveUSB Stick

Posted: Mon Mar 25, 2019 12:38 pm
by fehlix
seaken64 wrote: Mon Mar 25, 2019 9:43 am Today I ran across this when I was searching for info on using my LiveUSB on a Windows computer:
https://download.tuxfamily.org/antix/do ... e_usb.html
..
Is this still possible?
Yes, we can. The information on the page in general is still valid. The grub part would need some updates.

Here in three simple steps how to create a MX / antiX Live Multi USB Stick.

To demonstrate with two iso's for preparing BIOS-booting.
MX-18.1_x64.iso
antiX-17.4_x64-full.iso

First create with live-usb-maker from with MX or antiX using MX-18.1_x64.iso a full featured MX-LIve USB. When ready with the LiveUSB, do this on the LiveUSB.

Step1: Rename /antiX folder to MX181x64 in the LiveUSB

Step 2: Mount / open or extract antiX-17.4_x64-full.iso and copy the whole /antiX directory onto the USB Stick and name it antiX174x64 onto the LiveUSBstick

Step 3: Open to edit the file /boot/syslinux/syslinux.cfg on LiveUSB
Change original first part with the first menuentry from this
original syslinux.cfg

Code: Select all

default live

MENU TITLE Welcome to MX-18.1_x64 (Continuum)

LABEL live
    MENU LABEL  MX-18.1_x64 (Feb 9, 2019)
    KERNEL /antiX/vmlinuz
    APPEND quiet
    INITRD /antiX/initrd.gz
to the new MX/antiX mulitboot syslinux.cfg

Code: Select all

default MX181x64

MENU TITLE Welcome to MX / antiX Live

LABEL MX181x64
    MENU LABEL  MX-18.1_x64 (Feb 9, 2019)
    KERNEL /MX181x64/vmlinuz
    APPEND quiet bdir=MX181x64 lang=de_DE kbd=de tz=Europe/Berlin
    INITRD /MX181x64/initrd.gz

LABEL antiX174x64
    MENU LABEL antiX-17.4_x64-full (6 March 2019)
    KERNEL /antiX174x64/vmlinuz
    APPEND quiet splash=v disable=lx bdir=antiX174x64 lang=de_DE kbd=de tz=Europe/Berlin
    INITRD /antiX174x64/initrd.gz
Note the new bootdir bdir parameter used. Also adjust language, keyboards and timezone accordingly.
The above change would now provide two new boot menuentries for booting in BIOS-mode.
Similar simple changes has to be done with /boot/grub/grub.cfg for UEFI-system/boots.

Happy booting.
:puppy:

Re: Multiple MX's on one LiveUSB Stick

Posted: Mon Mar 25, 2019 1:55 pm
by seaken64
Antediluvian wrote: Mon Mar 25, 2019 12:05 pm Have you seen the MultiBootUSB guide? It may answer many of your present and future questions.
No, thank you. I will look at that. But I read a post on the antiX forum where it was stated that MultiBoot does not boot antiX. I do want antiX also, not just MX. So maybe that won't work.

Seaken64

Re: Multiple MX's on one LiveUSB Stick

Posted: Mon Mar 25, 2019 2:02 pm
by seaken64
fehlix wrote: Mon Mar 25, 2019 12:38 pm Yes, we can. The information on the page in general is still valid. The grub part would need some updates.

Here in three simple steps how to create a MX / antiX Live Multi USB Stick.

To demonstrate with two iso's for preparing BIOS-booting.
MX-18.1_x64.iso
antiX-17.4_x64-full.iso

First create with live-usb-maker from with MX or antiX using MX-18.1_x64.iso a full featured MX-LIve USB. When ready with the LiveUSB, do this on the LiveUSB.

Step1: Rename /antiX folder to MX181x64 in the LiveUSB

Step 2: Mount / open or extract antiX-17.4_x64-full.iso and copy the whole /antiX directory onto the USB Stick and name it antiX174x64 onto the LiveUSBstick

Step 3: Open to edit the file /boot/syslinux/syslinux.cfg on LiveUSB
Change original first part with the first menuentry from this
original syslinux.cfg

Ahhh! Now we're getting somewhere! Thanks Fehlix! I can follow this. I'll play around a little and get back to you.

Seaken64

Re: Multiple MX's on one LiveUSB Stick

Posted: Mon Mar 25, 2019 2:24 pm
by seaken64
Before the tips from Fehlix, above, I did some experiments. I could not understand from the wiki so I wanted to see the screens from the frugal install script. I put in my working antiX LiveUSB in one port and another fresh USB in another port. (I know now that this won't work from what Fehlix said but this is what I did while I was experimenting). I rebooted from the antiX LiveUSB and selected F5=frugal-only.

The frugal script looked for a antiX-Frugal and did not find it. It then asked me to select from a list of partitions or drive IDs. I selected the new USB and hit Enter. The script asked if I wanted to name the new install antiX-Frugal. I said "No" and hit Enter. The script proceeded to create the frugal install and gave it a long name starting with "antix-frugal..."

After the frugal install was done I was booted into the new frugal system. I rebooted and took a look at the drive with Thunar under my main OS (Xubuntu on this rig). I could see the newly created folder and the frugal files inside. I also could see the default folders that were already setup on this USB drive for use with Windows. The drive is still in FAT32, which is what I want if I am going to use this drive in Windows.

Next, I loaded another LiveUSB in one of the usb ports, this time a MX-17 setup. I rebooted from the MX-17 LiveUSB and again chose F5=frugal-only. The same thing happened as before and I chose the new FAT32 USB as the target and I said "No" to the label question. The script proceeded to install the frugal MX on the USB in it's own folder, again with a long name starting with "anti-frugal...". I was again booted into the new frugal install.

I rebooted into Xubuntu again and took a look at the file structure. Sure enough, I now have two frugal installs, each in their own folder. And the USB is still in FAT32 and I can read it in my Windows machine.

But now I can't figure out how to boot the USB and have a grub or isolinux menu. I think Fehlix has pointed me in the right direction for solving that. I will follow his instructions for first making a LiveUSB and then renaming the files and changing the boot codes.

I think I will try using a Windows tool for the Live USB so I can preserve the FAT32 file format. Then I'll proceed with the frugal installs. I'll let you know what happens. If anyone sees a glaring problem with my approach let me know.

[Edit - anticapitalista pointed out to me on the antiX forum the feature for limiting the amount of the drive to use in LUM. I will use that instead of the Windows tool for the LiveUSB. I had not noticed that before, duh! :duh: ]
Seaken64

Re: Multiple MX's on one LiveUSB Stick

Posted: Mon Mar 25, 2019 3:12 pm
by fehlix
seaken64 wrote: Mon Mar 25, 2019 2:24 pm [Edit - anticapitalista pointed out to me on the antiX forum the feature for limiting the amount of the drive to use in LUM. I will use that instead of the Windows tool for the LiveUSB. I had not noticed that before, duh! :duh: ]
LUM creates 2 partitions and let you choose free space after those two.
The main ext4 partition is the first, and this is normally not accessible from WinOS (except you use
some ext4 drivers for winOS.) WinOS is designed only to try to access the first partition., which fails as ext4 is not supported. So a 3rd fat32 or NTFS partition would still not be accessible from winos.
In another thread BitJam has pointed out an idea to sort this. If you choose to create the USB-stick in LUM with GPT part.-table-scheme, within this thread was shown how to renumber those partitions, so WinOS sees the 3rd as the 1st. Need to search/find this thread, as I have proven that it would work.
You can use with rufus-made FAT32, but be warned, if you use persistence, the FAT32 does not provide any means of repairing filesystem. So you might quickly be locked out. That's the reason we highly recommend ext4, as it magically can recover the filesystem failures due to it's journaled filesystem feature.
HTH
:puppy:

Re: Multiple MX's on one LiveUSB Stick

Posted: Mon Mar 25, 2019 4:20 pm
by BitJam
seaken64 wrote: Mon Mar 25, 2019 2:24 pm The script proceeded to create the frugal install and gave it a long name starting with "antix-frugal..."
The rest of the name is the version of the kernel currently running. This acts as a simple lockout mechanism so we will only boot into frugal systems that match our kernel.
I rebooted into Xubuntu again and took a look at the file structure. Sure enough, I now have two frugal installs, each in their own folder. And the USB is still in FAT32 and I can read it in my Windows machine.
We only frugal install to an existing partition. I strongly suggest that you start with a partition with an ext4 file system for this unless you really need to have Windows see the live-usb stuff.
But now I can't figure out how to boot the USB and have a grub or isolinux menu. I think Fehlix has pointed me in the right direction for solving that. I will follow his instructions for first making a LiveUSB and then renaming the files and changing the boot codes.
This is a bit more tricky because you will need to install a bootloader on the new usb you are creating.

The easiest way by far, is to start with a live-usb made by live-usb-maker and then add directories just like fehlix originally suggested. Each directory needs to contain 3 files from an iso or live-usb:

/antiX/linuxfs
/antiX/vmlinuz
/antiX/initrd.gz

Of course you need to copy these 3 to a new directory with another name. Then edit /boot/syslinux/syslinux.cfg and /boot/grub/grub.cfg just as fehlix suggested.

I think I could add a feature in live-usb-maker to do all of this for you automatically. But I have my hands full ATM (getting my stuff ready for antiX-19) and there has been little demand. If you do follow the advice fehlix gave, please let us know how it goes. If I have some free time in the next few weeks then I could add this feature to live-usb-maker. It was always part of my plan but there has been zero demand for it up until now.

Re: Multiple MX's on one LiveUSB Stick

Posted: Mon Mar 25, 2019 4:40 pm
by seaken64
BitJam wrote: Mon Mar 25, 2019 4:20 pm I think I could add a feature in live-usb-maker to do all of this for you automatically. But I have my hands full ATM (getting my stuff ready for antiX-19) and there has been little demand. If you do follow the advice fehlix gave, please let us know how it goes. If I have some free time in the next few weeks then I could add this feature to live-usb-maker. It was always part of my plan but there has been zero demand for it up until now.
Thanks BitJam. You needn't worry about putting it the gui on my account. I'm fine working thru the excercises by myself. It's no surprise there is little demand. I just carry two USB keys with me now. A blue one for MX-64-bit and a red one for antiX-32-bit. I just thought it would be cool to have them both on one drive.

Seaken64

Re: Multiple MX's on one LiveUSB Stick

Posted: Mon Mar 25, 2019 5:03 pm
by BitJam
seaken64 wrote: Mon Mar 25, 2019 4:40 pmI just thought it would be cool to have them both on one drive.
I agree! Our live system was designed from the ground up to make this as easy as possible. Even without automation it should be easy. Start with a live-usb made by live-usb-maker. You can make the changes running it live or you can plug it into another system. If it is plugged into a host then mount then main ext4 partition. If you are running it live then it is already mounted at /live/boot-dev/.

For each iso file or live-usb system you want to add:

1)Mount the iso file or live-usb ext4 partition. Example:

Code: Select all

sudo mkdir -p /mnt/iso
sudo mount $ISO_FILE /mnt/iso
2) Copy the antiX directory:

Code: Select all

 sudo cp -r $ISO_MNTPNT/antiX  $LIVE_USB_MNTPNT/antiX-2
Note: you need to use a name other than "antiX" for the destination.

3) Edit the config files just like fehlix suggested:

Code: Select all

sudo $EDITOR $LIVE_USB_MNTPNT/boot/syslinux/syslinux.cfg
sudo $EDITOR $LIVE_USB_MNTPNT/boot/grub/grub.cfg
I used :
$EDITOR to represent the editor of your choice
$ISO_MNTPNT as the location where the iso file or live-usb you copy from is mount
$LIVE_USB_MNTPNT the mountpoint where the live-usb you are adding to is mounted

By doing the frugal installs you are making the simple copy command easier but you make everything else much more difficult. There are a bunch of extra steps that you don't need to do if you start with a live-usb. Starting with a live-usb made by a live-usb-maker tool is by far the easiest way to do what you want. Bite the bullet and use the copy command in step (2) instead of doing frugal installs.

Re: Multiple MX's on one LiveUSB Stick

Posted: Mon Mar 25, 2019 6:07 pm
by seaken64
So, I'm a little confused now about the value of limiting the space used on the USB drive for the Live system. Since Windows won't read past the first partition on the USB maybe I should be using the entire drive for the Live system in the ext4 file format.

If I do the copy operation as explained by Fehlix and BitJam I will be using the same space as the main Live system, right? What will I use the extra unused space for if not a frugal install?

I already made the Live USB and used 50% of the 16GB drive, thinking I would use the rest as a Windows accessible drive. Can I reclaim the unused space now for the LiveUSB? Or do I have to start over? I think I am not going to worry about reading from Windows and just go with ext4.

Seaken64

Re: Multiple MX's on one LiveUSB Stick

Posted: Mon Mar 25, 2019 6:53 pm
by fehlix
seaken64 wrote: Mon Mar 25, 2019 6:07 pm So, I'm a little confused now
Just ignore for now frugal, as it might confuse yourself.
Frugal idea meant for the hdd , it similar to the stuff on usb but not identical.
Make in those simple three steps as explained above and a bit more by BitJam.
Re do a full featured LUM Live USB. Ignore the free space.
The ext4 partition you can use for other stuff as well.
when you Live-booted you'll find a Live Storage folder, within the home directory
which is linked to a folder on the ext4. so you can save and copy data from the running Live
on the the ext4 partition. You can also create any other folder on the ext4 to use for data etc.
:puppy:

Re: Multiple MX's on one LiveUSB Stick

Posted: Mon Mar 25, 2019 7:41 pm
by seaken64
OK, I will start over and use the entire drive for the LiveUSB. Thanks.

Seaken64

Re: Multiple MX's on one LiveUSB Stick

Posted: Mon Mar 25, 2019 7:57 pm
by seaken64
Here's a summary of what I understand so far:

Multi versions of OS are installable on a single USB stick device in antiX or MX. But it is not yet setup as an option in any of the live-usb tools.

Don't use the frugal install. That is meant for hard disks and is hard to setup on the USB stick.

Start by setting up a LiveUSB using LUM. This will be OS #1 and will use the standard directories unless specifically changed.

Use a "copy" command to copy the necessary files from the additional OS over to a separate directory with a different name. This will be OS #2.

Repeat the copy operation and unique directory name for each additional OS, (#3, #4, etc.)

Edit the boot config files on the USB to add the additional OS's to the boot menu.

Do I have this correct?

Seaken64

Re: Multiple MX's on one LiveUSB Stick

Posted: Mon Mar 25, 2019 8:05 pm
by BitJam
Yes! You've got it. Please let us know how it goes. I used to do this a lot. I think it can be really handy to have several systems on the same usb stick.

The Live-usb-storage/ directories will be share between the distros.

Re: Multiple MX's on one LiveUSB Stick

Posted: Mon Mar 25, 2019 8:25 pm
by skidoo
seaken64 wrote: I just carry two USB keys with me now. A blue one for MX-64-bit and a red one for antiX-32-bit.
.
Image


coincidence is not just only a road to facts but also a call to ponder
. . . .Ernest Agyemang Yeboah
.

Re: Multiple MX's on one LiveUSB Stick

Posted: Mon Mar 25, 2019 9:19 pm
by seaken64
skidoo wrote: Mon Mar 25, 2019 8:25 pm
seaken64 wrote: I just carry two USB keys with me now. A blue one for MX-64-bit and a red one for antiX-32-bit.
.
Image


coincidence is not just only a road to facts but also a call to ponder
. . . .Ernest Agyemang Yeboah
.
That's funny. And I didn't consciously choose those colors. (They are two "lego" style USB keys).

"the brutal truths of reality" - that's antiX alright! Love it!

"the blissful ignorance of illusion" - MX for the masses, right? But it's just as powerful behind the scenes.

Re: Multiple MX's on one LiveUSB Stick

Posted: Tue Mar 26, 2019 12:08 am
by seaken64
Success! I now have a single LiveUSB stick with two Live OS's - antiX 32-bit and MX 64-bit.

I started with using live-usb-maker and created a LiveUSB with antiX-17.4-32-bit.

Next I copied over the antiX folder from a previously made MX-18.1-64-bit LiveUSB to the /live/boot-dev/ and named the folder antiX-MX.

Then I edited the syslinux.cfg file and added my new MX entry.

Finally I rebooted and chose the newly added MX entry and booted the MX system.

I rebooted and chose the antiX entry to make sure they both worked. Everything is working good.

I tested the persistence in MX by doing an upgrade and a remaster. It all is working good.

There is a delay in booting MX at the line that says populating /dev but it does eventually boot the system. There was also a stall at shutdown for reboot. But I was able to power down and reboot with no apparent issues.

I will add one more OS, a MX-32-bit and I'll be done.

Thanks for everyones help! You've done a great job with the LiveUSB system.

Seaken64

Re: Multiple MX's on one LiveUSB Stick

Posted: Wed Jun 09, 2021 7:20 am
by Danathar
seaken64 wrote: Tue Mar 26, 2019 12:08 am Success! I now have a single LiveUSB stick with two Live OS's - antiX 32-bit and MX 64-bit.

I started with using live-usb-maker and created a LiveUSB with antiX-17.4-32-bit.

Next I copied over the antiX folder from a previously made MX-18.1-64-bit LiveUSB to the /live/boot-dev/ and named the folder antiX-MX.

Then I edited the syslinux.cfg file and added my new MX entry.

Finally I rebooted and chose the newly added MX entry and booted the MX system.

I rebooted and chose the antiX entry to make sure they both worked. Everything is working good.

I tested the persistence in MX by doing an upgrade and a remaster. It all is working good.

There is a delay in booting MX at the line that says populating /dev but it does eventually boot the system. There was also a stall at shutdown for reboot. But I was able to power down and reboot with no apparent issues.

I will add one more OS, a MX-32-bit and I'll be done.

Thanks for everyones help! You've done a great job with the LiveUSB system.

Seaken64
Are you using Encryption with your stick? I want to replicate your work but for me to have it on my keychain I'd want it encrypted.

Re: Multiple MX's on one LiveUSB Stick

Posted: Wed Jun 09, 2021 8:29 am
by seaken64
@Danathar ,

No, I have not used Encryption yet. Give it a try and let us know how it works out for you.

Seaken64