mounting / ro permanently

scott thomason scott at industrial-linux.org
Wed Jan 24 16:05:17 PST 2001


I haven't tried it, but I suspect you don't need /bin or /mnt either. Over the years I have heard varying descriptions of what the 's' in /sbin stands for, and I've seen these responses: Secure, System, and Static. If you compiled the binaries found in /sbin statically, you wouldn't need /lib either...you would have a kind of maxi-rescue-disk on a hard drive. 

As a real-life example, I recently had the dis-pleasure of working on an older HP-UX machine, and they had everything you would normally find in /sbin inside /etc so they could grapple with the 'ro mount' issue.

I have recently made a gnu-tool-based boot/root diskette set, and I can say definitively that you can boot a GNU/Linux 2.4 system with no more than these binaries (these are dynamic because of the space savings on a floppy, but it wouldn't be much effort to compile these packages statically and locate them in /sbin):

/mnt:
total 23
drwxrwxrwx    2 root	 root	      1024 Jan 20 16:45 bin
drwxrwxrwx    2 root	 root	      1024 Jan 20 16:45 dev
drwxrwxrwx    2 root	 root	      1024 Jan 20 16:45 etc
drwxrwxrwx    2 root	 root	      1024 Jan 20 16:45 lib
drwxr-xr-x    2 root	 root	     12288 Jan 20 16:45 lost+found
drwxrwxrwx    4 root	 root	      1024 Jan 20 16:45 mnt
drwxrwxrwx    2 root	 root	      1024 Jan 20 16:45 proc
drwxrwxrwx    2 root	 root	      1024 Jan 20 16:45 root
drwxrwxrwx    2 root	 root	      1024 Jan 20 16:45 sbin
drwxrwxrwx    2 root	 root	      1024 Jan 20 16:45 tmp
drwxrwxrwx    4 root	 root	      1024 Jan 20 16:45 usr
drwxrwxrwx    5 root	 root	      1024 Jan 20 16:45 var

/mnt/bin:
total 910
-rwxrwxrwx    1 root	 root	     78652 Jan 20 16:45 bunzip2
-rwxrwxrwx    1 root	 root	      9344 Jan 20 16:45 cat
-rwxrwxrwx    1 root	 root	     10700 Jan 20 16:45 chmod
-rwxrwxrwx    1 root	 root	     11040 Jan 20 16:45 chown
-rwxrwxrwx    1 root	 root	     25832 Jan 20 16:45 cp
-rwxrwxrwx    1 root	 root	     25500 Jan 20 16:45 date
-rwxrwxrwx    1 root	 root	     21024 Jan 20 16:45 dd
-rwxrwxrwx    1 root	 root	     20024 Jan 20 16:45 df
-rwxrwxrwx    1 root	 root	      4408 Jan 20 16:45 false
-rwxrwxrwx    1 root	 root	      9112 Jan 20 16:45 hostname
-rwxrwxrwx    1 root	 root	     13332 Jan 20 16:45 ln
-rwxrwxrwx    1 root	 root	     38256 Jan 20 16:45 login
-rwxrwxrwx    1 root	 root	     45892 Jan 20 16:45 ls
-rwxrwxrwx    1 root	 root	     10496 Jan 20 16:45 mkdir
-rwxrwxrwx    1 root	 root	      8992 Jan 20 16:45 mknod
-rwxrwxrwx    1 root	 root	     22804 Jan 20 16:45 more
-rwxrwxrwx    1 root	 root	     55520 Jan 20 16:45 mount
-rwxrwxrwx    1 root	 root	     31816 Jan 20 16:45 mv
-rwxrwxrwx    1 root	 root	     15380 Jan 20 16:45 ping
-rwxrwxrwx    1 root	 root	     59964 Jan 20 16:45 ps
-rwxrwxrwx    1 root	 root	      6128 Jan 20 16:45 pwd
-rwxrwxrwx    1 root	 root	     18688 Jan 20 16:45 rm
-rwxrwxrwx    1 root	 root	     77168 Jan 20 16:45 sh
-rwxrwxrwx    1 root	 root	     25900 Jan 20 16:45 stty
-rwxrwxrwx    1 root	 root	     26216 Jan 20 16:45 su
-rwxrwxrwx    1 root	 root	      4880 Jan 20 16:45 sync
-rwxrwxrwx    1 root	 root	    111092 Jan 20 16:45 tar
-rwxrwxrwx    1 root	 root	      4408 Jan 20 16:45 true
-rwxrwxrwx    1 root	 root	     24316 Jan 20 16:45 umount
-rwxrwxrwx    1 root	 root	      6160 Jan 20 16:45 uname
-rwxrwxrwx    1 root	 root	     71244 Jan 20 16:45 vi

/mnt/dev:
total 0
crw-rw-rw-    1 root	 root	    5,	 1 Jan 20 15:33 console
brw-rw-rw-    1 root	 root	    2,	 0 Jan 20 15:32 fd0
brw-rw-rw-    1 root	 root	    2, 124 Jan 20 15:32 fd0H1600
brw-rw-rw-    1 root	 root	    2,	44 Jan 20 15:32 fd0H1680
brw-rw-rw-    1 root	 root	    2,	60 Jan 20 15:32 fd0H1722
brw-rw-rw-    1 root	 root	    2,	76 Jan 20 15:32 fd0H1743
brw-rw-rw-    1 root	 root	    3,	 0 Jan 20 15:32 hda
brw-rw-rw-    1 root	 root	    3,	 1 Jan 20 15:32 hda1
brw-rw-rw-    1 root	 root	    3,	10 Jan 19 10:10 hda10
brw-rw-rw-    1 root	 root	    3,	 2 Jan 20 15:32 hda2
brw-rw-rw-    1 root	 root	    3,	 3 Jan 20 15:32 hda3
brw-rw-rw-    1 root	 root	    3,	 4 Jan 20 15:32 hda4
brw-rw-rw-    1 root	 root	    3,	 5 Jan 20 15:32 hda5
brw-rw-rw-    1 root	 root	    3,	 6 Jan 20 15:32 hda6
brw-rw-rw-    1 root	 root	    3,	 7 Jan 20 15:32 hda7
brw-rw-rw-    1 root	 root	    3,	 8 Jan 20 15:32 hda8
brw-rw-rw-    1 root	 root	    3,	 9 Jan 19 10:10 hda9
brw-rw-rw-    1 root	 root	    3,	64 Jan 20 15:32 hdb
brw-rw-rw-    1 root	 root	    3,	65 Jan 20 15:32 hdb1
brw-rw-rw-    1 root	 root	    3,	66 Jan 20 15:32 hdb2
brw-rw-rw-    1 root	 root	    3,	67 Jan 20 15:32 hdb3
brw-rw-rw-    1 root	 root	    3,	68 Jan 20 15:32 hdb4
brw-rw-rw-    1 root	 root	    3,	69 Jan 20 15:32 hdb5
brw-rw-rw-    1 root	 root	    3,	70 Jan 20 15:32 hdb6
brw-rw-rw-    1 root	 root	    3,	71 Jan 20 15:32 hdb7
brw-rw-rw-    1 root	 root	    3,	72 Jan 20 15:32 hdb8
crw-rw-rw-    1 root	 root	    1,	 2 Jan 20 15:32 kmem
crw-rw-rw-    1 root	 root	    1,	 1 Jan 20 15:32 mem
crw-rw-rw-    1 root	 root	    1,	 3 Jan 20 15:32 null
lrwxrwxrwx    1 root	 root		 4 Jan 20 16:45 ram -> ram0
brw-rw-rw-    1 root	 root	    1,	 0 Jan 20 15:32 ram0
brw-rw-rw-    1 root	 root	    1,	 1 Jan 20 15:32 ram1
brw-rw-rw-    1 root	 root	    1,	 2 Jan 20 15:32 ram2
brw-rw-rw-    1 root	 root	    1,	 3 Jan 20 15:32 ram3
brw-rw-rw-    1 root	 root	    1,	 4 Jan 20 15:32 ram4
brw-rw-rw-    1 root	 root	    1,	 5 Jan 20 15:32 ram5
brw-rw-rw-    1 root	 root	    1,	 6 Jan 20 15:32 ram6
brw-rw-rw-    1 root	 root	    1,	 7 Jan 20 15:32 ram7
crw-rw-rw-    1 root	 root	    5,	 0 Jan 20 15:32 tty
crw-rw-rw-    1 root	 root	    4,	 0 Jan 20 15:33 tty0
crw-rw-rw-    1 root	 root	    4,	 1 Jan 20 15:33 tty1
crw-rw-rw-    1 root	 root	    4,	 2 Jan 20 15:33 tty2
crw-rw-rw-    1 root	 root	    4,	 3 Jan 20 15:33 tty3
crw-rw-rw-    1 root	 root	    4,	 4 Jan 20 15:33 tty4
crw-rw-rw-    1 root	 root	    4,	 5 Jan 20 15:33 tty5
crw-rw-rw-    1 root	 root	    4,	 6 Jan 20 15:33 tty6
crw-rw-rw-    1 root	 root	    1,	 5 Jan 20 15:32 zero

/mnt/etc:
total 27
-rw-rw-rw-    1 root	 root		 8 Jan 14 16:20 HOSTNAME
-rw-rw-rw-    1 root	 root	       147 Jan	9 23:41 fstab
-rw-rw-rw-    1 root	 root		91 Jan 10 00:00 group
-rw-rw-rw-    1 root	 root		21 Jan 11 21:28 host.conf
-rw-rw-rw-    1 root	 root		20 Jan 11 21:37 hosts
-rw-rw-rw-    1 root	 root	       429 Jan 10 20:03 inittab
-rw-rw-rw-    1 root	 root	       332 Jan	7 11:19 nsswitch.conf
-rw-rw-rw-    1 root	 root		30 Jan 10 20:42 passwd
-rw-rw-rw-    1 root	 root	      1344 Jan 11 21:29 protocols
-rwxrwxrwx    1 root	 root	       158 Jan 14 16:21 rc
-rw-rw-rw-    1 root	 root		 0 Jan 11 21:29 resolv.conf
-rw-rw-rw-    1 root	 root		30 Jan 10 00:13 securetty
-rw-rw-rw-    1 root	 root	     10870 Jan 11 21:30 services
-rw-rw-rw-    1 root	 root		38 Jan 10 00:00 shadow
-rw-rw-rw-    1 root	 root		 8 Jan	7 11:44 shells
-rw-rw-rw-    1 root	 root	       774 Jan	7 11:19 termcap
-rw-rw-rw-    1 root	 root		78 Jan	7 11:19 ttytype
lrwxrwxrwx    1 root	 root		15 Jan 20 16:45 utmp -> ../var/run/utmp
lrwxrwxrwx    1 root	 root		15 Jan 20 16:45 wtmp -> ../var/log/wtmp

/mnt/lib:
total 1672
-rwxrwxrwx    1 root	 root	     86316 Jan 20 16:45 ld-2.2.1.so
lrwxrwxrwx    1 root	 root		11 Jan 20 16:45 ld-linux.so.2 -> ld-2.2.1.so
-rwxrwxrwx    1 root	 root	   1116896 Jan 20 16:45 libc-2.2.1.so
lrwxrwxrwx    1 root	 root		13 Jan 20 16:45 libc.so.6 -> libc-2.2.1.so
lrwxrwxrwx    1 root	 root		17 Jan 20 16:45 libcom_err.so.2 -> libcom_err.so.2.0
-rwxrwxrwx    1 root	 root	      5852 Jan 20 16:45 libcom_err.so.2.0
-rwxrwxrwx    1 root	 root	     21388 Jan 20 16:45 libcrypt-2.2.1.so
lrwxrwxrwx    1 root	 root		17 Jan 20 16:45 libcrypt.so.1 -> libcrypt-2.2.1.so
lrwxrwxrwx    1 root	 root		13 Jan 20 16:45 libe2p.so.2 -> libe2p.so.2.3
-rwxrwxrwx    1 root	 root	     14172 Jan 20 16:45 libe2p.so.2.3
lrwxrwxrwx    1 root	 root		16 Jan 20 16:45 libext2fs.so.2 -> libext2fs.so.2.4
-rwxrwxrwx    1 root	 root	     71428 Jan 20 16:45 libext2fs.so.2.4
lrwxrwxrwx    1 root	 root		17 Jan 20 16:45 libncurses.so.5 -> libncurses.so.5.2
-rw-rw-rw-    1 root	 root	    258260 Jan 20 16:45 libncurses.so.5.2
-rwxrwxrwx    1 root	 root	     34292 Jan 20 16:45 libnss_files-2.2.1.so
lrwxrwxrwx    1 root	 root		21 Jan 20 16:45 libnss_files.so.2 -> libnss_files-2.2.1.so
-rwxrwxrwx    1 root	 root	     34540 Jan 20 16:45 libproc.so.2.0.7
lrwxrwxrwx    1 root	 root		18 Jan 20 16:45 libshadow.so.0 -> libshadow.so.0.0.0
-rwxrwxrwx    1 root	 root	     40900 Jan 20 16:45 libshadow.so.0.0.0
lrwxrwxrwx    1 root	 root		14 Jan 20 16:45 libuuid.so.1 -> libuuid.so.1.2
-rwxrwxrwx    1 root	 root	     10184 Jan 20 16:45 libuuid.so.1.2

/mnt/lost+found:
total 0

/mnt/mnt:
total 2
drwxrwxrwx    2 root	 root	      1024 Jan 20 16:45 cdrom
drwxrwxrwx    2 root	 root	      1024 Jan 20 16:45 floppy

/mnt/mnt/cdrom:
total 0

/mnt/mnt/floppy:
total 0

/mnt/proc:
total 0

/mnt/root:
total 2
-rw-rw-rw-    1 root	 root	       580 Jan 20 16:45 .bashrc
-rwxrwxrwx    1 root	 root	       316 Jan 20 16:45 .profile

/mnt/sbin:
total 1152
-rwxrwxrwx    1 root	 root	     12564 Jan 20 16:45 agetty
-rwxrwxrwx    2 root	 root	    450392 Jan 20 16:45 e2fsck
-rwxrwxrwx    1 root	 root	     64508 Jan 20 16:45 fdisk
-rwxrwxrwx    1 root	 root	     14132 Jan 20 16:45 fsck
-rwxrwxrwx    2 root	 root	    450392 Jan 20 16:45 fsck.ext2
-rwxrwxrwx    1 root	 root	      7736 Jan 20 16:45 halt
-rwxrwxrwx    1 root	 root	     29984 Jan 20 16:45 ifconfig
-rwxrwxrwx    1 root	 root	     28372 Jan 20 16:45 init
-rwxrwxrwx    2 root	 root	     19924 Jan 20 16:45 mke2fs
-rwxrwxrwx    1 root	 root	      4876 Jan 20 16:45 mkfs
-rwxrwxrwx    2 root	 root	     19924 Jan 20 16:45 mkfs.ext2
-rwxrwxrwx    1 root	 root	      8168 Jan 20 16:45 mkswap
-rwxrwxrwx    1 root	 root	     26492 Jan 20 16:45 route
-rwxrwxrwx    1 root	 root	     15096 Jan 20 16:45 shutdown
lrwxrwxrwx    1 root	 root		 6 Jan 20 16:45 swapoff -> swapon
-rwxrwxrwx    1 root	 root	      6228 Jan 20 16:45 swapon
lrwxrwxrwx    1 root	 root		 4 Jan 20 16:45 telinit -> init

/mnt/tmp:
total 0

/mnt/usr:
total 2
drwxrwxrwx    2 root	 root	      1024 Jan 20 16:45 bin
drwxrwxrwx    3 root	 root	      1024 Jan 20 16:45 share

/mnt/usr/bin:
total 210
-rwxrwxrwx    1 root	 root	      5992 Jan 20 16:45 chroot
-rwxrwxrwx    1 root	 root	     55300 Jan 20 16:45 find
-rwxrwxrwx    1 root	 root	     71552 Jan 20 16:45 grep
-rwxrwxrwx    1 root	 root	      9196 Jan 20 16:45 id
-rwxrwxrwx    1 root	 root	     21308 Jan 20 16:45 passwd
-rwxrwxrwx    1 root	 root	     22428 Jan 20 16:45 snarf
-rwxrwxrwx    1 root	 root	     22076 Jan 20 16:45 tail

/mnt/usr/share:
total 1
drwxrwxrwx    4 root	 root	      1024 Jan 20 16:45 terminfo

/mnt/usr/share/terminfo:
total 2
drwxrwxrwx    2 root	 root	      1024 Jan 20 16:45 l
drwxrwxrwx    2 root	 root	      1024 Jan 20 16:45 v

/mnt/usr/share/terminfo/l:
total 6
-rw-rw-rw-    1 root	 root	      1580 Jan 20 16:45 linux
-rw-rw-rw-    1 root	 root	      1570 Jan 20 16:45 linux-m
-rw-rw-rw-    1 root	 root	      1611 Jan 20 16:45 linux-nic

/mnt/usr/share/terminfo/v:
total 2
-rw-rw-rw-    1 root	 root	      1143 Jan 20 16:45 vt100
lrwxrwxrwx    1 root	 root		10 Jan 20 16:45 vt100-am -> ../v/vt100

/mnt/var:
total 3
drwxrwxrwx    2 root	 root	      1024 Jan 20 16:45 log
drwxrwxrwx    2 root	 root	      1024 Jan 20 16:45 run
drwxrwxrwx    2 root	 root	      1024 Jan 20 16:45 tmp

/mnt/var/log:
total 0
-rw-rw-rw-    1 root	 root		 0 Jan 20 16:45 wtmp

/mnt/var/run:
total 0
-rw-rw-rw-    1 root	 root		 0 Jan 20 16:45 utmp

/mnt/var/tmp:
total 0

Hope this inspires you.
---scott


-- 
Unsubscribe: send email to lfs-apps-request at linuxfromscratch.org
and put unsubscribe in the subject header of the message




More information about the blfs-support mailing list