-   Linux From Scratch (
-   -   as promised scripts for auto LFS (

NGraphiX 10-08-2002 05:14 PM

as promised scripts for auto LFS
here goes:
(only 5 scripts )

To run them all you need to do is download the
packages and mount a fs on /mnt/lfs. then: alfsrun1
2.copy all the scripts to somewhere in /mnt/lfs/*
3.enter root alfsrun2
5.from the now chrooted system run alfsrun3 alfsrun4 alfsrun5

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

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 10-08-2002 05:19 PM

oops and one more thing .. need to have glibc 2.2 on your base
distro. (most new ones do)

acid_kewpie 10-08-2002 05:25 PM

how about making them a touch easier to read... why not put it in a <pre> section..? i *think* i mean pre...

NGraphiX 10-08-2002 05:35 PM

they were writen with UNIX NL just download them and view them in mcedit or vim

NGraphiX 10-08-2002 05:45 PM

posted them again as .txt files with MSDOS newline.
hope it makes it more visible but both should work.

adam_boz 10-09-2002 12:08 AM

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???

adam_boz 10-09-2002 12:17 AM

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 )
cd $i
./configure --enable-static-link --prefix=$LFS/static --with-curses
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

adam_boz 10-09-2002 12:21 AM

my bad... I guess i just didn't (don't) understand that function install_program().....

NGraphiX 10-09-2002 05:44 AM

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.. :D

adam_boz 10-09-2002 11:29 PM

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:

maybe someone will help us out.

adam_boz 11-03-2002 05:54 PM

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


NGraphiX 11-04-2002 06:49 AM

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...

All times are GMT -5. The time now is 01:44 PM.