summaryrefslogtreecommitdiff
path: root/old-school/menu-select
diff options
context:
space:
mode:
Diffstat (limited to 'old-school/menu-select')
-rwxr-xr-xold-school/menu-select27
1 files changed, 9 insertions, 18 deletions
diff --git a/old-school/menu-select b/old-school/menu-select
index 1dbd847..9b340ac 100755
--- a/old-school/menu-select
+++ b/old-school/menu-select
@@ -62,28 +62,18 @@ hwclock_to_system()
62 62
63case "$1" in 63case "$1" in
64 boot-ram) 64 boot-ram)
65 mkdir /cdrom /btrfs
66 bootwait samizdat-cdrom
67
68 losetup_layers || error
69 modprobe btrfs || error
70 btrfs device scan || error
71 uuid=$(choose_uuid) || error
72 [ "$uuid" ] || error
73
74 mount -t btrfs -o loop,subvol=ROOT UUID="$uuid" /btrfs
75 memtotal=$(sed -ne 's/MemTotal: *//p' /proc/meminfo) 65 memtotal=$(sed -ne 's/MemTotal: *//p' /proc/meminfo)
76 ramdisk=$((1024 * ${memtotal% *} / 2)) 66 ramdisk=$((1024 * ${memtotal% *} / 2))
77 [ $ramdisk -ge 256 ] || ramdisk=256 67 [ $ramdisk -ge 256 ] || ramdisk=256
78 modprobe brd rd_size=$ramdisk 68 modprobe brd rd_size=$ramdisk
79 69
80 btrfs device add /dev/ram0 /btrfs 70 init_gpg || error
81 mount -o rw,remount /btrfs 71 init_samizdat /dev/ram0 '' || {
82 mount -o move /btrfs /root 72 umount /root/cdrom
83 mkdir /root/cdrom 73 umount /root/outerfs
84 mount -o move /cdrom /root/cdrom 74 umount /root
85 75 error
86 bootdone root-mounted 76 }
87 ;; 77 ;;
88 boot-overwrite|boot-new|boot-luks) 78 boot-overwrite|boot-new|boot-luks)
89 dev="$2" 79 dev="$2"
@@ -109,7 +99,8 @@ case "$1" in
109 99
110 start_meter "Allocating ${megs}MB in '$loopfile' on $dev..." 100 start_meter "Allocating ${megs}MB in '$loopfile' on $dev..."
111 101
112 if init_samizdat "$loopfile" "$megs" "$loopfile"k; then 102 if init_samizdat_blockdev "$loopfile" "$megs" "$loopfile"k &&
103 init_samizdat /dev/mapper/samizdatcrypt "$imgfile"; then
113 stop_meter done. 104 stop_meter done.
114 else 105 else
115 stop_meter error! 106 stop_meter error!