Opened 14 years ago
Closed 14 years ago
#2982 closed defect (invalid)
Replace "uncompress" with a symlink
| Reported by: | Marcel van den Boer | Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | 7.1 |
| Component: | Book | Version: | SVN |
| Severity: | normal | Keywords: | gzip, uncompress |
| Cc: |
Description
During the installation of gzip (chapter 6), the file /bin/uncompress is moved to /usr/bin. However, because uncompress is a hard link to /bin/gunzip, this move fails if /usr is on a separate partition.
I've tagged this issue as a defect, because in the chapter "Creating a New Partition", LFS instructs the reader to consider putting /usr on a separate partition, which clearly is not possible without modifying LFS a bit.
The solution is simple. In the instructions for installing gzip in chapter 6:
mv -v /bin/{gzexe,uncompress,zcmp,zdiff,zegrep} /usr/bin
mv -v /bin/{zfgrep,zforce,zgrep,zless,zmore,znew} /usr/bin
should become:
mv -v /bin/{gzexe,zcmp,zdiff,zegrep} /usr/bin
mv -v /bin/{zfgrep,zforce,zgrep,zless,zmore,znew} /usr/bin
rm -rvf /bin/uncompress
ln -sv ../../bin/gunzip /usr/bin/uncompress
Change History (3)
comment:1 by , 14 years ago
comment:2 by , 14 years ago
I stand corrected. Somehow, mv did not behave like this on my machine. Strange.
Thanks.
comment:3 by , 14 years ago
| Resolution: | → invalid |
|---|---|
| Status: | new → closed |

mv does copy the file to a separate partition.
# echo test >a1 # ln a1 b1 # ls -li ?1 291550 -rw-r--r-- 2 root root 5 Dec 14 11:57 a1 291550 -rw-r--r-- 2 root root 5 Dec 14 11:57 b1 # df Filesystem 1K-blocks Used Available Use% Mounted on /dev/sda11 10325748 2111220 7690008 22% /home /dev/sda2 9614148 1428428 7697344 16% /opt # mv b1 /opt # ls -li ?1 /opt/?1 12 -rw-r--r-- 1 root root 5 Dec 14 11:57 /opt/b1 291550 -rw-r--r-- 1 root root 5 Dec 14 11:57 a1In the case of a mv to a separate partition, the system does a cp and an rm and the hard link is severed.