dipartman/early_command\

dipartman/early_command\

私のコンピュータシステム構成で最小のハードドライブにプリセットを介してUbuntuをインストールしたいと思います。うまく動作しますが、より小さいHDDが/ dev / sdaではない場合(例:/ dev / sdb)、「 'grub-install / dev / sda'実行に失敗しました」というエラーが発生します。 grub-installer/bootdevを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{ / }                         \
              .                                               \

ベストアンサー1

コメントする

dipartman/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`)"

ただ使用

di grub インストーラ/bootdev/dev/sdb

おすすめ記事