[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Quick mounting question



On Sun, 6 Jun 1999, Brian May wrote:

> >2.  In the future, if I decide to use my 128 MB partition on hdc for 
> >something else, how should I go about that?  Will everything break if 
> >I unmount /lib?
> 
> Yes, everything will break (for all practical purposes - see below for
> true technical explanation).

Assuming the technical explanation below is right, it's possible.
1. Install sash or something just in case it severely breaks.
2. Make sure you know how to boot to single user mode, using sash as the
   shell. This is important in case you hose everything that you have a
   chance to restore.
3. Get a copy of the Debian installation boot disk. Remember that you can
   do Alt-F2 to get to a VC when the install screen comes up. Make sure
   you can do this. This is in case your system gets _really_ hosed.
4. telinit 1 might not be a bad idea.
5. Let's assume you're going to use /mnt/hdc in the next step. Add that
   directory to your LD_LIBRARY_PATH
6. Umount /lib and remount it on that directory from step 5 (/mnt/hdc i'll 
   assume) (using sash for this step might be a Good Idea)
7. Copy (cp -a) everything from /mnt/hdc to /lib (which should show the
   files you were mounting over all this time)
8. Copy down the proper entry from /etc/fstab, Just In Case.
9. Remove that proper entry from /etc/fstab, so it won't mount over /lib
   anymore.
A. Cross your fingers and reboot to see if it works. 

Suggestions are welcome. i haven't tested this, so it could VERY easily be
wrong. At least i tried to be excessively paranoid...

> >3.  When installing Debian packages, I often see "Warning: 
> >/lib/somethingorother.2 is not a symlink".  Is this because /lib is 
> >mounted on a different filesystem?  Are there any consequences of 
> >this warning, or is it harmless?
> 
> I suspect this may be an unrelated bug in the package. I have seen
> similar warnings myself, but do not have /lib mounted on a separate
> partition.

The way the libs work, a generic name (e.g. "libc.so.6") is symlinked to
the actual library the system uses (e.g. "libc-2.1.1.so"). This makes it
easy to change libraries around, you can install a new version as normal,
and only change the symlinks as the final step (more magic ;)

i'm guessing that when you copied the libraries, you didn't use the -d
option to cp...

> >4.  Was mounting /lib on a different filesystem a completely dumb 
> >idea to begin with?  What's something else I could put on my 128MB 
> >filesystem?
> 
> Now for the bad news - mounting /lib on another partition will not work
> (someone please tell me if I am wrong) because the libraries in it are
> required for booting the computer, and before partitions other then
> the root partition have been mounted. If you can find a to
> boot up to the point where /lib is mounted, everything should
> be OK....

i _think_ it might be ok, but don't quote me on that. At any rate, /usr
would be a much better thing to stick on a separate partition.


Technical explanation, kept because i referred to it above:
> So to answer your question above, "will unmounting /lib break your
> system?" the correct technical answer is that, no it won't break your
> system if it is already running, because the computer still will
> be using the old copy of the libraries for critical functions (eg
> /sbin/init). However, I don't think this is the answer you were looking
> for. If this doesn't make sense to you, don't worry about it.
> 
> However, deleting the old copies of the libraries, will break your
> system, and won't be able to boot again.
> 
> A better approach would be to do the same thing for /usr, as /usr is
> not required for boot. However, have a rescue disk handy in case you do
> anything wrong and can no longer boot.
> 
> Others should be able to point out step-by-step instructions to prevent
> accidently hosing your computer. However, it looks like you have already
> done a significant part of the job yourself for /lib. You didn't say how
> you copied the files though - make you you preserve the file permissions
> when you do so. "cp -a" will do the right thing and recurse into
> subdirectories.


> I much prefer mutt to pine ;-)

Personally i prefer pine, but that's just because it's the mua i learned
first. And i despise vi as a mail editor ;)


Reply to: