]> gitweb.fluxo.info Git - hydra.git/commitdiff
Set proper /boot device at fstab during provision
authorSilvio Rhatto <rhatto@riseup.net>
Mon, 21 Sep 2015 01:26:21 +0000 (22:26 -0300)
committerSilvio Rhatto <rhatto@riseup.net>
Mon, 21 Sep 2015 01:26:21 +0000 (22:26 -0300)
share/hydractl/provision

index 9bd8aac922aeb69380ab6b9e5fb77e673b54bb4d..e2ebbd9ecff9146548978c8d44f9e450828a7f82 100755 (executable)
@@ -150,6 +150,7 @@ hydra_safe_run parted -s -- $device set 3 lvm  on
 # Use absolute paths for devices.
 boot_device="$device"2
 syst_device="$device"3
+reboot_device="`blkid | grep ^$boot_device: | cut -d ' ' -f 2 | sed -e 's/"//g'`"
 
 # Create volumes.
 echo "Creating the needed disk volumes..."
@@ -366,7 +367,7 @@ if [ "$grub" == "y" ]; then
   echo "Boot device setup..."
   hydra_safe_run mkfs.ext4 $boot_device
   hydra_safe_run mount $boot_device /tmp/debootstrap/boot
-  echo "$boot_device /boot ext4 defaults,errors=remount-ro 0 2" >> /tmp/debootstrap/etc/fstab
+  echo "$reboot_device /boot ext4 defaults,errors=remount-ro 0 2" >> /tmp/debootstrap/etc/fstab
 
   echo "Setting up GRUB..."
   hydra_safe_run chroot /tmp/debootstrap/ apt-get install grub-pc -y