summaryrefslogtreecommitdiff
path: root/old-school
diff options
context:
space:
mode:
authorAndrew Cady <d@jerkface.net>2016-04-22 22:43:20 -0400
committerAndrew Cady <d@jerkface.net>2016-04-22 22:45:17 -0400
commitab710e99bbbacdcb445776393ef627d8cb2d3574 (patch)
treef129f8d5123aefff41e7a1966a12c7b0874ecdd6 /old-school
parent642351efec733b36ac0863ee4f04462a8ac171bb (diff)
mount seed layers when booting with RAM option
Diffstat (limited to 'old-school')
-rwxr-xr-xold-school/menu-select15
1 files changed, 13 insertions, 2 deletions
diff --git a/old-school/menu-select b/old-school/menu-select
index 55360b6..e661079 100755
--- a/old-school/menu-select
+++ b/old-school/menu-select
@@ -64,8 +64,19 @@ case "$1" in
64 boot-ram) 64 boot-ram)
65 mkdir /cdrom /btrfs 65 mkdir /cdrom /btrfs
66 bootwait samizdat-cdrom 66 bootwait samizdat-cdrom
67 mount -t btrfs -o loop,subvol=ROOT /cdrom/live/filesystem.btrfs /btrfs 67
68 modprobe brd rd_size=$((256 * 1024 * 2)) # TODO: choose intelligently 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)
76 ramdisk=$((1024 * ${memtotal% *} / 2))
77 [ $ramdisk -ge 256 ] || ramdisk=256
78 modprobe brd rd_size=$ramdisk
79
69 btrfs device add /dev/ram0 /btrfs 80 btrfs device add /dev/ram0 /btrfs
70 mount -o rw,remount /btrfs 81 mount -o rw,remount /btrfs
71 mount -o move /btrfs /root 82 mount -o move /btrfs /root