I have a machine with a single SSD and 3 partitions. I want to unmount the entire SSD while staying live so that I can run a firmware upgrade tool on the SSD. I know that unmounting your only disk is not recommended but I figure this is okay in my case since my rootfs is a squashfs which loaded into memory during boot, and the kernel, theoretically, is also mounted in memory. That's why I believe we can unmount all partitions, run the firmware upgrade, and then reboot the system to get back to normal state.
My problem: I cannot unmount
I am able to unmount
sda2 (storage space) and
sda3 (where some log files are stashed) after repeatedly running the following 2-3 times:
fuser -mv /dev/sda1 -k -9 fuser -mv /dev/sda2 -k -9 fuser -mv /dev/sda3 -k -9 umount -f /dev/sda1 umount -f /dev/sda2 umount -f /dev/sda3
At that point, running
fuser -mv /dev/sda1 fuser -mv /dev/sda2 fuser -mv /dev/sda3
produces the output
USER PID ACCESS COMMAND /dev/sda1: root kernel mount /boot
That tells me that the
sda3 unmounted successfully but that kernel does not want to let go of the
sda1. No matter what I try,
sda1 does not unmount
I have also tried to kill the only process linked to sda1 through:
$ ps -ef | grep sda root 423 2 0 00:19 ? 00:00:00 [jbd2/sda1-8] $ kill -9 423
but no luck there either.
Note: I can't use any other hardware like a USB stick to help throughout the process.
lsblk produces the following
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT sda 8:0 0 3.8G 0 disk |-sda2 8:2 0 1.9G 0 part |-sda3 8:3 0 949.2M 0 part `-sda1 8:1 0 957M 0 part /boot