diff options
Diffstat (limited to 'old-school')
-rwxr-xr-x | old-school/menu-select | 12 |
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() | |||
63 | case "$1" in | 63 | case "$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 '' || { |