LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Debian (https://www.linuxquestions.org/questions/debian-26/)
-   -   mounting /home on boot (https://www.linuxquestions.org/questions/debian-26/mounting-home-on-boot-173333/)

Jelle 04-22-2004 10:29 AM

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?

ac1980 04-22-2004 01:10 PM

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

Jelle 05-09-2004 02:34 AM

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.

ac1980 05-09-2004 09:35 AM

Quote:

I cannout find mountall in any runlevel.
Under my Debian I have /etc/rcS.d/S35mountall.sh -> ../init.d/mountall.sh

Quote:

I don't understand, I thought S & 1 were both the single user mode runlevel...
Actually AFAIK there is no 'S' runlevel, files in rcS.d are executed at boot time, regardless to what runtime level you are booting into. Instead rc1.d is executed when you go to single user mode, so it contains for example commands to explicitly kill unwanted services, just in case they where running.
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.

Jelle 05-10-2004 05:39 AM

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.

ac1980 05-10-2004 12:29 PM

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/*
PS: What distro are you working on? You're on debian forum, but your profile says RH...
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

Jelle 05-12-2004 04:36 AM

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.