DEV Community

Jaeyson Anthony Y.
Jaeyson Anthony Y.

Posted on

1 2

how to mount another drive and install updates

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

Heroku

Simplify your DevOps and maximize your time.

Since 2007, Heroku has been the go-to platform for developers as it monitors uptime, performance, and infrastructure concerns, allowing you to focus on writing code.

Learn More

Top comments (0)

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more