--- trunk/mkinitrd-magellan/mkinitrd.in 2012/04/02 11:28:14 1791 +++ trunk/mkinitrd-magellan/mkinitrd.in 2012/04/02 11:39:05 1792 @@ -754,7 +754,16 @@ add_initrd 'mount -t proc proc /proc' add_initrd 'mount -t sysfs sysfs /sys' -add_initrd 'mount -t tmpfs tmpfs /dev -o rw,mode=0644,size=1024' +add_initrd "if [[ -z \$(grep '[[:space:]]/dev[[:space:]]' /proc/mounts | cut -d ' ' -f2) ]]" +add_initrd 'then' +add_initrd ' # many video drivers needed exec access' +add_initrd ' fstype=ramfs' +add_initrd ' # tmpfs was suggested by Greg Kroah-Hartman' +add_initrd " [[ \$(grep '[[:space:]]tmpfs' /proc/filesystems | cut -d \$'\\t' -f2) = tmpfs ]] && fstype=tmpfs" +add_initrd ' # mount devtmpfs if supported' +add_initrd " [[ \$(grep '[[:space:]]devtmpfs' /proc/filesystems | cut -d \$'\\t' -f2) = devtmpfs ]] && fstype=devtmpfs" +add_initrd ' mount -t ${fstype} dev /dev -o exec,nosuid,mode=0755,size=10M' +add_initrd 'fi' [[ ${IMAGE_TYPE} = loopback ]] && add_initrd 'mount -t ramfs -o remount,rw /dev/ram /'