always overwrite the root= kernel boot parameter

This commit is contained in:
Matthew Thode 2015-12-28 23:09:25 -06:00
parent 3d847f917f
commit 11ebf1d11e
No known key found for this signature in database
GPG key ID: 64A37BEAAE19A4E8

View file

@ -21,7 +21,7 @@ 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/UUID=[a-z,0-9,-]*/\/dev\/vda2/g' /boot/grub/grub.cfg
sed -i 's/root=.*\ ro/root=\/dev\/vda2\ ro/' /boot/grub/grub.cfg
# And the fstab
echo '/dev/vda2 / ext4 defaults 0 0' > /etc/fstab