4

I decided that I want to learn more about Linux and try building LFS. I'm using Ubuntu 11.04 as host system and Ubuntu uses dash and mawk by default. I've changed mawk to gawk, but considering that mawk is much faster than gawk I'm thinking that I might want to use mawk anyway.

Since making bash the default shell will have a negative effect on the system's performance, especially boot times I'm hesitant to make the change.

In the LFS book you can read the following:

Symlinks that point to other software (such as dash, mawk, etc.) may work, but are not tested or supported by the LFS development team, and may require either deviation from the instructions or additional patches to some packages.

So I'm basically on my own if something fails, but it might work. So I was hoping that someone with more experience could tell me if it will work and if not what would be required to make it work?

9
  • 2
    Can I challenge to measure boot times with bash installed, versus with dash installed. You are probably not even going to notice.
    – tshepang
    May 5, 2011 at 18:36
  • One important thing is when building something like LFS, try as hard as possible to stay with the book. You can always revert to dash anyways, once you don't need the host anymore (i.e. after you log into your LFS system).
    – tshepang
    May 5, 2011 at 18:37
  • 1
    @Thespang "The boot speed improvements in Ubuntu 6.10 were often incorrectly attributed to Upstart, which is a fine platform for future development of the init system but in Ubuntu 6.10 was primarily running in System V compatibility mode with only small behavioural changes. These improvements were in fact largely due to the changed /bin/sh." From: wiki.ubuntu.com/DashAsBinSh
    – Erik B
    May 5, 2011 at 18:47
  • @ErikB: Do you mind checking on your system?
    – tshepang
    May 5, 2011 at 18:59
  • 1
    @Tshepang: This is not micro-optimization, it was carefully studied by the Debian Devs. Changing to dash was a significant hassle. Why did Debian and Ubuntu decide to take that move, if it yielded no start-up improvement. In his specific case, the improvement might not be significant, but generally speaking it is not even a discussion. I would still put dollers to doughnuts , he would see improvement if benched. Truthfully, your asking for him to waste his time proving it. You really should only do that, if you are questioning accepted knowledge or presenting new knowledge. Dec 27, 2011 at 4:29

2 Answers 2

1

I recommend using gawk instead of mawk because of some errors that appear later on in the build, something to do with glibc. remember to ln -s /usr/bin/awk /usr/bin/gawk. at least that's what I found using Debian squeeze as the host.

As said above follow the book to the letter the first few times until your happy, then backup and mess around with it.

0

I had the same question, and found the answer. See the following link (it also provides the method of using bash in debian), it seems we have to use bash... http://www.linuxfromscratch.org/blfs/view/svn/postlfs/dash.html

Note
If you create the symbolic link from dash to sh, you will need to reset the link to bash to build LFS.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.