chiark / gitweb /
libvirt thing has no swap partition
authorfdroid on solaria <fdroid@solaria.relativity.greenend.org.uk>
Sat, 5 May 2018 11:29:54 +0000 (12:29 +0100)
committerfdroid on solaria <fdroid@solaria.relativity.greenend.org.uk>
Sat, 5 May 2018 11:29:54 +0000 (12:29 +0100)
Vagrantfile

index 9f70fe03ba773da65561c7eca3b044066852574f..53382e0d245b0ecacc91b0ac07ae6aa82cf68767 100644 (file)
@@ -9,18 +9,18 @@ Vagrant.configure("2") do |config|
   config.vm.provision "shell", inline: <<-SHELL
     set -e
     sudo egrep . /proc/partitions /proc/swaps
-    sudo apt-get update && sudo apt-get install -y parted
-    sudo swapoff /dev/sda5 # disable swap so we can then remove the partition
-    sudo parted /dev/sda rm 5 rm 2 # remove swap and extended partition
+    #sudo apt-get update && sudo apt-get install -y parted
+    #sudo swapoff /dev/sda5 # disable swap so we can then remove the partition
+    #sudo parted /dev/sda rm 5 rm 2 # remove swap and extended partition
     # Extend sda1 to the full disk. Yes, this needs three dashes. See
     # https://unix.stackexchange.com/a/365657/126364.
-    sudo parted ---pretend-input-tty /dev/sda resizepart 1 yes 100%
-    sudo resize2fs /dev/sda1 # enlarge filesystem to fill the whole partition
+    #sudo parted ---pretend-input-tty /dev/sda resizepart 1 yes 100%
+    #sudo resize2fs /dev/sda1 # enlarge filesystem to fill the whole partition
     sudo dd if=/dev/zero of=/swap bs=1024K count=500 # create a swapfile
     sudo chmod 600 /swap
     sudo mkswap /swap
     sudo swapon /swap
-    sudo sed -i '/swap/d' /etc/fstab # and update fstab with the swapfile
+    #sudo sed -i '/swap/d' /etc/fstab # and update fstab with the swapfile
     echo "/swap       none    swap    sw   0   0" | sudo tee -a /etc/fstab
   SHELL
 end