升级到gnome2.22后的几个问题及其解决
sudo不需要输入密码

一步一步打造自己的Linux--LFS6.3安装过程(八)

獨立的圓 posted @ 2008年3月27日 00:01 in Linux with tags LFS , 8158 阅读

 本站文章已轉移,敬請移步:http://www.xxb.me/ ,謝謝!

Mktemp-1.5
Module-Init-Tools-3.2.2
Patch-2.5.4
Psmisc-22.5
Shadow-4.0.18.1
Sysklogd-1.4.1
Sysvinit-2.86
Tar-1.18
Texinfo-4.9
Udev-113
Util-linux-2.12r

由于一次操作不慎,我硬盘的东西都没了,LFS也不例外,又由于时间关系,暂不玩LFS。所以这一系列的文章告一段落,没有下文了,有时间再卷土重来~~

Mktemp

  1. $ tar xvf $LFS/mktemp-1.5.tar.gz
  2. $ cd mktemp-1.5
  3. $ patch -Np1 -i $LFS/mktemp-1.5-add_tempfile-3.patch
  4. $ ./configure --prefix=/usr --with-libc
  5. $ make
  6. $ make install
  7. $ make install-tempfile
  8. $ cd ..
  9. $ rm -rf cd mktemp-1.5

module-init-tools

  1. $ tar xvf $LFS/module-init-tools-3.2.2.tar.bz2
  2. $ cd module-init-tools-3.2.2
  3. $ patch -Np1 -i $LFS/module-init-tools-3.2.2-modprobe-1.patch
  4. $ ./configure
  5. $ make check
  6. $ make distclean
  7. $ ./configure --prefix=/ --enable-zlib
  8. $ make
  9. $ make INSTALL=install install
  10. $ cd ..
  11. $ rm -rf module-init-tools-3.2.2

patch

  1. $ tar xvf $LFS/patch-2.5.4.tar.gz
  2. $ cd patch-2.5.4
  3. $ ./configure --prefix=/usr
  4. $ make
  5. $ make install
  6. $ cd ..
  7. $ rm -rf patch-2.5.4

psmisc

  1. $ tar xvf $LFS/psmisc-22.5.tar.gz
  2. $ cd psmisc-22.5
  3. $ ./configure --prefix=/usr --exec-prefix=""
  4. $ make
  5. $ make install
  6. $ mv -v /bin/pstree* /usr/bin
  7. $ ln -sv killall /bin/pidof
  8. $ cd ..
  9. $ rm -rf psmisc-22.5

shadow

  1. $ tar xvf $LFS/shadow-4.0.18.1.tar.bz2
  2. $ cd shadow-4.0.18.1
  3. $ patch -Np1 -i $LFS/shadow-4.0.18.1-useradd_fix-2.patch
  4. $ ./configure --libdir=/lib --sysconfdir=/etc --enable-shared \
        --without-selinux
  5. $ sed -i 's/groups$(EXEEXT) //' src/Makefile
  6. $ find man -name Makefile -exec sed -i 's/groups\.1 / /' {} \;
  7. $ sed -i -e 's/ ko//' -e 's/ zh_CN zh_TW//' man/Makefile
  8.  
  9. $ for i in de es fi fr id it pt_BR; do
  10.     convert-mans UTF-8 ISO-8859-1 man/${i}/*.?
  11. done
  12.  
  13. $ for i in de es fi fr id it pt_BR; do
        convert-mans UTF-8 ISO-8859-1 man/${i}/*.?
    done
  14. $ convert-mans UTF-8 EUC-JP man/ja/*.?
  15. $ convert-mans UTF-8 KOI8-R man/ru/*.?
  16. $ convert-mans UTF-8 ISO-8859-9 man/tr/*.?
  17.  
  18. $ sed -i -e 's@#MD5_CRYPT_ENAB.no@MD5_CRYPT_ENAB yes@' \
        -e 's@/var/spool/mail@/var/mail@' etc/login.defs
  19.  
  20. $ make
  21. $ make install
  22. $ mv -v /usr/bin/passwd /bin
  23. $ mv -v /lib/libshadow.*a /usr/lib
  24. $ rm -v /lib/libshadow.so
  25. $ ln -sfv ../../lib/libshadow.so.0 /usr/lib/libshadow.so
  26. $ pwconv
  27. $ grpconv
  28. $ useradd -D -b /home
  29. $ sed -i 's/yes/no/' /etc/default/useradd
  30. $ passwd root   #一定要设置root的密码,否则重新启动后无法登陆。
  31. $ cd ..
  32. $ rm -rf shadow-4.0.18.1

sysklogd

  1. $ tar xvf $LFS/sysklogd-1.4.1.tar.gz
  2. $ cd sysklogd-1.4.1
  3. $ patch -Np1 -i $LFS/sysklogd-1.4.1-fixes-2.patch
  4. $ patch -Np1 -i $LFS/sysklogd-1.4.1-8bit-1.patch
  5. $ make
  6. $ make install
  7.  
  8. $ cat > /etc/syslog.conf << "EOF"
    # Begin /etc/syslog.conf
     
    auth,authpriv.* -/var/log/auth.log
    *.*;auth,authpriv.none -/var/log/sys.log
    daemon.* -/var/log/daemon.log
    kern.* -/var/log/kern.log
    mail.* -/var/log/mail.log
    user.* -/var/log/user.log
    *.emerg *
     
    # End /etc/syslog.conf
    EOF
  9. $ cd ..
  10. $ rm -rf sysklogd-1.4.1

sysvinit

  1. $ tar xvf $LFS/sysvinit-2.86.tar.gz
  2. $ cd sysvinit-2.86
  3. $ sed -i 's@Sending processes@& configured via /etc/inittab@g' \
        src/init.c
  4. $ make -C src
  5. $ make -C src install
  6.  
  7. $ cat > /etc/inittab << "EOF"
    # Begin /etc/inittab
     
    id:3:initdefault:

    si::sysinit:/etc/rc.d/init.d/rc sysinit

    l0:0:wait:/etc/rc.d/init.d/rc 0
    l1:S1:wait:/etc/rc.d/init.d/rc 1
    l2:2:wait:/etc/rc.d/init.d/rc 2
    l3:3:wait:/etc/rc.d/init.d/rc 3
    l4:4:wait:/etc/rc.d/init.d/rc 4
    l5:5:wait:/etc/rc.d/init.d/rc 5
    l6:6:wait:/etc/rc.d/init.d/rc 6

    ca:12345:ctrlaltdel:/sbin/shutdown -t1 -a -r now

    su:S016:once:/sbin/sulogin

    1:2345:respawn:/sbin/agetty tty1 9600
    2:2345:respawn:/sbin/agetty tty2 9600
    3:2345:respawn:/sbin/agetty tty3 9600
    4:2345:respawn:/sbin/agetty tty4 9600
    5:2345:respawn:/sbin/agetty tty5 9600
    6:2345:respawn:/sbin/agetty tty6 9600

    # End /etc/inittab
    EOF
  8.  
  9. $ cd ..
  10. $ rm -rf sysvinit-2.86

tar

  1. $ tar xvf $LFS/tar-1.18.tar.bz2
  2. $ cd tar-1.18
  3. $ ./configure --prefix=/usr --bindir=/bin --libexecdir=/usr/sbin
  4. $ make
  5. $ make install
  6. $ cd ..
  7. $ rm -rf tar-1.18

texinfo

  1. $ tar xvf $LFS/texinfo-4.9.tar.bz2
  2. $ cd texinfo-4.9
  3. $ patch -Np1 -i $LFS/texinfo-4.9-multibyte-1.patch
  4. $ patch -Np1 -i $LFS/texinfo-4.9-tempfile_fix-1.patch
  5. $ ./configure --prefix=/usr
  6. $ make
  7. $ make install
  8. $ make TEXMF=/usr/share/texmf install-tex
  9. $ cd /usr/share/info
  10. $ rm dir
  11. $ for f in *
  12. $ do install-info $f dir 2>/dev/null
    done
  13. $ cd /sources
  14. $ rm -rf texinfo-4.9

udev

  1. $ tar xvf $LFS/udev-113.tar.bz2
  2. $ cd udev-113
  3. $ tar -xvf $LFS/udev-config-6.3.tar.bz2
  4. $ install -dv /lib/{firmware,udev/devices/{pts,shm}}
  5. $ mknod -m0666 /lib/udev/devices/null c 1 3
  6. $ ln -sv /proc/self/fd /lib/udev/devices/fd
  7. $ ln -sv /proc/self/fd/0 /lib/udev/devices/stdin
  8. $ ln -sv /proc/self/fd/1 /lib/udev/devices/stdout
  9. $ ln -sv /proc/self/fd/2 /lib/udev/devices/stderr
  10. $ ln -sv /proc/kcore /lib/udev/devices/core
  11. $ make EXTRAS="`echo extras/*/`"
  12. $ make DESTDIR=/ EXTRAS="`echo extras/*/`" install
  13. $ cp -v etc/udev/rules.d/[0-9]* /etc/udev/rules.d/
  14. $ cd udev-config-6.3
  15. $ make install
  16. $ make install-doc
  17. $ make install-extra-doc
  18. $ cd ..
  19. $ install -m644 -v docs/writing_udev_rules/index.html \
        /usr/share/doc/udev-113/index.html
  20. $ cd ..
  21. $ rm -rf udev-113
util-linux
  1. $ tar xvf $LFS/util-linux-2.12r.tar.bz2
  2. $ cd util-linux-2.12r
  3. $ sed -e 's@etc/adjtime@var/lib/hwclock/adjtime@g' \
        -i $(grep -rl '/etc/adjtime' .)
  4. $ mkdir -pv /var/lib/hwclock
  5. $ patch -Np1 -i $LFS/util-linux-2.12r-cramfs-1.patch
  6. $ patch -Np1 -i $LFS/util-linux-2.12r-lseek-1.patch
  7. $ ./configure
  8. $ make HAVE_KILL=yes HAVE_SLN=yes
  9. $ make HAVE_KILL=yes HAVE_SLN=yes install
  10. $ cd ..
  11. $ rm -rf util-linux-2.12r

登录 *


loading captcha image...
(输入验证码)
or Ctrl+Enter