On Tue, 12 Nov 2002, Eli Billauer wrote:

> Hello Guy & all.
> 
> Personally, I didn't understand much of you explanation.

i'll try to write it again, with a more illustrative example.

> I didn't understand why a rescue floppy won't work. The only thing I realized,
> was that rather than correcting the links, you create a /bigdisk/etc that
> points to /etc. Looks like a nice solution, which I may have adopted myself,
> if I wasn't so eager to get on.

here is the scenario:

lets talk about an upgrade from RH version X, to version X+1 (the case i 
stumbled upon, that finally made me understand why full-path symbolic 
links can be bad):

suppose that i have a '/' partition and a '/bigdisk' partition. suppose 
that my '/usr' is a symlink to '/bigdisk/usr'.

i insert the new RH version CD and choose to 'upgrade'. the upgrade 
program now looks at the 'etc/fstab' on my '/' partition, and sees 
which filesystems i use, and so it mounts them:

my '/'  is mounted under '/root'.
my '/bigdisk' is mounted under '/root/bigdisk'.

now the upgrade wants to upgrade a package that exists under my '/usr'. it 
assumes the package can be found (during the upgrade process) under 
'/root/usr'. this is, however, a symlink to '/bigdisk/usr'. however, 
currently 'bigdisk' is mounted under '/root/bigdisk', and there is no 
'/bigdisk/usr' - only a '/root/bigdisk/usr' directory, and thus the 
upgrade will fail.

if my /usr symlink was made relative (i.e. under my '/', usr was
a symlink to 'bigdisk/usr') the link would still have worked during the 
upgrade process:  under /root, i'll have a 'usr' link, pointing to 
'bigdisk/usr', which translates (again, during the upgrade) to 
'/root/bigdisk/usr' - which is correct.

the same issue, btw, would exist if i wanted to mount my partitions under 
a different operating system (e.g. via an NFS mount).

hope this makes the need for relative links clear.

> My 'absolute links' are all corrections of the cases, where the root directory
> was referred to as ../../...(and so on). If I want /etc/passwd, why go
> ../../../etc/passwd? If I mean root, go root. In that sense, the link
> correction looks better than the previous trick.

but you don't realy mean root - you mean a specific root. and if that root 
changes its location - you'll want to link to change the location it 
points to as well - and that will happen only with proper relative links - 
not with absolute links. and that, my friend, is something i wish would 
have been explained to me years ago - rather then understood during a bad 
system upgrade, late at night ;)

> I agree that things become messy when new packages are installed, which is
> exactly the reason why I install all the packages from the beginning. And when
> you want a new package, it's a headache anyhow...

but what about updating existing pacakges, e.g. because a security bug was 
found (i know, you don't care about those ;)  ) or because of some other 
reason (e.g. a fix to a bug that you stumbled over - you would care about 
those). not to mention the case of upgrade to a newer version of the 
distribution - you will probably do that in a few years ;)

-- 
guy

"For world domination - press 1,
 or dial 0, and please hold, for the creator." -- nob o. dy


--------------------------------------------------------------------------
Haifa Linux Club Mailing List (http://www.haifux.org)
To unsub send an empty message to [EMAIL PROTECTED]


Reply via email to