/Users not mounting

baur

Registered
Right now, I have this entry in my /etc/fstab file:
/dev/disk1s10 /Users hfs rw 1 2

This is to mount a separate partition as the /Users directory (I'm doing this because of the 8 GB limit on the boot partition on the Beige G3s). Most of the time this works perfectly, but occasionally (say, after a crash or after booting into MacOS 9), its not mounting properly and I'm getting a generic Home folder. If I reboot, it comes back.
At first, I thought one of my drives was spinning up slow and changing the order they were identified in, but that's not it. I can't track down what's happening.

Is there a better/different way to mount partitions at a specific mount point? (I didn't want to use a sym-link or alias because of possible issues with dumb installers or confused applications - or is this less of an issue than I thought?)

Thanks!
 
... but I had thought /etc/fstab was not consulted except in exceptional circumstances, notably single user mode.

Certainly, what is in my (default, unmodified) fstab does not correspond at all to the way my disks mount (one at /, the rest at /Volumes/diskname)

I would very much like to do something just like what you describe - /Users mounting off a different partition, if not a different disk altogether, on a beige G3.

Do you happen to know whether it is true that a beige G3 can actually handle a second HD? I had heard that a SCSI HD could be put in the spot reserved for a SCSI zip disk...
 
On first install, I don't think OS X has a fstab file - I had to create one. (There were other fstab.[something] files, but not a plain fstab one.) On reading through posts, I found one (posted by testuser, I believe) that suggested putting an entry in fstab to force a mount. So I did. You see, automount usually takes care of mounting things automatically, but it only puts disks in /Volumes, which is not what I wanted.

BTW, testuser: I tried your suggestion about putting the root partition explicitly in the fstab file and it works when booting from OS 9, but right after a crash it still won't mount... strange (I just used Control-Command-Power to test, not something I usually like to do <grin>).

Anyway, about drives in a Beige G3: I have four hard drives currently mounted, three in the case and one external. There is the original SCSI3 drive that came with the computer and two IDE drives (I don't have a zip drive). I used to have a SCSI1 drive instead of the second IDE before I finally bought a 40 GB drive. :)
A couple things to be careful of. If you get more than one IDE drive, you will have to get a new cable. Apple only included a cable with one connector on it. If you hook up two, you'll have to be sure the jumpers are set right (one Master, one Slave - this is the next issue I'm going to check out for my issue, I may have set them wrong). If you hook up more than one SCSI drive, you also need to worry about jumper settings, but this time for the ID of the drives.

Hope that helps.
 
Your /Users is not mounted because it is not cleanly unmounted.
mount -vat hfs only mounts directories in /etc/fstab if the device is clean. Upon improper shutdown, the device is not clean and hence not mounted.

It is sad that Apple still does not implement customizable shutdown scripts. I've looked into the comments in CVS of darwin about this and they are in design stage.

With customizable shutdown scripts, one can put un-mount commands on disks to it so that every disk mounted is cleanly umounted before shutdown.

Up to now, you need to do some shell script to check if the drive is mounted, if it is not mounted, you may want to do a "fsck_hfs -y /dev/disk0s?" on the disk to check and fix it before mounting again.

Or you may want to get the source code for autodiskmount and change it accordingly so that it respects the /etc/fstab. If I have some time, I'll probably do it because it is the best way up to now.
 
Because of the non-existance of shutdown script in Mac OS X, I've found out that sometimes the machine is shutdowned or restarted without cleanly unmounting the hard disks.

This is already a filed bug in Mac OS X (for shutdown script non-existance).

Currently I've written a daemon that is activated during shutdown, synchronize the disk and umount all drives. If anyone is interested, e-mail me.

I've also write a little shell script to check in /etc/rc so that if a drive cannot be mounted according to /etc/fstab, I'll fsck the drive and try to re-mount.

I'll need some time to test it because I don't startup/shutdown a lot.

Get back later in the topic.
 
About the autodiskmount stuff ....

I'd like to submit a bug report to Apple concerning autodiskmount does not unmount volumes before reboot. How can I do it? I can explain to them how to do it using the current architecture.
 
This is kind of an old response, but it probably should go up here for the record. I took testuser's suggestion about removing the extra IDE drive from the system. It was miraculous! :) The system boot over twice as fast, launching of apps and logins are much faster all around. Amazing...

As for the automount / boot fsck script... I would love to have one. I could probably edit the rc files myself, but I'd rather not, since I'm not always sure what the implications are. :)
 
baur,

The program that I've written simply runs in /etc/rc, daemonizing itself can catch the SIGTERM signal.

Upon shutting down the system, the SIGTERM signal is send to all processes, thus the program that I've written catches the SIGTERM signal.

After I've catched the SIGTERM, I call "sync()" to synchronize all filesystems, wait for 2 seconds, then I execute a command "umount -A" to umount all filesystems.

I've tested it in command line, all things works. The only thing that I need to test is if the program can really un-mount all volumes.

Anyone have any ideas on how to test it?
 
all this is very nice. I, too, want to mount a separate drive as /Users/theo. It is the second partition of my first IDE-HD, how do I find out which /dev/disk#s# it is?


theo
 
There are two ways I can think of off the top of my head. The easy (command line) way is to type 'mount' or 'df' at a command prompt and look through the output. It should be more or less straight forward. The graphical way is to use the Disk Utility, and I seem to remember that it had that information, but I don't remember exactly where.
 
Back
Top