Hello. I’m trying to install Lubuntu 18.04.3 64 bit to a USB drive following this guide and everything works as it should but every time I try booting my laptop without the USB, I just get a GRUB command line. Now, it’s not that I don’t know how to get out of this (type exit and select windows boot manager from the boot list) but Is there any way I can create a fully portable Lubuntu USB? (again, not just a live USB with persistance, but a full install to USB) I already tried removing the boot entry and deleting the Lubuntu boot files from my boot partition on my ssd but when I try booting from the USB then, I just get taken back to my boot menu. In other words, how can I take this Lubuntu USB, go to a friend’s PC, and boot from the USB no problem?
Looks like your bootloader was installed on your drive, instead of the USB stick.
No, it is not easy to create a fully portable system on a stick, because there are two different boot modes. Either you have an UEFI installation or a BIOS installation. If you boot from another PC, the PC must have enabled the same boot mode. Another problem are proprietary drivers for graphic cards or WLAN chips.
If the PC has only a BIOS (which means, it is [very] old), it can boot only systems installed in BIOS mode.
If the PC has an UEFI firmware, chances are good, that it has also the Compatibility Support Module (CSM). If CSM is active, it can boot systems installed in BIOS mode. If it is disabled or not available, it can only start systems installed in UEFI mode. CSM will disappear more and more in the next years.
Some UEFI implementations allow to choose the system from the EFI boot menu, independently of the boot mode configured, and switches internally in the needed boot mode.
Why do you have a /boot partition on the disk? Are you using full disk encryption? Or are you using a filesystem like ZFS or BTRFS? Or are you using LVM?
The easiest way to install Lubuntu on a stick is to install it in BIOS mode, because you can specify the MBR (in case of GPT it needs a bios_grub partition), where the bootloader must be installed.
More difficult is an UEFI installation. As far as I know, ubiquity (installer used by Lubuntu 18.04) installs the bootloader in the first EFI-System partition, that is found, which is normally the ESP from the disk drive of the PC.
Maybe Calamares (installer used by Lubuntu 19.10) handles this differently.
This is just the theoretical background. To help you further, we need more informations (with the USB stick plugged in):
sudo parted --list sudo efibootmgr -v # install it, if the package is missing: sudo apt install efibootmgr
- Yeah I guess I forgot to mention that even though I selected the fat32 partition on my USB it just installed to the boot partition on my internal SSD. I don’t really have the need to run it on another pc becides my own.
- This is a laptop rented to me by my school so I’m just looking for a bit more freedom without having the school know I’m using linux. Also the laptop has a UEFI BIOS so that isn’t much of an issue. Also, I can’t boot in normal BIOS mode because as this is a school rented laptop, the BIOS is locked down.
- What I ment by boot partition is on my Internal SSD, there is a fat32 partition that Windows normaly boots from.
I’ve never done it, but there’s lots of how-tos when you google about it. I’ve read that some people remove the internal hard disk while installing to the external drive.
I also see people explicitly saying they’re creating a portable system to use on the machines. Just boot it up like a LiveCD. But, it does seem like there would be hardware issues (different network chipsets, video drivers).
MX Linux has a “Live USB Maker” which, unlike other tools has an option for persistent environment (not just a dd image write of the ISO). They also have a tool to essentially create a bootable ISO from your installed system, so you can install that same system elsewhere. I think people use that in conjunction with LUM to have a persistent LiveCD environment after they configure an install the way they want it. (But, these tools probably won’t work for you since you’re starting from Windows. I saw an announcement that MX released LUM as an appimage or flatpak. I don’t know if it would run on Windows.).
What if you removed the windows hard drive, put the external drive inside the laptop. Installed linux however you want? After you put the Windows hard drive back in, wouldn’t the external drive boot from F12 list of devices to boot from? (Did the school disable that in the bios? Apparently you were able to boot a LiveCD type device and install it. The only problem is that it touched your internal drive?).
Virtual Box would let you run Linux from inside Windows.
I would try removing my internal drive but as this is a laptop rented to me by my school, I can’t exactly screw off the back and remove the drive without potentially getting in trouble. I believe what you guys are referring to is live mode with persistence. I would do this but not everything is fully supported in live mode even with persistence.
What’s not supported??
- Even with persistence, I can’t have the USB be password protected.
- Can’t preform major system updates without stuff breaking.
- can’t install hardware drivers.
- probably the biggest one, I can’t modify system files.
The partition is not the /boot partition. It is the EFI system partition (ESP), where the bootloaders are stored.
On a Linux system, /boot contains normally the initramfs, kernel and additional parts of the bootloader.
On a Windows system, the /boot equivalent is, as far as I know, C:\windows\system32\boot.
The lock down of the UEFI is a clear sign, that you should not install another system! I guess, you have signed a paper, after reading the conditions? If it is explicitly forbidden in the conditions of use, to install another system on the laptop, then you are in trouble.
Before installing the system on the stick, you should have asked the IT administration for a permission to do so.
If the school has a good network monitoring, they will see, that you are using a Linux system (browser user agent, downloading deb packages from the Ubuntu servers, etc.)!
Now, you have installed another bootloader on the ESP and set it at the first place of the boot order in NVRAM. When you give back the laptop, then you have to delete the bootloader from the ESP (
It depends on the UEFI implementation, if you have to delete also the the boot entry in the NVRAM. Some UEFI remove automatically invalid entries, on other you have to delete them manually with
efibootmgr and other (mostly older, bad implementations) need access to the UEFI, to delete the entry.
In your situation, I would have tried to set up a virtual machine and using a Linux system inside Windows. If you don’t have local administration rights on your Windows machine, you could ask the IT administration to install a virtualisation software.
Virtualisation provides features like snapshots and it will be faster than a system on an USB stick.
To some extent I was. But, when I was googling, I saw a lot of how-tos for what sounded like actual installation to external drive.
I think apt-ghetto brought up a good point. I assumed the bios is locked just so the IT guy doesn’t have to deal with stupid mistakes. In that case, it wouldn’t bother me to screw around (or, go ask or access to it). But, if you signed a contract agreeing not to do things like this, I’d try to abide by that. (I.e., if you’re willing to risk something being installed on the disk, it wouldn’t be a problem to remove the disk and protect it from that. But, if removing the disk crosses a line, running something that would be safer to run with the hard disk absent probably crosses that line to.).
I haven’t looked at Puppy Linux for 4-5 years. Maybe there’s something better today. It was odd to me then because it had two install modes (frugal & full). I would think full (installed the same way all distros are) would be what most people do. But, back then everyone recommended the frugal install simply because you had better chances of support – because most people ran frugal (which odd to me that that was the mainstream, not the normal way of installing). If I recall, frugal was intended more for external USB drives, which to me seemed like why would anyone install that to hard drive when they could just do the “full” install like any other distro. But, that’s what people were doing the most (frugal on a hard drive. Just because it was easier, or everyone did it and there was more experience/support for it.
You can read about Puppy’s install options here. The reason I’m mentioning it is that Puppy has been doing the sort of thing you want to do. Puppy’s not as polished as mainstream distros. It feels a little more hobbyiest. It had these more unusual use-cases years ago. That might be the safest one to install (to external USB drive, at least. I think “frugal” to internal hard disk would be safe too.).
I have linux (Debian) installed on a USB and use it with my laptop. However, not Windows but Mac with rEFInd. It is slightly different as we have to ‘bless’ the EFI partition and all.
Anyways, if I understood correctly, you have successfully installed Lubuntu on a USB and it works fine. Also you can boot into Windows, albeit with ‘exit from grub and choose Windows from boot menu’ hack. If you say, you get a
grub> prompt when you are booting up without USB and no other issue, it means Lubuntu is default boot entry and making Windows the default in grub should work for you (
GRUB_DEFAULT=0 entry in /etc/default/grub file). See askubuntu question on this topic.
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.