Skip to content

Instantly share code, notes, and snippets.

@pkutzner
Created July 15, 2014 23:07
Show Gist options
  • Select an option

  • Save pkutzner/d9c045664bf44897e716 to your computer and use it in GitHub Desktop.

Select an option

Save pkutzner/d9c045664bf44897e716 to your computer and use it in GitHub Desktop.
d-i partman/early_command string \
DISKA=$(list-devices disk | head -n1); \
DISKB=$(list-devices disk | tail -n2 | head -n1); \
if [ "$DISKA" = "$DISKB" ]; then \
debconf-set partman-auto/disk string "$DISKA"; \
debconf-set partman-auto-raid/recipe string "1 2 0 ext2 /boot ${DISKA}1 . 1 2 0 lvm - ${DISKA}5 ."; \
debconf-set grub-installer/bootdev string "$DISKA"; \
else
debconf-set partman-auto/disk string "$DISKA $DISKB"; \
debconf-set partman-auto-raid/recipe string "1 2 0 ext2 /boot ${DISKA}1#${DISKB}1 . 1 2 0 lvm - ${DISKA}5#${DISKB}5 ."; \
debconf-set grub-installer/bootdev string "$DISKA $DISKB"; \
fi;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment