From 122114fc5d2828993afc44c17b5c5f5069b44cff Mon Sep 17 00:00:00 2001 From: Ulrich Dangel Date: Sun, 8 Jan 2012 12:25:00 +0100 Subject: [PATCH] Support 9p-virtio filesystem for mounting the DCS-directory. This patch allows to use exported directories via 9p-virtio to be used as DCS-directory. This allows customization of standard Grml ISO images in virtualized environments without the need to adjust anything or create specialized blockdevices/floppy images. For a short introduction about using 9p with qemu/kvm see http://wiki.qemu.org/Documentation/9psetup --- autoconfig.functions | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/autoconfig.functions b/autoconfig.functions index 23eee82..5a25040 100755 --- a/autoconfig.functions +++ b/autoconfig.functions @@ -1512,6 +1512,17 @@ else fi fi DCSDEVICE=$(blkid -t LABEL=$GRMLCFG | head -1 | awk -F: '{print $1}') + + modprobe 9p 2>/dev/null || true + if [ -z "$DCSDEVICE" ] && grep -q 9p /proc/filesystems ; then + if grep -q "$GRMLCFG" /sys/bus/virtio/devices/*/mount_tag 2>/dev/null ; then + einfo "Found 9p-virtio fs with mount_tag $GRMLCFG" + DCSDEVICE="$GRMLCFG" + MOUNTOPTIONS="ro,trans=virtio" + DCSFS="9p" + fi + fi + if [ -n "$DCSDEVICE" ]; then DCSMP="/mnt/grmlcfg" fi -- 2.1.4