static bzip2 & hardlinks problem

Christophe Devine devine at
Mon May 13 13:57:55 PDT 2002

Bill Maltby LFS Related wrote:

> > Here's a simple command which solves the problem of moving hardlinks
> > on old distros:
> > 
> > mv $LFS/usr/bin/{bzcat,bunzip2,bzip2,bzip2recover} $LFS/bin &&
> > cp $LFS/usr/bin/{bzless,bzmore} $LFS/bin &&
> > rm $LFS/usr/bin/{bzless,bzmore}
> > 
> > I have tested this command on RH 6.0;
> > it did fix the bug reported on lfs-dev.

> Are you sure that's how you want to fix it?

I took the same approach as the gzip hardlink fix:

cp $LFS/usr/bin/{gunzip,gzip} $LFS/bin &&
rm $LFS/usr/bin/{gunzip,gzip}

> If you do an ls -li you will see the i-node numbers on some of
> the target files are not the same anymore if the /usr/bin and /bin
> directories are on different partitions, a common setup.
> They still work and all, but prior to the move some files pointed
> to the same i-node and so if you changed the contents of the file
> named in one directory, the side-effect was the other was "updated"
> simultaneously. If the inodes are now different, that won't happen.
> May not be an issue, but one should be aware.

That's right; however bzless and bzmore are going to be overwritten
in chapter 6 with the proper hardlinks, so it's probably not an issue.
Furthermore, with chapter 5 and 6 separated, bzless and bzmore never
'pollute' $LFS/bin, only $LFS/static/bin.

Unsubscribe: send email to listar at
and put 'unsubscribe lfs-book' in the subject header of the message

More information about the lfs-book mailing list