updating prep to make use of fs labels

This commit is contained in:
Matthew Thode 2016-01-12 20:51:12 -06:00
parent 6a1a502eae
commit c822bfa3fb
No known key found for this signature in database
GPG key ID: 64A37BEAAE19A4E8

View file

@ -20,11 +20,11 @@ echo 'vm.swappiness = 0' >> /etc/sysctl.conf
mkdir /boot/grub
echo 'GRUB_CMDLINE_LINUX="console=tty0 console=ttyS0,115200n8"' >> /etc/default/grub
grub2-mkconfig -o /boot/grub/grub.cfg
sed -r -i 's/loop[0-9]+p1/vda2/g' /boot/grub/grub.cfg
sed -i 's/root=.*\ ro/root=\/dev\/vda2\ ro/' /boot/grub/grub.cfg
sed -r -i 's/loop[0-9]+p1/LABEL\=cloudimg-rootfs/g' /boot/grub/grub.cfg
sed -i 's/root=.*\ ro/root=LABEL\=cloudimg-rootfs\ ro/' /boot/grub/grub.cfg
# And the fstab
echo '/dev/vda2 / ext4 defaults 0 0' > /etc/fstab
echo 'LABEL=cloudimg-rootfs / ext4 defaults 0 0' > /etc/fstab
# allow the console log
sed -i 's/#s0/s0/g' /etc/inittab