From 6219ad79171e00a841353ec88bb0fdf59afd32c0 Mon Sep 17 00:00:00 2001 From: Lucas Alvares Gomes Date: Wed, 5 Jun 2013 11:44:32 +0100 Subject: [PATCH] Change the rootfs label in fedora's /etc/fstab. The images produced by the diskimage-builder have their filesystem with a label of "cloudimg-rootfs", so we need to change the default /etc/fstab on fedora to reflect that. Change-Id: Id1bb00cb81cb200a114f500e26272624be577da0 --- elements/fedora/post-install.d/05-fstab-rootfs-label | 4 ++++ elements/vm/finalise.d/51-grub | 2 -- 2 files changed, 4 insertions(+), 2 deletions(-) create mode 100755 elements/fedora/post-install.d/05-fstab-rootfs-label diff --git a/elements/fedora/post-install.d/05-fstab-rootfs-label b/elements/fedora/post-install.d/05-fstab-rootfs-label new file mode 100755 index 00000000..4825aad7 --- /dev/null +++ b/elements/fedora/post-install.d/05-fstab-rootfs-label @@ -0,0 +1,4 @@ +#!/bin/bash + +# Fedora sets up for root to have a label of "_/" +sed -i "s%LABEL=_/%LABEL=cloudimg-rootfs%" /etc/fstab diff --git a/elements/vm/finalise.d/51-grub b/elements/vm/finalise.d/51-grub index b6bfbbba..4880f4d1 100755 --- a/elements/vm/finalise.d/51-grub +++ b/elements/vm/finalise.d/51-grub @@ -53,8 +53,6 @@ fi sed -i "s%$PART_DEV%LABEL=cloudimg-rootfs%" $GRUB_CFG sed -i "s%search --no-floppy --fs-uuid --set=root .*$%search --no-floppy --set=root --label cloudimg-rootfs%" $GRUB_CFG sed -i "s%root=UUID=[A-Za-z0-9\-]*%root=LABEL=cloudimg-rootfs%" $GRUB_CFG -# Fedora sets up for root to have a label of "_/" -sed -i "s%LABEL=_/%LABEL=cloudimg-rootfs%" /etc/fstab if [ $DIST = 'Fedora' ] ; then # enable serial console sed -i "s%LABEL=cloudimg-rootfs%LABEL=cloudimg-rootfs console=tty0 console=ttyS0,115200%" $GRUB_CFG