end
end
- unless File.exists? "#{dir}/vmlinuz"
- system("chroot", dir, "apt-get", "-qy", "update")
- system("chroot", dir, "apt-get", "-y", "install", "linux-image-amd64")
- end
+ system("chroot", dir, "apt-get", "-qy", "update")
+ system("chroot", dir, "apt-get", "-y", "install", "linux-image-amd64")
puts "Update grub..."
- unless File.exists? "#{dir}/boot/grub/grub.cfg"
+ unless File.exists? "#{dir}/usr/sbin/grub-mkconfig"
system("chroot", dir, "apt-get", "-qy", "update") or raise "Failed to install grub-pc"
system({'DEBIAN_FRONTEND' => 'noninteractive'}, "chroot", dir, "apt-get", "-y", "install", "grub-pc")
end