LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 09-11-2022, 02:57 PM   #1
Li_99
LQ Newbie
 
Registered: Sep 2022
Posts: 12

Rep: Reputation: 0
Question Possible to create a Custom Slackware Live Edition ?


Slackware offers a Live Edition that can be written to a DVD or USB pendrive:

https://docs.slackware.com/slackware:liveslak

Now this live edition comes with a "root" and "live" user account by default.

Is it possible to create an additional non-root account and implement further customizations (firewall & network configurations, install additional browsers, remove unused packages)
and write this customized live image to a USB pendrive that is then booted into a non-persistent RAM-only mode?

The idea is to not install Slackware on a hard drive but to run a customized live version from USB in memory, where data of the OS should not be editable. So that you can boot the same clean version every time from your USB.

Looking forward to your feedback and ideas.
 
Old 09-11-2022, 03:28 PM   #2
Tonus
Senior Member
 
Registered: Jan 2007
Location: Paris, France
Distribution: Slackware-15.0
Posts: 1,407
Blog Entries: 3

Rep: Reputation: 514Reputation: 514Reputation: 514Reputation: 514Reputation: 514Reputation: 514
Just have a look at Alien pastures, everything is already available.

https://alien.slackbook.org/blog/liv...#comment-50896

http://www.slackware.com/~alien/liveslak/

Last edited by Tonus; 09-11-2022 at 03:34 PM. Reason: Add links
 
1 members found this post helpful.
Old 09-11-2022, 07:10 PM   #3
jloco
Member
 
Registered: Apr 2016
Location: Detroit, MI
Distribution: Slackware
Posts: 188

Rep: Reputation: 170Reputation: 170
Yes, the included make_slackware_live.conf file offers one things to edit and replace to make the iso their own. You can insert code into it at the bottom to have it execute upon creation.

Liveslak does have presets for a few different installs. An XFCE slimmed version, Cinnamon, KDE, and a stipped down base Slackware install, as well as a complete installed ISO.

I've personally done a fair bit of hacking away at the script myself to create my own GNOME 42-based Slackware. The user account can be changed in the conf file,
Code:
LIVEUID="live"
is the item for that, you can change it to whatever you want (make sure to uncomment it as well). You can also change the
Code:
LIVEUIDNR="1000"
UID to another option and even change the
Code:
LIVEPW=yourp4s5w0rd
. You don't have to edit the conf file, you can just edit the script itself, but if you break it, it usually breaks hard. So be careful, but don't be afraid. You can always start again!

If you want to leave the root/live accounts and add more, after line 108 in the make_slackware_live.sh has some items you can customize to add users/groups if you need advanced use of this feature.

As for packages, inside the pkglists/ folder you'll find sets of packages for specific installs, you can always hack away at them to tailor it to your needs. But the simplest method I've found for myself, is to edit the
Code:
tagfiles
within the Slackware package tree. If you're familiar with using them, the ADD/REQ are basically treated as auto-install but to not-include a package, you'll want to change it's entry to
Code:
SKP
and when creating the ISO, it will be omitted. Just like the installer would treat it. I keep local edited tagfiles and just copy them over a freshly copied -current tree myself and run with that. You can even replace specific packages with older/newer versions if you'd like, the script consults the tagfiles but doesn't seem to mind differing md5 data. If you want to omit entire package sets, edit the
Code:
SEQ_SLACKWARE
line (if you're sticking to customizing that specific build, or choose the base your editing). It's really quite easy to play with once your familiar with the script.

My advice though, when re-building a pkgset you do have the option of just re-building the pkgset you've edited with the
Code:
REFRESH=""
line. It's just like the SEQ parameter, but you need to apply a
Code:
-r
on the command. This can/will save a lot of time between edits and not re-building the entire ISO each time.

Most importantly, have fun! AlienBob has created a wonderful tool with liveslak!

EDIT: I forgot to mention persistence. I believe if you just write the ISO to a usb using other methods, no persistence folder is created, therefor, you will achieve what you're looking for. Not sure if one can turn it off from the iso2usb.sh script, but the ISO itself has no persistence.

Last edited by jloco; 09-11-2022 at 07:33 PM. Reason: add persistence info
 
3 members found this post helpful.
Old 09-12-2022, 08:39 AM   #4
Li_99
LQ Newbie
 
Registered: Sep 2022
Posts: 12

Original Poster
Rep: Reputation: 0
Once the configuration has been customized make_slackware_live.conf, which script do I have to run in order to create the final, custom .iso image?

To get non-persistence, I guess I then have to simply dd the custom image to the USB instead of using the iso2usb.sh script, right?

Do you know how to incorporate the output of AlienBob's firewall generator tool into the build (rc.firewall)? I guess I can define DNS servers and add specific IP block rules to that file.

http://www.slackware.com/~alien/efg/
 
Old 09-12-2022, 05:54 PM   #5
Li_99
LQ Newbie
 
Registered: Sep 2022
Posts: 12

Original Poster
Rep: Reputation: 0
Once the configuration has been customized in make_slackware_live.conf, which script do I have to run in order to create the custom .iso image?

If I use AlienBob's firewall generator, where do I have to add the generated rc.firewall file to include it in the custom image?

To get non-persistence, I guess I then have to simply dd the custom image to the USB instead of using the iso2usb.sh script?

I tried to download the full 3.8 GB image today from the oficial repository,
but the server was so slow and the connection constantly timed out. I was only able
to download the smaller xfce image, which I burned to a DVD. Are the configuration files and scripts to customize the live image also available in that version or only on the full image?

Last edited by Li_99; 09-12-2022 at 05:55 PM.
 
Old 09-12-2022, 06:42 PM   #6
Tonus
Senior Member
 
Registered: Jan 2007
Location: Paris, France
Distribution: Slackware-15.0
Posts: 1,407
Blog Entries: 3

Rep: Reputation: 514Reputation: 514Reputation: 514Reputation: 514Reputation: 514Reputation: 514
Alien Bob is known for his excellent docs. The script is very well commented and the related blog posts are quite informative.

Your customisations could be added as packages.

If you do not use iso2usb script you might have troubles to boot on some hardware. Persistance is not compulsory btw.
 
Old 09-12-2022, 08:15 PM   #7
jloco
Member
 
Registered: Apr 2016
Location: Detroit, MI
Distribution: Slackware
Posts: 188

Rep: Reputation: 170Reputation: 170
Quote:
Originally Posted by Li_99 View Post
Once the configuration has been customized in make_slackware_live.conf, which script do I have to run in order to create the custom .iso image?
make_slackware_live.sh

Quote:
Originally Posted by Li_99 View Post
If I use AlienBob's firewall generator, where do I have to add the generated rc.firewall file to include it in the custom image?
Around line 3217 where the script creates rc.local, I assume you can do the same for this rc.firewall script. Use cat to print your file out, and save it right from inside the script itself. I've never used his rc.firewall script, so I'm assuming it belongs in /etc/rc.d/, if not, put it where it needs to be. You can also create a package with your files and have it install it like any system package during creation, or you can create your own squashfs modules like a package to add into the addons/ folder that liveslak will process during boot. You could likely completely customize it that way, and not edit the original slackware package set. It will upgrade any installed packages upon boot if you want it to.

Quote:
Originally Posted by Li_99 View Post
To get non-persistence, I guess I then have to simply dd the custom image to the USB instead of using the iso2usb.sh script?
That's correct. There may be another way using the iso2usb.sh script, but the only option I see about persistence is the option to change the directory. Feel free to experiment with it yourself, I'm sure there is a logical way to not have persistence at all. You can always completely remove all of the persistence code, then it simply doesn't exist!

Quote:
Originally Posted by Li_99 View Post
I tried to download the full 3.8 GB image today from the oficial repository,
but the server was so slow and the connection constantly timed out. I was only able
to download the smaller xfce image, which I burned to a DVD. Are the configuration files and scripts to customize the live image also available in that version or only on the full image?
Image? ISO? You can use any slackware mirror to obtain the package set, a local mirror (to you) one is likely your best bet. I keep a rync'ed local copy of the entire -current source tree on my machine, and provide a symlink to liveslak for processing it. You don't have to download a pre-built liveslak iso to make your own. I wouldn't recommend that anyway. It doesn't convert back to a regular slackware package set anyhow. You want to give it original package files from an official slackware mirror site. As for liveslak, there are various mirror download sites all over the world, find one that works from your location, and you should be all set.

You can get the liveslak scripts without an iso here.
 
  


Reply



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
Have you tried USB boot of Slackware Live Edition? slackware-live/1.3.5.1 or other versions? philip0 Slackware - Installation 2 05-27-2020 12:06 PM
Is it possible to create a custom command line inside a BASH script? ShadyThGod Linux - Newbie 6 01-03-2017 05:39 AM
[SOLVED] Create a custom Slackware Live CD kikinovak Slackware 12 11-23-2014 01:07 AM
Is it possible to create a custom font.conf file Rick069 Linux - General 1 06-04-2011 03:14 PM
Which edition (desktop edition or Server edition) best for Oracle RAC on vm thmsvng Linux - Virtualization and Cloud 2 11-26-2009 04:13 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

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