diff options
author | P. J. McDermott <pj@pehjota.net> | 2016-09-05 17:04:08 (EDT) |
---|---|---|
committer | P. J. McDermott <pj@pehjota.net> | 2016-09-10 15:44:50 (EDT) |
commit | 87b25a514b1905e44f5d76f687aeff52feaa25d0 (patch) | |
tree | 2b9e97347ffd9596f9959e4545d6f0359f86ff5e | |
parent | 5ec50efd4f51c85dfe25c70904b30e29b93de2d1 (diff) | |
download | pc-inst-87b25a514b1905e44f5d76f687aeff52feaa25d0.zip pc-inst-87b25a514b1905e44f5d76f687aeff52feaa25d0.tar.gz pc-inst-87b25a514b1905e44f5d76f687aeff52feaa25d0.tar.bz2 |
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.
-rw-r--r-- | hosts/generic1 | 21 |
1 files changed, 20 insertions, 1 deletions
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 |