Changeset 716db1f for chapter07/cleanup.xml
- Timestamp:
- 09/20/2021 07:37:34 AM (3 years ago)
- Branches:
- multilib
- Children:
- 60870bc
- Parents:
- e680022 (diff), 7e62bbc (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
chapter07/cleanup.xml
re680022 r716db1f 10 10 11 11 <title>Cleaning up and Saving the Temporary System</title> 12 12 13 13 <sect2> 14 14 <title>Cleaning</title> … … 21 21 <para>Second, the libtool .la files are only useful when linking with static 22 22 libraries. They are unneeded and potentially harmful when using dynamic 23 shared libraries, specially when using non-autotools build systems.23 shared libraries, especially when using non-autotools build systems. 24 24 While still in chroot, remove those files now:</para> 25 25 … … 30 30 31 31 <para> 32 The current system size is now about 3 GB, however 32 The current system size is now about 3 GB, however 33 33 the /tools directory is no longer needed. It uses about 34 34 1 GB of disk space. Delete it now: … … 41 41 <title>Backup</title> 42 42 43 <para> 44 At this point the essential programs and libraries have been created 45 and your current LFS system is in a good state. Your system can now be 46 backed up for later reuse. In case of fatal failures in the subsequent 47 chapters, it often turns out that removing everything and starting over 48 (more carefully) is the best option to recover. Unfortunately, all the 49 temporary files will be removed, too. To avoid spending extra time to 50 redo something which has been built successfully, creating a backup of 51 the current LFS system may prove useful. 52 </para> 53 43 54 <note><para> 44 55 All the remaining steps in this section are optional. Nevertheless, … … 46 57 linkend="chapter-building-system"/>, the temporary files will be 47 58 overwritten. So it may be a good idea to do a backup of the current 48 system as described below. 59 system as described below. 49 60 </para></note> 50 61 51 62 <para> 52 63 The following steps are performed from outside the chroot … … 60 71 </para> 61 72 73 <para> 74 If you have decided to make a backup, leave the chroot environment: 75 </para> 76 77 <screen role="nodump"><userinput>exit</userinput></screen> 78 62 79 <important> 63 <para>All of the following instructions are executed by 64 <systemitem class="username">root</systemitem>. Take extra 65 care about the commands you're going to run as mistakes 80 <para> 81 All of the following instructions are executed by 82 <systemitem class="username">root</systemitem> on your host system. 83 Take extra care about the commands you're going to run as mistakes 66 84 here can modify your host system. Be aware that the 67 environment variable <envar>LFS</envar> 68 is set for user <systemitem class="username">lfs</systemitem> by default 69 but may <emphasis>not</emphasis> be set for 70 <systemitem class="username">root</systemitem>. Whenever 71 commands are to be executed by <systemitem class="username">root</systemitem>, 85 environment variable <envar>LFS</envar> 86 is set for user <systemitem class="username">lfs</systemitem> by default 87 but may <emphasis>not</emphasis> be set for 88 <systemitem class="username">root</systemitem>. 89 </para> 90 <para> 91 Whenever commands are to be executed by <systemitem class="username">root</systemitem>, 72 92 make sure you have set <envar>LFS</envar>. 93 </para> 94 <para> 73 95 This has been discussed in <xref linkend='ch-partitioning-aboutlfs'/>. 74 96 </para> 75 97 </important> 76 98 77 <para> 78 Now, if you are making a backup, leave the chroot environment: 79 </para> 99 <para>Before making a backup, unmount the virtual file systems:</para> 80 100 81 <screen role="nodump"><userinput>exit</userinput></screen> 101 <screen role="nodump"><userinput>umount $LFS/dev/pts 102 umount $LFS/{sys,proc,run,dev}</userinput></screen> 82 103 83 104 <para> 84 At this point the essential programs and libraries have been created 85 and your current system is in a good state. Your system can now be 86 backed up for later reuse. In case of fatal failures in the subsequent 87 chapters, it often turns out that removing everything and starting over 88 (more carefully) is the best option to recover. Unfortunately, all the 89 temporary files will be removed, too. To avoid spending extra time to 90 redo something which has been built successfully, prepare a backup. 105 Make sure you have at least 1 GB free disk space (the source tarballs 106 will be included in the backup archive) on the filesystem containing 107 directory where you create the backup archive. 91 108 </para> 92 109 93 110 <para> 94 Make sure you have at least 1 GB free disk space (the source tarballs95 will be included in the backup archive) in the home directory of user96 <systemitem class="username">root</systemitem>.111 Note that the instructions below specify the home directory of the host 112 system's <systemitem class="username">root</systemitem> user, which is 113 typically found on the root filesystem. 97 114 </para> 98 115 99 <para>Before we make a backup, unmount the virtual file systems:</para> 100 101 <screen role="nodump"><userinput>umount $LFS/dev{/pts,} 102 umount $LFS/{sys,proc,run}</userinput></screen> 116 <para> 117 Replace <envar>$HOME</envar> by a directory of your choice if you 118 do not want to have the backup stored in <systemitem 119 class="username">root</systemitem>'s home directory. 120 </para> 103 121 104 122 <para> … … 111 129 long time (over 10 minutes) even on a resonably fast system. 112 130 </para> 113 114 <para>115 Also, ensure the <envar>LFS</envar> environment variable is set116 for the root user.117 </para>118 131 </note> 119 132 120 <screen role="nodump" revision="sysv"><userinput>cd $LFS 133 <screen role="nodump" revision="sysv"><userinput>cd $LFS 121 134 tar -cJpf $HOME/lfs-temp-tools-&version;.tar.xz .</userinput></screen> 122 135 123 <screen role="nodump" revision="systemd"><userinput>cd $LFS 136 <screen role="nodump" revision="systemd"><userinput>cd $LFS 124 137 tar -cJpf $HOME/lfs-temp-tools-&versiond;.tar.xz .</userinput></screen> 125 138 126 <para>127 Replace <envar>$HOME</envar> by a directory of your choice if you128 do not want to have the backup stored in <systemitem129 class="username">root</systemitem>'s home directory.130 </para>131 139 </sect2> 132 140 … … 137 145 In case some mistakes have been made and you need to start over, you can 138 146 use this backup to restore the system and save some recovery time. 139 Since the sources are located under 147 Since the sources are located under 140 148 <filename class="directory">$LFS</filename>, they are included in the 141 149 backup archive as well, so they do not need to be downloaded again. After … … 148 156 149 157 <warning><para>The following commands are extremly dangerous. If 150 you run <command>rm -rf ./*</command> as the root user and you 151 do not change to the $LFS directory or the <envar>LFS</envar> 152 environment variable is not set for the root user, it will destroy 158 you run <command>rm -rf ./*</command> as the root user and you 159 do not change to the $LFS directory or the <envar>LFS</envar> 160 environment variable is not set for the root user, it will destroy 153 161 your entire host system. YOU ARE WARNED.</para></warning> 154 162 155 <screen role="nodump" revision="sysv"><computeroutput>cd $LFS 156 rm -rf ./* 163 <screen role="nodump" revision="sysv"><computeroutput>cd $LFS 164 rm -rf ./* 157 165 tar -xpf $HOME/lfs-temp-tools-&version;.tar.xz</computeroutput></screen> 158 166 159 <screen role="nodump" revision="systemd"><computeroutput>cd $LFS 160 rm -rf ./* 167 <screen role="nodump" revision="systemd"><computeroutput>cd $LFS 168 rm -rf ./* 161 169 tar -xpf $HOME/lfs-temp-tools-&versiond;.tar.xz</computeroutput></screen> 162 170 … … 176 184 </para> 177 185 </important> 178 186 179 187 </sect2> 180 188
Note:
See TracChangeset
for help on using the changeset viewer.