LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
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-01-2013, 01:21 AM   #1
AN28
Member
 
Registered: Apr 2013
Posts: 93

Rep: Reputation: 0
Creating a System Installer


Hi Guys,

So I have built a system on an LFS Platform and have added different applications on it too.

At the moment I am trying out the possibilities of writing my own system installer script (total newbie in writing such scripts); so that I can distribute it among others as well.

For this, I have created a very basic script using the dialog utility and I am obtaining user preferences on language, locale, key-map, network, root/other user settings. (dummy values given) The selected options are then set to be appended to a file for the purpose of testing.

I now want to append them to the relevant files needed to actually install the system. However I am not completely sure on the files that need to be modified.

I am trying to look for other scripts that may have been created prior to this, but haven't really come across any.

I would be grateful if someone can share some (scripts/links to scripts) with me please
 
Old 10-01-2013, 01:29 AM   #2
AN28
Member
 
Registered: Apr 2013
Posts: 93

Original Poster
Rep: Reputation: 0
For anyone interested: this is what I have done so far....
Please feel free to comment and help me improve it! Feedback will be greatly appreciated
 
Old 10-01-2013, 12:42 PM   #3
Lennie
Member
 
Registered: Aug 2012
Location: Sweden
Distribution: LFS, built with pacman
Posts: 374

Rep: Reputation: 85
It's not my day! Firefox deleted my post twice, because I hadn't reloaded the page since I read it this morning. I pressed the back button and started to rewrite the message, but forgot to reload the page, so again it was deleted. (But I hadn't written so much that time.) Some never learn...

Third attempt:
Go back to the book and remind yourself about all config files you have created. It's the same files that needs to be changed.
Timezone: see chapter 6.9 glibc
Chapter 7 has some configs.
Chapter 8 about fstab and grub.
The files in /etc/sysconfig.

You can use sed to change in the files. You can also let your script enter a chroot to add a user and set root password. And to generate the grub config and install grub in mbr (or to a partition) - if the user said they want it.

I haven't used dialog, so I can't help you with that.
 
Old 10-01-2013, 10:51 PM   #4
AN28
Member
 
Registered: Apr 2013
Posts: 93

Original Poster
Rep: Reputation: 0
Oops we all have our bad days...

Thanks for the info will go through the book again!
Any idea where I could get a sample installer script that anyone else might have created ?? Would really like to take a look at another if possible.
 
Old 10-03-2013, 08:43 PM   #5
ReaperX7
LQ Guru
 
Registered: Jul 2011
Location: California
Distribution: Slackware64-15.0 Multilib
Posts: 6,558
Blog Entries: 15

Rep: Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097
I'm only working on crafting some build scripts, not binary installers.
 
Old 10-08-2013, 11:32 PM   #6
AN28
Member
 
Registered: Apr 2013
Posts: 93

Original Poster
Rep: Reputation: 0
ReaperX7: Ohh! build scripts for ?

Quote:
You can also let your script enter a chroot to add a user and set root password. And to generate the grub config and install grub in mbr (or to a partition) - if the user said they want it.
Lennie:: I didn't really understand this part. Do you mind explaining please
 
Old 10-09-2013, 12:36 PM   #7
Lennie
Member
 
Registered: Aug 2012
Location: Sweden
Distribution: LFS, built with pacman
Posts: 374

Rep: Reputation: 85
Hm, thinking about it, I don't know... I tried to make a script enter a chroot, and run some commands in the chroot, but immediately after it entered the chroot the script stopped...

I haven't made an installer. Maybe you can have some use of looking at Arch's install script. (Just download the package and untar it somewhere.) It doesn't use dialog or anything graphical, it's just scripts that the user has to run. I don't know where to find other distros installers. Maybe Slackware's could be useful to study. They usually don't hide anything from the user, so I guess their installer should be easy to understand. If I find a link to it I'll post it here.
 
Old 10-09-2013, 01:42 PM   #8
Keith Hedger
Senior Member
 
Registered: Jun 2010
Location: Wiltshire, UK
Distribution: Void, Linux From Scratch, Slackware64
Posts: 3,150

Rep: Reputation: 856Reputation: 856Reputation: 856Reputation: 856Reputation: 856Reputation: 856Reputation: 856
Quote:
Originally Posted by Lennie View Post
... I tried to make a script enter a chroot, and run some commands in the chroot, but immediately after it entered the chroot the script stopped...
Try something like
Code:
echo -e '#!/bin/bash\nls\npwd\n' >/media/Zen/tmp/xxx
chmod +x /media/Zen/tmp/xxx
sudo chroot /media/Zen/ /tmp/xxx
Don't forget the path to the script in the chroot is local to the chroot ( so no /media/... etc )
Change "/media/Zen" of course to point to your own mounted partition
 
Old 10-09-2013, 03:48 PM   #9
ReaperX7
LQ Guru
 
Registered: Jul 2011
Location: California
Distribution: Slackware64-15.0 Multilib
Posts: 6,558
Blog Entries: 15

Rep: Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097
I'm considering crafting up ready-to-use build scripts for BLFS related software and additional software normally not included in the BLFS book at this time. Mostly to simplify certain lengthy install methods.

I have a few I'm testing but they aren't deployment ready yet.
 
Old 10-10-2013, 11:16 AM   #10
Keith Hedger
Senior Member
 
Registered: Jun 2010
Location: Wiltshire, UK
Distribution: Void, Linux From Scratch, Slackware64
Posts: 3,150

Rep: Reputation: 856Reputation: 856Reputation: 856Reputation: 856Reputation: 856Reputation: 856Reputation: 856
I did start to do some setup scripts a la slackware ( what would we do without it! ) but abandoned them for the time being but you might find them interesting, just two scripts for adding users and groups ( they need dialog installed ) remove the .txt suffix that has to be there for the forum and make them executable, these are provided "as is" as I have not really touched them in a while.
Attached Files
File Type: txt addgroup.txt (881 Bytes, 15 views)
File Type: txt adduser.txt (2.7 KB, 12 views)
 
Old 10-13-2013, 09:34 AM   #11
Lennie
Member
 
Registered: Aug 2012
Location: Sweden
Distribution: LFS, built with pacman
Posts: 374

Rep: Reputation: 85
I found the installer for Archbang. It uses Dialog so you can get some ideas from it. I still haven't found Slackware's installer. I looked at a mirror, but couldn't find it.
 
1 members found this post helpful.
Old 10-30-2013, 11:28 PM   #12
AN28
Member
 
Registered: Apr 2013
Posts: 93

Original Poster
Rep: Reputation: 0
THank YOu Lennie
BTW in which file do I insert this installer script? I need it to run at the initial boot up of the system.
 
  


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
[SOLVED] Mint-Fluxbox installer does not ask for creating partitions ! Aquarius_Girl Linux Mint 3 09-29-2010 05:40 AM
Creating the ultimate Grub2 setup: Windows installer + Live, Linux installer + live + todda7 Linux - General 47 08-05-2010 11:22 AM
Creating an installer backup from current installation s0l1dsnak3123 Debian 1 08-09-2008 08:45 AM
Creating a Bin Installer For a Application stranger_6_7 Linux - Newbie 5 11-06-2006 09:05 AM
Creating a Linux from Scratch installer? pilot1 Linux From Scratch 6 03-04-2004 03:12 AM

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

All times are GMT -5. The time now is 07:50 PM.

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