Failed to unmount /oldroot/dev warning during the shutdown or restart
After Upgrading from 18.04 to 20.04 I've notices several warnings during shutdown or reboot like:
Failed to unmount /oldroot: Device or Resource busy
Failed to unmount /oldroot/dev/pts: Device or Resource busy
Failed to unmount /oldroot/dev: Device or Resource busy
Failed to unmount /oldroot/sys: Device or Resource busy
Sometimes it's visible on the screen, sometimes it's covered by the splash.
I cannot find anything related using journalctl or logs, the only thing I've found is:
abr 23 22:24:36 vanburen07-G5-5590 sudo[6451]: vanburen07 : TTY=pts/0 ; PWD=/home/vanburen07 ; USER=root ; COMMAND=/bin/umount /oldroot/dev/pts
There's nothing specific in fstab:
<file system> <mount point> <type> <options> <dump> <pass>
# / was on /dev/nvme0n1p3 during installation
UUID=063c6892-66d6-4598-9dcf-82136ad4ea81 / ext4 errors=remount-ro 0 1
# /boot/efi was on /dev/nvme0n1p1 during installation
UUID=C000-EAB9 /boot/efi vfat umask=0077 0 1
/swapfile none swap sw 0 0
The only thing I was able to find were on Arch/Manajaro forums and the suggested workaround is to modify a file that doesn't esxist in Ubuntu: /etc/mkinitcpio.conf
I don't think this is a huge issue as it doesn't cause visible crush or even error in syslogs but yet it'd be nice to know the reason.
Hope this will help. I think it is because of the unused kernel because I have upgraded my ubuntu from 18.04 LTS to 20.04 LTS and in few days after that I encountered the problem during shutdown and restart.
Just remove all unused kernels without doing clean re installation of the system, just visit this link on removing unused kernels --> https://www.cyberciti.biz/faq/ubuntu-18-04-remove-all-unused-old-kernels/
God Bless everyone.
This happened to me too after switching motherboards. It turns out that a MBR compatibility setting was hidden inside the Windows submenu (that I skipped initially) which seems to cause this.
After changing these settings, the error disappeared:
-
BIOS>Settings>Boot>Boot Mode Select [LEGACY+UEFI]
set toUEFI
-
BIOS>Settings>Advanced>Windows OS Configuration>BIOS UEFI/CSM Mode
set toUEFI