Booting Ubuntu on the hard disk from USB
Liam Proven
lproven at gmail.com
Mon Jun 21 12:52:53 UTC 2021
On Sun, 20 Jun 2021 at 18:05, Ralf Mardorf via ubuntu-users
<ubuntu-users at lists.ubuntu.com> wrote:
>
> On Sun, 20 Jun 2021 17:34:52 +0200, Liam Proven wrote:
> >/dev/sda5
>
> Hi Liam,
>
> perhaps sda5 is the culprit?
The real partition was /dev/sdb5 -- I have 2 SSDs fitted.
I managed to sort out this machine's problems at lunchtime today, but
without starting from USB (except to make a dedicated swap partition,
sda, the Windows 10 drive.)
I thought my 2nd SSD was dying, due to some scary error messages, but
I have run `fstrim` on it, and thoroughly checked it, and it seems to
be working now.
I had problems with recent 5.4 kernels -- the default 20.04 kernel.
Eventually I got to the point where I had one old kernel pinned in
Synaptic that worked, and all others complained of a corrupt initrd. I
managed to boot in recovery mode, install the new HWE 5.8 kernel, and
then I had to remove and purge `zram-config` because it was trying to
resume from a now-empty zram "partition". Even this wasn't enough and
left me with a 15min boot process, until I rebuilt my initrd, which is
necessary to purge all traces of the old swap drive.
It has been quite an education.
I've never had problems with zram before, but after this, even on SSDs
I will use a dedicated swap partition.
> Try by UUID
You can specify root by UUID at boot? I didn't know. Very long and
tricky to type correctly, though.
> 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.
This is the problem -- I found the easiest way to fix GRUB in the past
was to boot the kernel off USB, the root FS from hard disk as normal,
and then you can just `apt full-upgrade` and reinstall GRUB without
any special measures.
But the container is an interesting idea -- I can see that might be helpful.
> I'm using syslinux, not
> grub anymore, so I need to google...
Yes, I know. Why is that?
> 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 ;)!
With Thinkpads, you can just press F12 on the POST screen to choose a
boot device. No need to go into the BIOS at all.
--
Liam Proven – Profile: https://about.me/liamproven
Email: lproven at cix.co.uk – gMail/gTalk/gHangouts: lproven at gmail.com
Twitter/Facebook/LinkedIn/Flickr: lproven – Skype: liamproven
UK: +44 7939-087884 – ČR (+ WhatsApp/Telegram/Signal): +420 702 829 053
More information about the ubuntu-users
mailing list