KVM host image creator.Jessica Lockwood
リビジョン | f58e1045e51a1ee11fdb32c53e882a4ad4b6b04a (tree) |
---|---|
日時 | 2020-06-09 14:09:35 |
作者 | Tatsuki SUGIURA <sugi@osdn...> |
コミッター | Tatsuki SUGIURA |
Install grub-pc and remove grub-efi.
@@ -153,7 +153,10 @@ class ImageCreator | ||
153 | 153 | end |
154 | 154 | |
155 | 155 | puts "Update grub..." |
156 | - unless File.exists? "#{dir}/usr/sbin/grub-mkconfig" | |
156 | + if File.exists? "#{dir}/var/lib/dpkg/info/grub-efi-amd64.list" | |
157 | + system({'DEBIAN_FRONTEND' => 'noninteractive'}, "chroot", dir, "apt", "remove", "--purge", "-y", "grub-efi-amd64") or raise "Failed to purge grub-efi" | |
158 | + end | |
159 | + unless File.exists? "#{dir}/var/lib/dpkg/info/grub-pc.list" | |
157 | 160 | system("chroot", dir, "apt-get", "-qy", "update") or raise "Failed to install grub-pc" |
158 | 161 | system({'DEBIAN_FRONTEND' => 'noninteractive'}, "chroot", dir, "apt-get", "-y", "install", "grub-pc") |
159 | 162 | end |