Booting Ubuntu on the hard disk from USB

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Booting Ubuntu on the hard disk from USB

Liam Proven
I cannot get something to work which I used to be able to do fine.

I am wondering if I have forgotten how to do it, or if it no longer
works in Ubuntu 20.04.

With older versions, what you could do was:

Install Ubuntu to hard disk as normal. Let's say you are dual-booting
with Windows in /dev/sda1 and Ubuntu is in a logical partition,
/dev/sda5.

Something goes wrong or you break it and it won't boot.

What I used to do was put in a bootable Ubuntu USB, start it, and then
in the boot menu choose the "edit startup options" box.

I would remove the stuff about Casper and so on, so it said

[original boot stuff inc initrd] root=/dev/sda5 nosplash nomodeset

... and then press F10.

It would load the kernel and initrd from USB but then continue booting
from my installed OS.

Then I could install a new kernel or whatever, or reinstall GRUB, and fix my OS.

But I can't get this to work with 20.04. I always get the live system from USB.

What am I missing?

--
Liam Proven – Profile: https://about.me/liamproven
Email: [hidden email] – gMail/gTalk/gHangouts: [hidden email]
Twitter/Facebook/LinkedIn/Flickr: lproven – Skype: liamproven
UK: +44 7939-087884 – ČR (+ WhatsApp/Telegram/Signal): +420 702 829 053

--
ubuntu-users mailing list
[hidden email]
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
Reply | Threaded
Open this post in threaded view
|

Re: Booting Ubuntu on the hard disk from USB

Ubuntu mailing list
On Sun, 20 Jun 2021 17:34:52 +0200, Liam Proven wrote:
>/dev/sda5

Hi Liam,

perhaps sda5 is the culprit? Try by UUID or boot the live Linux on the
stick and install the Ubuntu package "systemd-container" or whatever
it's called  by a non-Ubuntu live Linux.

By running

  sudo systemd-nspawn -bqD /mnt_point

you can boot the Ubuntu install, from the USB stick's install in a
container and then install almost everything, even the grub package/s,
but not grub.

To install grub, just boot the live Linux and _do not_ use the systemd
container approach, since it won't work. I'm using syslinux, not
grub anymore, so I need to google...

https://help.ubuntu.com/community/Grub2/Installing#Fixing_a_Broken_System

  sudo grub-install --boot-directory=[...]

does the trick.

Regards,
Ralf

PS: I tend to use labels, however, for me sdX is quasi always
consistent, too, but you never know, especially after inserting an USB
stick and changing the boot device order by the "BIOS" might make usage
of sdX tricky/fishy. Just a thought ;)!


--
ubuntu-users mailing list
[hidden email]
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
Reply | Threaded
Open this post in threaded view
|

Re: Booting Ubuntu on the hard disk from USB

Ubuntu mailing list
On Sun, 20 Jun 2021 18:04:07 +0200, Ralf Mardorf wrote:
>sudo systemd-nspawn

PPS:

Or chroot :D. IIRC in some exceptional cases systemd-nspawn still needs
to be replaced by chroot. I don't have such an exceptional case at hand.

PPPS:

"But I can't get this to work with 20.04. I always get the live system
from USB.

What am I missing?"

You would ask another subscriber asking the same question as you do,
what messages s/he would get.

--
ubuntu-users mailing list
[hidden email]
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users