diff options
author | Dave Reisner <dreisner@archlinux.org> | 2011-11-06 01:05:16 +0100 |
---|---|---|
committer | Dave Reisner <dreisner@archlinux.org> | 2011-11-15 01:11:09 +0100 |
commit | c06a144a66ec24b9e2b4fd52c9abd655f352f685 (patch) | |
tree | 4fbf2dc8a3c9b71118a22c3c41faa7f521c84638 | |
parent | 0d46d5cdd93ad1086ceb023876d3d071f3148db7 (diff) | |
download | mkinitcpio-c06a144a66ec24b9e2b4fd52c9abd655f352f685.tar.gz mkinitcpio-c06a144a66ec24b9e2b4fd52c9abd655f352f685.tar.xz |
init: use util-linux's /bin/mount
Providing this means we no longer need blkid for FS detection, as mount
will do this for us. Adds a slight bloat to the image, in exchange for a
huge convenience. Messaging is changed to assume that /bin/mount will
provide useful feedback for us on failure.
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
-rw-r--r-- | init_functions | 15 | ||||
-rw-r--r-- | install/base | 3 |
2 files changed, 5 insertions, 13 deletions
diff --git a/init_functions b/init_functions index 7dd0968..33a749f 100644 --- a/init_functions +++ b/init_functions @@ -117,23 +117,12 @@ default_mount_handler() { msg "Trying to continue (this will most likely fail) ..." fi fi - # We didn't build filesystem support into busybox, - # instead we use util-linux's blkid for best compatibility - fstype=${rootfstype:-$(blkid -u filesystem -o value -s TYPE -p "$root")} - if [ -z "$fstype" ]; then - err "Unable to determine the file system type of ${root}:" - echo "Either it contains no filesystem, an unknown filesystem," - echo "or more than one valid file system signature was found." - echo - echo "Try adding" - echo " rootfstype=your_filesystem_type" - echo "to the kernel command line." - echo + + if ! mount ${fstype:+-t $fstype} -o ${rwopt:-ro}${rootflags:+,$rootflags} "$root" "$1"; then echo "You are now being dropped into an emergency shell." launch_interactive_shell msg "Trying to continue (this will most likely fail) ..." fi - mount ${fstype:+-t $fstype} -o ${rwopt:-ro}${rootflags:+,$rootflags} "$root" "$1" } # vim: set ft=sh ts=4 sw=4 et: diff --git a/install/base b/install/base index 1f2b3b8..3d18fe0 100644 --- a/install/base +++ b/install/base @@ -8,6 +8,9 @@ build() { add_binary /lib/initcpio/busybox /bin/busybox add_binary /sbin/modprobe add_binary /sbin/blkid + add_binary /bin/mount + + add_symlink "/etc/mtab" "/proc/self/mounts" add_file "/lib/initcpio/init_functions" "/init_functions" add_file "/lib/initcpio/init" "/init" |