summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Cady <d@jerkface.net>2016-04-28 10:02:27 -0400
committerAndrew Cady <d@jerkface.net>2016-04-28 10:02:27 -0400
commit6706a919083d1bb815ebddca08b2f2755bcd918d (patch)
tree4379baade8aab32ba0a0401411c218ce41a9dfc9
parent3488e06a31c67586217791c8c1d8f44fbb82afd6 (diff)
ramdisk is now allocated "all" of system memory
-rwxr-xr-xold-school/menu-select12
1 files changed, 8 insertions, 4 deletions
diff --git a/old-school/menu-select b/old-school/menu-select
index d8c9d6e..ed23280 100755
--- a/old-school/menu-select
+++ b/old-school/menu-select
@@ -63,10 +63,14 @@ hwclock_to_system()
63case "$1" in 63case "$1" in
64 boot-ram) 64 boot-ram)
65 read _ memtotal_kb _ < /proc/meminfo 65 read _ memtotal_kb _ < /proc/meminfo
66 memtotal_mb=$((memtotal_kb / 1024)) 66 # This doesn't make sense to me, but setting rd_size _lower_ than total
67 ramdisk_mb=$((memtotal_mb / 2)) 67 # memory seems to be what breaks things ('btrfs device add' hangs forever).
68 [ "$ramdisk_mb" -ge 256 ] || ramdisk_mb=256 68 # Somehow you can fill up the filesystem and there's still space for
69 modprobe brd rd_size=$((ramdisk_mb * 1024)) 69 # programs and btrfs does not complain. I don't know what is going on here.
70
71 # BTW, I verified with blockdev that the device size really is being
72 # specified in KB here. I did not really believe it.
73 modprobe brd rd_nr=1 rd_size=$memtotal_kb
70 74
71 init_gpg || error 75 init_gpg || error
72 init_samizdat /dev/ram0 '' || { 76 init_samizdat /dev/ram0 '' || {