LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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 09-28-2004, 12:40 PM   #1
sibtay
Member
 
Registered: Aug 2004
Location: U.S
Distribution: Ubuntu
Posts: 145

Rep: Reputation: 15
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
 
Old 09-28-2004, 01:04 PM   #2
bisailb
LQ Newbie
 
Registered: Sep 2004
Location: Toronto, Ontario, Canada
Distribution: SUSE 9.2
Posts: 8

Rep: Reputation: 0
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.
 
Old 09-29-2004, 03:31 AM   #3
sibtay
Member
 
Registered: Aug 2004
Location: U.S
Distribution: Ubuntu
Posts: 145

Original Poster
Rep: Reputation: 15
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?
 
Old 10-05-2004, 01:14 PM   #4
bisailb
LQ Newbie
 
Registered: Sep 2004
Location: Toronto, Ontario, Canada
Distribution: SUSE 9.2
Posts: 8

Rep: Reputation: 0
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.
 
  


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
Red Hat Installer, vs Debian Installer rmckayfleming Linux - General 6 10-19-2005 01:23 PM
(K)Ubuntu installer failing to load installer components from CD. slackyoda Ubuntu 5 07-20-2005 03:06 PM
making mozilla installer from mozilla-source basanta Debian 0 11-22-2004 12:18 AM
What Does The UT2004 Installer Do Behind The Fancy GUI Installer? Tsuroerusu Linux - Games 2 09-09-2004 02:37 PM
Making a CD installer cirrus Linux - General 2 05-08-2002 02:19 PM

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

All times are GMT -5. The time now is 11:58 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