summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 3962448)
raw | patch | inline | side by side (parent: 3962448)
author | Ian Kelling <ian@iankelling.org> | |
Sun, 14 Feb 2016 05:39:02 +0000 (21:39 -0800) | ||
committer | Ian Kelling <ian@iankelling.org> | |
Mon, 6 Feb 2017 06:21:40 +0000 (22:21 -0800) |
fai-revm | patch | blob | history | |
fai/config/class/50-host-classes | patch | blob | history | |
fai/config/hooks/partition.DEFAULT | patch | blob | history |
diff --git a/fai-revm b/fai-revm
index d9bacf4d48be6592eba0e2a7d0a03256bf9e1566..5ac7fce1c6ff660c855ef8179414d6e0bdf62d8c 100755 (executable)
--- a/fai-revm
+++ b/fai-revm
trap 'echo "$0:$LINENO:error: \"$BASH_COMMAND\" returned $?"' ERR
-disk_count=4
+disk_count=1
script_dir=$(dirname $(readlink -f "$BASH_SOURCE"))
index 27c1e1b7cf84752ce8286dfefa64d3a8060bec08..413ac010d0a1a3f948d5d298126785a6f3acdead 100755 (executable)
# use a list of classes for our demo machine
case $HOSTNAME in
demohost)
- echo "FAIBASE DEBIAN DESKTOP MANY_DISK STABLE" ;;
+ echo "FAIBASE DEBIAN DESKTOP ONE_DISK STABLE" ;;
x2)
echo "FAIBASE DEBIAN DESKTOP ONE_DISK" ;;
tp)
index c4514c500cf7d6afc50bfd7dd6198ac4767aa849..5d4684c6bf79af7c3bbe6a00dc196885b7505380 100755 (executable)
crypt_devs=(${letters[@]/#//dev/mapper/crypt_dev_${d}})
first_boot_dev=${devs[0]}$bootn
-partition=false
+partition=true
# somewhat crude detection of whether to partition
for dev in ${devs[@]}; do
parted -s $dev mklabel gpt
# gpt ubuntu cloud image uses ~4. fai uses 1 MiB. ehh, i'll do 4.
# also, using MB instead of MiB causes complains about alignment.
- parted -s $dev mkpart primary "ext3" 4MB ${boot_end}MiB
- parted -s $dev mkpart primary "linux-swap" ${boot_end}MiB ${swap_end}MiB
- parted -s -- $dev mkpart primary "" ${swap_end}MiB -0
- parted -s $dev mkpart primary "" 1MiB 4MiB
- parted -s $dev set $bios_grubn bios_grub on
- parted -s $dev set $bootn boot on # generally not needed on modern systems
+ pcmd="parted -a optimal -s -- $dev"
+ $pcmd mkpart primary "ext3" 4MB ${boot_end}MiB
+ $pcmd mkpart primary "linux-swap" ${boot_end}MiB ${swap_end}MiB
+ $pcmd mkpart primary "" ${swap_end}MiB -0
+ $pcmd mkpart primary "" 1MiB 4MiB
+ $pcmd set $bios_grubn bios_grub on
+ $pcmd set $bootn boot on # generally not needed on modern systems
# the mkfs failed randomly on a vm, so I threw a sleep in here.
sleep .1