SOLVED - Running other distro ISO's Debian Buster Live USB

If it doesn't relate to Debian, but you still want to share it, please do it here

SOLVED - Running other distro ISO's Debian Buster Live USB

Postby kkman007 » 2020-08-23 07:04

Can I ask as this question has a solution which is for Debian Buster that this thread is removed from the Off Topic section

I have managed to create a live USB of Debian Buster 10.5 which works with Legacy Boot as well as UEFI Secure Boot.

What I am trying to do/learn is if it is possible to run other distros using either their ISO or extracted files from my Live USB.

For example I am able to use it to boot Ubunto ISO's in legacy mode and UEFI ( without Secure Boot ), but when I try to do the same using Secure Boot, I receive a message saying invalid signature for vmlinuz.

Obviously this is because the USB does not have access to the Ubuntu ISO's internal BOOTX64.EFI.

So my question is; is there any way to include those in a way that will allow booting using secure boot.

As a suggestion, I have been trying to find information about fbx64.efi and BOOTX64.CSV which allow defining a fallback BOOTX64, but I dont think that it will work for my use case.

So am I wasting my time? Or is there a way I have not looked at.

Any help/advice would be appreciated.

PS. Once I know what the limitations are I will finish my work and hope to release the steps I followed to create the Live USB in case of it being helpful to other.

Just finished a write up of how I created a Live Debian Buster 10.5 Secure Boot USB

SORRY I REMOVED THE LINK BECAUSE SOMEONE THOUGT I WAS SPAMMING.

PPS. I am not using a live USB to build a live USB. I am building from scratch a live USB using debootstrap and chroot. I end up with a LXDE desktop under 200MB including the latest google chrome browser and include all free and nonfree firmware.

********* SOLVED **************

OK, I know some have said that this was off topic, but having a debian live USB capable of running multiple 3rd part distro is somthing that some may find usful.

I have managed to add multiple BOOTx64.EFI to the USB EFI partition, in the same way as this is done on the HDD. I have also managed to automate the process by using grub keyboard fuctions to run each step.

First for reference, I am using the USB created in the mentioned link above.
I will use Lubuntu as an example 3rd party distro to add to the live USB.

I extracted the grubx64.efi and BOOTx64.EFI from the ISO
mounted the USB EFI partition and created a directory which I used to copy the said files.

You cn repeat this for as many other distro's you want.

Next I modified the main UEFI grub menu and added the following menu entries to allow loading of Ubuntu grub and BOOTx64 EFI entries

menuentry "Debian Buster 10.5 UEFI Secure Mode - Boot 3rd Party Distro (EG : Lubuntu)" {
echo "Debian Buster 10.5 UEFI Secure Mode - Boot 3rd Party Distro (EG : Lubuntu)"
}
menuentry " Step 1 ) Load 3rd Party GrubLoader" {
search --set=root --file /other/grubx64.efi
chainloader ($root)/other/grubx64.efi
boot ($root)/other/grubx64.efi
}
menuentry " Step 2 ) Load 3rd Party BootLoader" {
search --set=root --file /other/grubx64.efi
chainloader ($root)/other/BOOTx64.EFI
}
menuentry " Step 3 ) Enter 3rd Party Grub Menu" {
search --set=root --file /area3/grub.cfg
set prefix=($root)/area3
configfile ($root)/area3/grub.cfg
}

I have automated the process by defining a grub key which run the three menus in turn, so the user will only see the top menu, and once selected the submenus will be run.
For simplicity I have not shown the submenu method as the above is simple to see and understand.
Lastly by adding a exit menu we can return the the Debian grub and bootloader there by allow to run Buster once more.

The only extra work is a small script to extract the files needed from the ISO and updaing the EFI partition.

Thank you again for your input.
PS. Can I ask as this question has a solution which is for Debian Buster that this thread is removed from the Off Topic section.
Last edited by kkman007 on 2020-08-24 01:53, edited 5 times in total.
kkman007
 
Posts: 19
Joined: 2020-08-09 19:53
Location: London

Re: Running other distro ISO's from Debian Buster Live USB (

Postby Dai_trying » 2020-08-23 07:13

You do realise that images for live buster LXDE already exist dont you? along with other desktops too

https://cdimage.debian.org/debian-cd/cu ... bt-hybrid/
Dai_trying
 
Posts: 938
Joined: 2016-01-07 12:25

Re: Running other distro ISO's from Debian Buster Live USB (

Postby kkman007 » 2020-08-23 07:34

Yes I do.

Have you looked at their size? My build using debootstrap and chroot ( with a google chrome browser ) is around 200MB, including free and non free firmware.

Also can you update them on the live medium?

Thats the point. My build is designed to run in memory and allow the end user of the live USB to update/upgrade it.

Burning the debian ISO to a USB gives you an ISO9660 device which cannot be changed. You can use persistence but that is somthing else.

If I am wrong please help me understand.

The idea for this is to allow non techincal users to use a live environment which they can ungrade as and when they need without the need of any other resource.

Anyway thank you for the input.
kkman007
 
Posts: 19
Joined: 2020-08-09 19:53
Location: London

Re: Running other distro ISO's from Debian Buster Live USB (

Postby barlafuss » 2020-08-23 08:23

following, very interesting.
Thanks
barlafuss
 
Posts: 15
Joined: 2007-11-11 17:49
Location: Milan

Re: Running other distro ISO's from Debian Buster Live USB (

Postby Bloom » 2020-08-23 08:39

If you would like to have a bootable usb stick with multiple distributions on it, there's software for that. I like MultiSystem very much, but it's all in French (although I think the software speaks English): http://liveusb.info/dotclear/
Instructions for installing it:
Code: Select all
sudo apt install software-properties-common # in case this isn't installed yet
sudo apt install wget # in case this isn't installed yet
sudo apt-add-repository 'deb http://liveusb.info/multisystem/depot all main'
wget -q -O - http://liveusb.info/multisystem/depot/multisystem.asc | sudo apt-key add -
sudo apt update
sudo apt -y install multisystem
sudo usermod -a -G adm "$USER" # add your own user to the adm group, this is needed to operate MultiSystem

It looks like this:
Image
Adding ISO files is simply dragging and dropping them on the MultiSystem window.
If you want to boot usb from an old computer that doesn't support that, you can use the Plop Boot Manager to create a floppy or a cd-r which allows you to boot from usb on such a system.
User avatar
Bloom
 
Posts: 291
Joined: 2017-11-11 12:23

Re: Running other distro ISO's from Debian Buster Live USB (

Postby kkman007 » 2020-08-23 08:47

Thanks for the suggestion, but I wanted to learn how/if I can have multiple BOOTX64.EFI files on the same USB device, the same way HDD EFI do, so I can boot other distros.

As I said above, I already have worked out how to build a custom Live USB of Buster 10.5 which can boot using Secure Boot. The problem I was looking at was how to allow the USB to host other distro's.

This is not essential to my work but will help me understand the differences between UEFI on USB and HDD.
I am currently focusing on the EFI partition and how I can create multiple directories, each holding the BOOTX64.EFI for each distro.

The sticking point is chainloading from the debian grub to another distro grub so the signature files are loaded and I dont get "invalid signature" problems when I try loading other distros.

I can get this all to work as long as I disable Secure Boot, which is what I am trying to avoid.

Thanks again.
kkman007
 
Posts: 19
Joined: 2020-08-09 19:53
Location: London

Re: Running other distro ISO's from Debian Buster Live USB (

Postby Head_on_a_Stick » 2020-08-23 09:04

kkman007 wrote:I wanted to learn how/if I can have multiple BOOTX64.EFI files on the same USB device, the same way HDD EFI do

It is not possible to have multiple BOOTX64.EFI loaders even on a hard disk drive because it is the fallback EFI loader and is only started by UEFI firmware implementations if it is located on the EFI system partition under /EFI/BOOT/ — if it is anywhere else then a custom NVRAM entry is needed to boot it, which won't work on a USB stick for obvious reasons.

And anyway your Secure Boot question is not relevant for these boards so you should ask on the Ubuntu forums instead, I've moved this thread to the Offtopic section.
Black Lives Matter

Debian buster-backports ISO image: for new hardware support
User avatar
Head_on_a_Stick
 
Posts: 12495
Joined: 2014-06-01 17:46
Location: /dev/chair

Re: Running other distro ISO's from Debian Buster Live USB (

Postby kkman007 » 2020-08-23 09:49

Thank you Head_on_a_Stick for telling me where to go.

I wanted to ask Debian experts about how to setup Debian to handle multiboot from a USB. I used Ubuntu as an example.

I will take your advice and ask for help from Ubuntu forum, BUT the question I asked is relavent to Debian.

At least in my humble opinion. I hope you dont mind too much if I keep the question open in the hope of getting some useful help.

If you think it is offtopic then I dont want you to waste your time with such matters.

You may be correct in your view that what I am trying to do is not possible, but I hope you dont mind if I seek other views.

On a side note, I am experimenting in chainloading grub and that may be the way to go.
One last note, you where of great help in my last post, and thanks to the work you did on your project I was able to solve my Safe Boot problems. So I have great respect for your work and efforts.
kkman007
 
Posts: 19
Joined: 2020-08-09 19:53
Location: London

Re: Running other distro ISO's from Debian Buster Live USB (

Postby kkman007 » 2020-08-23 10:03

I dont understand, how this thread was push to OffTopic section without any option for me to reply. This was about Debian and NOT Ubuntu.
Is there any procedure or can anyone push a topic here.
To me this is very hard handed... A shame as I was starting to like the forum.
kkman007
 
Posts: 19
Joined: 2020-08-09 19:53
Location: London

Re: Running other distro ISO's from Debian Buster Live USB (

Postby Head_on_a_Stick » 2020-08-23 10:18

kkman007 wrote:I dont understand, how this thread was push to OffTopic section without any option for me to reply. This was about Debian and NOT Ubuntu.

I moved the thread because your problem appears to be about the non-Debian kernels being unverified by Secure Boot. I know that the Debian kernels are signed with Microsoft's Secure Boot keys but I have no idea how Ubuntu handles this and that question would seem to be more appropriate on their forums.

The thread is still open and you may yet receive assistance from somebody who understands Ubuntu's Secure Boot support so there is no need to despair.
Black Lives Matter

Debian buster-backports ISO image: for new hardware support
User avatar
Head_on_a_Stick
 
Posts: 12495
Joined: 2014-06-01 17:46
Location: /dev/chair

Re: Running other distro ISO's from Debian Buster Live USB (

Postby kkman007 » 2020-08-23 10:37

OK... Although I still think it is not off topic, thank you for your reply.

The area where it is relavent to Debian is the grub bootloader and how it could change the boot order of the EFI's installed on the USB to reload another distros grub.

I have been trying this, and so far I have been able to switch the bootloader. Although my problem seems to be reseting the order. I know that may not make too much sense, but I lack better understanding in how the boot process in UEFI works and so am looking for help on the grub side.

I will try and write up what I have got so far, but I need to test my work to get a better handle on the matter.
kkman007
 
Posts: 19
Joined: 2020-08-09 19:53
Location: London

Re: Running other distro ISO's from Debian Buster Live USB (

Postby Head_on_a_Stick » 2020-08-23 10:47

kkman007 wrote:The area where it is relavent to Debian is the grub bootloader and how it could change the boot order of the EFI's installed on the USB to reload another distros grub.

Debian's GRUB doesn't "reload another distros grub", it loads another distribution's kernel & initramfs images (or perhaps another distribution's grub.cfg file if $configfile is specified in the menuentry).

For Secure Boot support on removable devices the UEFI grub-install(8) command in Debian will copy /usr/lib/shim/shimx64.efi to $ESP/EFI/BOOT/BOOTX64.EFI and that will then load $ESP/EFI/BOOT/grubx64.efi (if the --removable switch is called).
Black Lives Matter

Debian buster-backports ISO image: for new hardware support
User avatar
Head_on_a_Stick
 
Posts: 12495
Joined: 2014-06-01 17:46
Location: /dev/chair

Re: Running other distro ISO's from Debian Buster Live USB (

Postby Deb-fan » 2020-08-23 18:21

^ English, in english Hoas! :P

Really nothing useful to add was going to say the same as somebody else already has, there's already projects which do this, multiboot usb's. Look them over, find one which does what you're trying or closet to it and then study how they do it, how it's setup. Almost surely this is an endeavor to reinvent the wheel. Multibooting whichever media is bound to be well covered by now. Spend some time looking at examples of all the other wheels around. :)

Ps, still an interesting subject and therefore worth investing some time into learning about for anybody with an interest.
Most powerful FREE tech-support tool on the planet * HERE. *
Deb-fan
 
Posts: 895
Joined: 2012-08-14 12:27

Re: SOLVED - Running other distro ISO's Debian Buster Live U

Postby kkman007 » 2020-08-23 22:58

Can I ask as this question has a solution which is for Debian Buster that this thread is removed from the Off Topic section

********* SOLVED **************

OK, I know some have said that this was off topic, but having a debian live USB capable of running multiple 3rd part distro is somthing that some may find usful.

I have managed to add multiple BOOTx64.EFI to the USB EFI partition, in the same way as this is done on the HDD. I have also managed to automate the process by using grub keyboard fuctions to run each step.

First for reference, I am using the USB created in the mentioned link above.
I will use Lubuntu as an example 3rd party distro to add to the live USB.

I extracted the grubx64.efi and BOOTx64.EFI from the ISO
mounted the USB EFI partition and created a directory which I used to copy the said files.

You cn repeat this for as many other distro's you want.

Next I modified the main UEFI grub menu and added the following menu entries to allow loading of Ubuntu grub and BOOTx64 EFI entries

menuentry "Debian Buster 10.5 UEFI Secure Mode - Boot 3rd Party Distro (EG : Lubuntu)" {
echo "Debian Buster 10.5 UEFI Secure Mode - Boot 3rd Party Distro (EG : Lubuntu)"
}
menuentry " Step 1 ) Load 3rd Party GrubLoader" {
search --set=root --file /other/grubx64.efi
chainloader ($root)/other/grubx64.efi
boot ($root)/other/grubx64.efi
}
menuentry " Step 2 ) Load 3rd Party BootLoader" {
search --set=root --file /other/grubx64.efi
chainloader ($root)/other/BOOTx64.EFI
}
menuentry " Step 3 ) Enter 3rd Party Grub Menu" {
search --set=root --file /area3/grub.cfg
set prefix=($root)/area3
configfile ($root)/area3/grub.cfg
}

I have automated the process by defining a grub key which run the three menus in turn, so the user will only see the top menu, and once selected the submenus will be run.
For simplicity I have not shown the submenu method as the above is simple to see and understand.
Lastly by adding a exit menu we can return the the Debian grub and bootloader there by allow to run Buster once more.

The only extra work is a small script to extract the files needed from the ISO and updaing the EFI partition.

Thank you again for your input.
PS. Can I ask as this question has a solution which is for Debian Buster that this thread is removed from the Off Topic section.
kkman007
 
Posts: 19
Joined: 2020-08-09 19:53
Location: London

Re: SOLVED - Running other distro ISO's Debian Buster Live U

Postby cuckooflew » 2020-08-24 01:39

Re: The multiple requests on moving this "off topic" thread.All those requests are only serving to make it even more off topic, and it is a mixture of several topics, starting with " Running other distro ISO's---", those other distros, are actually of no interest to some of us , including me.. Did you count how many times you said ?:
Can I ask as this question has a solution which is for Debian Buster that this thread is removed from the Off Topic section
?
I did , I counted 4 times, plus a couple of other times, but worded slightly different, ....You know, it is really starting to look like some kind of spam to me,
especially with your promotional link that you threw in, to your personal blog, or web site,...But any way, now that kind of explains why you are making such a big deal about wanting to have it moved to a strictly Debian topic, but it is not strictly Debian, ...
I think you need to do what you should have done when you first joined the forum, [url=http://forums.debian.net/viewtopic.php?f=30&t=10653Forum guidelines. Please read before first post![/url]
10.Moderators might move your thread to a more suitable category (for instance from 'General Discussion' to 'General Questions'). This is no cause for alarm and a shadow topic, linked directly to the new location, will always be left at the original location.
11.If you feel like your post/ thread has been locked, edited or even removed in error please contact the moderator team via e-mail at team@forums.debian.net.

=============
by kkman007 » 2020-08-23 22:58
Can I ask as this question has a solution which is for Debian Buster that this thread is removed from the Off Topic section

Yes you can ask, but you should follow the procedures mention in the "Read before you post" guidelines.
I can remove it from the "off topic board", to the spam bin, where no one will see it, Is that what you want ?
by kkman007(partial)>So am I wasting my time? Or is there a way I have not looked at.

Any help/advice would be appreciated.

PS. Once I know what the limitations are I will finish my work and hope to release the steps I followed to create the Live USB in case of it being helpful to other.

Just finished a write up of how I created a Live Debian Buster 10.5 Secure Boot USB (http://link removed, for the quote, and no need to repeat it)

"So am I wasting my time?", Yes, you are wasting your time in repeatedly asking that the topic be moved elsewhere.
"Any help/advice would be appreciated.", You exposed the truth here, I advise you read the forum guidelines, but you also show me your motives for the topic, you want members here to explain how to do this, so you can use the information in your blog, ...since maybe you have missed a lot of things,...
I suggest the topic be closed, and locked, it is solved and there is nothing more to discuss. Or maybe I should just move the 1 post with the link off the board, ? Your call now. :mrgreen:
Please Read What we expect you have already Done
Search Engines know a lot, and
"If God had wanted computers to work all the time, He wouldn't have invented RESET buttons"
and
Just say NO to help vampires!
cuckooflew
 
Posts: 683
Joined: 2018-05-10 19:34
Location: Some where out west

Next

Return to Offtopic

Who is online

Users browsing this forum: No registered users and 13 guests

fashionable