0

I'm running Ubuntu Live USB right now. My SSD has Ubuntu installed on it, but it's having boot issues. I want to login to this SSD so I can run some updates. I was able to do this yesterday but I lost the command I used. I don't want to do this from the Grub screen or full CLI login.

I want to run sudo apt update and some other commands on my SSD, not the Live USB I'm running.

  • 2
    You can run Boot-Repair and its advanced mode to run a chroot. It normally runs just a grub reinstall or optionally a kernel reinstall https://help.ubuntu.com/community/Boot-Repair & https://sourceforge.net/p/boot-repair/home/Home/ Or you can do a full chroot and run any commands you want. http://askubuntu.com/questions/53578/can-i-install-in-uefi-mode-with-the-alternate-installer/57380#57380 If you can get grub menu, you can boot the recovery mode and turn on Internet & use terminal to run any non-gui commands. – oldfred Aug 11 '23 at 02:34
  • 1
    Related: https://askubuntu.com/a/1238393 – Raffa Aug 11 '23 at 07:43

1 Answers1

3

From the comments @oldfred and @Raffa this worked for me.

sudo mount /dev/sda1 /mnt/
sudo mount --bind /proc/ /mnt/proc/
sudo mount --bind /sys/ /mnt/sys/
sudo mount --bind /dev/ /mnt/dev/
sudo mkdir -p /mnt/boot/efi #Create EFI partition mount point
sudo mount /dev/sda1 /mnt/boot/efi
sudo cp /etc/resolv.conf /mnt/etc/resolv.conf
sudo chroot /mnt/
dpkg --configure -a
apt update (no sudo)