cvs commit: hints mtab.txt

timothy at linuxfromscratch.org timothy at linuxfromscratch.org
Thu Jan 2 15:55:10 PST 2003


timothy     03/01/02 18:55:10

  Modified:    .        mtab.txt
  Log:
  Updates by author.
  
  Revision  Changes    Path
  1.7       +38 -33    hints/mtab.txt
  
  Index: mtab.txt
  ===================================================================
  RCS file: /home/cvsroot/hints/mtab.txt,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- mtab.txt	21 Nov 2002 20:15:10 -0000	1.6
  +++ mtab.txt	2 Jan 2003 23:55:10 -0000	1.7
  @@ -2,7 +2,9 @@
   LFS VERSION:	LFS-3.2-RC1 or above
   AUTHOR:		Oliver Brakmann <obrakmann at gmx.net>
   
  -LAST CHANGES:	2002-11-14: Minor stylistic changes (thanks to DJ Lucas)
  +LAST CHANGES:	2003-01-02: Minor stylistic changes
  +		2003-01-02: Added a note for glibc 2.3.1 users
  +		2002-11-14: Minor stylistic changes (thanks to DJ Lucas)
   		2002-08-06: Restructured the whole hint
   		2002-08-04: Corrected a few technical details
   		2002-08-04: Minor stylistic changes
  @@ -54,7 +56,7 @@
   
   	- the fstab `user' option does not work
   	  (you have to specify `users' as a workaround)
  -	- loop devices are not freed properly when umounting
  +	- loop devices are not freed properly when unmounting
   	  (you have to use `umount -d' or run `losetup -d' manually)
   	- certain kernel versions under certain circumstances list /dev/root
   	  instead of the real root device in /proc/mounts.
  @@ -75,9 +77,9 @@
   =================
   
   Follow these instructions if your / and /var directories are on the same
  -partition.  If they are not, but your root is writeable nevertheless,
  -go to chapter 4 anyway.  If you want to have a read-only root one day,
  -you do not need to start all over again with this.
  +partition.  If they are not, but your / is writeable nevertheless, go to
  +chapter 4 anyway.  If you want to have a read-only / one day, you do not
  +need to start all over again with this.
   
   
   	1. Switch to single-user mode
  @@ -88,12 +90,12 @@
   
   		# rm /etc/mtab
   
  -	   Be careful: from this point on you lose all information about the
  -	   currently mounted partitions (that umount can work with, at least)!
  -	   If you have anything mounted that does not get mounted at boot-time
  -	   (ie. by the /etc/rc.d/init.d/mountfs script), umount it _before_
  -	   this step! If you are not sure what you have mounted, you can still
  -	   take a look at /proc/mounts.
  +	   Be careful: from this point on, you lose all information about the
  +	   currently mounted filesystems (that umount can work with, at least)!
  +	   If you have any filesystems mounted that do not get mounted at boot-
  +	   time (ie. by the /etc/rc.d/init.d/mountfs script), unmount them
  +	   _before_ this step! If you are not sure what you have mounted, you
  +	   can still take a look at /proc/mounts.
   
   	3. Create an empty /etc/mtab
   
  @@ -154,8 +156,8 @@
   [...remainder of the script omitted...]
   `-------------------------------------->8--------------------------------------
   
  -	    If you use another set of init scripts, you are surely competent
  -	    enough to know how to implement these changes in your scripts.
  +	   If you use another set of init scripts, you are surely competent
  +	   enough to know how to implement these changes in your scripts.
   
   	5. Modify your /etc/fstab so that /proc does not get mounted by
   	   mount -a:
  @@ -168,7 +170,7 @@
   	   though, in case you ever run `mount -a' from outside of any
   	   bootscripts (like in the following step :-).
   
  -	6. If you have not umounted any other partitions during the process,
  +	6. If you have not unmounted any other partitions during the process,
   	   all those listed in /etc/fstab should still be mounted.  Check out
   	   /proc/mounts to be sure.  The userland tools do not know all this
   	   anymore, so we have to tell them:
  @@ -185,7 +187,7 @@
   
   
   4. READ-ONLY ROOT
  -====================================================
  +=================
   
   Follow these instructions if you have your / and /var directories on
   separate partitions.
  @@ -202,18 +204,21 @@
   	3. Rebuild glibc with the following patch applied:
   	   (or just do the change by hand, which is probably faster *g*)
   
  -,---[ glibc-2.2.5.mtab-patch ]--------->8--------------------------------------
  ---- glibc-2.2.5/sysdeps/unix/sysv/linux/paths.h.orig    Sun Jul  7 12:22:31 2002
  -+++ glibc-2.2.5/sysdeps/unix/sysv/linux/paths.h Sun Jul  7 12:22:53 2002
  +	   Please note that this patch works with both glibc 2.2.5 and 2.3.1.
  +
  +,---[ glibc.mtab-patch ]--------------->8--------------------------------------
  +diff -Naur glibc-2.2.5/sysdeps/unix/sysv/linux/paths.h.orig glibc-2.2.5/sysdeps/unix/sysv/linux/paths.h
  +--- glibc-2.2.5/sysdeps/unix/sysv/linux/paths.h.orig	2000-11-16 00:06:47.000000000 +0100
  ++++ glibc-2.2.5/sysdeps/unix/sysv/linux/paths.h	2003-01-02 13:37:12.000000000 +0100
   @@ -51,7 +51,7 @@
  -#define        _PATH_MAN       "/usr/share/man"
  -#define        _PATH_MEM       "/dev/mem"
  -#define        _PATH_MNTTAB    "/etc/fstab"
  --#define        _PATH_MOUNTED   "/etc/mtab"
  -+#define        _PATH_MOUNTED   "/var/lib/misc/mtab"
  -#define        _PATH_NOLOGIN   "/etc/nologin"
  -#define        _PATH_PRESERVE  "/var/lib"
  -#define        _PATH_RWHODIR   "/var/spool/rwho"
  + #define	_PATH_MAN	"/usr/share/man"
  + #define	_PATH_MEM	"/dev/mem"
  + #define	_PATH_MNTTAB	"/etc/fstab"
  +-#define	_PATH_MOUNTED	"/etc/mtab"
  ++#define	_PATH_MOUNTED	"/var/lib/misc/mtab"
  + #define	_PATH_NOLOGIN	"/etc/nologin"
  + #define	_PATH_PRESERVE	"/var/lib"
  + #define	_PATH_RWHODIR	"/var/spool/rwho"
   `-------------------------------------->8--------------------------------------
   
   	Look up the installation instructions for glibc in the LFS Book.
  @@ -221,7 +226,7 @@
   	This patch makes newly compiled programs look for the mtab file
   	in /var/lib/misc/mtab.
   
  -	4. Now umount /var
  +	4. Now unmount /var
   
   		# umount /var
   
  @@ -242,11 +247,11 @@
   		# ln -sf ../var/lib/misc/mtab /etc/mtab
   
   	   Be careful: from this point on, you lose all information about the
  -	   currently mounted partitions (that umount can work with, at least)!
  -	   If you have anything mounted that does not get mounted at boot-time
  -	   (ie. by the /etc/rc.d/init.d/mountfs script), umount it _before_
  -	   this step! If you are not sure what you have mounted, you can still
  -	   take a look at /proc/mounts.
  +	   currently mounted filesystems (that umount can work with, at least)!
  +	   If you have any filesystems mounted that do not get mounted at boot-
  +	   time (ie. by the /etc/rc.d/init.d/mountfs script), unmount them
  +	   _before_ this step! If you are not sure what you have mounted, you
  +	   can still take a look at /proc/mounts.
   
   	7. At this point you have to mount /var again
   
  @@ -347,7 +352,7 @@
   
   		# mount -n -o remount,ro /
   
  -	13. If you have not umounted any other partitions during the process,
  +	13. If you have not unmounted any other partitions during the process,
   	    all those listed in /etc/fstab should still be mounted.  Check out
   	    /proc/mounts to be sure.  The userland tools do not know all this
   	    anymore, so we have to tell them:
  
  
  
-- 
Unsubscribe: send email to listar at linuxfromscratch.org
and put 'unsubscribe hints' in the subject header of the message



More information about the hints mailing list