• R/O
  • HTTP
  • SSH
  • HTTPS

image-creator: Commit

KVM host image creator.


Commit MetaInfo

Revisionf58e1045e51a1ee11fdb32c53e882a4ad4b6b04a (tree)
Time2020-06-09 14:09:35
AuthorTatsuki SUGIURA <sugi@osdn...>
CommiterTatsuki SUGIURA

Log Message

Install grub-pc and remove grub-efi.

Change Summary

Incremental Difference

--- a/create-image
+++ b/create-image
@@ -153,7 +153,10 @@ class ImageCreator
153153 end
154154
155155 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"
157160 system("chroot", dir, "apt-get", "-qy", "update") or raise "Failed to install grub-pc"
158161 system({'DEBIAN_FRONTEND' => 'noninteractive'}, "chroot", dir, "apt-get", "-y", "install", "grub-pc")
159162 end
Show on old repository browser