LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Linux From Scratch
User Name
Password
Linux From Scratch This Forum is for the discussion of LFS.
LFS is a project that provides you with the steps necessary to build your own custom Linux system.

Notices


Reply
  Search this Thread
Old 02-06-2017, 08:32 AM   #1
joecoc1916
LQ Newbie
 
Registered: Feb 2017
Location: West Palm Beach, Florida
Distribution: Ubuntu 16.04
Posts: 18

Rep: Reputation: 0
basic question on proceeding through the instructions of LFS?


I have done some reading ahead of where I have actually succeeded in executing the processes, if that is understandable.

Simply put, I am not sure how I can check when I am on the Host System doing work, or when I am on the target system doing work?

I would think this is important. Is it? And if so how can I clear up this ambiguity that I am having?

Hope I am making sense?

Thank you ahead of time!!!

Joe
 
Old 02-06-2017, 11:29 AM   #2
spiky0011
Senior Member
 
Registered: Jan 2011
Location: PLANET-SPIKE
Distribution: /LFS/Debian
Posts: 2,511
Blog Entries: 1

Rep: Reputation: 412Reputation: 412Reputation: 412Reputation: 412Reputation: 412
No it dosn;t. If you are building lfs CH5 you should be logged in as user lfs, also you should have LFS set as the variable check with
Code:
echo $LFS
which should result in /mnt/lfs. When building your lfs you would be in $LFS/sources = /mnt/lfs/sources How to check "pwd" will show which dir you are in.

So simple steps login as lfs echo $LFS, cd $LFS/sources

best I can do hope this helps
 
1 members found this post helpful.
Old 02-06-2017, 11:59 AM   #3
hazel
LQ Guru
 
Registered: Mar 2016
Location: Harrow, UK
Distribution: LFS, AntiX, Slackware
Posts: 7,559
Blog Entries: 19

Rep: Reputation: 4445Reputation: 4445Reputation: 4445Reputation: 4445Reputation: 4445Reputation: 4445Reputation: 4445Reputation: 4445Reputation: 4445Reputation: 4445Reputation: 4445
It depends on whether you are in Chapter 5 or Chapter 6. In Chapter 5 you work exclusively on the host system as the lfs user. In Chapter 6, you work in the target system as root. You add enough bits and pieces to make it into a functional Linux system and then use the chroot command to move across.

You can usually tell easily whether you are in the host or the new system by observing your root prompt. Most Linux distros give root a red prompt; the new system will have a default white one.
 
1 members found this post helpful.
Old 02-06-2017, 12:44 PM   #4
joecoc1916
LQ Newbie
 
Registered: Feb 2017
Location: West Palm Beach, Florida
Distribution: Ubuntu 16.04
Posts: 18

Original Poster
Rep: Reputation: 0
Terminal Color Schemes... To help identifying "WhoAmI"

Automatically give different terminal colors each time I open terminal

I did a search on google with "Automatically get different terminal colors each time I open terminal".

Gives good ideas but too much work on the return for investment.

I created multiple terminal color schemes through the preferences option on the drop down menu "Edit" in the terminal.
, achieves manageable results...
 
Old 02-07-2017, 02:28 AM   #5
Luridis
Member
 
Registered: Mar 2014
Location: Texas
Distribution: LFS 9.0 Custom, Merged Usr, Linux 4.19.x
Posts: 616

Rep: Reputation: 167Reputation: 167
If you followed sections 4.3 & 4.4 correctly, you did this:

Code:
cat > ~/.bash_profile << "EOF"
exec env -i HOME=$HOME TERM=$TERM PS1='\u:\w\$ ' /bin/bash
EOF
Inside the LFS user's home directory. The "\u" means display the user-name at the prompt, so it should look like this:

username:current-directory$ _

That's how you know you're in the lfs account on the host system. The second half (Chapter 6) is tricky because you're running as root inside a chroot. You can make that prompt stand out by adding something like an underscore or a double hash at the beginning of the prompt. Just add it to the chroot options in section 6.4.

Code:
chroot "$LFS" /tools/bin/env -i \
    HOME=/root                  \
    TERM="$TERM"                \
    PS1='##-\u-##:\w\$ '              \
    PATH=/bin:/usr/bin:/sbin:/usr/sbin:/tools/bin \
    /tools/bin/bash --login +h
Which would make your prompt look like this...

##-username-##:current-directory$ _

And give you an easily visible indication that you're root-within-chroot instead of root at the host, as the latter wouldn't display the hashes.
 
1 members found this post helpful.
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
need basic instructions for setting up a MythTv system balsam Linux - Software 4 05-05-2010 09:32 AM
Basic working instructions Wassock Linux - Newbie 8 01-05-2010 09:20 AM
basic command line instructions Spike Spiegel Linux - Newbie 3 10-28-2008 01:34 PM
help with basic modem driver instructions kapalka Linux - Newbie 3 03-28-2005 04:45 PM
Basic Commands and Instructions on LFTP Rehni Linux - Newbie 1 05-28-2004 01:56 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Linux From Scratch

All times are GMT -5. The time now is 03:39 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration