wok annotate slitaz-loram-cdrom/stuff/loram.rootfs @ rev 2381
rt2860sta: remove potential warning for tazpkg
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Sun Mar 08 12:57:59 2009 +0000 (2009-03-08) |
parents | f0963019ca5a |
children | d09310ff02e5 |
rev | line source |
---|---|
pascal@309 | 1 echo "$(du -hs /usr | cut -f1) were used by /usr" |
pascal@954 | 2 lib/ld-*.so --list ./sbin/insmod | grep /usr/lib | cut -d\ -f3 | \ |
pascal@954 | 3 while read ii; do |
pascal@954 | 4 mv .${ii%%.so.*}.so* ./lib |
pascal@954 | 5 done |
pascal@309 | 6 for ii in /sbin /lib /bin; do |
pascal@309 | 7 mkdir -p ./usr/.moved$ii |
pascal@390 | 8 for j in e2fsprogs pcmciautils cpio syslinux-extra isapnptools ncurses \ |
pascal@390 | 9 libcap; do |
pascal@744 | 10 for k in $(grep -s ^$ii /var/lib/tazpkg/installed/$j/files.list) ; do |
pascal@309 | 11 [ -f .$k ] || continue |
pascal@309 | 12 mv .$k ./usr/.moved$k |
pascal@309 | 13 ln -s /usr/.moved$k .$k |
pascal@309 | 14 done |
pascal@309 | 15 done |
pascal@309 | 16 done |
pascal@390 | 17 k="$(ls /lib/lib[rp]*.so)" |
pascal@390 | 18 [ -x /bin/funionfs ] && k="$(ls /lib/libresolv*.so)" |
pascal@390 | 19 for ii in /var/lib/tazpkg/installed /lib/modules/*/kernel/drivers/net \ |
pascal@2140 | 20 /lib/modules/*/kernel/sound /sbin/depmod /sbin/modinfo /sbin/lsmod \ |
pascal@390 | 21 /lib/libns*.so $k; do |
pascal@390 | 22 [ -L .$ii ] && continue |
pascal@309 | 23 j=$(dirname /usr/.moved$ii) |
pascal@309 | 24 mkdir -p .$j |
pascal@309 | 25 mv .$ii .$j |
pascal@309 | 26 ln -s /usr/.moved$ii .$ii |
pascal@309 | 27 done |
pascal@390 | 28 echo "$(du -hs ./usr/.moved | cut -f1) have been moved into /usr" |
pascal@370 | 29 usr=usr |
pascal@1884 | 30 if [ -x bin/funionfs -o -d /var/lib/tazpkg/installed/aufs ]; then |
pascal@370 | 31 usr=.usr.ro |
pascal@370 | 32 mkdir .usr.ro .usr.rw |
pascal@1884 | 33 fi |
pascal@1884 | 34 if [ -x bin/funionfs -o -x usr/bin/mkcromfs ]; then |
pascal@1884 | 35 ln -s /$usr/lib/$(cd usr/lib ; ls libfuse.so.2.*) lib/libfuse.so.2 |
pascal@370 | 36 fi |
pascal@370 | 37 if [ -x usr/bin/mkcromfs ]; then |
pascal@370 | 38 usr/bin/mkcromfs -qq -f 262144 -b 16384 usr ../rootcd/usr.cromfs |
pascal@370 | 39 rm -rf usr |
pascal@370 | 40 mkdir usr |
pascal@370 | 41 for ii in unmkcromfs cromfs-driver ; do |
pascal@370 | 42 mv bin/$ii ../rootcd |
pascal@370 | 43 ln -s /cdrom/$ii bin/$ii |
pascal@370 | 44 done |
pascal@370 | 45 elif [ -x usr/sbin/mksquashfs ]; then |
pascal@309 | 46 usr/sbin/mksquashfs usr ../rootcd/usr.sqfs |
pascal@309 | 47 rm -rf usr |
pascal@309 | 48 mkdir usr |
pascal@309 | 49 else |
pascal@309 | 50 mv usr ../rootcd |
pascal@390 | 51 [ "$usr" = "usr" ] || mv $usr usr |
pascal@370 | 52 ln -s /cdrom/usr $usr |
pascal@309 | 53 fi |
pascal@850 | 54 if [ -d ../rootcd/usr/lib ]; then |
pascal@850 | 55 for ii in *; do |
pascal@850 | 56 case "$ii" in |
pascal@1096 | 57 usr|boot|home) continue;; |
pascal@850 | 58 mnt|media|sys|proc|cdrom) mkdir ../rootcd/$ii;; |
pascal@850 | 59 *) cp -a $ii ../rootcd/$ii;; |
pascal@850 | 60 esac |
pascal@850 | 61 done |
pascal@1096 | 62 for ii in media/*; do |
pascal@1096 | 63 [ "$ii" = "media/cdrom" ] || mkdir ../rootcd/$ii |
pascal@1096 | 64 done |
pascal@850 | 65 for ii in keymap.conf locale.conf resolv.conf TZ motd; do |
pascal@1096 | 66 rm -f ../rootcd/etc/$ii |
pascal@1096 | 67 ln -s /tmp/$ii ../rootcd/etc/$ii |
pascal@850 | 68 done |
pascal@1097 | 69 ln -s /tmp/detected-modules ../rootcd/var/lib/detected-modules |
pascal@850 | 70 for ii in log run lock; do |
pascal@850 | 71 mv ../rootcd/var/$ii ../rootcd/var/$ii.ORG |
pascal@1096 | 72 ln -s /tmp ../rootcd/var/$ii |
pascal@850 | 73 done |
pascal@850 | 74 mv ../rootcd/root ../rootcd/root.ORG |
pascal@850 | 75 ln -s /tmp ../rootcd/root |
pascal@1096 | 76 ln -s /tmp ../rootcd/home |
pascal@850 | 77 ln -s / ../rootcd/media/cdrom |
pascal@850 | 78 mkdir ../rootcd/mnt/target |
pascal@850 | 79 sed -i 's/CLEAN_UP_SYSTEM="yes"/CLEAN_UP_SYSTEM="no"/' ../rootcd/etc/rcS.conf |
pascal@850 | 80 sed -i 's/RUN_DAEMONS=.*/RUN_DAEMONS=""/' ../rootcd/etc/rcS.conf |
pascal@850 | 81 for ii in ../rootcd/boot/isolinux/*.cfg; do |
pascal@850 | 82 cat $ii | awk '{ print } /append/ { printf "label loram\n\tkernel /boot/bzImage\n\tappend ro sound=noconf screen=text %s %s %s\n",$5,$6,$7 }' > $ii.tmp |
pascal@850 | 83 mv -f $ii.tmp $ii |
pascal@850 | 84 done |
pascal@850 | 85 cat >> ../rootcd/boot/isolinux/enopts.txt <<EOT |
pascal@821 | 86 With few RAM, you can use loram entry with the cdrom device; example: |
pascal@821 | 87 boot: loram root=/dev/hdc |
pascal@821 | 88 EOT |
pascal@850 | 89 cat >> ../rootcd/boot/isolinux/options.txt <<EOT |
pascal@821 | 90 Avec peu de RAM, utilisez l'entrée loram en précisant le cdrom, exemple: |
pascal@821 | 91 boot: loram root=/dev/hdc |
pascal@821 | 92 EOT |
pascal@850 | 93 fi |
pascal@2140 | 94 for ii in bin/vcsa2txt bin/awk bin/script bin/cut bin/readlink bin/du bin/free \ |
pascal@2140 | 95 bin/killall5 bin/seq ; do |
pascal@1620 | 96 [ -e $ii ] || ln -s busybox $ii |
pascal@370 | 97 done |
pascal@309 | 98 mkdir cdrom |
pascal@309 | 99 COMPRESSION="gzip" |