Changeset 44c2fd8
- Timestamp:
- 09/08/2002 09:54:14 PM (22 years ago)
- Branches:
- 10.0, 10.0-rc1, 10.1, 10.1-rc1, 11.0, 11.0-rc1, 11.0-rc2, 11.0-rc3, 11.1, 11.1-rc1, 11.2, 11.2-rc1, 11.3, 11.3-rc1, 12.0, 12.0-rc1, 12.1, 12.1-rc1, 6.0, 6.1, 6.1.1, 6.3, 6.4, 6.5, 6.6, 6.7, 6.8, 7.0, 7.1, 7.2, 7.3, 7.4, 7.5, 7.5-systemd, 7.6, 7.6-systemd, 7.7, 7.7-systemd, 7.8, 7.8-systemd, 7.9, 7.9-systemd, 8.0, 8.1, 8.2, 8.3, 8.4, 9.0, 9.1, arm, bdubbs/gcc13, ml-11.0, multilib, renodr/libudev-from-systemd, s6-init, trunk, v4_0, v4_1, v5_0, v5_1, v5_1_1, xry111/arm64, xry111/arm64-12.0, xry111/clfs-ng, xry111/lfs-next, xry111/loongarch, xry111/loongarch-12.0, xry111/loongarch-12.1, xry111/mips64el, xry111/pip3, xry111/rust-wip-20221008, xry111/update-glibc
- Children:
- e9d69fa6
- Parents:
- cb33ea8
- Files:
-
- 15 edited
Legend:
- Unmodified
- Added
- Removed
-
appendixa/makedev-desc.xml
rcb33ea8 r44c2fd8 9 9 10 10 <sect4><title>MAKEDEV</title> 11 <para>MAKEDEV is a script that can help in creating the necessary static 12 device files that usually reside in the /dev directory. More 13 information on device nodes can be found in the Linux Kernel source tree 14 in <filename>Documentation/devices.txt</filename>.</para></sect4> 11 <para><filename>MAKEDEV</filename> is a script that creates the necessary 12 static device nodes usually residing in the 13 <filename class="directory">/dev</filename> directory. 14 Detailed information on device nodes can be found in the Linux kernel source 15 tree in <filename>Documentation/devices.txt</filename>.</para></sect4> 15 16 16 17 </sect3> -
chapter01/changelog.xml
rcb33ea8 r44c2fd8 53 53 </itemizedlist> 54 54 </para></listitem> 55 56 <listitem><para>September 8th, 2002 [timothy]: Chapter 06: Applied Alex's 57 grammar changes patch.</para></listitem> 55 58 56 59 <listitem><para>September 7th, 2002 [timothy]: Chapter 06 - Gzip: -
chapter06/aboutdebug.xml
rcb33ea8 r44c2fd8 3 3 <?dbhtml filename="aboutdebug.html" dir="chapter06"?> 4 4 5 <para>Most programs and libraries by default arecompiled with debugging6 symbols (gcc option -g).</para>5 <para>Most programs and libraries are by default compiled with debugging 6 symbols included (with gcc option -g).</para> 7 7 8 <para>A program compiled with debugging symbols means a user can run a program 9 or library through a debugger and the debugger's output will be user 10 friendly. These debugging symbols also enlarge the program or library 11 significantly.</para> 12 13 <para>Before you start wondering whether these debugging symbols really make a 14 big difference, here are some statistics. Use them to draw your own 15 conclusion.</para> 8 <para>When debugging a program or library that was compiled with debugging 9 information included, the debugger can give you not only memory addresses 10 but also the names of the routines and variables.</para> 11 12 <para>But the inclusion of these debugging symbols enlarges a program or 13 library significantly. To get an idea of the amount of space these symbols 14 occupy, have a look at the following:</para> 16 15 17 16 <itemizedlist> 18 17 19 <listitem><para> A dynamic Bash binary20 with debugging symbols: 1 .2 MB</para></listitem>18 <listitem><para>a bash binary 19 with debugging symbols: 1200 KB</para></listitem> 21 20 22 <listitem><para> A dynamic Bash binary23 without debugging symbols: 4 78KB</para></listitem>21 <listitem><para>a bash binary 22 without debugging symbols: 480 KB</para></listitem> 24 23 25 <listitem><para> /lib and /usr/lib (glibc26 and gcc files)with debugging symbols: 87 MB</para></listitem>24 <listitem><para>glibc and gcc files (/lib and /usr/lib) 25 with debugging symbols: 87 MB</para></listitem> 27 26 28 <listitem><para> /lib and /usr/lib (glibc29 and gcc files)without debugging symbols: 16 MB</para></listitem>27 <listitem><para>glibc and gcc files 28 without debugging symbols: 16 MB</para></listitem> 30 29 31 30 </itemizedlist> 32 31 33 <para>Sizes vary depending on which compiler was used and which C library34 version was used to link dynamic programs against, but results will be 35 s imilar if you compare programs with and without debugging symbols.</para>32 <para>Sizes may vary a little, depending on which compiler was used and 33 which C library. But when comparing programs with and without debugging 34 symbols, the difference will generally be a factor between 2 and 5.</para> 36 35 37 <para>To remove debugging symbols from a binary (must be an a.out or ELF 38 binary) run <userinput>strip --strip-debug filename</userinput>. Wildcards 39 can be used to strip debugging symbols from multiple files (use something 40 like <userinput>strip --strip-debug $LFS/usr/bin/*</userinput>). Most 41 people will probably never use a debugger on software, so by removing 42 those symbols a lot of disk space can be regained.</para> 36 <para>As most people will probably never use a debugger on their system 37 software, a lot of disk space can be regained by removing these symbols .</para> 38 39 <para>To remove debugging symbols from a binary (which must be an a.out 40 or ELF binary), run <userinput>strip --strip-debug filename</userinput>. 41 Wildcards can be used to treat multiple files (use something like 42 <userinput>strip --strip-debug $LFS/static/bin/*</userinput>).</para> 43 43 44 44 <para>For your convenience, chapter 9 includes one simple command to strip 45 all debugging symbols from the programs and libraries on your system. You46 might find additional information in the optimization hint which can be 47 found at<ulink url="&hints-root;optimization.txt"/>.</para>45 all debugging symbols from all programs and libraries on your system. 46 Additional information on optimization you can find in the hint at 47 <ulink url="&hints-root;optimization.txt"/>.</para> 48 48 49 49 </sect1> -
chapter06/changingowner.xml
rcb33ea8 r44c2fd8 3 3 <?dbhtml filename="changingowner.html" dir="chapter06"?> 4 4 5 <para>Now we're in chroot, it is time to change the ownership of 6 the files and directories that were installed in chapter 5 to root. 7 Run the following command to do so:</para> 5 <para>The first thing we'll do, now that we're <emphasis>root</emphasis>, 6 is change the ownership of the files and directories installed in chapter 5 7 to root -- because when later we don't delete the 8 <filename class="directory">/static</filename> directory and start adding 9 new users, one of these users might end up owning the statically linked 10 programs, which is not a good idea.</para> 8 11 9 <para><screen><userinput>chown -R 0:0 /</userinput></screen></para> 12 <para>Run the following command to make root the owner of all the statically 13 linked programs:</para> 10 14 11 <para>This command changes the ownership of the root partition to 12 root. The command uses 0:0 instead of root:root, because the user name 13 "root" can't be resolved, as glibc is not installed yet.</para> 15 <para><screen><userinput>chown -R 0:0 /static</userinput></screen></para> 16 17 <para>The command uses "0:0" instead of "root:root", because there is no way 18 to resolve the name "root", as glibc hasn't been installed yet.</para> 14 19 15 20 </sect1> -
chapter06/chapter06.xml
rcb33ea8 r44c2fd8 8 8 &c6-changingowner; 9 9 &c6-creatingdirs; 10 &c6-mountproc; 11 &c6-mtablink; 12 &c6-createfiles; 10 13 &c6-pwdgroup; 11 &c6-mtablink;12 &c6-mountproc;13 &c6-createfiles;14 14 &c6-makedev; 15 15 &c6-kernel; -
chapter06/chroot.xml
rcb33ea8 r44c2fd8 3 3 <?dbhtml filename="chroot.html" dir="chapter06"?> 4 4 5 <para>It's time to enter our chroot'ed environment in order to install the 6 rest of the software we need. Before you can chroot you need to change to 7 the <emphasis>root</emphasis> user since only user 8 <emphasis>root</emphasis> can use the <userinput>chroot</userinput> 9 command.</para> 5 <para>It is time to enter the chroot'ed environment in order to begin installing 6 the packages we need. Before you can chroot, however, you need to become 7 <emphasis>root</emphasis>, since only <emphasis>root</emphasis> 8 can execute the <userinput>chroot</userinput> command.</para> 10 9 11 <para>Enter the following commands to enter the chroot'ed environment. From 12 this point on there's no need to use the $LFS variable anymore, because 13 everything a user does will be restricted to the LFS partition (since / is 14 actually /mnt/lfs, but the shell doesn't know that).</para> 10 <para>Become <emphasis>root</emphasis> and run the following command 11 to enter the chroot'ed environment:</para> 15 12 16 <para>&c6-chrootcmd;</para> 13 <para><screen><userinput>chroot $LFS /static/bin/env -i \ 14 HOME=/root TERM=$TERM PS1='\u:\w\$ ' \ 15 PATH=/bin:/usr/bin:/sbin:/usr/sbin:/static/bin \ 16 /static/bin/bash --login</userinput></screen> 17 </para> 17 18 18 <para>The -i option will clear all environment variables for as long as you 19 are in the chroot'ed environment and only the HOME, TERM, PS1 and PATH 20 variables are set. The TERM=$TERM construction will set the TERM variable 21 inside chroot to the same value as outside chroot which is needed for 22 programs like vim and less to operate properly. If you need other variables 23 present, such as CFLAGS or CXXFLAGS, you need to set them again.</para> 19 <para>The <userinput>-i</userinput> option given to the 20 <userinput>env</userinput> command will clear all variables of the chroot'ed 21 environment. After that, only the HOME, TERM, PS1 and PATH variables are 22 set again. The TERM=$TERM construct will set the TERM variable inside chroot 23 to the same value as outside chroot; this variable is needed for programs 24 like vim and less to operate properly. If you need other variables present, 25 such as CFLAGS or CXXFLAGS, this is a good place to set them again.</para> 24 26 25 <para>Now that we are inside a chroot'ed environment, we can continue to 26 install all the basic system software. You have to make sure all the 27 following commands in this and following chapters are run from within the 28 chroot'ed environment. If you ever leave this environment for any reason 29 (when rebooting for example) you must remember to enter chroot and mount 30 $LFS/proc again (as will be discussed later) before continuing with the 31 book.</para> 27 <para>From this point on there's no need anymore to use the $LFS variable, 28 because everything you do will be restricted to the LFS file system -- since 29 what the shell thinks is <filename class="directory">/</filename> is actually 30 <filename class="directory">/mnt/lfs</filename>.</para> 32 31 33 <para>Note that the bash prompt will contain "I have no name!" This is 34 normal because Glibc hasn't been installed yet.</para> 32 <para>You have to make sure all the commands in the rest of this chapter and 33 in the following chapters are run from within the chroot'ed environment. 34 If you ever leave this environment for any reason (rebooting for example), 35 you must remember to again enter chroot and mount proc (discussed later) 36 before continuing with the installations.</para> 37 38 <para>Note that the bash prompt will say "I have no name!" This is 39 normal, as the Glibc package hasn't been installed yet.</para> 35 40 36 41 </sect1> 42 -
chapter06/chrootcmd.xml
rcb33ea8 r44c2fd8 1 <screen><userinput>chroot $LFS /static/bin/env -i HOME=/root TERM=$TERM \ 2 PS1='\u:\w\$ ' \ 3 PATH=/bin:/usr/bin:/sbin:/usr/sbin:/static/bin \ 4 /static/bin/bash --login</userinput></screen> 1 2 [delete me] 3 -
chapter06/createfiles.xml
rcb33ea8 r44c2fd8 4 4 5 5 <para>Some programs hard-wire paths to programs which don't exist yet. In 6 order to satisfy these programs, we create the <filename>/bin/bash</filename> 7 and <filename>/bin/sh</filename> symlinks.</para> 6 order to satisfy these programs, we create the symbolic links 7 <filename>/bin/bash</filename> and <filename>/bin/sh</filename>, both 8 pointing to the static <filename>bash</filename> program.</para> 8 9 9 <para>Create the /bin/bash and /bin/sh symlinks by running the following10 commands:</para>10 <para>Create the <filename>/bin/bash</filename> and <filename>/bin/sh</filename> 11 symlinks by running the following commands:</para> 11 12 12 13 <para><screen><userinput>ln -s /static/bin/bash /bin/bash && -
chapter06/creatingdirs.xml
rcb33ea8 r44c2fd8 3 3 <?dbhtml filename="creatingdirs.html" dir="chapter06"?> 4 4 5 <para>Let's now create the directory tree on the LFS partition based on 6 the FHS standard, which can be found at 7 <ulink url="http://www.pathname.com/fhs/"/>. 8 Issuing the following commands will create a default directory layout:</para> 5 <para>Let's now create some structure in our LFS file system, let's create 6 a directory tree. Issuing the following commands will create a more or less 7 standard tree:</para> 9 8 10 9 <para><screen><userinput>mkdir -p /{bin,boot,dev/pts,etc/opt,home,lib,mnt,proc} && … … 24 23 ln -s ../var/tmp /usr</userinput></screen></para> 25 24 26 <para>Normally, directories are created with permission mode 755, which isn't 27 desired for all directories. The first change is a mode 0750 for the 28 /root directory. This is to make sure that not just everybody can 29 enter the /root directory (the same a user would do with his /home/username 30 directory). The second change is a mode 1777 for the tmp 31 directories. In this way any user can write to the /tmp and /var/tmp 32 directories, but cannot remove other users's files from them (the latter is prohibited 33 by the so-called "sticky bit" -- bit 1 in the 1777 bit mask).</para> 25 <para>Directories are by default created with permission mode 755, but this 26 isn't desirable for all directories. We will make two changes: one to the home 27 directory of root, and another to the directories for temporary files.</para> 34 28 35 29 <para><screen><userinput>chmod 0750 /root && 36 30 chmod 1777 /tmp /var/tmp</userinput></screen></para> 37 31 32 <para>The first mode change ensures that not just everybody can enter the 33 <filename class="directory">/root</filename> directory -- the same 34 a normal user would do with his or her home directory. 35 The second mode change makes sure that any user can write to the 36 <filename class="directory">/tmp</filename> and 37 <filename class="directory">/var/tmp</filename> directories, but 38 cannot remove other users's files from them. The latter is prohibited 39 by the so-called "sticky bit" -- the highest bit in the 1777 bit mask.</para> 40 38 41 <para>Now that the directories are created, copy the source files that were 39 downloaded in chapter 3 to some subdirectory under /usr/src (you 40 will need to create the desired directory yourself).</para> 42 downloaded in chapter 3 to some subdirectory under 43 <filename class="directory">/usr/src</filename> (you 44 will have to create the desired subdirectory yourself).</para> 41 45 42 46 <sect2> 43 <title>FHS compliance note s</title>47 <title>FHS compliance note</title> 44 48 45 <para>The FHS stipulates that the /usr/local directory should contain the 46 bin, games, include, lib, man, sbin, and share subdirectories. You can 47 alter your /usr/local directory yourself if you want your system to be 48 FHS-compliant.</para> 49 50 <para>Also, the standard says that there should exist a /usr/share/games 51 directory, which we don't much like for a base system. But feel free to 52 make your system FHS-compliant if you wish. The FHS isn't precise as 53 to the structure of the /usr/local/share subdirectories, so we took the 54 liberty of creating the directories that we felt were needed.</para> 49 <para>We have based our directory tree on the FHS standard (available at 50 <ulink url="http://www.pathname.com/fhs/"/>). Besides the above created 51 tree this standard stipulates the existence of 52 <filename class="directory">/usr/local/games</filename> and 53 <filename class="directory">/usr/share/games</filename>, but we don't 54 much like these for a base system. However, feel free to make your system 55 FHS-compliant. As to the structure of the 56 <filename class="directory">/usr/local/share</filename> subdirectory the FHS 57 isn't precise, so we created here the directories that we think are needed.</para> 55 58 56 59 </sect2> -
chapter06/introduction.xml
rcb33ea8 r44c2fd8 8 8 and then start installing all the packages, one by one.</para> 9 9 10 <para>The installation of all th e software is pretty straightforward, and11 you will probably think it would be so much easier and shorter to give12 the generic installation instructions for a package here and only explain13 in full the installation of those packages that require an alternate14 method. Although we agree with that, wechoose to give the15 full instructions for each and every package, simply to avoid any16 possible confusion and errors.</para>10 <para>The installation of all this software is pretty straightforward, 11 and you will probably think it would be much shorter to give here 12 the generic installation instructions and explain in full only the 13 installation of those packages that require an alternate method. 14 Although we agree with that, we nevertheless choose to give the 15 full instructions for each and every package, simply to minimize 16 the possibilities for mistakes.</para> 17 17 18 <para>If you plan to use compiler optimization for the packages19 installed in this chapter, take a look at the optimization hint 20 at<ulink url="&hints-root;optimization.txt"/>.21 Compiler optimization can make a program run22 faster, but may also cause compilation problems. If you run into problems23 when using optimization, always try it without optimization to see if 24 the problem persists.</para>18 <para>If you plan to use compiler optimizations in this chapter, 19 take a look at the optimization hint at 20 <ulink url="&hints-root;optimization.txt"/>. 21 Compiler optimizations can make a program run faster, but they 22 may also cause compilation difficulties. If a package refuses 23 to compile when using optimization, try to compile it without 24 optimization and see if the problem goes away.</para> 25 25 26 <para>Please refrain from installing more than one package at a time, even 27 if it may save you time (especially with dual CPU machines). If you install 28 the wrong package at the wrong time, it may hard-wire program paths to 29 <filename class="directory">$LFS/static</filename> which will cause the 30 programs to stop working once the static directory is removed. The order 31 packages are installed in this chapter have to be followed exactly to be 32 sure nothing is hard-wiring the static paths.</para> 26 <para>The order in which packages are installed in this chapter has 27 to be strictly followed, to ensure that no program gets a path referring 28 to <filename class="directory">/static</filename> hard-wired into it. 29 For the same reason, <emphasis>do not </emphasis> compile packages 30 in parallel. Compiling in parallel may save you some time (especially on 31 dual-CPU machines), but it could result in a program containing a 32 hard-wired path to <filename class="directory">/static</filename>, 33 which will cause the program to stop working when the static directory 34 is removed.</para> 33 35 34 36 </sect1> -
chapter06/makedev-exp.xml
rcb33ea8 r44c2fd8 3 3 4 4 <para><userinput>./MAKEDEV -v generic:</userinput> This creates a whole 5 bunch of generic devices. Normally, these are all the devices you need. It's possible 6 that you are missing some special devices that are needed for your hardware 7 configuration. Create them with ./MAKEDEV -v <device>. 8 The <userinput>generic-nopty</userinput> option does a similar job, but skips 9 some devices which are not needed if you are using devpts.</para> 5 bunch of devices. Normally, these are all the devices you will need. But it 6 is possible that some special devices needed for your hardware configuration 7 are missing. Create these with ./MAKEDEV -v <device>. 8 The <userinput>generic-nopty</userinput> option mostly creates the same 9 devices as <userinput>generic-nopty</userinput>, but skips those that aren't 10 needed if you are using devpts.</para> 10 11 11 12 </sect2> -
chapter06/makedev-inst.xml
rcb33ea8 r44c2fd8 2 2 <title>Creating devices</title> 3 3 4 <para> Note: the MAKEDEV-&makedev-version;.bz2 file you have unpacked is not5 a n archive, so it won't create a directory for you to cd into.</para>4 <para>(Note that unpacking the MAKEDEV-&makedev-version;.bz2 file doesn't create 5 a directory for you to cd into, as the file only contains a script.)</para> 6 6 7 <para>Create the device files by running the following commands:</para> 7 <para>Prepare for the creation of the device files by running the 8 following commands:</para> 8 9 9 10 <para><screen><userinput>cp MAKEDEV-&makedev-version; /dev/MAKEDEV && … … 11 12 chmod 754 MAKEDEV</userinput></screen></para> 12 13 13 <para>Now, depending on whether you are going to use devpts or not, you 14 can run one of two commands:</para> 15 16 <para>If you do not intend to use devpts, run:</para> 14 <para>Most people will now want to create devices by running:</para> 17 15 <para><screen><userinput>./MAKEDEV -v generic</userinput></screen></para> 18 16 19 <para> If you do intend to use devpts, then run:</para>17 <para>But if you intend to use devpts, then run this instead:</para> 20 18 <para><screen><userinput>./MAKEDEV -v generic-nopty</userinput></screen></para> 21 19 22 <para>Note that if you aren't sure, it's best to use 23 the <userinput>./MAKEDEV -v generic</userinput> command as this will 24 ensure you have the devices you need. If you are sure you are going to 25 use devpts however, the other command makes sure that you don't create a 26 set of devices which you don't require.</para> 20 <para>Note that if you aren't sure, it's best to use the 21 <userinput>./MAKEDEV -v generic</userinput> command as this will ensure you 22 have all the devices you need. But if you are certain you are going to use 23 devpts, the other command skips creating a set of devices you won't need.</para> 27 24 28 <para>MAKEDEV will create hda[1-20] to hdh[1-20] and such, but keep in mind 29 that you may not be able to use all of these devices due to kernel 30 limits on the maximum number of partitions.</para> 25 <para><filename>MAKEDEV</filename> will create hda[1-20] to hdh[1-20] and 26 many more of such disk device nodes, but keep in mind that you probably won't 27 be able to use all of these, due to kernel limits on the maximum number of 28 partitions.</para> 31 29 32 30 </sect2> -
chapter06/mountproc.xml
rcb33ea8 r44c2fd8 1 1 <sect1 id="ch06-proc"> 2 <title>Mounting /proc file system</title>2 <title>Mounting the proc file system</title> 3 3 <?dbhtml filename="proc.html" dir="chapter06"?> 4 4 5 5 <para>In order for certain programs to function properly, the proc file 6 system must be available fromwithin the chroot'ed environment.7 A file system can be mounted as many times and in as many places8 as you 'd like, soit's not a problem that the proc file system is already9 mounted on your host system ,especially so because proc is a6 system must be available within the chroot'ed environment. 7 As a file system can be mounted as many times and in as many places 8 as you like, it's not a problem that the proc file system is already 9 mounted on your host system -- especially so because proc is a 10 10 virtual file system.</para> 11 11 12 <para>The proc file system is mounted under /proc by running the 13 following command.</para> 12 <para>The proc file system is mounted under 13 <filename class="directory">/proc</filename> by running the 14 following command:</para> 14 15 15 16 <para><screen><userinput>mount proc /proc -t proc</userinput></screen></para> -
chapter06/mtablink.xml
rcb33ea8 r44c2fd8 1 1 <sect1 id="ch06-mtablink"> 2 <title>Creating the /etc/mtab symlink</title>2 <title>Creating the mtab symlink</title> 3 3 <?dbhtml filename="mtablink.html" dir="chapter06"?> 4 4 5 5 <para>The next thing to do is to create a symlink pointing from 6 /etc/mtab to /proc/mounts. This is done using the following 7 command:</para>6 <filename>/etc/mtab</filename> to <filename>/proc/mounts</filename>. 7 This is done using the following command:</para> 8 8 9 9 <para><screen><userinput>ln -s /proc/mounts /etc/mtab</userinput></screen></para> 10 10 11 <para>Creating this symlink avoids problems which can occur if / is 12 mounted read-only and the information in /etc/mtab is stale (i.e. out of 13 date). By creating the symlink to /proc/mounts, we ensure that 14 /etc/mtab will always be up-to-date.</para> 11 <para>Creating this symlink avoids problems which can occur if 12 <filename class="directory">/</filename> is mounted read-only and the 13 information in <filename>/etc/mtab</filename> is stale (i.e. out of date). 14 By creating the symlink to <filename>/proc/mounts</filename>, we ensure that 15 the information on currently mounted devices is always up-to-date.</para> 15 16 16 <para>Note that using this symlink requires that you have /proc17 filesystem support compiled into your kernel. Thisis included by18 default and should not be removed unless you <emphasis>really</emphasis>19 know what you are doing as many more things than just the /etc/mtab20 symlink depend on /proc being present. In summary, make sure you have 21 /proc filesystem support in your kernel.</para>17 <para>Note that using this symlink requires that you have support for the 18 proc filesystem compiled into your kernel. This support is included by 19 default, and should not be removed unless you <emphasis>really</emphasis> 20 know what you are doing, as some more things besides the 21 <filename>/etc/mtab</filename> symlink depend on proc being present. 22 In short, make sure you have proc filesystem support in your kernel.</para> 22 23 23 24 </sect1> -
chapter06/pwdgroup.xml
rcb33ea8 r44c2fd8 1 1 <sect1 id="ch06-pwdgroup"> 2 <title>Creating passwd and group files</title>2 <title>Creating the passwd and group files</title> 3 3 <?dbhtml filename="pwdgroup.html" dir="chapter06"?> 4 4 5 <para>In order for the user and the group "root" to be recognized and to be 6 able to login, there need to be entries in the /etc/passwd and /etc/group file. 7 Besides the group "root", a couple of other groups are recommended or needed 8 by some packages. The groups created below aren't part of any standard. 9 The LSB only recommends a group "bin" with GID 1 to be present besides 10 "root". Other group names and GIDs can be chosen by the user. 11 Well-written packages don't depend on GID numbers, but use the group's 12 name; so it doesn't matter which GID a group has. Since there 13 aren't any standards for groups, the groups created here are the groups the 14 MAKEDEV script (the script that creates the device files in the /dev 15 directory) mentions.</para> 5 <para>In order for root to be able to login and for the name "root" to be 6 recognized, there need to be relevant entries in the 7 <filename>/etc/passwd</filename> and 8 <filename>/etc/group</filename> files.</para> 16 9 17 <para>Create a new file <filename>/etc/passwd</filename>by running the10 <para>Create the <filename>/etc/passwd</filename> file by running the 18 11 following command:</para> 19 12 20 13 <para><screen><userinput>echo "root:x:0:0:root:/root:/bin/bash" > /etc/passwd</userinput></screen></para> 21 14 22 <para>Create a new file <filename>/etc/group</filename> by running the 15 <para>The actual password for root (the "x" here is just a placeholder) will 16 be set later.</para> 17 18 <para>Create the <filename>/etc/group</filename> file by running the 23 19 following command:</para> 24 20 … … 38 34 <userinput>EOF</userinput></screen></para> 39 35 36 <para>The created groups aren't part of any standard -- they are the groups 37 that the MAKEDEV script in the next section uses. 38 Besides the group "root", the LSB recommends only a group "bin" with a GID 39 of 1 to be present. All other group names and GIDs can be chosen freely by 40 the user, as well-written packages don't depend on GID numbers but use the 41 group's name.</para> 42 40 43 </sect1> 41 44
Note:
See TracChangeset
for help on using the changeset viewer.