Linux From ScratchThis 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.
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.
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
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.
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.
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
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.
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
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.
Distribution: Void, Linux From Scratch, Slackware64
Posts: 3,150
Rep:
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.
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.