0

I would like to install Ubuntu to smallest HDD in my computer system config via preseed. It works fine but when smaller HDD not /dev/sda(eg /dev/sdb) I have an error "Executing 'grub-install/dev/sda' failed". How can I bind my grub-installer/bootdev with debconf-set partman-auto/disk?

    d-i partman/early_command \
     string debconf-set partman-auto/disk "$(echo /dev/`lsblk -rndbo SIZE,NAME,TRAN | grep sata | grep sd* | sort -V | head -n1 | cut -d " " -f2`)"

d-i grub-installer/bootdev (what am i need to type here?)
d-i partman-auto/method string crypto
d-i partman-lvm/device_remove_lvm boolean true
d-i partman-lvm/confirm boolean true
d-i partman-auto-lvm/guided_size string max
d-i partman-auto-lvm/new_vg_name string crypt
d-i partman-auto/choose_recipe select root-encrypted
d-i partman-auto/expert_recipe string                         \
      root-encrypted ::                                       \
              512 512 512 ext4                                \
                      $primary{ } $bootable{ }                \
                      method{ format } format{ }              \
                      use_filesystem{ } filesystem{ ext4 }    \
                      mountpoint{ /boot }                     \
              .                                               \
              100% 100% 100% linux-swap                       \
                      $lvmok{ } lv_name{ swap }               \
                      in_vg { crypt }                         \
                      $primary{ }                             \
                      method{ swap } format{ }                \
              .                                               \
              10240 51200 -1 ext4                       \
                      $lvmok{ } lv_name{ root }               \
                      in_vg { crypt }                         \
                      $primary{ }                             \
                      method{ format } format{ }              \
                      use_filesystem{ } filesystem{ ext4 }    \
                      mountpoint{ / }                         \
              .                                               \
0

Comment out

d-i partman/early_command \

 string debconf-set partman-auto/disk "$(echo /dev/`lsblk -rndbo SIZE,NAME,TRAN | grep sata | grep sd* | sort -V | head -n1 | cut -d " " -f2`)"

and just use

d-i grub-installer/bootdev /dev/sdb

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.