r/linuxfromscratch • • Mar 15 '21

Building environment

Quick question about the building environment for lfs, I'm trying to get my first one started and I'm wanting to basically have my tower dual boot between lfs and windows, I have plenty of space for the system set aside on partition, but would it be ok to just use live USB as environment? Or do I need to install a linux environment onto hard drive first?

6 Upvotes

12 comments sorted by

View all comments

Show parent comment

2

u/cor3dx Mar 15 '21

in preparing the host environment, certain variables and settings are created. program versions and some symbolic links might need to be changed:

export LFS=/mnt/lfsgroupadd lfsuseradd -s /bin/bash -g lfs -m -k /dev/null lfs

sh is a symbolic link to bash

ImportantSeveral commercial distributions add a non-documented instantiation of /etc/bash.bashrc to the initialization of bash. This file has the potential to modify the lfs user's environment in ways that can affect the building of critical LFS packages. To make sure the lfs user's environment is clean, check for the presence of /etc/bash.bashrc and, if present, move it out of the way. As the root user, run:[ ! -e /etc/bash.bashrc ] || mv -v /etc/bash.bashrc /etc/bash.bashrc.NOUSE

any such changes that you make won't survive a reboot on a live usb without some kind of persistence.

2

u/BoiledBurntBagel May 17 '21

Interesting idea.