mounting /home on boot
hello All,
I am in a state of switching from redhat 9 to debian, and still have some problems doing so. My /home directories are held on a LVM disk. On redhat (for want of beter) i just edited rc.sysinit to activate and mount that partition (maybe should have gone in rc.local?) I expected to have to do the same with Debian. The LVM script in init.d was very welcome indeed. I have added a line in /etc/fstab to mount my lvm partition on /home. But it still does not mount at boot.. Anything I missed? |
I'm not sure this is the reason, but here is an idea: at boot time, files (usually links) in /etc/rcS.d/ are executed alphabetically. Make sure the one concerning LVM is executed before mountall.
Actually there is a strong chance that LVM itself won't run until you mounted at least /usr, so you'd better have links to mountall both in the place where it is now AND after LVM is loaded; not sure this in rcS.d, it maybe in rc1.d or even rc2.d, to find it use Code:
find /etc/rc?.d/ |grep -i lvm |
thanx, I'll have a look. I beleive to remember that mountall was executed after LVM, but it skips/ignores /home. (...)
cannot find it in any other runlevels than S and 1, but I cannout find mountall in any runlevel. :( I don't understand, I thought S & 1 were both the single user mode runlevel... maybe I'll just plonk it into rc.local. |
Quote:
Quote:
This is how it works on my system, still I fear the init script is one of the most distro-dependant part of the OS. Good luck. |
Oh ok, so rcS.d contains the 'core' of the startup scripts? I obviously didn't know that.. I just met the file /etc/init.d/README and got a smile on my face. why put a file there that says nothing usefull if you don't have this policy document installed. Package management can install and keep files up to date anywhere in the filesystem AFAIK.
Anyways: There was no link to mountall.sh in rcS.d. (lvm is at S25) I made a symbolic link to it with the name you mentioned, but I was wondering if there was a better way than doing this manually? I 'll let you guys know if this worked, as I obviously have to reboot to try this out. |
Actually mountall.sh is a script that does some checks, executes a mount -a, then activates any newly mounted swap file (swap partitions are already active) and cleans /tmp and some /var subdirs. Maybe yours has a different name. You can try locating it by
Code:
grep 'mount -a' /etc/init.d/* if you're using debian you can search for the package containing a file via apt-file or this page http://www.debian.org/distrib/packages#search_contents |
I cme from redhat, but the uncertanties with fedora led me to debian. (actually I installed knoppix)
mountall.sh was not in my rcS.d so I made said link. It now mounts my LVM disks at boottime. I figured It wouldn't be too bad to issue a mount -a two times when booting, so I didn't bother to find where the other mount -a is. Thanx for the explanation. |
All times are GMT -5. The time now is 03:09 PM. |