Cannot reboot if a drive named "New Volume" is mounted due to the space character
Cannot reboot if a drive named "New Volume" is mounted due to the space character
I am having an issue with MX Linux.
When I try to reboot, the reboot process fails with an error that it is unable to unmount "New040Volume", then then fails to unmount the rest of the filesystem. I need to REISUB to safely reboot the computer.
Photo of error message: Text of error message:
umount: can't unmount /media/demo/New040Volume: No such file or directory
umount: can't unmount /aufs: Device or resource busy
umount: can't unmount /boot-dev: Device or resource busy
umount: can't unmount /media/demo/New040Volume: No such file or directory
umount: can't unmount /aufs: Device or resource busy
umount: can't unmount /boot-dev: Device or resource busy
umount: can't unmount /media/demo/New040Volume: No such file or directory
umount: can't unmount /aufs: Device or resource busy
umount: can't unmount /boot-dev: Device or resource busy
df: /media/demo/New\040Volume: No such file or directory
When I try to reboot, the reboot process fails with an error that it is unable to unmount "New040Volume", then then fails to unmount the rest of the filesystem. I need to REISUB to safely reboot the computer.
Photo of error message: Text of error message:
umount: can't unmount /media/demo/New040Volume: No such file or directory
umount: can't unmount /aufs: Device or resource busy
umount: can't unmount /boot-dev: Device or resource busy
umount: can't unmount /media/demo/New040Volume: No such file or directory
umount: can't unmount /aufs: Device or resource busy
umount: can't unmount /boot-dev: Device or resource busy
umount: can't unmount /media/demo/New040Volume: No such file or directory
umount: can't unmount /aufs: Device or resource busy
umount: can't unmount /boot-dev: Device or resource busy
df: /media/demo/New\040Volume: No such file or directory
You do not have the required permissions to view the files attached to this post.
Re: Cannot reboot if a drive named "New Volume" is mounted due to the space character
Seems to be one of those famous bugs where someone has missed to handle spaces in filenames/lables properly.Dwedit wrote: Sat Nov 16, 2019 3:56 pm When I try to reboot, the reboot process fails with an error that it is unable to unmount "New040Volume", then then fails to unmount the rest of the filesystem. I need to REISUB to safely reboot the computer.
Photo of error message:
Text of error message:
umount: can't unmount /boot-dev: Device or resource busy
df: /media/demo/New\040Volume: No such file or directory
OK, I can reproduce the un-mount error - but you shall also see a message "Press Enter to reboot", as shown here:
You do not have the required permissions to view the files attached to this post.
Re: Cannot reboot if a drive named "New Volume" is mounted due to the space character
Mine gets stuck there and doesn't proceed to Press Enter to Reboot.
Re: Cannot reboot if a drive named "New Volume" is mounted due to the space character
Thanks for the report!
I think I fixed the space problem. I don't know if there are other problems. You will need to unpack the live initrd, replace the /bin/live-umount script and then repack it.
PS: I'm assuming you're using a full-featured live-usb made with *live-usb-maker. If you are using a read-only live-usb then we cannot change it. But even then you can cp live-umount to /live/bin on the running live system to see if it works for the next shutdown/reboot.
On M-X19 the unpack-initrd script is in /usr/local/bin which should be on your PATH. If you are running an older version of MX then you can find it in /usr/local/lib/cli-shell-utils/bin/ and it should be in /live/bin if you're running live.
You can update the live initrd running live or from a host. It's actually easier to do it live (and far more exciting!)
Download the attached tarball. Unpack it with:
This will give a copy of the new live-umount executable.
When running live, you can update your initrd with these commands:
The cp command should ask you if you want to over-write the file. You should say "yes".
You can also copy the live-umount file to /live/bin to use it for the current shutdown/reboot:
In fact, it might be safer to try this first because this change is not permanent.
Updating the live initrd on a host system
If you want to update the initrd on a host system then you need a copy of the unpack-initrd script. If you don't have one (see above) you could boot the live system and copy the script to your ~/Live-usb-storage/ directory:
Assume the live-usb is mounted at /media/user/live-usb. Then run:
Note: I always use up-arrow to run unpack-initrd the second time. I add the "-r" at the end and the "sudo" at the beginning of the line.
I think I fixed the space problem. I don't know if there are other problems. You will need to unpack the live initrd, replace the /bin/live-umount script and then repack it.
PS: I'm assuming you're using a full-featured live-usb made with *live-usb-maker. If you are using a read-only live-usb then we cannot change it. But even then you can cp live-umount to /live/bin on the running live system to see if it works for the next shutdown/reboot.
On M-X19 the unpack-initrd script is in /usr/local/bin which should be on your PATH. If you are running an older version of MX then you can find it in /usr/local/lib/cli-shell-utils/bin/ and it should be in /live/bin if you're running live.
You can update the live initrd running live or from a host. It's actually easier to do it live (and far more exciting!)
Download the attached tarball. Unpack it with:
Code: Select all
tar xzf live-umount.tgz
When running live, you can update your initrd with these commands:
Code: Select all
unpack-initrd
sudo cp -i live-umount initrd/bin/
sudo unpack-initrd -r
You can also copy the live-umount file to /live/bin to use it for the current shutdown/reboot:
Code: Select all
sudo cp -i live-umount /live/bin
Updating the live initrd on a host system
If you want to update the initrd on a host system then you need a copy of the unpack-initrd script. If you don't have one (see above) you could boot the live system and copy the script to your ~/Live-usb-storage/ directory:
Code: Select all
cp /live/bin/unpack-initrd ~/Live-usb-storage/
Code: Select all
cp /media/user/live-usb/Live-usb-storage/demo/unpack-initrd .
./unpack initrd -f /media/user/live-usb/antiX/initrd.gz
sudo cp -i live-umount initrd/bin
sudo ./unpack-initrd f /media/user/live-usb/antiX/initrd.gz -r
You do not have the required permissions to view the files attached to this post.
"The first principle is that you must not fool yourself -- and you are the easiest person to fool."
-- Richard Feynman
-- Richard Feynman
Re: Cannot reboot if a drive named "New Volume" is mounted due to the space character
also, do not create one folder
with name 'new' ... the word 'new'
can crash complet system...
with name 'new' ... the word 'new'
can crash complet system...
Re: Cannot reboot if a drive named "New Volume" is mounted due to the space character
Nonsense. I have several folders with names containing the word "new". That word has nothing to do with the original issue which is that spaces in a volume's label aren't being handled correctly. The work-around is that when you label a partition don't use spaces in its name, use underscores.bled wrote: Sun Nov 17, 2019 1:56 am also, do not create one folder
with name 'new' ... the word 'new'
can crash complet system...
Please read the Forum Rules, How To Ask For Help, How to Break Your System and Don't Break Debian. Always include your full Quick System Info (QSI) with each and every new help request.
Re: Cannot reboot if a drive named "New Volume" is mounted due to the space character
Just for info.
White space - space & tab - are considered separators between arguments to programs, so must be 'quoted' if used elsewhere.
https://www.tldp.org/LDP/abs/html/special-chars.html
White space - space & tab - are considered separators between arguments to programs, so must be 'quoted' if used elsewhere.
https://www.tldp.org/LDP/abs/html/special-chars.html
(FOSS, Linux, & BSD since 1999)
Re: Cannot reboot if a drive named "New Volume" is mounted due to the space character
Thank you very much, the fixed umount script did indeed resolve the problem that happened due to space characters, and I was able to apply the changes and remaster.
I ran into a minor issue with the "unpack-initrd" script. It was hardcoded to look for "/live/boot-device/antiX", and that's not where my system was installed. It was in "/live/boot-device/antiX-Frugal-4.19.0-6-amd64" instead, but it was easy enough to edit the script to change that. As for why I'd have a frugal install with a non-matching path, It could be because I deleted the root persistance file.
I'm now having another issue.
If I had any SMB/CIFS shares mounted, then rebooting silently freezes with no error messages, and I need to REISUB. I have not tried registering the network share in fstab. It may be happening because the wifi network disconnects before the share is unmounted, but I'm not certain about that.
Steps to reproduce on my system: (open a terminal)
su
cd /mnt
mkdir share
mount.cifs //servername/sharename share
Attempt to reboot.
I ran into a minor issue with the "unpack-initrd" script. It was hardcoded to look for "/live/boot-device/antiX", and that's not where my system was installed. It was in "/live/boot-device/antiX-Frugal-4.19.0-6-amd64" instead, but it was easy enough to edit the script to change that. As for why I'd have a frugal install with a non-matching path, It could be because I deleted the root persistance file.
I'm now having another issue.
If I had any SMB/CIFS shares mounted, then rebooting silently freezes with no error messages, and I need to REISUB. I have not tried registering the network share in fstab. It may be happening because the wifi network disconnects before the share is unmounted, but I'm not certain about that.
Steps to reproduce on my system: (open a terminal)
su
cd /mnt
mkdir share
mount.cifs //servername/sharename share
Attempt to reboot.
Re: Cannot reboot if a drive named "New Volume" is mounted due to the space character
Excellent!Dwedit wrote: Sun Nov 17, 2019 5:47 pm Thank you very much, the fixed umount script did indeed resolve the problem that happened due to space characters, and I was able to apply the changes and remaster.
BTW: you do not need to remaster to save changes made to the initrd.gz file. There are three main files need to boot live and by default they all exist in the /antiX/ directory but this can vary for example if you make an encrypted live-usb. The three files are:
- initrd.gz -- a small "bootstrap" file system for setting up the main file sytem
- linuxfs -- the main file system, compressed
- vmlinuz -- the kernel
That is what the -f (--file) command line parameter is for. IMO that's much better than hard-coding the change. YMMV. If you're running live I could also look in the /live/config/initrd.out file to try to find the location.I ran into a minor issue with the "unpack-initrd" script. It was hardcoded to look for "/live/boot-device/antiX", and that's not where my system was installed. It was in "/live/boot-device/antiX-Frugal-4.19.0-6-amd64" instead, but it was easy enough to edit the script to change that.
Whatever works for you. We tried to make the system very flexible with regard to the boot directory.As for why I'd have a frugal install with a non-matching path, It could be because I deleted the root persistance file.
Can you use <ctrl><alt><F1> to switch to the first virtual console and see what is printed out there? This might give us a clue to where the problem is. You could also add the "uverb=7" boot parameter to get more printed out during shutdown.I'm now having another issue.
If I had any SMB/CIFS shares mounted, then rebooting silently freezes with no error messages, and I need to REISUB. I have not tried registering the network share in fstab. It may be happening because the wifi network disconnects before the share is unmounted, but I'm not certain about that.
Steps to reproduce on my system: (open a terminal)
su
cd /mnt
mkdir share
mount.cifs //servername/sharename share
Attempt to reboot.
"The first principle is that you must not fool yourself -- and you are the easiest person to fool."
-- Richard Feynman
-- Richard Feynman
Re: Cannot reboot if a drive named "New Volume" is mounted due to the space character
I saw no errors on the first terminal, but I'll take a photo anyway.
There's a screen clear that happens during shutdown, so all I have is what's left on the screen.
Will I need to capture the contents of the screen just before the screen clear?
There's a screen clear that happens during shutdown, so all I have is what's left on the screen.
Will I need to capture the contents of the screen just before the screen clear?
You do not have the required permissions to view the files attached to this post.
Last edited by Dwedit on Sun Nov 17, 2019 7:54 pm, edited 1 time in total.