summaryrefslogtreecommitdiff
path: root/initramfs-tools/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'initramfs-tools/scripts')
-rw-r--r--initramfs-tools/scripts/samizdat33
1 files changed, 16 insertions, 17 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}