Skip to content

fixing initrd mounts w/ spaces fail to move to real rootfs

Arsalan Awan poky 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest1 patch 2 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/1initrdscripts/init-live.sh: fix mounts w/ spaces fail to move to real rootfsmeta/recipes-core/initrdscripts/files/init-live.sh+5 -22 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/1] fixing initrd mounts w/ spaces fail to move to real rootfs

From: "Arsalan H. Awan" <[email protected]>

When there are spaces in the mount points of devices e.g.:

a partition mounted at "/run/media/My Root Partition-sda1",

the initrd fails to move such mount points over to the corresponding directories at /media under the real root filesystem, and the mount points would appear at the same location as they were mounted on when detected by initrd, for example:
here: "/run/media/My Root Partition-sda1"
instead of here: "/media/My Root Partition-sda1"

This causes issues such as:

* The disks/partitions cannot be formated with any filesystem using e.g. mkfs.ext4 or mke2fs in general. When tried to do so by making sure the device is not mounted, it failed with errors such as:

> /dev/sda1 is apparently in use by the system; will not make a
filesystem here!
> /dev/sda1: Device or resource busy while setting up superblock

* The read/write operations become extremely slow. e.g. Under testing, it took approx. 2 hours just to copy 700 MB of data to the partition, and it took more than 40 minutes to delete that data from it. Same operations took under 5 minutes on a partition that had no spaces in its mount point (or that was successfully moved to real root by initrd and appeared under /media instead of /run/media).

This commit fixes such issues by quoting the arguments of failing mount move commands and by parsing OCT or HEX encoded special characters such as spaces to ASCII charecters in the mount points as kernel populates the procfs like so.

The following changes since commit 13c465663d0d1835773fb30baba345396cf0906e:

documentation: Updated manual revision tables with 2.2.4 release date (2018-05-24 17:23:02 +0100)

are available in the git repository at:

git://push.yoctoproject.org/poky-contrib ArsalanHAwan/initrdscripts-init-live

Arsalan H. Awan (1):
initrdscripts/init-live.sh: fix mounts w/ spaces fail to move to real
rootfs

 meta/recipes-core/initrdscripts/files/init-live.sh | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)
Signature · 1 line
2.7.4