diff --git a/contrib/fedora/nm-live-vm/nm-make-script.sh b/contrib/fedora/nm-live-vm/nm-make-script.sh index 34ee49cd79..79e1dff869 100755 --- a/contrib/fedora/nm-live-vm/nm-make-script.sh +++ b/contrib/fedora/nm-live-vm/nm-make-script.sh @@ -50,4 +50,7 @@ domains=ALL EOF /bin/systemctl enable NetworkManager.service || exit 1 +mkdir /mnt/sda1 +echo "/dev/sda1 /mnt/sda1 vfat defaults 1 2" >> /etc/fstab + git gc diff --git a/contrib/fedora/nm-live-vm/run.sh b/contrib/fedora/nm-live-vm/run.sh index 7a5acbb7c1..cb8b6db7c4 100755 --- a/contrib/fedora/nm-live-vm/run.sh +++ b/contrib/fedora/nm-live-vm/run.sh @@ -8,6 +8,11 @@ if [ -f /etc/redhat-release ]; then OS=`cat /etc/redhat-release | cut -d" " -f1,2,3,4` fi +DIR="$(dirname "$(readlink -f "$0")")" +SDIR="$DIR/share" + +mkdir "$SDIR" + if [ "$OS" == "Red Hat Enterprise Linux" ]; then # qemu-kvm is installed in /usr/libexec on RHEL6 # and redirects its output to VNC server @@ -31,5 +36,5 @@ else QEMU="qemu-system-$ARCH -enable-kvm" } - $QEMU -m 2048 -net nic $NET_OPTIONS -kernel vmlinuz -append "video=1024x768 rootfstype=ramfs" -initrd initramfs.img + $QEMU -m 2048 -net nic $NET_OPTIONS -drive "file=fat:rw:$SDIR,cache=none" -kernel vmlinuz -append "video=1024x768 rootfstype=ramfs" -initrd initramfs.img fi