loading...

how to mount another drive and install updates

jaeyson profile image Jaeyson Anthony Y. ・1 min read

Few months ago my 9-year-old motherboard died of natural cause, leaving my ssd drive (ubuntu 18) and the rest of parts working. How can I install updates to it?

1. Check mount point of [external] drive

If you don't see a mount point of your external drive (e.g. /dev/sdc1)

# either check the mount points via
sudo lsblk -f

# or
sudo fdisk -l
Enter fullscreen mode Exit fullscreen mode

lsblk

Mine's showing /dev/sdc1 so we'll use that as mount point example. Otherwise skip step 1

2. Mount drive (sudoer user)

sudo mount /dev/sdc1 /mnt

# bind
sudo mount --bind /dev /mnt/dev
sudo mount --bind /sys /mnt/sys
sudo mount --bind /proc /mnt/proc
sudo mount --bind /run /mnt/run

sudo chroot /mnt
Enter fullscreen mode Exit fullscreen mode

3. Install updates

Add -S for reading standard input instead of /dev/tty

sudo -S apt update
Enter fullscreen mode Exit fullscreen mode

mount

Discussion

pic
Editor guide