Installing OS on USB, where to put bootloader?

Questions about Grub, UEFI,the liveCD and the installer
Forum rules
Before you post please read how to get help
Hairyloon
Level 3
Level 3
Posts: 151
Joined: Thu Sep 22, 2011 8:15 am

Re: Installing OS on USB, where to put bootloader?

Post by Hairyloon »

overkill22 wrote:I was thinking to make a USB live with persistence that allow me to save files and install programs even though the system will always run as a live distro...
I had a similar idea, but I couldn't think where to start. Good luck with it.

User avatar
overkill22
Level 4
Level 4
Posts: 402
Joined: Fri Jan 16, 2015 6:09 am
Contact:

Re: Installing OS on USB, where to put bootloader?

Post by overkill22 »

fabien85 wrote:For full install, have a look at pbear's method and choose which one you prefer.
Thanks, now it is very clear. I will try your method since I don't have a BIOS computer and I don't know how and if I can boot my linux mint laptop in BIOS to follow Pbear's procedure. It would be good to try Pbear's procedure since it seems succesfull and it will create a more "universal" USB.

I also get to know the distro Porteus that looks nice and also works on both BIOS and UEFI systems.

User avatar
overkill22
Level 4
Level 4
Posts: 402
Joined: Fri Jan 16, 2015 6:09 am
Contact:

Re: Installing OS on USB, where to put bootloader?

Post by overkill22 »

ok, I'm doing the procedure, yesterday it took one hour to install lubuntu on the usb.

fabien85
Level 7
Level 7
Posts: 1676
Joined: Tue Mar 11, 2014 4:30 pm

Re: Installing OS on USB, where to put bootloader?

Post by fabien85 »

Mint, and all linux distros that I know of, can be booted both in Legacy and UEFI mode.
In principle, a UEFI computer can be set up to boot in BIOS/Legacy mode, via the so-called "Compatibility Support Module" (CSM). How to enable/disable the CSM is unfortunately manufacturer-dependent (and sometimes even machine-dependent), and may be cryptic. For the purpose of creating the USB, you would then need to switch back and forth your computer between Legacy and UEFI mode, with also the random chance that your firmware settings (in particular secure boot) may have been changed when you switch back to UEFI. All in all, I would think this is hazardous, at least until you know well your firmware and computer and are confident you can fix anything.

User avatar
overkill22
Level 4
Level 4
Posts: 402
Joined: Fri Jan 16, 2015 6:09 am
Contact:

Re: Installing OS on USB, where to put bootloader?

Post by overkill22 »

fabien85 wrote:Mint, and all linux distros that I know of, can be booted both in Legacy and UEFI mode.
In principle, a UEFI computer can be set up to boot in BIOS/Legacy mode, via the so-called "Compatibility Support Module" (CSM). How to enable/disable the CSM is unfortunately manufacturer-dependent (and sometimes even machine-dependent), and may be cryptic. For the purpose of creating the USB, you would then need to switch back and forth your computer between Legacy and UEFI mode, with also the random chance that your firmware settings (in particular secure boot) may have been changed when you switch back to UEFI. All in all, I would think this is hazardous, at least until you know well your firmware and computer and are confident you can fix anything.
This mean that the Pbear's solution is not applicable if I have a linux computer?

It's almost one hour since I started the installation, in a few minutes more it should be done.... So damn slow....
After this I want to try to install Porteus, it looks it has the feature to be a LIVE installation but also to save programs and files.

User avatar
overkill22
Level 4
Level 4
Posts: 402
Joined: Fri Jan 16, 2015 6:09 am
Contact:

Re: Installing OS on USB, where to put bootloader?

Post by overkill22 »

Hairyloon wrote:
overkill22 wrote:I was thinking to make a USB live with persistence that allow me to save files and install programs even though the system will always run as a live distro...
I had a similar idea, but I couldn't think where to start. Good luck with it.
Ok, I've done the installation of Lubuntu on a USB.
Now when I restarted, the system gave me an error of "secure boot" even though during the installation I selected "disable safe boot".
So I went to my boot settings and disabled the safe boot. Refind (very nice) booted and there were the bootloaders from my systems.
I choose the USB one and it worked. Didn't spend too much time trying the OS on the usb because now I have another problem, will open a different thread.

I'll also try Porteus and report here the results.

fabien85
Level 7
Level 7
Posts: 1676
Joined: Tue Mar 11, 2014 4:30 pm

Re: Installing OS on USB, where to put bootloader?

Post by fabien85 »

Congrats on getting it to work.
Secure boot can be tricky indeed, especially because manufacturers can give it different names etc in their implementations.
Pbear's solution is very well applicable on any UEFI computer, it's just that you need to be well confident with your firmware and bootloading.

User avatar
pbear
Level 11
Level 11
Posts: 3902
Joined: Wed Jun 21, 2017 12:25 pm
Location: San Francisco

Re: Installing OS on USB, where to put bootloader?

Post by pbear »

fabien85 wrote:For reference, I explain in larger details my method below: ...
That IS a nice solution. Not sure which is better (bear in mind, I don't claim credit for "my" solution). I'm curious. Is the way you're using Ubiquity documented anywhere? I spent more than an hour last night looking and only found standard instructions. Also, for me at least, being able to boot the USB in both UEFI or BIOS is nearly essential. Seems to me this should be possible with your method. Thoughts?

BTW, overkill22, picking up on a side issue in the thread, as regards backup, I'd recommend periodically making copies of the full system with Clonezilla or similar. This is independent of data file backups, which generally are made more frequently as they're easier to do. A full system image plus top-up data file backup makes restoring the status quo ante much easier if something like this happens again in future.
Time flies like an arrow. Fruit flies like a banana.
If your problem has been solved, please edit the thread title.

User avatar
overkill22
Level 4
Level 4
Posts: 402
Joined: Fri Jan 16, 2015 6:09 am
Contact:

Re: Installing OS on USB, where to put bootloader?

Post by overkill22 »

pbear wrote:
fabien85 wrote:For reference, I explain in larger details my method below: ...
That IS a nice solution. Not sure which is better (bear in mind, I don't claim credit for "my" solution). I'm curious. Is the way you're using Ubiquity documented anywhere? I spent more than an hour last night looking and only found standard instructions. Also, for me at least, being able to boot the USB in both UEFI or BIOS is nearly essential. Seems to me this should be possible with your method. Thoughts?

BTW, overkill22, picking up on a side issue in the thread, as regards backup, I'd recommend periodically making copies of the full system with Clonezilla or similar. This is independent of data file backups, which generally are made more frequently as they're easier to do. A full system image plus top-up data file backup makes restoring the status quo ante much easier if something like this happens again in future.
For the backup I know have all the documents stored in dropbox and I create a symlink everytime I install a new system.
Then I use megasync for the pictures. For videos and music I do standard backup with external HD.
The most annoyng part for me is that I have to reinstall all the programs and the tweak on the new system. For the programs I'll try the bakup tool next time I need it, for the tweak, I guess I just have to deal with it every time.

Please check out my other discussion regarding the bootloader problem , I'd like to hear your opinions. viewtopic.php?f=46&t=256076

User avatar
pbear
Level 11
Level 11
Posts: 3902
Joined: Wed Jun 21, 2017 12:25 pm
Location: San Francisco

Re: Installing OS on USB, where to put bootloader?

Post by pbear »

overkill22 wrote:Please check out my other discussion regarding the bootloader problem , I'd like to hear your opinions. viewtopic.php?f=46&t=256076
Alas, I know very little about grub, as I've not had a problem with it yet (knock wood).
Time flies like an arrow. Fruit flies like a banana.
If your problem has been solved, please edit the thread title.

User avatar
pbear
Level 11
Level 11
Posts: 3902
Joined: Wed Jun 21, 2017 12:25 pm
Location: San Francisco

Re: Installing OS on USB, where to put bootloader?

Post by pbear »

pbear wrote:I'm curious. Is the way you're using Ubiquity documented anywhere?
Found it! Rod Smith himself, posting to askubuntu. Confirms and explains the bug when installing to a USB drive in UEFI. See also bug report.
Time flies like an arrow. Fruit flies like a banana.
If your problem has been solved, please edit the thread title.

fabien85
Level 7
Level 7
Posts: 1676
Joined: Tue Mar 11, 2014 4:30 pm

Re: Installing OS on USB, where to put bootloader?

Post by fabien85 »

Yeah the -b flag to ubiquity is alas undocumented, it's not in any man page that I found. I learned this trick on this forum, maybe from Rod Smith (who works for Ubuntu) or another forumer, I cant remember.

The fact that ubiquity ignores what ESP you indicate is also confirmed in several bug reports, e.g :
https://bugs.launchpad.net/ubuntu/+sour ... ug/1396379
https://bugs.launchpad.net/ubuntu/+sour ... ug/1173457
(just the first reports I found, there are maybe other)

@pbear For getting a USB both bootable in BIOS and UEFI mode, I dont see any other simple way than the method you indicated in viewtopic.php?f=46&t=252351, you can just replace step 6. by the refind-install command, to get refind instead of grub
I find useful to have a UEFI-bootable USB with refind, eg to debug the bootloading of a computer where I messed things up.

@overkill22 I will look at your other thread (just later, I now have a work meeting)

User avatar
overkill22
Level 4
Level 4
Posts: 402
Joined: Fri Jan 16, 2015 6:09 am
Contact:

Re: Installing OS on USB, where to put bootloader?

Post by overkill22 »

fabien85 wrote:Yeah the -b flag to ubiquity is alas undocumented, it's not in any man page that I found. I learned this trick on this forum, maybe from Rod Smith (who works for Ubuntu) or another forumer, I cant remember.

The fact that ubiquity ignores what ESP you indicate is also confirmed in several bug reports, e.g :
https://bugs.launchpad.net/ubuntu/+sour ... ug/1396379
https://bugs.launchpad.net/ubuntu/+sour ... ug/1173457
(just the first reports I found, there are maybe other)

@pbear For getting a USB both bootable in BIOS and UEFI mode, I don't see any other simple way than the method you indicated in viewtopic.php?f=46&t=252351, you can just replace step 6. by the refind-install command, to get refind instead of grub
I find useful to have a UEFI-bootable USB with refind, eg to debug the bootloading of a computer where I messed things up.

@overkill22 I will look at your other thread (just later, I now have a work meeting)
Thank you.
I solved by reinstalling completely the system.

I tried the backup tools for the programs but it's not what I'm looking for. It takes all the dependencies that are installed on the laptop instead of the single programs. That means that if I have installed some useless stuff from old programs. it will be installed in the new installation too.
What would be good is having the chance to select only the programs, and not the single packets, also because many programs need extra libraries not installed by default.

For the USB thing, I took a quick look at Portabus and it looks quite cool. There's also cinnamon edition. I'll try to work out with that system and see if I can get it to work on a USB instead of using the full Lubuntu (that I still have on another USB since it costed me 3 days of work).

Now I have to figure out why the last stable kernel 4.11 is giving me connection problems.... :(
and also the 4.10 seems to have some problems. it's weird because I thought I was using one of those previously

The trick with ubiquity is super good.

Post Reply

Return to “Installation & Boot”