Downtown Doug Brown
How to run Ubuntu 20.04 server with only 256 MB of RAM
Here’s a quick post — it should be a nice short one by my standards. This weekend I decided to upgrade a couple of my Ubuntu servers from 18.04 to 20.04. I ran into a bit of a problem with a really tiny cheap VPS that I keep mainly for playing around. It only has 256 MB of RAM and 5 GB of storage. It was an interesting challenge finding enough free disk space to complete the upgrade process to begin with, but that ended up being the easy part.
After I was all done upgrading, I rebooted, and the server never came back up. I figured out how to gain access to the console, rebooted the VPS again, and watched the console as it froze with a kernel panic. I couldn’t scroll up too far to see the very beginning of the panic, but the last line gave me a big clue:
---[ end Kernel panic - not syncing: System is deadlocked on memory ]---
Looking at the stack trace above that line, I could see that the kernel was inside of populate_rootfs and appeared to be in the middle of unzipping the initramfs file into a RAM disk. Seems like the kernel ran out of free memory during this process. I did some Googling and found a few others who were seeing the same or a similar problem with low-RAM systems (1, 2, 3) but nobody had posted a solution.
I rebooted once again, but this time I interrupted GRUB and headed back into the older 4.15.0-144-generic kernel that had been left over from 18.04 instead of the new 5.4.0-74-generic kernel, and it worked fine. At first I convinced myself that I’d simply have to stick with the older kernel from 18.04, but I really wanted to get it working with the newer 20.04 kernel, so I played around some more. I noticed in /boot that the initramfs had gotten even bigger with the new 20.04 kernel:
-rw-r--r-- 1 root root 46854754 Jun 6 11:22 initrd.img-4.15.0-144-generic
-rw-r--r-- 1 root root 51028888 Jun 6 11:40 initrd.img-5.4.0-74-generic
It seemed kind of crazy that a minimal server really needed around 50 MB of stuff in a RAM disk just to pass the boot process onto the final root filesystem. It was also interesting because it looked like my 18.04 kernel’s initramfs may have been teetering on the edge of being too big as well. Anyway, I noticed that at the top of /etc/initramfs-tools/initramfs.conf there is an option to choose which modules to add to the initramfs. It defaults to MODULES=most, which adds most filesystem and all disk drivers. I changed it to MODULES=dep, which attempts to guess which ones are needed and only use those. Then I regenerated the 5.4 initramfs by running “update-initramfs -u” and checked it again:
-rw-r--r-- 1 root root 46854754 Jun 6 11:22 initrd.img-4.15.0-144-generic
-rw-r--r-- 1 root root 8811191 Jun 6 11:44 initrd.img-5.4.0-74-generic
I was amazed to discover that it had shrunk down to around 8 MB in size. I guess there were a lot of drivers in there that were not needed. Anyway, after making that change, I rebooted and everything works great now!
Obviously there are always tradeoffs. The downside is that if something changes about the storage setup of my VPS in the future, it might fail to boot due to not having the driver it needs. Also, if I image the server, the image likely won’t be able to directly boot a different computer or VM unless I regenerate the initramfs. But this solution works great for me and now my tiny VPS is happy running Ubuntu 20.04 with kernel 5.4.
Linux на комп с 256 RAM
Посоветуйте дистрибутив.
Имеется комп с 256 мегами памяти, пень 4, видео — 7600GT.
Требования — юзер френдли, так как ставлю не себе, а людям мало разбирающимся в линухе.
Заранее спасибо!
любой с lxde. Из сразу готовых сборок можно туже Lubuntu
Simply Linux от альтов. Очень лёгок, идёт с Xfce.
На машине с 256RAM, Celeron 800Mhz сносно работает. Но я накатил на него флюксбокс. Флюкс идёт уже локализованный и хорошо настроен. Теперь всё летает.
debian + xfce. с lxde пока еще куча проблем.
Дай людм взаймы 10 т.р, на более-менее нормальную машину.
Спасибо, попробую. Действительно очень лёгкий — в режиме LiveCD занимает всего 80 мб рамы. Lubuntu на той машине даже не грузится почему-то (судя по всему выжирает всю память).
Всякие бубунты — для более менее современного железа, чтобы кто ни говорил.
У меня на таком стоял Debian Lenny с KDE3.
>комп с 256 мегами памяти, пень 4, видео — 7600GT.
После установки и тюнинга Macpup 5.2.8 (164 MB) ты сможешь его продать как новейший «Apple Mac» 🙂
Любой. В качестве окружения — LXDE.
Archbang (или как называется уже готовый арч с боксом?)
или, если всё таки можно поддерживать, то нормальный арч с тем же openbox
сносно работало на pentium 3 с 128мб оперативки и с riva tnt2 m64
http://www.zenwalk.org/ Вот ещё один вариант для тебя
kubuntu 8.04 с KDE3, всякие LXDE даже не смотри
Не обязательно 8.04, ppa же с тринити есть. А третьи кеды — самое лучшее, красивое и удобное (и быстрое) ДЕ.
Gentoo достаточно user-friendly при условии тщательной предварительной настройки
а если самому заморачиваться не кайф — какую-нибудь разновидность убунты
накати чтоли ещё плашечку на гиг, и будет всё вполне сносно так работать. хотя я и с celeron 566 256 ОЗУ даже ничё так работал. ставь debian+xfce/kde3/lxde.
Дисит
Вопрос не очень коректный!, для каких нужд вам нужен дист, если комп не очень «сильный», в случаи если вы будете использовать дист как Desktop»/, то можна взять Debian с графической оболочкой Gnome2 или xfce ( что на мой взгяд лучше)
Linux on 256 ram
In the typical Christmas family-IT support I’ve been debugging and fixing the family computers this christmas. One such computer is an old Athlon 2600+ with 256mb of RAM. It is currently running Windows XP acceptably and the family still wants to keep it in service. Due to basic virus/security I would like to install linux on it.
I’ve played around with puppy linux but it really feels dumbed down on some things and sometimes overcomplicated in others. It runs ok though.
So the question basically is, is there any «regular» distros that might work on said PC. I think xfce would be cool but from my research the 256mb of RAM would just be enough to run it and only it. Obviously web browsing and some basic word processing would be nice, even though it’s very difficult.
Because we are talking about old people, I can’t install stuff like Arch, or Gentoo and such. I was thinking either Xubuntu, or Lubuntu, but both of them say min 512mb. Anything other that is user friendly and light weight?
EDIT: Worth mentioning that the pursuite is pretty much pointless. The CPU of that vintage doesn’t have SSE2 which it seems almost any new application needs. I’ve been searching for some time now for a browser that is non-SSE2 but it seems it’s been a thing for some years now. I found this out accidentally in puppy because the browser wasn’t starting. Then it eventually told me the error.
So for people of the future, you might get away with it for an offline PC, but web browsing or newer versions of apps are a no go. So for my use case I need to stick with the latest software that still works and leave it at that.
EDIT2: After effectively giving up on the linux dream, I tried it out on modern websites. It really is no point in using it anymore. Even while sitting there on the website with the animations and BS that we have today it was keeping the CPU at 100%. Anything java script related was pinning it. With javascript turned off it still is usable, but the majority of websites don’t work. I ended up giving up on the machine and just told them to get something else.