Among other things, many parts of Debian-installer want /proc/mounts. Implementing it the right way is non-trivial, though. In the meantime, we publish a symlink to /etc/mtab so that the user can fake it in whatever way they want. Furthermore I hope to be porting busybox mount soon, and use it to manage the mtab in d-i.
Signed-off-by: Jeremie Koenig <j...@jk.fr.eu.org> --- procfs_dir.c | 3 +++ procfs_nonpid_files.c | 13 +++++++++++++ 2 files changed, 16 insertions(+), 0 deletions(-) diff --git a/procfs_dir.c b/procfs_dir.c index 598b2e3..f99f402 100644 --- a/procfs_dir.c +++ b/procfs_dir.c @@ -657,6 +657,9 @@ procfs_fill_root_dir(struct procfs_dir *dir, time_t timestamp) if ((err = procfs_create_cmdline (dir, &node, timestamp)) != 0) return err; + if ((err = procfs_create_mounts (dir, &node, timestamp)) != 0) + return err; + return 0; } diff --git a/procfs_nonpid_files.c b/procfs_nonpid_files.c index 2041610..e64d7be 100644 --- a/procfs_nonpid_files.c +++ b/procfs_nonpid_files.c @@ -179,6 +179,19 @@ error_t procfs_create_cmdline (struct procfs_dir *dir, return err; } +error_t procfs_create_mounts (struct procfs_dir *dir, + struct node **node, + time_t timestamp) +{ + struct procfs_dir_entry *dir_entry; + int err; + + dir_entry = update_pid_entries (dir, "mounts", timestamp, "/etc/mtab"); + err = procfs_create_node (dir_entry, "mounts", node); + + return err; +} + error_t get_uptime (struct timeval *uptime) { struct timeval boot_time, now; -- 1.7.1