LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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 07-17-2003, 07:25 PM   #1
itsjustme
Senior Member
 
Registered: Mar 2003
Location: Earth
Distribution: Slackware, Ubuntu, Smoothwall
Posts: 1,571

Rep: Reputation: 45
LFS - first apparent problem


Host system: slackware 9.0

LFS partition: /dev/hda11 ->> /LFS

Going through the book, I created the user 'lfs'.

When I did 'su - lfs', as instructed, I got:

/dev/tty1: Operation not permitted

but the user did change from slacker@bsslack to lfs@bsslack.

Doesn't appear to be a problem, but just bugs me a little that it showed up.

A side note: I was going to copy and paste from my session, but I did a Ctrl-Alt-F2, logged in, ran startx,
Ctrl-Alt-F1 back to my session to copy the text,
CTRL-Alt-F2 back to the X session -- X is no longer on screen.
I returned to some error messages which I can't get over to this machine to post. I thought you were supposed to be able to jump between terminals with Ctrl-Alt-F1 and F2 and not lose anything from either session.

Last edited by itsjustme; 07-17-2003 at 07:59 PM.
 
Old 07-17-2003, 07:48 PM   #2
fancypiper
Guru
 
Registered: Feb 2003
Location: Sparta, NC USA
Distribution: Ubuntu 10.04
Posts: 5,141

Rep: Reputation: 58
alt-F7 should take you back to your x session from a virtual terminal.

Once out of x alt-F1 through alt-F6 will take you to 6 different virtual terminals. The one you logged into to start x will be busy.
 
Old 07-17-2003, 08:46 PM   #3
itsjustme
Senior Member
 
Registered: Mar 2003
Location: Earth
Distribution: Slackware, Ubuntu, Smoothwall
Posts: 1,571

Original Poster
Rep: Reputation: 45
Thanks for the help. I remember now about the ALT-F7 thing, but I forgot, since I haven't used it since the first time I read about it.

Unfortunately I couldn't then figure out how to copy the text from the CTRL-ALT-F1 session into the X session, so I simply opened an xterm and entered the stuff from the LFS 4.1 book, chapter 5, section .4 and .5 there.
Here's that:
Code:
[slacker@bsslack ~] $ su -
Password:
Computers are useless.  They can only give you answers.
                -- Pablo Picasso
[root@bsslack ~] $ useradd -s /bin/bash -m lfs
[root@bsslack ~] $ passwd lfs
Changing password for lfs
Enter the new password (minimum of 5, maximum of 127 characters)
Please use a combination of upper and lower case letters and numbers.
New password:
Re-enter new password:
Password changed.
[root@bsslack ~] $ chown lfs /LFS/static
[root@bsslack ~] $ ls -l /LFS
total 24
drwx------    2 root     root        16384 May 12 11:38 lost+found
drwxr-xr-x    2 root     root         4096 Jul 17 16:56 packages
drwxr-xr-x    2 lfs      root         4096 Jul 17 17:59 static
[root@bsslack ~] $ su - lfs
/dev/tty1: Operation not permitted
He who is known as an early riser need not get up until noon.
lfs@bsslack:~$  cat > /.bash_profile << "EOF"
> umask 022
> LFS=/LFS
> LC_ALL=POSIX
> CC="gcc -s"
> export LFS LC_ALL CC
> EOF
-su: /.bash_profile: Permission denied
lfs@bsslack:~$ source ~/.bash_profile
-su: /home/lfs/.bash_profile: No such file or directory
lfs@bsslack:~$
Something is amiss. Apparently it doesn't like the "su - lfs" step or that "cat > ..." thing.

Maybe I just need to vi the .bash_profile and add those lines.

Last edited by itsjustme; 07-17-2003 at 08:48 PM.
 
Old 07-17-2003, 08:55 PM   #4
fancypiper
Guru
 
Registered: Feb 2003
Location: Sparta, NC USA
Distribution: Ubuntu 10.04
Posts: 5,141

Rep: Reputation: 58
Copy everything from /etc/skel to the user/root directory(s) changing ownership afterward.
 
Old 07-17-2003, 09:02 PM   #5
itsjustme
Senior Member
 
Registered: Mar 2003
Location: Earth
Distribution: Slackware, Ubuntu, Smoothwall
Posts: 1,571

Original Poster
Rep: Reputation: 45
The only thing in /etc/skel is .screenrc , and /home/lfs already has one of those.

I logged in as lfs directly to tty1, rather than try that 'su - lfs', and created the .bash_profile with vi and then ran the source command and that seems to have worked to export those environment variables.

On to chapter 5.6, Installing Bash-2.05a

regards...
 
Old 07-17-2003, 09:05 PM   #6
Azmeen
Senior Member
 
Registered: May 2003
Location: Malaysia
Distribution: Slackware, LFS, CentOS
Posts: 1,307

Rep: Reputation: 46
Quote:
Originally posted by itsjustme
Thanks for the help. I remember now about the ALT-F7 thing, but I forgot, since I haven't used it since the first time I read about it.

Unfortunately I couldn't then figure out how to copy the text from the CTRL-ALT-F1 session into the X session, so I simply opened an xterm and entered the stuff from the LFS 4.1 book, chapter 5, section .4 and .5 there.
Here's that:
Code:
....
lfs@bsslack:~$  cat > /.bash_profile << "EOF"
....
Something is amiss. Apparently it doesn't like the "su - lfs" step or that "cat > ..." thing.

Maybe I just need to vi the .bash_profile and add those lines.
shouldn't it be: cat > ~/.bash_profile << "EOF" instead?
 
Old 07-17-2003, 09:28 PM   #7
itsjustme
Senior Member
 
Registered: Mar 2003
Location: Earth
Distribution: Slackware, Ubuntu, Smoothwall
Posts: 1,571

Original Poster
Rep: Reputation: 45
Quote:
shouldn't it be: cat > ~/.bash_profile << "EOF" instead?
Possibly there is a typo in the book. The tilde is not present there. This is the printed book I paid for. Is that supposed to create the file or was it expecting the file to already exist and this stuff was just getting appended? Slackware doesn't automatically create .bash_profile.

Anyway, I think I am past the goof with the .bash_profile.

Now I am in 5.6, Installing Bash-2.05a. It says to make sure I have libcurses.a and libncurses.a. Good, I have those. Then it says to run:

./configure --enable-static-link --prefix=$LFS/static --with-curses

Then it says to run 'make' and then 'make install'.

Uh... I'm still in /home/lfs. Shouldn't this be taking place in /LFS, where LFS is being built? Or, am I in the right place, /home/lfs, for that? The book gives no indication of where I need to be for this.

Over in 5.7 it gets to installing binutils and says to 'mkdir ../binutils-build' and cd to it. But, if I am just following along in the book I am still in /home/lfs and I'm pretty sure I need to be in /LFS. Is that right.

Thanks!

Edit: Hmmmm... Maybe I'm supposed to be in /LFS/static at this point.

Last edited by itsjustme; 07-17-2003 at 09:56 PM.
 
Old 07-17-2003, 10:14 PM   #8
Azmeen
Senior Member
 
Registered: May 2003
Location: Malaysia
Distribution: Slackware, LFS, CentOS
Posts: 1,307

Rep: Reputation: 46
BTW... what version of the book are you using? I'd suggest the 4.1 version... it worked well for me (the only problems I faced were because of me not reading the instructions properly).

Maybe you should download the book (maybe it has some bugfixes over the printed version).

My method was... not starting X at all, and opening the book with lynx on v-term 2 and doing my operations on v-term 1. It works well, and I guess there's no harm in trying that. It's also convenient because you can easily copy and paste long lines between the two v-terms.

<Edit>Spelling corrections</Edit>

Last edited by Azmeen; 07-17-2003 at 10:19 PM.
 
Old 07-17-2003, 10:18 PM   #9
itsjustme
Senior Member
 
Registered: Mar 2003
Location: Earth
Distribution: Slackware, Ubuntu, Smoothwall
Posts: 1,571

Original Poster
Rep: Reputation: 45
Hmmmm...

Of course, that ./configure isn't going to work because there isn't yet a configure file to be found. I guess I am supposed to know already that maybe I need to uncompress the bash-2.05a.tar.bz2 to some directory, apparently the /LFS/static directory.

I can always reformat and reinstall slackware if I screw up because I don't have ESP.

Anybody out there have the printed book that they are following through to do an LFS system?? Am I just dense?

 
Old 07-17-2003, 10:21 PM   #10
itsjustme
Senior Member
 
Registered: Mar 2003
Location: Earth
Distribution: Slackware, Ubuntu, Smoothwall
Posts: 1,571

Original Poster
Rep: Reputation: 45
Quote:
Originally posted by Azmeen
Maybe you should download the book (maybe it has some bugfixes over the printed version).
Maybe that's a good idea.



Edit: It IS the 4.1 printed book. Maybe there was stuff in the previous chapters that said, OK, when you get to 5.6 here's what you have to remember to do from what you read here...

Last edited by itsjustme; 07-17-2003 at 10:23 PM.
 
Old 07-17-2003, 10:57 PM   #11
itsjustme
Senior Member
 
Registered: Mar 2003
Location: Earth
Distribution: Slackware, Ubuntu, Smoothwall
Posts: 1,571

Original Poster
Rep: Reputation: 45
Ok, I know the book says:
All programs compiled in this chapter will be installed under $LFS/static to keep them separate from the programs compiled in the next chapter.

- Ok, does that mean then that I should copy the 'packages' from the CD into the /LFS/static directory and work from there?
- Should I uncompress the packages from their present location into the static directory?
- When I get to installing, say, bzip2, after I uncompress that package, will the 'configure' file from the 'bash' package be overwritten by a new 'configure' file from the bzip2 tar? Or is there just one 'configure' file that works for all packages and it comes out of the bash package?
- When I run 'make' for each package, will that new package have overwritten all the files from the previous package so there is no confusion between packages?
- Should I create a separate directory for each package?

I guess the book is leaving it up to me to know a lot of specific stuff before I get started here.

Thanks...
 
Old 07-18-2003, 10:02 AM   #12
itsjustme
Senior Member
 
Registered: Mar 2003
Location: Earth
Distribution: Slackware, Ubuntu, Smoothwall
Posts: 1,571

Original Poster
Rep: Reputation: 45
Ok, so it seems the thing that the book is not telling me, that I should automatically know, is that I get the package I am working with, put it in the static directory, un-tar it there, it creates a new directory for that package, I change into that directory and run the ./configure, make, etc... At least that's what it looks like so far with the bash packages.

The book just says, ok, let's install bash. Type in ./configure blah blah...

Of course the second package in the process is going to be binutils, and the book says to manually create a separate directory for that. So, I assume that my assumption ( ) is not correct for binutils.

Edit:
Another question, in case anybody wants to jump in here and throw some advice/experience at me, the book says to run that './configure....', then 'make', then 'make install'. Before I type in 'make install' and start seeing all sorts of errors, do I need to be root to run 'make install'??

thanks...

Last edited by itsjustme; 07-18-2003 at 10:24 AM.
 
Old 07-18-2003, 10:29 AM   #13
itsjustme
Senior Member
 
Registered: Mar 2003
Location: Earth
Distribution: Slackware, Ubuntu, Smoothwall
Posts: 1,571

Original Poster
Rep: Reputation: 45
So.... there's not much activity that happens over here in the LFS forum, eh?

 
Old 07-18-2003, 10:41 AM   #14
fancypiper
Guru
 
Registered: Feb 2003
Location: Sparta, NC USA
Distribution: Ubuntu 10.04
Posts: 5,141

Rep: Reputation: 58
I did linux from scratch the easy way, with gentoo.

./configure and make can be done as user, but installing must be done for root if it is for system wide use.

Last edited by fancypiper; 07-18-2003 at 10:44 AM.
 
Old 07-18-2003, 10:42 AM   #15
Azmeen
Senior Member
 
Registered: May 2003
Location: Malaysia
Distribution: Slackware, LFS, CentOS
Posts: 1,307

Rep: Reputation: 46
Quote:
Originally posted by itsjustme
So.... there's not much activity that happens over here in the LFS forum, eh?
LOL! LFSers are shy ya know Well, anyway... if you followed everything by the book (even the version used don't use newer versions even if they exist, IMPORTANT!) you will be fine.

Well anyway, if you setup your $LFS variable and your environments properly, you will heading to a good start.

Bash shouldn't be a problem... but don't use versions other than recommended by the book, there are reasons why 2.05a is chosen. Don't be like me, and find that out when you're halfway through chapter 6 and had to start all over again!

Some apps require you to compile them outside of the source directory... HEED THE WARNING, lest you want a fubar'd system!

If you need more assistance, just give a shoutout. I'll assist whenever I can.
 
  


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
Apparent hacker Attack lenlutz Linux - Security 2 10-14-2005 09:10 AM
fedora server shuts down for no apparent reason jordanthompson Linux - General 9 09-10-2005 02:54 PM
xorg hanging for no apparent reason Covel Linux - Software 6 06-06-2004 04:59 AM
Apparent Fetchmail problem anorman Linux - Software 0 08-28-2003 10:59 AM
X drops back to 640x480 for no apparent reason Griffon26 Linux - Software 2 06-24-2002 01:55 PM


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