LinuxシステムのRAMリソースを制限して起動する
なーんか、ずっと前にやってみたことあったような記憶が。
あったあった。
Name
mem ― Force memory usage.Synopsis
mem= n[KMG]Set the specific ammount of memory used by the kernel. When used with the memmap= option, physical address space collisions can be avoided. Without the memmap= option, this option could cause PCI devices to be placed at addresses that belong to unused RAM. n specifies the amount of memory to force and is measured in units of kilobytes (K), megabytes (M), or gigabytes (G).
試すか。
Ubuntuは、Grub2になってから、よーわからんな。
/boot/grub/grub.cfgを編集したらいかんのね。
つーか、このマシン、起動時にGRUBメニュー出てこないんだけど...
kinneko@BuildSV:~$ sudo vi /etc/default/grub GRUB_HIDDEN_TIMEOUT=0 -> 10
設定は/etc/grub.d/に、こんなのが置かれている。
00_header 20_linux_xen 40_custom 05_debian_theme 20_memtest86+ 41_custom 10_linux 30_os-prober README
中身は呪文だな...
ブートローダーの設定ごときに、こんなに構造はいらんのに...
呪文がわからんですよ。
読む気力もない。
設定が終わったら、アップデートして書き込む。
今回はGRUB_HIDDEN_TIMEOUTをいじったし、やる必要がある。
kinneko@BuildSV:~$ sudo update-grub Generating grub.cfg ... Found linux image: /boot/vmlinuz-2.6.38-8-generic Found initrd image: /boot/initrd.img-2.6.38-8-generic Found memtest86+ image: /boot/memtest86+.bin done
ビデオモードの問題か、GRUBメニューが出てこないや... orz
StartUp-Managerをインストール。
起動してみる。
あぁ、kernelのパラメータとかは入れられないのか... orz
うーん、ダメだな。
しょうがない、時間もないから、仮想マシンで試す。
VirtualBoxでメインメモリを512MBに設定した仮想マシンを作る。
android-x86のeeepc.isoで起動。
F1でshellに落ちて、メモリを調べる。
root@eeepc:/ # free
total used free shared buffers
Mem: 511848 441368 70400 0 912
-/+ buffers: 440456 71392
Swap: 0 0 0
再起動して、grubでmem=256Mを設定して起動してみる。
root@eeepc:/ # free
total used free shared buffers
Mem: 252016 248880 3136 0 736
-/+ buffers: 248144 3872
Swap: 0 0 0
ちゃんと256MBになっているようだ。
しかし、ICSだとカツカツだねぇ。
もう何も動かんという感じ。