friedgold
Group: Members
Posts: 122
Joined: Mar. 2005 |
|
Posted: Sep. 23 2005,18:36 |
|
To allow changes to the filesystem while DSL is loaded, a ramdisk is mounted over /ramdisk and symlinks to /ramdisk are created. Loaded .dsl and .tar.gz extensions will occupy this ramdisk. The maximum size of this ramdisk is set to 4/5 of the memory available when the linuxrc in the initrd runs.
If you have a small amount of physical memory the maximum size of this ramdisk will be fairly small (e.g. with 64MB of ram the ramdisk's maximum size is about 45MB). If you want to load large extensions (e.g. GTK2 libraries and a couple of GTK2 apps) you quickly run out of room on the ramdisk and can no longer load additional extensions. Currently creating a swap file/partition makes no difference as the maximum size of the ramdisk is set before any swap files/partitions are mounted (it's set by the linuxrc script in the initrd).
To get around this I modified /etc/init.d/knoppix-autoconfig so that if a swap file or swap partition has been mounted, /ramdisk will be remounted with the maximum size set to 4/5 of the free memory including swap.
This means when using a swap file or partition it is possible to load .tar.gz and .dsl extensions that previously would not have had room.
The relevent section of my knoppix-autoconfig now looks like this:
Code Sample | update_progress 90
FREEMEM="$(awk 'BEGIN{m=0};/MemFree|Cached|SwapFree/{m+=$2};END{print m}' /proc/meminfo)"
if [ -z "$INSTALLED" ]; then # Now that any swap partitions/files are mounted, see if we can increase the ramdisk size RAMSIZE="$(expr $FREEMEM \* 4 / 5)" [ -n "$RAMSIZE" ] && mount -o "remount,size=${RAMSIZE}k" /ramdisk fi |
Maybe this change could be incorporated into DSL?
|