On Sun, Sep 7, 2014 at 1:11 AM, Dylan Cali <[email protected]> wrote:
> So it would probably be better to either remove the attempt entirely
> and print a suitable error, or fully support it.
It turns out the cryptic 'mount failed: No such file or directory'
error is because /etc/mtab is a symlink to /proc/self/mounts instead
of a regular file. Changing mtab to a regular file results in the much
more user friendly:
mount: can't find /run in /etc/fstab
mount: can't find /proc in /etc/fstab
mount: can't find /sys in /etc/fstab
Since you don't want to support auto-mounting the virtual filesystems,
what about changing mtab to be a regular file in Section 6.6, so a
clearer error is produced? And then also remove the hardcoded mount
options in the boot script:
--- lfs/etc/init.d/mountvirtfs.orig 2014-09-06 17:04:40.634926001 -0500
+++ lfs/etc/init.d/mountvirtfs 2014-09-07 02:43:06.842926001 -0500
@@ -43,17 +43,17 @@
if ! mountpoint /proc >/dev/null; then
log_info_msg2 " ${INFO}/proc"
- mount -o nosuid,noexec,nodev /proc || failed=1
+ mount /proc || failed=1
fi
if ! mountpoint /sys >/dev/null; then
log_info_msg2 " ${INFO}/sys"
- mount -o nosuid,noexec,nodev /sys || failed=1
+ mount /sys || failed=1
fi
if ! mountpoint /dev >/dev/null; then
log_info_msg2 " ${INFO}/dev"
- mount -o mode=0755,nosuid /dev || failed=1
+ mount /dev || failed=1
fi
# Copy devices that Udev >= 155 doesn't handle to /dev
--
http://lists.linuxfromscratch.org/listinfo/lfs-dev
FAQ: http://www.linuxfromscratch.org/faq/
Unsubscribe: See the above information page