summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--initramfs-tools/modules2
-rw-r--r--initramfs-tools/scripts/samizdat11
-rw-r--r--isolinux/pxelinux.cfg/default2
-rw-r--r--src/initrd/common.sh7
4 files changed, 18 insertions, 4 deletions
diff --git a/initramfs-tools/modules b/initramfs-tools/modules
index dd9dc54..ee049de 100644
--- a/initramfs-tools/modules
+++ b/initramfs-tools/modules
@@ -9,3 +9,5 @@
9# 9#
10# raid1 10# raid1
11# sd_mod 11# sd_mod
12
13btrfs
diff --git a/initramfs-tools/scripts/samizdat b/initramfs-tools/scripts/samizdat
index 1591883..0c511e8 100644
--- a/initramfs-tools/scripts/samizdat
+++ b/initramfs-tools/scripts/samizdat
@@ -6,10 +6,10 @@ mountroot()
6 6
7 samizdat_install_udev_rules 7 samizdat_install_udev_rules
8 mkfifo "$MENUFIFO" 8 mkfifo "$MENUFIFO"
9 sh /scripts/local-top/nbd >/dev/null 2>&1 & # I guess this isn't getting called otherwise?
10 9
10 # Note: this blocks waiting for the network
11 if [ "${nbdroot%%,*}" ]; then 11 if [ "${nbdroot%%,*}" ]; then
12 wait_for_gnupghome_tar 12 try_nbd
13 fi 13 fi
14 14
15 bootmenu 15 bootmenu
@@ -17,6 +17,13 @@ mountroot()
17 chvt 1 17 chvt 1
18} 18}
19 19
20try_nbd()
21{
22 sh /scripts/local-top/nbd >/dev/null 2>&1 & # I guess this isn't getting called otherwise?
23 wait_for_gnupghome_tar
24 (. common.sh && force_grok_block)
25}
26
20wait_for_gnupghome_tar() 27wait_for_gnupghome_tar()
21{ 28{
22 [ -e /gnupghome.tar ] && return 29 [ -e /gnupghome.tar ] && return
diff --git a/isolinux/pxelinux.cfg/default b/isolinux/pxelinux.cfg/default
index 8e0a05f..386012f 100644
--- a/isolinux/pxelinux.cfg/default
+++ b/isolinux/pxelinux.cfg/default
@@ -2,4 +2,4 @@ default samizdat
2label samizdat 2label samizdat
3 linux linux/vmlinuz 3 linux linux/vmlinuz
4 initrd linux/initrd.img 4 initrd linux/initrd.img
5 append boot=samizdat components quiet splash nbdroot=192.168.10.1,samizdat.iso nbddev=/dev/nbd0 ip=dhcp 5 append boot=samizdat components quiet splash nbdroot=192.168.10.1,samizdat.btrfs nbddev=/dev/nbd0 ip=dhcp
diff --git a/src/initrd/common.sh b/src/initrd/common.sh
index 09906d9..b91bbf9 100644
--- a/src/initrd/common.sh
+++ b/src/initrd/common.sh
@@ -31,6 +31,11 @@ menutitle()
31 printf 'setWelcomeText "%s"\n' "$2" >>$MENUFIFO 31 printf 'setWelcomeText "%s"\n' "$2" >>$MENUFIFO
32} 32}
33 33
34force_grok_block()
35{
36 udevadm trigger --subsystem-match=block --action=add
37}
38
34bootmenu() 39bootmenu()
35{ 40{
36 local do_trigger="$1" no_panic="$2" 41 local do_trigger="$1" no_panic="$2"
@@ -43,7 +48,7 @@ bootmenu()
43 panic "error loading boot menu! the system won't be usable :(" 48 panic "error loading boot menu! the system won't be usable :("
44 fi 49 fi
45 if [ "$do_trigger" ]; then 50 if [ "$do_trigger" ]; then
46 udevadm trigger --subsystem-match=block --action=add 51 force_grok_block
47 fi 52 fi
48} 53}
49 54