summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--initramfs-tools/scripts/samizdat33
-rwxr-xr-xold-school/menu-select20
2 files changed, 27 insertions, 26 deletions
diff --git a/initramfs-tools/scripts/samizdat b/initramfs-tools/scripts/samizdat
index e8f5198..2bc16f8 100644
--- a/initramfs-tools/scripts/samizdat
+++ b/initramfs-tools/scripts/samizdat
@@ -2,26 +2,15 @@ klogd -c1 # TODO: This should be even earlier. Can it go on the kernel command
2 2
3mountroot() 3mountroot()
4{ 4{
5 mkdir /cdrom /btrfs
6 mount -t iso9660 /dev/sr0 /cdrom
7 mount -t btrfs -o loop,subvol=ROOT /cdrom/live/filesystem.btrfs /btrfs
8 modprobe brd rd_size=$((256 * 1024 * 2))
9 btrfs device add /dev/ram0 /btrfs
10 mount -o rw,remount /btrfs
11 mount -o move /btrfs /root
12 mkdir /root/cdrom
13 mount -o move /cdrom /root/cdrom
14
15 sed -i -e 's/^root:x:/root::/' /root/etc/passwd
16
17 samizdat_install_udev_rules
18
19 openvt -c 13 sh 5 openvt -c 13 sh
20 6
21 mkfifo "$MENUFIFO" || panic "mkfifo '$MENUFIFO' failed" 7 samizdat_install_udev_rules
8 mkfifo "$MENUFIFO"
22 bootmenu 9 bootmenu
10 bootwait root-mounted
11 chvt 1
23 12
24 sleep 1000 13 sed -i -e 's/^root:x:/root::/' /root/etc/passwd
25} 14}
26 15
27samizdat_install_udev_rules() 16samizdat_install_udev_rules()
@@ -70,4 +59,14 @@ bootmenu()
70 menutitle 'Samizdat\n\nAs the Internet develops there are\ntransitions in the management arrangements.\nThe time has come to take\na small step in one of those transitions.' 'Choose an installation target.' 59 menutitle 'Samizdat\n\nAs the Internet develops there are\ntransitions in the management arrangements.\nThe time has come to take\na small step in one of those transitions.' 'Choose an installation target.'
71# menutitle 'Samizdat\nfreedom from surveillance\nno trusted authorities' 'Choose an installation target.' 60# menutitle 'Samizdat\nfreedom from surveillance\nno trusted authorities' 'Choose an installation target.'
72 addmenu "ramdisk" "[ Boot to RAM without installing anything ]" "menu-select boot-ram" 61 addmenu "ramdisk" "[ Boot to RAM without installing anything ]" "menu-select boot-ram"
73} \ No newline at end of file 62}
63
64bootwait()
65{
66 mkdir -p /bootwait
67 local i=$#; while [ $i -gt 0 ]; do
68 i=$((i-1))
69 local f="$1"; shift; set -- "$@" "/bootwait/$f"
70 done
71 wait_for_files "$@"
72}
diff --git a/old-school/menu-select b/old-school/menu-select
index 0cc0c67..5f0848f 100755
--- a/old-school/menu-select
+++ b/old-school/menu-select
@@ -62,15 +62,17 @@ hwclock_to_system()
62 62
63case "$1" in 63case "$1" in
64 boot-ram) 64 boot-ram)
65 modprobe squashfs || true 65 mkdir /cdrom /btrfs
66 find_squashfs_root | mountsquashes || error 66 bootwait samizdat-cdrom
67 mkdir /overlay || error 67 mount -t btrfs -o loop,subvol=ROOT /cdrom/live/filesystem.btrfs /btrfs
68 mount -t tmpfs tmpfs /overlay || error 68 modprobe brd rd_size=$((256 * 1024 * 2))
69 mkdir /overlay/gpg || error 69 btrfs device add /dev/ram0 /btrfs
70 ln -s /overlay/gpg /gpg 70 mount -o rw,remount /btrfs
71 71 mount -o move /btrfs /root
72 init_gpg || error 72 mkdir /root/cdrom
73 bootdone squashfs-root rw-overlay 73 mount -o move /cdrom /root/cdrom
74
75 bootdone root-mounted
74 ;; 76 ;;
75 boot-overwrite|boot-new|boot-luks) 77 boot-overwrite|boot-new|boot-luks)
76 dev="$2" 78 dev="$2"