LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux From Scratch (https://www.linuxquestions.org/questions/linux-from-scratch-13/)
-   -   as promised scripts for auto LFS (https://www.linuxquestions.org/questions/linux-from-scratch-13/as-promised-scripts-for-auto-lfs-32273/)

NGraphiX 10-08-2002 05:14 PM

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

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

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

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

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.. :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: http://www.linuxquestions.org/questi...threadid=32391

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

-Adam

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.