Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migration script Pi4 - umount: /boot: target is busy. #6819

Closed
KapriQ opened this issue Dec 25, 2023 · 7 comments
Closed

Migration script Pi4 - umount: /boot: target is busy. #6819

KapriQ opened this issue Dec 25, 2023 · 7 comments
Labels
Raspberry Pi Solution available 🥂 Definite solution has been done
Milestone

Comments

@KapriQ
Copy link

KapriQ commented Dec 25, 2023

Details:

  • Date | Mon Dec 25 15:58:41 CET 2023
  • DietPi version | v8.25.1 (MichaIng/beta)
  • Image creator |
  • Pre-image |
  • Hardware | RPi 4 Model B (aarch64) (ID=4)
  • Kernel version | Linux pi 6.1.21-v8+ #1642 SMP PREEMPT Mon Apr 3 17:24:16 BST 2023 aarch64 GNU/Linux
  • Distro | bookworm (ID=7,RASPBIAN=0)
  • Command | umount /boot
  • Exit code | 32
  • Software title | dietpi-rpi-firmware-migration

Steps to reproduce:

  1. ...
  2. ...

Expected behaviour:

  • ...

Actual behaviour:

  • ...

Extra details:

  • ...

Additional logs:

umount: /boot: target is busy.
----------------
[FAILED] dietpi-rpi-firmware-migration | Unable to continue, dietpi-rpi-firmware-migration will now terminate.
rm: cannot remove '/tmp/dietpi-rpi-firmware-migration/rootfs/tmp': Device or resource busy
rm: cannot remove '/tmp/dietpi-rpi-firmware-migration/rootfs/run': Device or resource busy
rm: cannot remove '/tmp/dietpi-rpi-firmware-migration/rootfs/proc': Device or resource busy
rm: cannot remove '/tmp/dietpi-rpi-firmware-migration/rootfs/sys': Device or resource busy
rm: cannot remove '/tmp/dietpi-rpi-firmware-migration/rootfs/mnt/dietpi_userdata/docker-data/overlay2/6663d3cec446046df41bb8ea20d244251bf4fed52c0395a9f01518c78fe0a58b/merged': Device or resource busy


@MichaIng
Copy link
Owner

Probably there was a concurrent cron job execution.

Oh, I see we need to unmount the temporary rootfs mount on failure. Please run umount /tmp/dietpi-rpi-firmware-migration/rootfs && rm -R /tmp/dietpi-rpi-firmware-migration before retrying the script.

If it fails again please check e.g. via htop which other process runs and accesses files in /boot.

@KapriQ
Copy link
Author

KapriQ commented Dec 25, 2023

Gonna try it. And let you know the results. Thx bro.

@KapriQ
Copy link
Author

KapriQ commented Dec 25, 2023

root@pi:~# umount /tmp/dietpi-rpi-firmware-migration/rootfs && rm -R /tmp/dietpi-rpi-firmware-migration umount: /tmp/dietpi-rpi-firmware-migration/rootfs: no mount point specified.
After i run script, the same issue: umount: /boot: target is busy.

So I have tried to add -l to umount. And now it is running. "umount -l ...."

...
Script FINISHED. Gonna try to put SD Card to Pi5- ... ALL DONE! Wroking ...

@MichaIng
Copy link
Owner

MichaIng commented Dec 25, 2023

It generally makes sense to check which process actually accesses /boot, before breaking something potentially unintended 😉. Usually nothing but our scripts and APT commands should access this mount point.

However, whatever it was should continue as before after a reboot.

@terminet85
Copy link

Check if vmtouch is holding the dietpi.txt

ps aux | grep vmtouch

lsof -c vmtouch

If there is match stop vmtouch

systemctl stop vmtouch.service

@MichaIng
Copy link
Owner

Oh right, we used vmtouch a long time ago when removing the /boot tmpfs. I'll have a look whether we can identify our build/config and in case remove it. Something like:

[[ -f '/etc/default/vmtouch' ]] && grep -q dietpi /etc/default/vmtouch && G_AGP vmtouch

@MichaIng MichaIng added Solution available 🥂 Definite solution has been done and removed Investigating 🤔 labels Apr 4, 2024
@MichaIng MichaIng added this to the v9.3 milestone Apr 4, 2024
MichaIng added a commit that referenced this issue Apr 4, 2024
- DietPi-Patches | Purge ancient vmtouch which prevents /boot from being unmounted e.g. for RPi firmware migration: #6819, #6976
@MichaIng
Copy link
Owner

MichaIng commented Apr 4, 2024

vmtouch is now purged for everyone, if it is this old DietPi-RAMdisk replacement: bdf526f

@MichaIng MichaIng closed this as completed Apr 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Raspberry Pi Solution available 🥂 Definite solution has been done
Projects
None yet
Development

No branches or pull requests

3 participants