LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
楼主: youbest

[原创]制作LFS过程中各个阶段恢复工作状态的方法

[复制链接]
发表于 2006-2-24 22:34:19 | 显示全部楼层
补充一下:
从开始到第6章,
只要能够保证:[color="Red"]PATH="/tools/bin:xxxx就可以了
其他的条件基本都没什么用:)
回复 支持 反对

使用道具 举报

发表于 2006-2-24 22:37:46 | 显示全部楼层
及时雨~ 刚好做到 chapter 6(还没开始), 歇一会儿,玩玩gentoo,听听歌,明天继续
回复 支持 反对

使用道具 举报

 楼主| 发表于 2006-2-24 22:45:06 | 显示全部楼层
Post by good02xaut
补充一下:
从开始到第6章,
只要能够保证:[color="Red"]PATH="/tools/bin:xxxx就可以了
其他的条件基本都没什么用:)


你要是真的从LiveCD启动来恢复工作状态,需要的步骤是很讲究的,单靠PATH=/tools/bin是绝对不行的,也许对于有过经验的人是没什么,因为发现问题能知道怎么回事,但新手还是按照规范的方式恢复到工作状态比较好,这里不能光涂省事.
回复 支持 反对

使用道具 举报

发表于 2006-2-24 22:59:34 | 显示全部楼层
我现在用的就是LiveCD硬盘的环境。
而且每次开机后,就设置这一个参数。也没建立lfs用户,就是默认的,应该是root,或者0吧

发现问题还没有,会有什么问题啊?
我进行中多次用:
[color="Red"]gcc -v  查看当前用的gcc
[color="red"]ldd /tools/bin/xx  查看刚刚编译出来的程序使用的lib是否正确

发现没有受开关机的影响,只要PATH,ok。
回复 支持 反对

使用道具 举报

发表于 2006-2-24 23:15:12 | 显示全部楼层
硬盘记录了你修改的信息,livecd不记录的。:)。也许之间有一点什么差别吧。。
回复 支持 反对

使用道具 举报

发表于 2006-2-24 23:25:30 | 显示全部楼层
可我什么也没修改啊~
我保证!
回复 支持 反对

使用道具 举报

发表于 2006-2-25 20:53:25 | 显示全部楼层
Post by youbest
我不太清楚写成hints的要求或者有什么条件,而且我英文非常的菜,如果有人愿意帮忙我不胜感激.谢谢.

幻想老大怎麽不出来说说?上次csfrank的中文版LFS手册也是他提交的嘛:confused:
回复 支持 反对

使用道具 举报

发表于 2006-2-25 20:58:33 | 显示全部楼层
我是在看谁出来先答应一下,如果没有的话,下个星期我就翻译。(这么一说,肯定就没人来了。嘿嘿。)。。

我来翻译,尽快给出结果。上次的那个,是我提交的。借花献佛。活活。
回复 支持 反对

使用道具 举报

发表于 2006-3-4 16:36:34 | 显示全部楼层
译文如下,请覆核。
~~~~~~~~~~
(VMWare的部份散略了)

AUTHOR:       youbest <youbest at sina.com>

DATE:         2006-02-16

LICENSE:      ????

SYNOPSIS:     The continuity and recovery of building environment in various LFS stages

DESCRIPTION:         This hint will assist you to resume your building environment while you
are building your LFS system in various stages using LFS LiveCD as host system

PRIMARY URI:  http://www.linuxsir.cn/bbs/showthread.php?t=242880

PREREQUISITES:  LFS LiveCD-6.1.1-3

HINT:

Foreword
========
For those who have built their own LFS system more than once, they must be very "impressed" with the extremely long building time.  In particular, if the computer configuration is not powerful, it is quite scary to learn about such lengthy building time.

Sometimes, you may be forced to shutdown or reboot the computer, which you may have to resume the previous working conditions before continuing the job.  However, it is often panic to those who are not very familiar with the principles of LFS and find difficulties in resuming their previous building environment.  To avoid this from happening, they are often keep the computer running for several days until the whole LFS task is finished.

I have studied this problem and intended to share my works on how to keep the continuity of the building process based on my own experiences.  Every steps are verified carefully and should be correct.  Hope that this hint may assist those who are building their own LFS system and relief some of their "pains".

Throughout the article, sda is block device being used.  sda1 is being used as swap and sda2 is the partition for building LFS.

The following procedures are based on sections in LFS6.1.1-3, if you use a different version of LFS-Book, the section number may be also different, please refer to the sub-heading of each section in such case.

From beginning to Section 4.4 Setting up the Environment
========================================================
There is nothing valuable, you may simply restart the process from the very beginning.

From section 4.5 About SBUs to section 5.33 Stripping
=====================================================
Below are the steps to resume the building environment during any steps from section 4.5 till the end of Chapter 5:
1. Restart computer and boot from LiveCD
2. Mount your lfs partition
  export LFS=/mnt/lfs
  mkdir -pv $LFS
  mount /dev/sda2 $LFS
3. Mount your swap partition (skip this step if you do not use any swap partitions)
  swapon /dev/sda1
4. Establish symbolic link for toolchain
  ln -sv $LFS/tools /
5. Create lfs account
  groupadd lfs
  useradd -s /bin/bash -g lfs -m -k /dev/null lfs
  passwd lfs
  chown -v lfs $LFS/tools
  chown -v lfs $LFS/sources
  su - lfs
6. Define the lfs user profile
  cat > ~/.bash_profile << "EOF"
  exec env -i HOME=$HOME TERM=$TERM PS1='\u:\w\$ ' /bin/bash
  EOF

  cat > ~/.bashrc << "EOF"
  set +h
  umask 022
  LFS=/mnt/lfs
  LC_ALL=POSIX
  PATH=/tools/bin:/bin:/usr/bin
  export LFS LC_ALL PATH
  EOF

  source ~/.bash_profile
7. Verify the environment variables
  export //the export command should output the following:
  declare -x HOME="/home/lfs"
  declare -x LC_ALL="OSIX"
  declare -x LFS="/mnt/lfs"
  declare -x OLDPWD
  declare -x PATH="/tools/bin:/bin:/usr/bin"
  declare -x PS1="\\u:\\w\\\$ "
  declare -x PWD="/home/lfs"
  declare -x SHLVL="1"
  declare -x TERM="linux"
If you get these variables correct, then you have already resumed your building environment.

Section 6.1 Introduction
========================
At this point, you are probably tired and prefer to shutdown your computer for a rest. Steps to resume the building environment are:
1. Restart computer and boot from LiveCD
2. Mount your lfs partition
  export LFS=/mnt/lfs
  mkdir -pv $LFS
  mount /dev/sda2 $LFS
3. Mount your swap partition (skip this step if you do not use any swap partitions)
  swapon /dev/sda1
Remark:
At this point, the toolchain is already built up in the previous chapters, it is not
necessary to create the symbolic link for the /tools directory again.

From section 6.2. Mounting Virtual Kernel File Systems to section 6.8. Populating /dev
======================================================================================
At this point, if you reboot or shutdown your computer.  Steps to resume the building environment are:
1. Restart computer and boot from LiveCD
2. Mount your lfs partition
  export LFS=/mnt/lfs
  mkdir -pv $LFS
  mount /dev/sda2 $LFS
3. Mount your swap partition (skip this step if you do not use any swap partitions)
  swapon /dev/sda1
4. Mount the virtual kernel filesystems
  mount -vt proc proc $LFS/proc
  mount -vt sysfs sysfs $LFS/sys
5. Entering the chroot environment
  chroot "$LFS" /tools/bin/env -i \
  HOME=/root TERM="$TERM" PS1='\u:\w\$ ' \
   PATH=/bin:/usr/bin:/sbin:/usr/sbin:/tools/bin \
  /tools/bin/bash --login +h

From section 6.9. Linux-Libc-Headers-2.6.11.2 to section 6.37. Bash-3.0
=======================================================================
From this point to the end of Bash-3.0 (before File-4.13) in Chapter 6, at any moment if you reboot or shutdown your computer.  Steps to resume the building environment are:
1. Restart computer and boot from LiveCD
2. Mount your lfs partition
  export LFS=/mnt/lfs
  mkdir -pv $LFS
  mount /dev/sda2 $LFS
3. Mount your swap partition (skip this step if you do not use any swap partitions)
  swapon /dev/sda1
4. Mount the virtual kernel filesystems
  mount -vt proc proc $LFS/proc
  mount -vt sysfs sysfs $LFS/sys
5. Entering the chroot environment
  chroot "$LFS" /tools/bin/env -i \
  HOME=/root TERM="$TERM" PS1='\u:\w\$ ' \
   PATH=/bin:/usr/bin:/sbin:/usr/sbin:/tools/bin \
  /tools/bin/bash --login +h
6. Populating /dev
  mount -nvt tmpfs none /dev
  mknod -m 622 /dev/console c 5 1
  mknod -m 666 /dev/null c 1 3
  mknod -m 666 /dev/zero c 1 5
  mknod -m 666 /dev/ptmx c 5 2
  mknod -m 666 /dev/tty c 5 0
  mknod -m 444 /dev/random c 1 8
  mknod -m 444 /dev/urandom c 1 9
  chown -v root:tty /dev/{console,ptmx,tty}
  ln -sv /proc/self/fd /dev/fd
  ln -sv /proc/self/fd/0 /dev/stdin
  ln -sv /proc/self/fd/1 /dev/stdout
  ln -sv /proc/self/fd/2 /dev/stderr
  ln -sv /proc/kcore /dev/core
  mkdir -v /dev/pts
  mkdir -v /dev/shm
  mount -vt devpts -o gid=4,mode=620 none /dev/pts
  mount -vt tmpfs none /dev/shm
7. Entering your working directory
  cd /sources

From 6.38. File-4.13 to section 6.58. Udev-056
==============================================
From this point to Udev-056 in Chapter 6, at any moment if you reboot or shutdown your computer.  Steps to resume the building environment are:
1. Restart computer and boot from LiveCD
2. Mount your lfs partition
  export LFS=/mnt/lfs
  mkdir -pv $LFS
  mount /dev/sda2 $LFS
3. Mount your swap partition (skip this step if you do not use any swap partitions)
  swapon /dev/sda1
4. Mount the virtual kernel filesystems
  mount -vt proc proc $LFS/proc
  mount -vt sysfs sysfs $LFS/sys
5. Entering the chroot environment
  chroot "$LFS" /tools/bin/env -i \
  HOME=/root TERM="$TERM" PS1='\u:\w\$ ' \
   PATH=/bin:/usr/bin:/sbin:/usr/sbin:/tools/bin \
  /bin/bash --login +h
6. Populating /dev
  mount -nvt tmpfs none /dev
  mknod -m 622 /dev/console c 5 1
  mknod -m 666 /dev/null c 1 3
  mknod -m 666 /dev/zero c 1 5
  mknod -m 666 /dev/ptmx c 5 2
  mknod -m 666 /dev/tty c 5 0
  mknod -m 444 /dev/random c 1 8
  mknod -m 444 /dev/urandom c 1 9
  chown -v root:tty /dev/{console,ptmx,tty}
  ln -sv /proc/self/fd /dev/fd
  ln -sv /proc/self/fd/0 /dev/stdin
  ln -sv /proc/self/fd/1 /dev/stdout
  ln -sv /proc/self/fd/2 /dev/stderr
  ln -sv /proc/kcore /dev/core
  mkdir -v /dev/pts
  mkdir -v /dev/shm
  mount -vt devpts -o gid=4,mode=620 none /dev/pts
  mount -vt tmpfs none /dev/shm
7. Entering your working directory
  cd /sources

From section 6.59. Util-linux-2.12q to section 6.60. About Debugging Symbols
============================================================================
From this point to Stripping Again in Chapter 6, at any moment if you reboot or
shutdown your computer.  Steps to resume the building environment are:
1. Restart computer and boot from LiveCD
2. Mount your lfs partition
  export LFS=/mnt/lfs
  mkdir -pv $LFS
  mount /dev/sda2 $LFS
3. Mount your swap partition (skip this step if you do not use any swap partitions)
  swapon /dev/sda1
4. Mount the virtual kernel filesystems
  mount -vt proc proc $LFS/proc
  mount -vt sysfs sysfs $LFS/sys
5. Entering the chroot environment
  chroot "$LFS" /tools/bin/env -i \
  HOME=/root TERM="$TERM" PS1='\u:\w\$ ' \
   PATH=/bin:/usr/bin:/sbin:/usr/sbin:/tools/bin \
  /bin/bash --login +h
6. Populating /dev
  mount -nvt tmpfs none /dev
  /sbin/udevstart
  mkdir -v /dev/pts
  mkdir -v /dev/shm
  mount -vt devpts -o gid=4,mode=620 none /dev/pts
  mount -vt tmpfs none /dev/shm
7. Entering your working directory
  cd /sources

Section 6.61. Stripping Again
=============================
If you reboot your computer at this moment, steps to resume the building
environment are:
1. Restart computer and boot from LiveCD
2. Mount your lfs partition
  export LFS=/mnt/lfs
  mkdir -pv $LFS
  mount /dev/sda2 $LFS
3. Mount your swap partition (skip this step if you do not use any swap partitions)
  swapon /dev/sda1
4. Mount the virtual kernel filesystems
  mount -vt proc proc $LFS/proc
  mount -vt sysfs sysfs $LFS/sys
5. Entering the chroot environment
  chroot $LFS /tools/bin/env -i \
  HOME=/root TERM=$TERM PS1='\u:\w\$ ' \
  PATH=/bin:/usr/bin:/sbin:/usr/sbin \
  /tools/bin/bash --login
6. Populating /dev
  mount -nvt tmpfs none /dev
  /sbin/udevstart
  mkdir -v /dev/pts
  mkdir -v /dev/shm
  mount -vt devpts -o gid=4,mode=620 none /dev/pts
  mount -vt tmpfs none /dev/shm
7. Entering your working directory
  cd /sources

From section 6.62. Cleaning Up to The End
=========================================
From this point till the end of the whole LFS build.  Steps to resume the building
environment are:
1. Restart computer and boot from LiveCD
2. Mount your lfs partition
  export LFS=/mnt/lfs
  mkdir -pv $LFS
  mount /dev/sda2 $LFS
3. Mount your swap partition (skip this step if you do not use any swap partitions)
  swapon /dev/sda1
4. Mount the virtual kernel filesystems
  mount -vt proc proc $LFS/proc
  mount -vt sysfs sysfs $LFS/sys
5. Entering the chroot environment
  chroot "$LFS" /usr/bin/env -i \
  HOME=/root TERM="$TERM" PS1='\u:\w\$ ' \
   PATH=/bin:/usr/bin:/sbin:/usr/sbin \
  /bin/bash --login
6. Populating /dev
  mount -nvt tmpfs none /dev
  /sbin/udevstart
  mkdir -v /dev/pts
  mkdir -v /dev/shm
  mount -vt devpts -o gid=4,mode=620 none /dev/pts
  mount -vt tmpfs none /dev/shm
7. Entering your working directory
  cd /sources
回复 支持 反对

使用道具 举报

发表于 2006-3-4 17:20:19 | 显示全部楼层
兄弟翻译的真快,费心了。稍微校对了一下。

AUTHOR: youbest <youbest at sina dot com>

TRANSLATOR: d00m3d <doom3d at sina dot com>

DATE: 2006-02-16

LICENSE: [color="Red"]GPL

SYNOPSIS: How to resume from a break during different LFS stages.

DESCRIPTION: This hint helps you setting up your building environment at different stages. LFS LiveCD is used as the host system.

PRIMARY URI: http://www.linuxsir.cn/bbs/showthread.php?t=242880

PREREQUISITES: LFS LiveCD-6.1.1-3

HINT:

Foreword
========
For those who have built their own LFS systems more than once, they must be very "impressed" with the extremely long building time. In particular, if the computer is not a powerful one. It is quite scary to learn about such lengthy building time.

Sometimes, you may be forced to shutdown or reboot the computer, which you have to resume your previous working conditions before continuing the job. However, this process would be quite confusing to those who are not familiar with the principles of LFS and they are likely to have difficulties in resuming their previous building environment. To avoid this from happening, they often keep the computer running for several days until the whole LFS is finished.

Thus it is very useful to know how to have a smooth connection after a reboot/shutdown. Based on my own experiences I did a research on this topic and would like to share my results.  Every steps are carefully verified and should be correct. Hope this hint may assist those who are building their own LFS system and relief some of their "pains".

Throughout the article, sda is block device being used. sda1 is being used as swap and sda2 is the partition for building LFS.

The following procedures are based on LFS6.1.1-3. If a different book version is used, the section number may be different as well, please refer to the sub-heading of each section in such case.

From beginning to Section 4.4 Setting up the Environment
========================================================
You may simply restart the process from the very beginning.

From section 4.5 About SBUs to section 5.33 Stripping
=====================================================
Following are the steps for resuming the building environment from any stages starting from section 4.5 till the end of Chapter 5:
1. Restart computer and boot from LiveCD
2. Mount your lfs partition
  export LFS=/mnt/lfs
  mkdir -pv $LFS
  mount /dev/sda2 $LFS
3. Mount your swap partition (skip this step if you do not use any swap partitions)
  swapon /dev/sda1
4. Establish symbolic link for toolchain
  ln -sv $LFS/tools /
5. Create lfs account
  groupadd lfs
  useradd -s /bin/bash -g lfs -m -k /dev/null lfs
  passwd lfs
  chown -v lfs $LFS/tools
  chown -v lfs $LFS/sources
  su - lfs
6. Define the lfs user profile
  cat > ~/.bash_profile << "EOF"
  exec env -i HOME=$HOME TERM=$TERM PS1='\u:\w\$ ' /bin/bash
  EOF

  cat > ~/.bashrc << "EOF"
  set +h
  umask 022
  LFS=/mnt/lfs
  LC_ALL=POSIX
  PATH=/tools/bin:/bin:/usr/bin
  export LFS LC_ALL PATH
  EOF

  source ~/.bash_profile
7. Verify the environment variables
  export //the export command should output the following:
  declare -x HOME="/home/lfs"
  declare -x LC_ALL="OSIX"
  declare -x LFS="/mnt/lfs"
  declare -x OLDPWD
  declare -x PATH="/tools/bin:/bin:/usr/bin"
  declare -x PS1="\\u:\\w\\\$ "
  declare -x PWD="/home/lfs"
  declare -x SHLVL="1"
  declare -x TERM="linux"
If you get these variables correct, then you have already resumed your building environment.

Section 6.1 Introduction
========================
At this point, you are probably tired and prefer to shutdown your computer for a rest. Steps to resume the building environment are:
1. Restart computer and boot from LiveCD
2. Mount your lfs partition
  export LFS=/mnt/lfs
  mkdir -pv $LFS
  mount /dev/sda2 $LFS
3. Mount your swap partition (skip this step if you do not use any swap partitions)
  swapon /dev/sda1
Remark:
At this point, the toolchain is already built up in the previous chapters, it is not
necessary to create the symbolic link for the /tools directory again.

From section 6.2. Mounting Virtual Kernel File Systems to section 6.8. Populating /dev
======================================================================================
At this point, if you reboot or shutdown your computer. Steps to resume the building environment are:
1. Restart computer and boot from LiveCD
2. Mount your lfs partition
  export LFS=/mnt/lfs
  mkdir -pv $LFS
  mount /dev/sda2 $LFS
3. Mount your swap partition (skip this step if you do not use any swap partitions)
  swapon /dev/sda1
4. Mount the virtual kernel filesystems
  mount -vt proc proc $LFS/proc
  mount -vt sysfs sysfs $LFS/sys
5. Entering the chroot environment
  chroot "$LFS" /tools/bin/env -i \
  HOME=/root TERM="$TERM" PS1='\u:\w\$ ' \
   PATH=/bin:/usr/bin:/sbin:/usr/sbin:/tools/bin \
  /tools/bin/bash --login +h

From section 6.9. Linux-Libc-Headers-2.6.11.2 to section 6.37. Bash-3.0
=======================================================================
From this point to the end of Bash-3.0 (before File-4.13) in Chapter 6, at any moment if you reboot or shutdown your computer. Steps to resume the building environment are:
1. Restart computer and boot from LiveCD
2. Mount your lfs partition
  export LFS=/mnt/lfs
  mkdir -pv $LFS
  mount /dev/sda2 $LFS
3. Mount your swap partition (skip this step if you do not use any swap partitions)
  swapon /dev/sda1
4. Mount the virtual kernel filesystems
  mount -vt proc proc $LFS/proc
  mount -vt sysfs sysfs $LFS/sys
5. Entering the chroot environment
  chroot "$LFS" /tools/bin/env -i \
  HOME=/root TERM="$TERM" PS1='\u:\w\$ ' \
   PATH=/bin:/usr/bin:/sbin:/usr/sbin:/tools/bin \
  /tools/bin/bash --login +h
6. Populating /dev
  mount -nvt tmpfs none /dev
  mknod -m 622 /dev/console c 5 1
  mknod -m 666 /dev/null c 1 3
  mknod -m 666 /dev/zero c 1 5
  mknod -m 666 /dev/ptmx c 5 2
  mknod -m 666 /dev/tty c 5 0
  mknod -m 444 /dev/random c 1 8
  mknod -m 444 /dev/urandom c 1 9
  chown -v root:tty /dev/{console,ptmx,tty}
  ln -sv /proc/self/fd /dev/fd
  ln -sv /proc/self/fd/0 /dev/stdin
  ln -sv /proc/self/fd/1 /dev/stdout
  ln -sv /proc/self/fd/2 /dev/stderr
  ln -sv /proc/kcore /dev/core
  mkdir -v /dev/pts
  mkdir -v /dev/shm
  mount -vt devpts -o gid=4,mode=620 none /dev/pts
  mount -vt tmpfs none /dev/shm
7. Entering your working directory
  cd /sources

From 6.38. File-4.13 to section 6.58. Udev-056
==============================================
From this point to Udev-056 in Chapter 6, at any moment if you reboot or shutdown your computer. Steps to resume the building environment are:
1. Restart computer and boot from LiveCD
2. Mount your lfs partition
  export LFS=/mnt/lfs
  mkdir -pv $LFS
  mount /dev/sda2 $LFS
3. Mount your swap partition (skip this step if you do not use any swap partitions)
  swapon /dev/sda1
4. Mount the virtual kernel filesystems
  mount -vt proc proc $LFS/proc
  mount -vt sysfs sysfs $LFS/sys
5. Entering the chroot environment
  chroot "$LFS" /tools/bin/env -i \
  HOME=/root TERM="$TERM" PS1='\u:\w\$ ' \
   PATH=/bin:/usr/bin:/sbin:/usr/sbin:/tools/bin \
  /bin/bash --login +h
6. Populating /dev
  mount -nvt tmpfs none /dev
  mknod -m 622 /dev/console c 5 1
  mknod -m 666 /dev/null c 1 3
  mknod -m 666 /dev/zero c 1 5
  mknod -m 666 /dev/ptmx c 5 2
  mknod -m 666 /dev/tty c 5 0
  mknod -m 444 /dev/random c 1 8
  mknod -m 444 /dev/urandom c 1 9
  chown -v root:tty /dev/{console,ptmx,tty}
  ln -sv /proc/self/fd /dev/fd
  ln -sv /proc/self/fd/0 /dev/stdin
  ln -sv /proc/self/fd/1 /dev/stdout
  ln -sv /proc/self/fd/2 /dev/stderr
  ln -sv /proc/kcore /dev/core
  mkdir -v /dev/pts
  mkdir -v /dev/shm
  mount -vt devpts -o gid=4,mode=620 none /dev/pts
  mount -vt tmpfs none /dev/shm
7. Entering your working directory
  cd /sources

From section 6.59. Util-linux-2.12q to section 6.60. About Debugging Symbols
============================================================================
From this point to Stripping Again in Chapter 6, at any moment if you reboot or
shutdown your computer. Steps to resume the building environment are:
1. Restart computer and boot from LiveCD
2. Mount your lfs partition
  export LFS=/mnt/lfs
  mkdir -pv $LFS
  mount /dev/sda2 $LFS
3. Mount your swap partition (skip this step if you do not use any swap partitions)
  swapon /dev/sda1
4. Mount the virtual kernel filesystems
  mount -vt proc proc $LFS/proc
  mount -vt sysfs sysfs $LFS/sys
5. Entering the chroot environment
  chroot "$LFS" /tools/bin/env -i \
  HOME=/root TERM="$TERM" PS1='\u:\w\$ ' \
   PATH=/bin:/usr/bin:/sbin:/usr/sbin:/tools/bin \
  /bin/bash --login +h
6. Populating /dev
  mount -nvt tmpfs none /dev
  /sbin/udevstart
  mkdir -v /dev/pts
  mkdir -v /dev/shm
  mount -vt devpts -o gid=4,mode=620 none /dev/pts
  mount -vt tmpfs none /dev/shm
7. Entering your working directory
  cd /sources

Section 6.61. Stripping Again
=============================
If you reboot your computer at this moment, steps to resume the building
environment are:
1. Restart computer and boot from LiveCD
2. Mount your lfs partition
  export LFS=/mnt/lfs
  mkdir -pv $LFS
  mount /dev/sda2 $LFS
3. Mount your swap partition (skip this step if you do not use any swap partitions)
  swapon /dev/sda1
4. Mount the virtual kernel filesystems
  mount -vt proc proc $LFS/proc
  mount -vt sysfs sysfs $LFS/sys
5. Entering the chroot environment
  chroot $LFS /tools/bin/env -i \
  HOME=/root TERM=$TERM PS1='\u:\w\$ ' \
  PATH=/bin:/usr/bin:/sbin:/usr/sbin \
  /tools/bin/bash --login
6. Populating /dev
  mount -nvt tmpfs none /dev
  /sbin/udevstart
  mkdir -v /dev/pts
  mkdir -v /dev/shm
  mount -vt devpts -o gid=4,mode=620 none /dev/pts
  mount -vt tmpfs none /dev/shm
7. Entering your working directory
  cd /sources

From section 6.62. Cleaning Up to The End
=========================================
From this point till the end of the whole LFS build. Steps to resume the building
environment are:
1. Restart computer and boot from LiveCD
2. Mount your lfs partition
  export LFS=/mnt/lfs
  mkdir -pv $LFS
  mount /dev/sda2 $LFS
3. Mount your swap partition (skip this step if you do not use any swap partitions)
  swapon /dev/sda1
4. Mount the virtual kernel filesystems
  mount -vt proc proc $LFS/proc
  mount -vt sysfs sysfs $LFS/sys
5. Entering the chroot environment
  chroot "$LFS" /usr/bin/env -i \
  HOME=/root TERM="$TERM" PS1='\u:\w\$ ' \
   PATH=/bin:/usr/bin:/sbin:/usr/sbin \
  /bin/bash --login
6. Populating /dev
  mount -nvt tmpfs none /dev
  /sbin/udevstart
  mkdir -v /dev/pts
  mkdir -v /dev/shm
  mount -vt devpts -o gid=4,mode=620 none /dev/pts
  mount -vt tmpfs none /dev/shm
7. Entering your working directory
  cd /sources


Changelog:
1.0.   Initial Version
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表