Page MenuHomePhorge

Ubuntu
Updated 64 Days AgoPublic

Ubuntu Server installs

Minimal installers

There used to be minimal installers and a python commandline utility to build KVM images. Not Enterprise enough, I suppose.

There is still a minimal ISO, hidden away:

Hide ESM rambling

sudo touch /var/lib/update-notifier/hide-esm-in-motd as per https://askubuntu.com/a/1509911/306954

Notes on chroot'ing from SystemRescueCD or the like

You can mount it like so:

# Mounting a classic MBR/Legacy install
sudo mount /dev/sda1 /mnt
# Or, mounting a UEFI install, you may find the first partition is actually an EFI partition rather than your root. So instead it's more like:
sudo mount  /dev/sda2 /mnt
sudo mount /dev/sda1 /mnt/boot/efi

# Either way, then mount all the devices from the live session
sudo mount --bind /dev /mnt/dev
sudo mount --bind /dev/pts /mnt/dev/pts
sudo mount --bind /proc /mnt/proc
sudo mount --bind /sys /mnt/sys

# And now chroot into a shell in your existing install
sudo chroot /mnt

But if you're fixing GRUB on an EFI system and have booted into SystemRescueCD (or a live Kubuntu USB or such) in UEFI mode you may then find that running grub-install returns

grub-install: warning: EFI variables cannot be set on this system.
grub-install: warning: You will have to complete the GRUB setup manually.

You just need to run grub-install --removable to avoid that, having bootstrapped into this via EFI USB boot was how I got there myself certainly as per https://superuser.com/a/1749282

Hey I have an old 18.04 32-bit install and I wanna bitness crossgrade because reinstallers are cowards

See https://wiki.debian.org/CrossGrading, which builds on https://wiki.debian.org/Multiarch/HOWTO, but I did specifically the following to go from i386 to amd64:

  1. dpkg --add-architecture amd64
  2. apt update
  3. apt install linux-generic:amd64 (rather than linux-image-amd64:amd64)
  4. reboot
  5. apt clean to ensure laziness isn't punished later
  6. apt install libbz2-1.0:amd64 libacl1:amd64 liblzma5:amd64 libgcrypt20:amd64 libsystemd0:amd64 libselinux1:amd64 libzstd1:amd64 for some additional packages needed before...
  7. apt --download-only install dpkg:amd64 tar:amd64 apt:amd64
    1. and hey maybe also apt --download-only install --reinstall dpkg:i386 tar:i386 apt:i386 if you want those around for when the attempted 64-bit install of the package manager fails
  8. dpkg --install /var/cache/apt/archives/*_amd64.deb
  9. dpkg --print-architecture should now return amd64 (and, like, not crash or anything)
  10. apt purge '?obsolete' is recommended by the Debian instructions, didn't need it myself
  11. Now run:
    1. apt-mark showauto | sed -n -e's/:i386$//p' > auto-package-list
    2. apt install $(dpkg -l | awk '$1 ~ /^.i/ && $2 ~ /:i386$/ { sub(":i386", ""); print $2 }')
    3. xargs apt-mark auto < auto-package-list
  12. That results in a state where you now will need to run apt --fix-broken install and hopefully the gods are on your side---apparently they're on mine!
Last Author
keithzg
Last Edited
Oct 17 2024, 8:39 PM