On 03.10.2012 01:42, Bruce Dubbs wrote: > I am wondering about making a change to LFS to combine some of the root > directories and /usr. Looking at the sizes on a fairly complete system: > > 22M /lib > 4.9M /bin > 7.6M /sbin > 1.4G /usr/lib > 300M /usr/bin > 15M /usr/sbin > > It seems like the space needed for /usr is really not that much. > (Disclaimer: I have multiple versions of gnome, kde, qt, jdk, and xorg > on /opt that takes about 11 G) > > What I was thinking about doing was changing Section 6.5 - Creating > Directories from > > mkdir -pv /{bin,boot,etc/{opt,sysconfig},home,lib,mnt,opt,run} > mkdir -pv /{media/{floppy,cdrom},sbin,srv,var} > > to > > mkdir -pv /{boot,etc/{opt,sysconfig},home,mnt,opt,run} > mkdir -pv /{media/{floppy,cdrom},srv,var} > > ... (create /usr hierarchy) > > ln -sv /usr/bin /bin > ln -sv /usr/lib /lib > ln -sv /usr/sbin /sbin > > case $(uname -m) in > x86_64) ln -sv /usr/lib /lib64 && ln -sv lib /usr/lib64 ;; > esac > > As far as I can tell, everything should work as before, but we can > remove some of the things we do to move files and libraries from /usr to > /. The restriction, of course, is that /usr must be a part of the > rootfs, but a recommended size for that could be 20G and not really > affect anything. >
I have tried this already and I haven't noticed any runtime stuff. But at the other side, I had problems with package management (custom one) where it installs ie lib, sbin to the root of the package DESTDIR and when I'm running install or cp it just complains that it "cannot override non-directory with directory" or something like that. So not really good for people using package management. Just running plain make install should see no problems. As for the why, it was Lennart himself who explained that some software is broken without /usr available at boot so he suggested a merge. By broken that means it is possibly missing data from /usr/share like locale data and some more stuff. Some stuff is already covered here http://www.freedesktop.org/wiki/Software/systemd/TheCaseForTheUsrMerge I just ask you, if you ever manage to do this to try to fix packages (not all at once) to install directly to /usr hierarchy instead of / via symlinks so package management can work. I have some patches already for that. Also, I guess at least BLFS should provide a way to mount /usr in initramfs in case user decides to install it on seperate partition for some reason. As for the minimalists, this is LFS, you can do anything you like. And as someone said, don't fix anything that isn't broken, this change isn't just really needed nor it does anything special except possibly introducing some breakages. > ----- > > While I'm at it, should we remove *.la files in the libraries: > > find /usr/lib -name \*.la -delete > > We can add that to Section 6.64 - Stripping Again. What I've found is > that I get a lot of warning messages and sometimes failures when > packages try to use the .la files, but just removing them seems to fix > things up without causing other problems. > Yes, please! I was asking this ever since I got here. But it should be run after every package is installed in order to avoid breakages. At least that was the case when I first tried it. But remember, some packages use .la files to load modules since it is easier to use libltdl instead of libdl directly (lazy programmers or package is too complex). I know at least 2 packages in BLFS that do that, Cyrus SASL and Mpg123. I've patched Cyrus SASL long time ago not to do that and Mpg123 has switch to choose whether one should use .la or .so|.dll|.dynlib to load plugins. > Opinions? > > -- Bruce > > -- http://linuxfromscratch.org/mailman/listinfo/lfs-dev FAQ: http://www.linuxfromscratch.org/faq/ Unsubscribe: See the above information page