Linux From Scratch for Newbies - Part 1
TIP 3:
After completing LFS, we are eager to continue with BLFS. BLFS Book suggests that we log in as unprivileged user and later we install as root. In the beginning, I compiled and installed BLFS packages as root as it was easier thing to do but I faced one problem with vlc as it cannot be run as root. (Hack is available in Google for this.) Unlike LFS, BLFS Book does not spoon-feed this aspect. Chapter 3 of BLFS Book talks about /etc/skel directory and recommends to install a few files as follows:
" The files from those sections that you might want to place in /etc/skel include .inputrc, .bash_profile, .bashrc, .bash_logout, .dircolors, and .vimrc."
It was somewhat difficult to follow in the beginning. (Probably BLFS authors expect you to be proficient by this time!) After a few trials, this is what I have done:
1. First create /etc/skel directory.
2. Copy files to /etc/skel/.inputrc, /etc/skel/bash_profile, /etc/skel/.bashrc, /etc/skel/bash_logout. For .inputrc, I used LFS Book. The remaining are from BLFS BOOK. For .dircolors, I did:
dircolors -p > /etc/skel/.dircolors.
I then deleted existing user which was lfs. After this, I did:
useradd -m <newuser> The newuser is again lfs. We can verify this from /home/lfs/etc/skel. You will find all the four files. I did not bother about .vimrc.
Next is to give permission for lfs user to use the directories we create for BLFS. I created /blfs, /scripts and /xc directories. /scripts directory holds blfs-bootscripts and linux. From LFS Book, i entered:
chown -v lfs <directories>.
I now login as lfs user in to BLFS desktop. I use wget, tar xf, sed, make etc. commands as user lfs and sudo or sudo su to install. I have compiled many BLFS programs this way. I feel this is better than copying and pasting from text web browsers in virtual terminals.
If there is better way, LFS enthusiasts may please reply to linuxquestions.org.
|