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 |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
09-28-2004, 12:40 PM
|
#1
|
Member
Registered: Aug 2004
Location: U.S
Distribution: Ubuntu
Posts: 145
Rep:
|
making an installer
I am trying to make an installer for my lfs.
Can anyone tell me where should i get started?
Usefull links would help me alot
thank you
|
|
|
09-28-2004, 01:04 PM
|
#2
|
LQ Newbie
Registered: Sep 2004
Location: Toronto, Ontario, Canada
Distribution: SUSE 9.2
Posts: 8
Rep:
|
Installer concept for ALFS
Here is the package management concept I'm building into the AHLFS profile I'm creating that I'm going to submit to the HLFS team.
I put something like this at the top of the XML files for chapters 6 through 9 (this one is an example of the bash package):
<execute command="find / -xdev | grep -Ev '/var/lib/AHLFS|/tools' | sort > /var/lib/AHLFS/pre-install/bash-&bash-version;.log" />
Then, I put something like this at the bottom of the XML files for chapters 6 through 9 (this one is an example of the bash package):
<execute command="find / -xdev | grep -Ev '/var/lib/AHLFS|/tools' | sort > /var/lib/AHLFS/post-install/bash-&bash-version;.log" />
<execute command="diff /var/lib/AHLFS/pre-install/bash-&bash-version;.log /var/lib/AHLFS/post-install/bash-&bash-version;.log | cut -d '/' -f 2- -s | sed 's|^|/|' | grep -Ev '/var/lib/AHLFS|/tools' | sort > /var/lib/AHLFS/contents/bash-&bash-version;.log" />
After that, I created an extra XML file in chapter 9 called packages.xml and it includes things like this:
<execute command="tar -jcpvf /var/lib/AHLFS/tarballs/proc.tar.bz2 `cat /var/lib/AHLFS/contents/proc.log`" />
To get all of this to work properly I had to do a few extra things like put this in proc.xml for chapter 6:
<mkdir base="&LFS;">
<option>parents</option>
<name>var</name>
<name>var/lib</name>
<name>var/lib/AHLFS</name>
<name>var/lib/AHLFS/contents</name>
<name>var/lib/AHLFS/post-install</name>
<name>var/lib/AHLFS/pre-install</name>
<name>var/lib/AHLFS/scripts</name>
<name>var/lib/AHLFS/tarballs</name>
</mkdir>
Keep in mind, you should comment out the creation of the var directory in creatingdirs.xml file in chapter 6 as follows:
<!-- <name>var</name> -->
Also, proc is tricky and it needed to be handled like this:
<execute command="find &LFS; -xdev | cut -d '/' -f 4- -s | sed 's|^|/|' | grep -Ev '/var/lib/AHLFS|/tools' | sort > &LFS;/var/lib/AHLFS/pre-install/proc.log" />
Then, above (yes, above) the mount commands in the XML file I had to put this:
<execute command="find &LFS; -xdev | cut -d '/' -f 4- -s | sed 's|^|/|' | grep -Ev '/var/lib/AHLFS|/tools' | sort > &LFS;/var/lib/AHLFS/post-install/proc.log" />
<execute command="diff &LFS;/var/lib/AHLFS/pre-install/proc.log &LFS;/var/lib/AHLFS/post-install/proc.log | cut -d '/' -f 2- -s | sed 's|^|/|' | sort > &LFS;/var/lib/AHLFS/contents/proc.log" />
In the LFS.xml file, I had to add this above the textdump:
<execute command="find / -xdev | grep -Ev '/var/lib/AHLFS|/tools' | sort > /var/lib/AHLFS/pre-install/lfs-release.log" />
I also had to add this below the textdump:
<execute command="find / -xdev | grep -Ev '/var/lib/AHLFS|/tools' | sort > /var/lib/AHLFS/post-install/lfs-release.log" />
<execute command="diff /var/lib/AHLFS/pre-install/lfs-release.log /var/lib/AHLFS/post-install/lfs-release.log | sort > /var/lib/AHLFS/contents/lfs-release.log" />
&c9-packages;
Finally, the &c9-packages; entity needs to be defined in system.ent as follows:
<!ENTITY c9-packages SYSTEM "chapter09/packages.xml">
That's about it. You have to do the same as the bash package for each of the packages in chapters 6, 7, 9, packages in config and then you're set. So to sum this all up here is what you get...
/var/lib/AHLFS/contents - This holds the log files for all directories/files that belong to an LFS package such as bash for example.
/var/lib/AHLFS/post-install - This holds the log files for all directories/files before an LFS package was compiled and installed.
/var/lib/AHLFS/pre-install - This holds the log files for all directories/files after an LFS package was compiled and installed.
/var/lib/AHLFS/scripts - This is an empty placeholder for remove scripts etc. (i.e. you can use the contents/bash.log to remove bash files, etc.)
/var/lib/AHLFS/tarballs - This holds all of the .tar.bz2 packages for bash, etc. created by our package management integrated into our LFS profile for ALFS/nALFS.
This achieves simple package management without the need to use RPM, etc. The methods used here are similar to those you would use to build slackware .tar.gz packages. Mind you, you would have some extra files to edit and include for the installer to parse. In this case, we're not doing an installer, we're simply preparing the packages compiled by LFS into neat tarballs. Then you could build an installer frontend to this if you want or hack an existing installer like slackware's to use the .tar.bz2 packages we created. I have done this in the past with my LFS system so I know it works, you just have some extra work to do to hack the slackware installer. Of course, you could always build your own.
Last edited by bisailb; 10-05-2004 at 01:23 PM.
|
|
|
09-29-2004, 03:31 AM
|
#3
|
Member
Registered: Aug 2004
Location: U.S
Distribution: Ubuntu
Posts: 145
Original Poster
Rep:
|
what is the name of slackware's installer and where can i get it's source
lfs is supposed to be build on a host system already containing linux
My case is that i want to create an installer that should be able to copy the lfs executables, libs, scripts etc on a clean system containing no operating system at all.
Can slackware's installer do this?
|
|
|
10-05-2004, 01:14 PM
|
#4
|
LQ Newbie
Registered: Sep 2004
Location: Toronto, Ontario, Canada
Distribution: SUSE 9.2
Posts: 8
Rep:
|
Re: Slackware's Installer
The answer is YES, the slackware installer can install a Linux distribution on a clean system.
First you need to create tarballs of all your packages. This means using the commands I pasted in my earlier message to determine what lfs binaries, libraries, scripts, etc. need to be packaged. You don't need to package chapter 5. You only need to package all the right files from chapters 6 through 9. Then you can download all the necessary files and scripts from http://distro.ibiblio.org/pub/Linux/...urrent/source/ to modify the slackware installer to install your tarballs on a clean system. I would burn the installer to a rewritable CD once you're finished modifying it so you can test it. If you run into problems, you can always go back and fix the problems without having to waste any CDs. Once it's working properly, you can build an ISO of your distro's CD and burn it to regular CDs afterwards.
You will probably run into situations where you want to be able to set up LVM, RAID, different filesystems, etc. If the slackware installer isn't capable of doing that right now, it means you have to build that functionality into the installer yourself. However, the benefits of using the slackware installer is that it's easy to modify and it's much faster than most other installers. Don't forget, you're not working with crappy RPM and thank god for that.
That's about as much help as I can give you. You're just going to have to hack away at it from here on... Good luck!
Last edited by bisailb; 10-05-2004 at 01:24 PM.
|
|
|
All times are GMT -5. The time now is 09:51 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|