From 87b25a514b1905e44f5d76f687aeff52feaa25d0 Mon Sep 17 00:00:00 2001 From: P. J. McDermott Date: Mon, 05 Sep 2016 17:04:08 -0400 Subject: generic1: Install GRUB and configure net ifaces Also add post-MBR gap for GRUB. Otherwise, this happens: Installing for i386-pc platform. grub-install: warning: this msdos-style partition label has no post-MBR gap; embedding won't be possible. grub-install: warning: Embedding is not possible. GRUB can only be installed in this setup by using blocklists. However, blocklists are UNRELIABLE and their use is discouraged.. grub-install: error: will not proceed with blocklists. --- (limited to 'hosts') diff --git a/hosts/generic1 b/hosts/generic1 index 955bfa3..db283e8 100644 --- a/hosts/generic1 +++ b/hosts/generic1 @@ -2,7 +2,7 @@ # start,size,id,bootable part_script=' - ,+,83,* + 1024,+,83,* ' # fs mp type options dump pass @@ -80,6 +80,25 @@ do_postinst() # Remove packages from APT cache. in_target apt-get clean || return 1 + # Install GRUB. + in_target update-grub + in_target grub-install "${dev}" + + # Configure network interfaces. + cat >"${target}/etc/network/interfaces" <<-EOF + # This file describes the network interfaces available on your system + # and how to activate them. For more information, see interfaces(5). + + # The loopback network interface + auto lo + iface lo inet loopback + + # The primary network interface + auto eth0 + allow-hotplug eth0 + iface eth0 inet dhcp + EOF + # Use temporary configuation SSH key. install -d -o 1000 -g 1000 -m 0700 "${target}/home/user/.ssh" || return 1 cat >"${target}/home/user/.ssh/id_rsa" <<-EOF -- cgit v0.9.1