ec2-3-146-105-137.us-east-2.compute.amazonaws.com | ToothyWiki | RecentChanges | Login | Webcomic
YesterdayILearnt that it is a very good idea to read helpfiles more closely before editing critical system configuration files like fstab. --Vitenka
- (PeterTaylor) You found a useful helpfile on fstab? I had to get it right by trial and error, assisted by some helpful UFies.
- [This One] was pretty good - but no, I learnt by error that although mkfs will let you format a whole device as ext2, it won't actually WORK that way, and adding that entry into fstab before (for example) /proc and /var kills the boot process sufficiently for it to be basically unrecoverable unless you are able to recreate the fstab file manually. Which I cannot do, because RedHat made it needlessly complicated in the first place and the only editor the rescue mode has that is of any use is cat and the 'boot to recover' cd doesn't actually give you access to (or even mount points for) the hard drive. Nearly downloaded the cd for version nine, will be nuking and re-installing when I get home. --Vitenka (so, explain to me why kudzu detected my new drive, said it had set it up, and abandoned me there?)
- Uh - what's wrong with man fstab? Worked for me.. - MoonShadow
- man fstab was a good start, but failed utterly to explain what some of those numbers meant. --Vitenka
- (PeterTaylor) Quote from "man fstab" (my emphasis indicated with **text**):
**The first field, (fs_spec), describes the block special device or
remote filesystem to be mounted.**
For ordinary mounts it will hold (a link to) a block special device
node (as created by mknod(8)) for the device to be mounted, like
`/dev/cdrom' or `/dev/sdb7'. For NFS mounts one will have
<host>:<dir>, e.g., `knuth.aeb.nl:/'. **For procfs, use `proc'.**
Instead of giving the device explicitly, one may indicate the (ext2 or
XFS) filesystem that is to be mounted by its UUID or volume label (cf.
e2label(8) or xfs_admin(8)), writing LABEL=<label> or UUID=<uuid>,
e.g., `LABEL=Boot' or `UUID=3e6be9de-8139-11d1-9106-a43f08d823a6'.
This will make the system more robust: adding or removing a SCSI disk
changes the disk device name but not the filesystem volume label.
**The second field, (fs_file), describes the mount point for the
filesystem. For swap partitions, this field should be specified as
`none'.** If the name of the mount point contains spaces these can be
escaped as `\040'.
Compare with my /etc/fstab, as set up by the RH7.2 install process (again, my emphasis):
LABEL=/ / ext3 defaults 1 1
**none** /dev/pts devpts gid=5,mode=620 0 0
**none /proc proc** defaults 0 0
none /dev/shm tmpfs defaults 0 0
**/dev/hda5 swap** swap defaults 0 0
/dev/cdrom /mnt/cdrom iso9660 noauto,owner,kudzu,ro 0 0
/dev/fd0 /mnt/floppy auto noauto,owner,kudzu 0 0
- You can probably see why I was confused, especially since I couldn't find a definition of "mount point".
- Those last two numbers (per row) really confused me - they don't seem to be referenced anywhere. I found in a FAQ that the only purpose of one of them is to say which order the partitions should be checked for errors. Like I'd ever care enough about that to set it! --Vitenka
- My version of man fstab (dated 15 June 1999) has got documentation on those two numbers, which are called fs_freq (interpreted by 'dump' to decide whether to dump this fs or not), and fs_passno (order of checks). Importantly, fs_passno must be 1 for the root fs, and 2 for others. If it's 0 fsck won't check it. --Mjb67
CategoryComputing See also LinuxBox/TechSupport