Please read this before reporting a bug:
https://wiki.archlinux.org/title/Bug_reporting_guidelines
Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.
REPEAT: Do NOT report bugs for outdated packages!
https://wiki.archlinux.org/title/Bug_reporting_guidelines
Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.
REPEAT: Do NOT report bugs for outdated packages!
FS#31563 - [initscripts] Shutdown Dismount Fails with Space Char
Attached to Project:
Arch Linux
Opened by Dave (DaveCode) - Saturday, 15 September 2012, 21:57 GMT
Last edited by Tom Gundersen (tomegun) - Tuesday, 13 November 2012, 13:20 GMT
Opened by Dave (DaveCode) - Saturday, 15 September 2012, 21:57 GMT
Last edited by Tom Gundersen (tomegun) - Tuesday, 13 November 2012, 13:20 GMT
|
DetailsDescription:
Arch OS USB flash stick with a spare VFAT partition automounted at boot time. VFAT mount point has a space in its name. Shutdown dismount task fails over the space char and reports failure to user. Additional info: Made fresh install of Arch to a USB flash stick from latest installer ISO dated 2012.09.07 Steps to reproduce: Partition a USB flash stick with ext2 for system, VFAT for the rest of free space. Total of two partitions, standard PC BIOS partition table (cfdisk). Install Arch Linux from ISO to flash stick. No GUIs or fanciness, just terminal stuff. Use ext2 on the 1st (Arch system) partition. Make a VFAT filesystem on the 2nd partition. mkdir a folder like "/Flash\ Stick/" on the stick's 1st ext2 system partition as mount point for 2nd VFAT partition. In fstab, use 'auto' for automount of the 2nd partition, and the usual \040 for the mount point's space char. Now restart. "/Flash\ Stick" works fine at this point. Now shutdown. Watch the scrolling notices carefully. You'll catch the faiure from umount. It reports something like, no such folder "/Flash" cut at the space char. |
This task depends upon
Closed by Tom Gundersen (tomegun)
Tuesday, 13 November 2012, 13:20 GMT
Reason for closing: Fixed
Additional comments about closing: in git
Tuesday, 13 November 2012, 13:20 GMT
Reason for closing: Fixed
Additional comments about closing: in git
1. VFAT
2. ext2
Reason for VFAT first is to read stick on Mac/Win systems which prefer/need it first. Don't know that it matters for the bug but duly noted. Thanks all.
*** 645,652 ****
umount_all() {
# $1: restrict to fstype
! findmnt -mrunRo TARGET,FSTYPE,OPTIONS / | {
! while read -r target fstype options; do
# match only targeted fstypes
if [[ $1 && $1 != "$fstype" ]]; then
continue
--- 645,652 ----
umount_all() {
# $1: restrict to fstype
! findmnt -mrunRo FSTYPE,OPTIONS,TARGET / | {
! while read -r fstype options target; do
# match only targeted fstypes
if [[ $1 && $1 != "$fstype" ]]; then
continue
I have not tested it but I think it should fix it.
--- functions.orig 2012-10-21 15:36:27.729225154 +0200
+++ functions 2012-10-21 15:37:53.169255242 +0200
@@ -645,6 +645,8 @@ umount_all() {
findmnt -mrunRo TARGET,FSTYPE,OPTIONS / | {
while read -r target fstype options; do
+ # interpret the ascii chars, such as \x20 (space)
+ target=`echo -e $target`
# match only targeted fstypes
if [[ $1 && $1 != "$fstype" ]]; then
continue
1) Implement recursive umount in libmount and/or umount (i.e. we could just do umount -R -t tmpfs /; umount -R /).
2) Add an unmangle function[0] which only respects octal and hex escapes.
3) Reorder the output columns to the findmnt call, ditch the '-r' flag, and hope that options never contains a space (they can).
[0] https://github.com/falconindy/arch-install-scripts/blob/master/common#L69