From 86f3e9f5dc13e69a847ed8105557d8f0e384cd7d Mon Sep 17 00:00:00 2001 From: Trammell Hudson Date: Mon, 17 Jul 2017 12:22:48 -0400 Subject: [PATCH] add /boot and /media to /etc/fstab on startup (issue #220) --- initrd/init | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/initrd/init b/initrd/init index 20bbbc31..c795d738 100755 --- a/initrd/init +++ b/initrd/init @@ -29,6 +29,15 @@ hwclock -l -s . /etc/functions . /etc/config +# Add our boot devices into the /etc/fstab, if they are defined +# in the configuration file. +if [ ! -z "$CONFIG_BOOT_DEV" ]; then + echo >> /etc/fstab "$CONFIG_BOOT_DEV /boot auto defaults,ro 0 0" +fi +if [ ! -z "$CONFIG_USB_BOOT_DEV" ]; then + echo >> /etc/fstab "$CONFIG_USB_BOOT_DEV /media auto defaults,ro 0 0" +fi + if [ ! -x "$CONFIG_BOOTSCRIPT" ]; then recovery 'Boot script missing? Entering recovery shell' # just in case...