How to boot from a full Mint install on stick, just like a live CD but with all the full install goodness?

Questions about Grub, UEFI,the liveCD and the installer
Forum rules
Before you post please read how to get help
Post Reply
RickRussellTX
Level 1
Level 1
Posts: 3
Joined: Wed Jul 11, 2018 5:56 am

How to boot from a full Mint install on stick, just like a live CD but with all the full install goodness?

Post by RickRussellTX » Wed Jul 11, 2018 6:10 am

Hey folks. I have what seems like a pretty simple scenario but it keeps breaking and I don't know what to do.

I have a work laptop running Windows 10. When I'm traveling, I'd prefer to run Linux Mint on it during my downtime so I don't interact with the company-provided Windows installation at all.

I built a USB stick with Linux Mint (19) Live using Universal USB Installer. It works great, it's detected on boot, I can select it from the BIOS UEFI boot menu and everything is awesome. But I'd really rather not use the Live environment; it's not personalized, I can't install software or persistently update software, etc.

So I had the idea to install a full version of Mint to a new USB stick. It worked great too -- initially. It adds an "ubuntu" entry to the BIOS UEFI boot menu, I can select it and get the full Mint experience.

And here's where things go wrong. If I boot into Windows for work, the BIOS UEFI boot menu entry for "ubuntu" is removed. Maybe a security thing? I don't know. If I select the new stick directly from the boot menu (it appears there just like my Live stick), it doesn't boot. The Live stick still works great, just pick & go. But the full install stick is dead in the water.

Is there a way to get a full installation of Mint on a stick to boot like a Live CD -- that is, you just pick the stick from the BIOS boot menu and go? Assuming that I cannot prevent Windows from purging the UEFI config, how do I set up a full install with the right boot info to just pick & go without depending on a preconfigured UEFI boot menu?

My sense is that there must be some way to force a "legacy" boot config on my Mint full install stick, but I don't even know where to start.

User avatar
kc1di
Level 13
Level 13
Posts: 4705
Joined: Mon Sep 08, 2008 8:44 pm
Location: Maine USA

Re: How to boot from a full Mint install on stick, just like a live CD but with all the full install goodness?

Post by kc1di » Wed Jul 11, 2018 8:58 am

I have not dealt with this directly myself so I maybe way off. But as I see it you have three choices.
1. install Mint's/ubuntu's uefi in the windows boot partition and boot through grub boot loader to load windows and mint.
2. This AskUbuntu thread may give clues to how to use windows uefi to boot both without changing windows uefi too much. https://askubuntu.com/questions/838780/ ... every-time
3. Try refind found here: http://www.rodsbooks.com/refind/

good luck.
Easy tips : https://sites.google.com/site/easylinuxtipsproject/
Linux Mint Installation Guide: http://linuxmint-installation-guide.rea ... en/latest/
Registered Linux User #462608

RickRussellTX
Level 1
Level 1
Posts: 3
Joined: Wed Jul 11, 2018 5:56 am

Re: How to boot from a full Mint install on stick, just like a live CD but with all the full install goodness?

Post by RickRussellTX » Wed Jul 11, 2018 10:07 am

Thanks for your response. Here's what I have tried:
kc1di wrote:
Wed Jul 11, 2018 8:58 am
1. install Mint's/ubuntu's uefi in the windows boot partition and boot through grub boot loader to load windows and mint.
Unfortunately, invoking the Windows boot loader via Grub (basically boot UEFI "ubuntu" config -> grub -> Windows) does not work because Windows BitLocker, on my company's secured Windows installation, throws up a security violation and goes into BitLocker recovery mode.

Essentially I think BitLocker thinks that it's being evoked in a hypervisor, and it shuts down to prevent the symmetric key from being harvested.
kc1di wrote:
Wed Jul 11, 2018 8:58 am
2. This AskUbuntu thread may give clues to how to use windows uefi to boot both without changing windows uefi too much. https://askubuntu.com/questions/838780/ ... every-time
Interesting! Maybe there is an approach that would work there.
kc1di wrote:
Wed Jul 11, 2018 8:58 am
3. Try refind found here: http://www.rodsbooks.com/refiind/
Yeah, I suspect I'll get the same BitLocker security issue. If it's not invoked by the computers BIOS UEFI, I think BitLocker will... lock.

Thanks!

fabien85
Level 6
Level 6
Posts: 1378
Joined: Tue Mar 11, 2014 4:30 pm

Re: How to boot from a full Mint install on stick, just like a live CD but with all the full install goodness?

Post by fabien85 » Wed Jul 11, 2018 5:15 pm

If I boot into Windows for work, the BIOS UEFI boot menu entry for "ubuntu" is removed.
Several firmwares remove boot entries if they think they are useless, e.g. if they refer to a drive that is not present at boot.
So that's probably what happens.

Try installing grub at the fallback location on the USB stick :
1) Boot the stick one way or another (in UEFI mode)
2) Check what drive is the stick, e.g. with gparted. In the following I'm going to assume it's /dev/sdc
3) Open a terminal and

Code: Select all

sudo grub-install --removable /dev/sdc
It will probably also help if you can disable secure boot on the computer, although this may conflict with either bitlocker or your company policy.

RickRussellTX
Level 1
Level 1
Posts: 3
Joined: Wed Jul 11, 2018 5:56 am

Re: How to boot from a full Mint install on stick, just like a live CD but with all the full install goodness?

Post by RickRussellTX » Sat Jul 14, 2018 10:12 am

I appreciate your response -- I believe you are right about the underlying cause; the firmware seems to tweak the boot menu entries when the USB stick is removed.

Unfortunately, the --removable option didn't change anything. On the upside, there is a "boot from file" option on the BIOS boot menu, and I found that I can select it, then navigate down a couple of directories and invoke the shimx64.efi boot file directly, getting me back into grub and Linux.

So at least I have a workaround!

fabien85
Level 6
Level 6
Posts: 1378
Joined: Tue Mar 11, 2014 4:30 pm

Re: How to boot from a full Mint install on stick, just like a live CD but with all the full install goodness?

Post by fabien85 » Sat Jul 14, 2018 11:34 am

Hum not sure what goes on. What's the brand of your laptop ? If it's an Acer or HP, the answer is probably that secure boot needs to be turned off. Otherwise I dont know, but next time I cross that brand I will trick my Mint stick on it.

As kc1di said, you could try refind as your boot manager. There is a version which is made in an ISO to be burnt on a USB stick, so you can try it without installing, see if it allows you to boot windows. It's possible it does, because normally refind does not do any hardware initialization or anything, just calls the windows bootloader.

User avatar
michael louwe
Level 9
Level 9
Posts: 2690
Joined: Sun Sep 11, 2016 11:18 pm

Re: How to boot from a full Mint install on stick, just like a live CD but with all the full install goodness?

Post by michael louwe » Sat Jul 14, 2018 2:35 pm

@ RickRussellTX, .......
RickRussellTX wrote:.
.
Fyi, running a fully-installed LM system from a USB Flash-drive will likely soon wear out the USB, eg a 32GB USB will wear out in a few months from running the OS for a few hours daily because USB Flash-drives are not designed for lots of write operations, ie they have very basic wear-levelling circuitry, no TRIM feature, etc, unlike SSDs.

A more suitable option is to use a Live LM USB with Persistent Storage which can save your personal configuration/settings/programs = persist through reboots.
....... For fat32 format, persistent storage is limited to 4GB of system changes. To bypass the 4GB limit, use the NTFS or ext4 format. To reduce file fragmentation, plan and make fewer but bigger system changes during the first few Live sessions.
viewtopic.php?f=42&t=229086 ([Tutorial] Live usb with persistence over 4GB)

.
P S - I think you were referring to the "Select an UEFI file as trusted for executing" BIOS setting in OEM laptops like Acer, Asus and HP. This BIOS setting is accessed by setting the Supervisory Password. Thereafter, to boot Linux, select either shimx64.efi or grubx64.efi, depending on the Secure Boot setting.

Post Reply

Return to “Installation & Boot”