summaryrefslogtreecommitdiff
path: root/src/grub-efi.sh
diff options
context:
space:
mode:
authorAndrew Cady <d@jerkface.net>2017-03-28 09:30:51 -0400
committerAndrew Cady <d@jerkface.net>2017-03-28 09:30:51 -0400
commit42f0b3ff9b9e71da74ddca1b41f3f04787d571c4 (patch)
tree7fa5a368b3a82fac61c7c68edd2e29366c9a1e4b /src/grub-efi.sh
parent2b948633f002af0dd1e428bfeca0453cb6ac72c3 (diff)
Implement boot parameter "netkeys"
This allows the keys to be loaded from the boot medium even when the root filesystem is loaded over the network. I.e., specifying nbdroot= no longer implies that the keys will be loaded over the network. The ISO images generated by xorriso-usb.sh will not specify 'netkeys' so the keys on the USB stick will be used. The idea is that after install, the network should not be needed at all; but that requires using a new mechanism instead of the nbdroot= parameter, to determine dynamically whether to use a network root fs device. Currently, the network is still needed to boot a device that has its root fs on the local disk and the keys on the boot medium, even though no data is fetched from the NBD server. You can force the machine to boot by going to the initramfs shell and running: for n in $(seq 1 20); do killall ipconfig; done Otherwise it blocks waiting for the network.
Diffstat (limited to 'src/grub-efi.sh')
-rwxr-xr-xsrc/grub-efi.sh19
1 files changed, 14 insertions, 5 deletions
diff --git a/src/grub-efi.sh b/src/grub-efi.sh
index f96149d..44b9dec 100755
--- a/src/grub-efi.sh
+++ b/src/grub-efi.sh
@@ -1,11 +1,20 @@
1#!/bin/sh 1#!/bin/bash
2. samizdat-paths.sh 2. samizdat-paths.sh
3 3
4linux_kernel_commandline='boot=samizdat components quiet splash nbdroot=192.168.10.1,samizdat.btrfs nbddev=/dev/nbd0 ip=dhcp'
5
4grub_config() 6grub_config()
5{ 7{
6 cat <<EOF 8 cat <<EOF
7insmod echo 9insmod echo
8echo GRUB 10echo GRUB
11
12insmod normal
13insmod keystatus
14
15insmod linux
16insmod iso9660
17
9insmod part_acorn 18insmod part_acorn
10insmod part_amiga 19insmod part_amiga
11insmod part_apple 20insmod part_apple
@@ -17,13 +26,13 @@ insmod part_plan
17insmod part_sun 26insmod part_sun
18insmod part_sunpc 27insmod part_sunpc
19 28
20insmod linux
21insmod iso9660
22
23echo Loading vmlinuz... 29echo Loading vmlinuz...
24linux /linux/vmlinuz boot=samizdat components quiet splash 30
31linux /linux/vmlinuz ${linux_kernel_commandline}
32
25echo Loading initrd.img... 33echo Loading initrd.img...
26initrd /linux/initrd.img 34initrd /linux/initrd.img
35
27echo Booting. 36echo Booting.
28echo 37echo
29boot 38boot