etc:users:jcmvbkbc:linux128
Differences
This shows you the differences between two versions of the page.
Next revision | Previous revisionLast revisionBoth sides next revision | ||
etc:users:jcmvbkbc:linux128 [2008/04/23 01:07] – создано jcmvbkbc | users:jcmvbkbc:linux128 [2016/08/07 00:34] – ↷ Page moved from user:jcmvbkbc:linux128 to users:jcmvbkbc:linux128 kel | ||
---|---|---|---|
Line 1: | Line 1: | ||
====== GNU/Linux, rootfs <128 Mb ====== | ====== GNU/Linux, rootfs <128 Mb ====== | ||
- | * шаг первый, | + | __Проблема__: имеется множество разных конфигураций машин, на которых хочется запускать свой софт. Общее в них -- это PC, x86, не хуже Pentium-200. Хочется иметь базовую конфигурацию, которая будет работать **без настройки** на всех этих машинах. |
+ | |||
+ | __Цель__: с минимальными усилиями получить GNU/Linux rootfs <128Mb, включающий в себя X и работающий на всем. | ||
+ | |||
+ | __Решение__: собирать livecd, | ||
+ | |||
+ | __Детали__ (kickstart для Fedora8): | ||
< | < | ||
Line 10: | Line 16: | ||
selinux --disabled | selinux --disabled | ||
firewall --disabled | firewall --disabled | ||
- | part / --size | + | part / --size |
+ | |||
+ | #X11 | ||
+ | xconfig --startxonboot | ||
repo --name=e8 --baseurl=ftp:// | repo --name=e8 --baseurl=ftp:// | ||
+ | repo --name=u8 --baseurl=ftp:// | ||
%packages --excludedocs --nobase | %packages --excludedocs --nobase | ||
- | #@core | ||
- | #filesystem | ||
glibc | glibc | ||
initscripts | initscripts | ||
+ | chkconfig | ||
bash | bash | ||
kernel | kernel | ||
passwd | passwd | ||
- | #policycoreutils | + | authconfig |
- | # | + | |
- | #authconfig | + | # cyrillic console |
- | #rootfiles | + | kbd |
+ | |||
+ | #X11 | ||
+ | xorg-x11-drivers | ||
+ | xorg-x11-xinit | ||
+ | |||
+ | #window manager | ||
+ | # | ||
+ | # | ||
+ | metacity | ||
+ | |||
+ | xterm | ||
+ | system-config-display | ||
+ | |||
+ | #fonts | ||
+ | liberation-fonts | ||
+ | |||
+ | #qt4 | ||
+ | # | ||
+ | unixODBC-kde | ||
+ | |||
+ | # | ||
+ | rpm | ||
+ | strace | ||
+ | vim-minimal | ||
+ | fedora-logos | ||
+ | |||
+ | %end | ||
+ | |||
+ | |||
+ | %post | ||
+ | cat > / | ||
+ | # | ||
+ | # | ||
+ | # live: Init script for live image | ||
+ | # | ||
+ | # chkconfig: 345 00 99 | ||
+ | # description: | ||
+ | |||
+ | . / | ||
+ | |||
+ | if ! strstr "\`cat / | ||
+ | exit 0 | ||
+ | fi | ||
+ | |||
+ | exists() { | ||
+ | which \$1 >/ | ||
+ | \$* | ||
+ | } | ||
+ | |||
+ | touch / | ||
+ | |||
+ | # mount live image | ||
+ | if [ -b /dev/live ]; then | ||
+ | mkdir -p /mnt/live | ||
+ | mount -o ro /dev/live /mnt/live | ||
+ | fi | ||
+ | |||
+ | # read some variables out of / | ||
+ | for o in \`cat / | ||
+ | case \$o in | ||
+ | ks=*) | ||
+ | ks=" | ||
+ | ;; | ||
+ | xdriver=*) | ||
+ | xdriver=" | ||
+ | ;; | ||
+ | esac | ||
+ | done | ||
+ | |||
+ | |||
+ | # if liveinst or textinst is given, start anaconda | ||
+ | if strstr "\`cat / | ||
+ | / | ||
+ | fi | ||
+ | if strstr "\`cat / | ||
+ | / | ||
+ | fi | ||
+ | |||
+ | # enable swaps unless requested otherwise | ||
+ | swaps=\`blkid -t TYPE=swap -o device\` | ||
+ | if ! strstr "\`cat / | ||
+ | for s in \$swaps ; do | ||
+ | action " | ||
+ | done | ||
+ | fi | ||
+ | |||
+ | # configure X, allowing user to override xdriver | ||
+ | exists system-config-display --noui --reconfig --set-depth=24 \$xdriver | ||
+ | |||
+ | # add fedora user with no passwd | ||
+ | useradd -c " | ||
+ | passwd -d fedora > /dev/null | ||
+ | |||
+ | # turn off firstboot for livecd boots | ||
+ | echo " | ||
+ | |||
+ | # don't start yum-updatesd for livecd boots | ||
+ | chkconfig --level 345 yum-updatesd off 2>/ | ||
+ | |||
+ | # don't start cron/at as they tend to spawn things which are | ||
+ | # disk intensive that are painful on a live image | ||
+ | chkconfig --level 345 crond off 2>/ | ||
+ | chkconfig --level 345 atd off 2>/ | ||
+ | chkconfig --level 345 anacron off 2>/ | ||
+ | chkconfig --level 345 readahead_early off 2>/ | ||
+ | chkconfig --level 345 readahead_later off 2>/ | ||
+ | |||
+ | # Stopgap fix for RH #217966; should be fixed in HAL instead | ||
+ | touch / | ||
+ | |||
+ | # workaround clock syncing on shutdown that we don't want (#297421) | ||
+ | sed -i -e ' | ||
+ | EOF | ||
+ | |||
+ | |||
+ | # workaround avahi segfault (#279301) | ||
+ | touch / | ||
+ | / | ||
+ | |||
+ | chmod 755 / | ||
+ | / | ||
+ | / | ||
+ | |||
+ | # save a little bit of space at least... | ||
+ | rm -f / | ||
+ | # make sure there aren't core files lying around | ||
+ | rm -f /core* | ||
+ | |||
+ | rpm -e --nodeps fedora-release-notes | ||
+ | rpm -e --nodeps avahi | ||
+ | #rpm -e --nodeps cracklib-dicts | ||
+ | |||
+ | # | ||
+ | rm -rf / | ||
+ | rm -rf / | ||
+ | localedef -i / | ||
+ | localedef -i / | ||
+ | localedef -i / | ||
+ | find / | ||
+ | find / | ||
+ | |||
+ | #kernel | ||
+ | rm -rf / | ||
+ | |||
+ | #perl is needed only during setup | ||
+ | rpm -e --nodeps perl perl-libs | ||
+ | |||
+ | #funny X setup | ||
+ | cat >/ | ||
+ | metacity & | ||
+ | xterm | ||
+ | EOF | ||
+ | |||
+ | chmod +x / | ||
+ | |||
+ | cat >/ | ||
+ | #! /bin/sh | ||
+ | |||
+ | PATH=/ | ||
+ | # We need to source this so that the login screens get translated | ||
+ | [ -f / | ||
+ | startx | ||
+ | EOF | ||
+ | |||
+ | chmod +x / | ||
%end | %end | ||
</ | </ | ||
+ | |||
+ | Оно работает! ((: | ||
+ |
etc/users/jcmvbkbc/linux128.txt · Last modified: 2016/08/08 20:53 by kel