LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 05-07-2014, 05:12 PM   #1
Skorpius7
LQ Newbie
 
Registered: May 2014
Posts: 20

Rep: Reputation: Disabled
Question Linux from Scratch- probably the first of many questions!


Hey guys, complete Linux noob here, so I thought I'd undertake LFS as a sort of summer project to not only learn linux terminal commands, but also to really understand the inner workings of the system. My question is with regard to Chapter 4.4- I've created the lfs user, but when I do:

Code:
su - lfs
I get a password, input the password correctly, but immediately get yelled at with this:

Code:
env: \u:\w\$ : No such file or directory
I can log in as root like so:
Code:
su - root
and I can use sudo just fine, but su with some other account doesnt work for some reason...I tried to remake the account again, but to no avail.

Also I'm confused as to how su and sudo are different and what the actual purposes of them are- I assume sudo is for the root and su is to log in to some other user but just want to be sure...
 
Old 05-07-2014, 06:46 PM   #2
Emerson
LQ Guru
 
Registered: Nov 2004
Location: Saint Amant, Acadiana
Distribution: Gentoo ~arch
Posts: 6,153

Rep: Reputation: Disabled
sudo is to run a particular command as root. sudo -i will log you in as root using your user password.
su is to switch user. su - will log you in as root using root password and root environment.
Regarding your error, did you create user's home directory?
 
Old 05-07-2014, 07:06 PM   #3
EDDY1
LQ Addict
 
Registered: Mar 2010
Location: Oakland,Ca
Distribution: wins7, Debian wheezy
Posts: 6,838

Rep: Reputation: 649Reputation: 649Reputation: 649Reputation: 649Reputation: 649Reputation: 649
I would just start over removing the dirs & mounts
Also
Quote:
deluser lfs
 
Old 05-07-2014, 07:09 PM   #4
Skorpius7
LQ Newbie
 
Registered: May 2014
Posts: 20

Original Poster
Rep: Reputation: Disabled
To Emerson:

I just did what was on this page:

http://www.linuxfromscratch.org/lfs/...ddinguser.html

To Eddy: Yeah I was trying to do that, but I'm confused as to where exactly the "user" information or whatever is stored-

Also, I made a partition for this entire thing called LFS, but it was already mounted, so I just called commands for sources and tools by opening the terminal within the actual partition, not through /mnt/lfs or whatever- is that the same thing?
 
Old 05-07-2014, 07:21 PM   #5
Emerson
LQ Guru
 
Registered: Nov 2004
Location: Saint Amant, Acadiana
Distribution: Gentoo ~arch
Posts: 6,153

Rep: Reputation: Disabled
I've never done LFS myself, but you should be in chroot for working with your new system.
 
Old 05-07-2014, 07:39 PM   #6
EDDY1
LQ Addict
 
Registered: Mar 2010
Location: Oakland,Ca
Distribution: wins7, Debian wheezy
Posts: 6,838

Rep: Reputation: 649Reputation: 649Reputation: 649Reputation: 649Reputation: 649Reputation: 649
4.2. Creating the $LFS/tools Directory

All programs compiled in Chapter 5 will be installed under $LFS/tools to keep them separate from the programs compiled in Chapter 6. The programs compiled here are temporary tools and will not be a part of the final LFS system. By keeping these programs in a separate directory, they can easily be discarded later after their use. This also prevents these programs from ending up in the host production directories (easy to do by accident in Chapter 5).

Create the required directory by running the following as root:

Quote:
I've never done LFS myself, but you should be in chroot for working with your new system.
This is done later in the book after tool chain is built

Last edited by EDDY1; 05-07-2014 at 07:41 PM.
 
Old 05-07-2014, 08:24 PM   #7
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Germany
Distribution: Whatever fits the task best
Posts: 17,148
Blog Entries: 2

Rep: Reputation: 4853Reputation: 4853Reputation: 4853Reputation: 4853Reputation: 4853Reputation: 4853Reputation: 4853Reputation: 4853Reputation: 4853Reputation: 4853Reputation: 4853
Quote:
Originally Posted by Skorpius7 View Post
Hey guys, complete Linux noob here, so I thought I'd undertake LFS as a sort of summer project to not only learn linux terminal commands, but also to really understand the inner workings of the system.
You are doing it backwards. You will learn nothing from LFS if you don't already have a good understanding of terminal commands and how to compile software. Not without a reason the LFS book presents you a site which tells you which knowledge you should already have: http://www.linuxfromscratch.org/lfs/...equisites.html

I strongly recommend to go for the prerequisites first and then come back and give LFS another try.
 
Old 05-07-2014, 10:04 PM   #8
frankbell
LQ Guru
 
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Debian, Mageia, and whatever VMs I happen to be playing with
Posts: 12,857
Blog Entries: 18

Rep: Reputation: 3339Reputation: 3339Reputation: 3339Reputation: 3339Reputation: 3339Reputation: 3339Reputation: 3339Reputation: 3339Reputation: 3339Reputation: 3339Reputation: 3339
I recently got the same error myself. There was a typo in .bashrc or .bash_profile (I forget which one) that I had created. This is my second stab at LFS--the first time, something broke and I could not figure out what it was, so I deleted the VM, built a new one, and started over. As an afterthought, I strongly recommend building LFS in a VM just because of such an eventuality.

Once I fixed the typo, the login worked.

Also, I agree with TobiSGD. LFS is not for learning Linux as a new user; it's for gaining in-depth Linux knowledge after you know your way around a bit. For example, the "cat . . . EOF" commands you use to create text files are commands that most Linux users are likely never to encounter in day-to-day usage.

If you want to be able to use Linux and learn how to use the command line while doing so, I'd recommend Slackware. After the install, you have a fully-functional desktop Linux, along with a distro that prefers you to fine-tune the configuration with text files and the command line.

Last edited by frankbell; 05-07-2014 at 10:09 PM.
 
Old 05-07-2014, 10:24 PM   #9
Emerson
LQ Guru
 
Registered: Nov 2004
Location: Saint Amant, Acadiana
Distribution: Gentoo ~arch
Posts: 6,153

Rep: Reputation: Disabled
I'd say Gentoo is somewhere between mainstream distros and LFS. Or let me put it this way: Gentoo is LFS with tools that make managing your installation a breeze.
 
Old 05-07-2014, 11:14 PM   #10
Skorpius7
LQ Newbie
 
Registered: May 2014
Posts: 20

Original Poster
Rep: Reputation: Disabled
I understand where u guys are coming from- thing is I know some basic file system commands pretty well so I'm not really lost on terminal- though compiling is something that I need to become familiar with. I have a solid 3 months with quite a bit of free time- what would you guys recommend my course of action be- I feel like LFS wouldn't be too unreasonable to manage maybe after about a month of solid linux experience?
 
Old 05-07-2014, 11:58 PM   #11
Emerson
LQ Guru
 
Registered: Nov 2004
Location: Saint Amant, Acadiana
Distribution: Gentoo ~arch
Posts: 6,153

Rep: Reputation: Disabled
Alright, I'd say install Gentoo base system first. If you can get it booting proceed to LFS.
 
Old 05-08-2014, 01:55 AM   #12
EDDY1
LQ Addict
 
Registered: Mar 2010
Location: Oakland,Ca
Distribution: wins7, Debian wheezy
Posts: 6,838

Rep: Reputation: 649Reputation: 649Reputation: 649Reputation: 649Reputation: 649Reputation: 649
Quote:
Originally Posted by Emerson View Post
Alright, I'd say install Gentoo base system first. If you can get it booting proceed to LFS.
I'd beg to differ gentoo is just as difficult as lfs.
I tried to install gentoo & never got it running, whereas I installed a lfs system & had everything runiing.
To me it was much easier to get a running lfs system than to install gentoo. Also the fact that you're starting the build from a running system means that atleast you're not without a computer. Also you only need to edit grub not reinstall it.
 
Old 05-08-2014, 06:32 AM   #13
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Germany
Distribution: Whatever fits the task best
Posts: 17,148
Blog Entries: 2

Rep: Reputation: 4853Reputation: 4853Reputation: 4853Reputation: 4853Reputation: 4853Reputation: 4853Reputation: 4853Reputation: 4853Reputation: 4853Reputation: 4853Reputation: 4853
Quote:
Originally Posted by Skorpius7 View Post
I understand where u guys are coming from- thing is I know some basic file system commands pretty well so I'm not really lost on terminal- though compiling is something that I need to become familiar with. I have a solid 3 months with quite a bit of free time- what would you guys recommend my course of action be- I feel like LFS wouldn't be too unreasonable to manage maybe after about a month of solid linux experience?
Install Linux, use it. Best way is to use a rather source based distro, like Slackware, Gentoo, CRUX, Lunar or something similar.
Read (and understand) the material on the prerequisites site. If you have more than just a basic understanding of the commandline (read: learn basic scripting) and compiling software you are ready for LFS.
 
Old 05-08-2014, 04:52 PM   #14
Emerson
LQ Guru
 
Registered: Nov 2004
Location: Saint Amant, Acadiana
Distribution: Gentoo ~arch
Posts: 6,153

Rep: Reputation: Disabled
Getting slightly off topic here, but for sake of truth you can install Gentoo from a running system. Whether it is running from hard drive or USB stick or CD/DVD is irrelevant.
 
Old 05-08-2014, 05:39 PM   #15
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Germany
Distribution: Whatever fits the task best
Posts: 17,148
Blog Entries: 2

Rep: Reputation: 4853Reputation: 4853Reputation: 4853Reputation: 4853Reputation: 4853Reputation: 4853Reputation: 4853Reputation: 4853Reputation: 4853Reputation: 4853Reputation: 4853
Quote:
Originally Posted by Emerson View Post
Getting slightly off topic here, but for sake of truth you can install Gentoo from a running system. Whether it is running from hard drive or USB stick or CD/DVD is irrelevant.
Reading the Gentoo forums, it is even recommended to do that, people recommend to install from an already installed system or the SystemRescuCD. Installing Gentoo from Slackware worked fine for me, but really any distro should do it.
 
  


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
writable 'scratch space' for data between linux and winxp filesys questions... servnov Linux - General 2 02-11-2005 02:28 AM
ali aladdin v agp stinks :scratch: :scratch: :scratch: Mr Marmmalade Linux - Hardware 1 07-08-2003 06:11 AM
Linux From Scratch ( Multiple Questions ) astablemaverick Linux From Scratch 3 08-13-2002 10:01 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 08:19 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration