LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
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 10-08-2002, 04:14 PM   #1
NGraphiX
Member
 
Registered: Feb 2002
Location: Jerusalem, Israel
Distribution: Fedora Core 3
Posts: 154

Rep: Reputation: 30
as promised scripts for auto LFS


here goes:
http://www.geocities.com/ngraphix/alfsrun1.htm
http://www.geocities.com/ngraphix/alfsrun2.htm
http://www.geocities.com/ngraphix/alfsrun3.htm
http://www.geocities.com/ngraphix/alfsrun4.htm
http://www.geocities.com/ngraphix/alfsrun5.htm
(only 5 scripts )

To run them all you need to do is download the
packages and mount a fs on /mnt/lfs. then:

1.run alfsrun1
2.copy all the scripts to somewhere in /mnt/lfs/*
3.enter root
4.run alfsrun2
5.from the now chrooted system run alfsrun3
6.run alfsrun4
7.run alfsrun5

Now continue yourself from "kernel compile."
Good Luck !! notify me how goeth.

IMPORTANT:
a. remove the 3 lines of server added junk at the
end of the scripts before running.
b. download under the GNU Public license.
don't sue me if it kills off the remains of your HD.

NGraphiX,Israel
 
Old 10-08-2002, 04:19 PM   #2
NGraphiX
Member
 
Registered: Feb 2002
Location: Jerusalem, Israel
Distribution: Fedora Core 3
Posts: 154

Original Poster
Rep: Reputation: 30
oops and one more thing .. need to have glibc 2.2 on your base
distro. (most new ones do)
 
Old 10-08-2002, 04:25 PM   #3
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
how about making them a touch easier to read... why not put it in a <pre> section..? i *think* i mean pre...
 
Old 10-08-2002, 04:35 PM   #4
NGraphiX
Member
 
Registered: Feb 2002
Location: Jerusalem, Israel
Distribution: Fedora Core 3
Posts: 154

Original Poster
Rep: Reputation: 30
they were writen with UNIX NL just download them and view them in mcedit or vim
 
Old 10-08-2002, 04:45 PM   #5
NGraphiX
Member
 
Registered: Feb 2002
Location: Jerusalem, Israel
Distribution: Fedora Core 3
Posts: 154

Original Poster
Rep: Reputation: 30
posted them again as .txt files with MSDOS newline.
hope it makes it more visible but both should work.
http://www.geocities.com/ngraphix/alfsrun1.txt
http://www.geocities.com/ngraphix/alfsrun2.txt
http://www.geocities.com/ngraphix/alfsrun3.txt
http://www.geocities.com/ngraphix/alfsrun4.txt
http://www.geocities.com/ngraphix/alfsrun5.txt
 
Old 10-08-2002, 11:08 PM   #6
adam_boz
Member
 
Registered: Jul 2002
Location: Santa Cruz, CA
Distribution: lfs
Posts: 538

Rep: Reputation: 30
cool NGraphiX.... I'll give it a try this weekend (no time till then) and let you know how it goes.

ps- I guess you never figured out how to keep the program going after the chroot & bash in ch. 7 either? I was thinking that maybe it would be possible if you had one script controlling all of the others (maybe a c or c++ program would do it too)... but I never got around to trying it out. You got any Ideas???

Last edited by adam_boz; 10-08-2002 at 11:09 PM.
 
Old 10-08-2002, 11:17 PM   #7
adam_boz
Member
 
Registered: Jul 2002
Location: Santa Cruz, CA
Distribution: lfs
Posts: 538

Rep: Reputation: 30
Wait a Minute....

It doesn't look like you changed into any of the directories before compiling them???? how did you get around THAT? Also, when I tried this out, and put the "&&"'s in there, it would just give me a bash prompt when it got to that.... does that happen to you?

Here's what I did to get around having to have specific directory names when changing directory to compile... here's the one for bash:

function bash_install {
for i in $( ls | grep bash )
do
cd $i
done
./configure --enable-static-link --prefix=$LFS/static --with-curses
make
make install
cd ..
}

now, in that "ls | grep bash" part, just replace bash with whatever package you are working with... but be-ware, you might need to add some stuff like a "-" on the end, or "-3." to keep it from going into the wrong directory first.

Good luck... and will it this weekend
 
Old 10-08-2002, 11:21 PM   #8
adam_boz
Member
 
Registered: Jul 2002
Location: Santa Cruz, CA
Distribution: lfs
Posts: 538

Rep: Reputation: 30
my bad... I guess i just didn't (don't) understand that function install_program().....
 
Old 10-09-2002, 04:44 AM   #9
NGraphiX
Member
 
Registered: Feb 2002
Location: Jerusalem, Israel
Distribution: Fedora Core 3
Posts: 154

Original Poster
Rep: Reputation: 30
adam_box:
the function install_program is supposed to take of cd'ing
the idea was to put all the stuff that has to be done every time
such as cd'ing, printing error messages etc. into one function.
run them as is they should work

P.S. your right. I didn't come up with any ideas on how to continue
a script after a new login. sigh. if you have any advice..
 
Old 10-09-2002, 10:29 PM   #10
adam_boz
Member
 
Registered: Jul 2002
Location: Santa Cruz, CA
Distribution: lfs
Posts: 538

Rep: Reputation: 30
I like your scripts.... much more elegant then mine (i'm still trying to decipher them). I will test it out this weekend like I said.

About that issue of logins and chroots..... I opened up a thread over in the "programming" section here: http://www.linuxquestions.org/questi...threadid=32391

maybe someone will help us out.
 
Old 11-03-2002, 04:54 PM   #11
adam_boz
Member
 
Registered: Jul 2002
Location: Santa Cruz, CA
Distribution: lfs
Posts: 538

Rep: Reputation: 30
finally got back to working on it.... here's what I found.

to get past the chroot step:

exec chroot $LFS /bin/env -i HOME=/root TERM=$TERM PS1='\u:\w\$ ' PATH=/bin:/usr/bin:/sbin:/usr/sbin: /bin/bash --login -c "script_2"

and after that, when you gotta do /bin/bash --login or whatever, do this:

exec /bin/bash --login script_3

try playing around w/ that

good luck

-Adam
 
Old 11-04-2002, 05:49 AM   #12
NGraphiX
Member
 
Registered: Feb 2002
Location: Jerusalem, Israel
Distribution: Fedora Core 3
Posts: 154

Original Poster
Rep: Reputation: 30
cool I'll check up on 'exec' as soon as I get back to my linux box,
or preferably get my own computer here at university.
or we can just ask people at the Linux day here which should
be on wendsday (at the technion in Haifa) cheers! hope to back
to linux soon...
 
  


Reply



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
dell E510n with freedos is not all that was promised Garda General 0 10-08-2005 10:44 PM
How can I write Installation scripts for my LFS-5.1.1 distribution alihamza Linux From Scratch 2 09-13-2005 03:11 PM
samples of LFS build scripts dimaash Linux From Scratch 3 07-20-2005 09:35 PM
Auto Restart scripts for apps Ghent Linux - Software 3 06-20-2005 06:33 PM
Is anyone else installing LFS with shell scripts SparceMatrix Linux From Scratch 25 06-12-2003 01:29 AM

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

All times are GMT -5. The time now is 10:35 AM.

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