LinuxQuestions.org
Help answer threads with 0 replies.
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 07-11-2015, 02:56 AM   #1
mralk3
Senior Member
 
Registered: May 2015
Location: Utah, USA
Distribution: Slackware
Posts: 1,391

Rep: Reputation: 770Reputation: 770Reputation: 770Reputation: 770Reputation: 770Reputation: 770Reputation: 770
Slackware automated or unattended installation


I've been browsing docs.slackware.com and came across a link to https://github.com/willysr/slackbasics-i18n.

I attached a file that talks about automated installation of Slackware by modifying the initrd.img on the installation medium. See section 6.5 of the attached PDF.

Is this still a viable way to execute an automated installation of Slackware?

If so, maybe it should be documented as is on docs.slackware.com. I knew it was possible to use tag files to automate the installation, but did not know that the rest of the installer could just be skipped by using a shell script. I've found next to zero documentation on the subject of unattended or automated installation of Slackware.
Attached Files
File Type: pdf Slackware_Custom_Installation-Slackbasics-i18n.pdf (111.3 KB, 161 views)
 
Old 07-11-2015, 04:28 AM   #2
Didier Spaier
LQ Addict
 
Registered: Nov 2008
Location: Paris, France
Distribution: Slint64-14.2.1.2 on Lenovo Thinkpad W520
Posts: 9,175

Rep: Reputation: Disabled
Quote:
Originally Posted by mralk3 View Post
Is this still a viable way to execute an automated installation of Slackware?
Yes, with a few modifications as Danil de Kok wrote that book for Slackware 12.0. For instance now the initrd is a CPIO compressed archive, there are more configuration scripts in /var/log/setup, we need to cope with UEFI, etc.

Quote:
I've found next to zero documentation on the subject of unattended or automated installation of Slackware.
I am ready to contribute something to SlackDocs as I am acquainted with the Slackware installers but the question is: what?

To answer that question we need to choose target audience(s), uses case(s) and context(s) as that determines the needs that our "product" (the document + scripts) should fulfill, to define its scope.

Let's take a few examples:
  1. We want to install Slackware for friends or relatives either to revive an old box or in a new one, with or without wiping out the previously installed OS.
  2. We have several boxes on which we need to install Slackware at the same time.
  3. We are an OEM that sells computers with Slackware pre-installed.
About the context: Obviously the work to do will vary if we want to put the boot menu on a hard disk's partition or MBR (in case of BIOS or UEFI) or in the firmware (in case of UEFI), if we want to use a whole disk to install or if we need to preserve an existing OS, etc.

So, what scope do you have in mind?

Last edited by Didier Spaier; 07-11-2015 at 07:59 AM.
 
Old 07-11-2015, 12:03 PM   #3
mralk3
Senior Member
 
Registered: May 2015
Location: Utah, USA
Distribution: Slackware
Posts: 1,391

Original Poster
Rep: Reputation: 770Reputation: 770Reputation: 770Reputation: 770Reputation: 770Reputation: 770Reputation: 770
Quote:
Originally Posted by Didier Spaier View Post
So, what scope do you have in mind?
I think the best way to start would be to address unattended installations for enterprise workstation deployment. While I realize (did not know this at the time I switched to Slackware) that Slackware is not intended for large deployments, it could easily be used for small businesses in the home or at a small office. A medium sized business could even venture into the world of Slackware with this scope.

I've seen mentioned on LQ that there is no such thing as unattended installation for Slackware. While I did not believe Slackware did not have the ability to be installed unattended, I can only imagine the lack of documentation prevents most system administrators from even trying to deploy a Slackware workstation force.

This scope would require, I think, but please make suggestions if it is flawed:
  1. The installer use a local media or a PXE boot to install
  2. Should allow for installation on multiple machines or just one machine
  3. It would use the whole hard disk
  4. *Automatically partitioning approximately 10% of disk for a full installation to root
  5. The rest of the disk for home using the remaining % of the disk
  6. Should be easy to use a custom set of tag files from PXE server or via local media
*Maybe my partition sizes could be adjusted to something more sane. On a 1TB disk, 10% is over kill. I still use 500GB disks though.

I think if I saw a full example of a modern day Slackware unattended installation, I could probably modify it to work with other scopes.
 
Old 07-11-2015, 06:03 PM   #4
Didier Spaier
LQ Addict
 
Registered: Nov 2008
Location: Paris, France
Distribution: Slint64-14.2.1.2 on Lenovo Thinkpad W520
Posts: 9,175

Rep: Reputation: Disabled
Some thoughts:
1. That's already what the Slackware installer allows (setup vs pxesetup, thanks to Alien BoB).
2. Installation on multiple machines: if at the same time, either use several physical media or through PXE.
3+4+5: The Salix installer can do that (if you choose AUTOINSTALL), see attached script. It makes a root partition (xfs) and a swap one using either sfdisk or sgdisk, no /home. IMHO /home is useless, anyhow it would be possible to modify that script so that it takes instructions from an additional config file e.g. to choose a different layout or filesystem.

Similarly, I see that DaniŽl de Kok proposes an automated installation script (under 6.5 Automated installation script) that includes the settings to be used by the scripts in /var/log/setup. It could be useful that this script instead read these settings in a configuration file so that the user can do all customizations just setting the variables in the config file, instead of modifying the automated installation script.
Attached Files
File Type: txt autoinstall.txt (7.1 KB, 180 views)

Last edited by Didier Spaier; 07-11-2015 at 06:06 PM.
 
Old 07-12-2015, 12:45 PM   #5
chemfire
Member
 
Registered: Sep 2012
Posts: 239

Rep: Reputation: Disabled
A few thoughts. I for one don't see a lot of value in preparing automated unattended install media, building tag files, figuring out how to integrate with the existing step process, unless you need people to perform installs on equipment in the field.

Slackware pretty much after 13.0 on with the changes to X.Org etc works out of box with virtually no additional configuration steps or requires a substantial number of actions the installation scripts don't even try to help you with.

In the end using custom tag files etc and scripting the installer is going to leave you with a drive partitioned and formatted, a file system copied onto it, and a boot loader installed. Why bother?

One of the wonderful things about Slackware is its easily copied. Just install it, configure it on one 'gold system' or even a VM. Setup everything they way you like. Use the generic kernel, delete some of the 70-persisten-* udev rules and ssh-key. Now just tar up the entire thing. Create a few simple scripts to partition disks and create filesystems on the targets, extract the tar from some network server (net pipes faucet) and write it down to the disk. Last step your script chroots into the installation and installs the boot loader, reboots done. If the hardware is all mostly the same those scripts don't even need to be very smart.
 
1 members found this post helpful.
Old 07-12-2015, 05:21 PM   #6
atelszewski
Member
 
Registered: Aug 2007
Distribution: Slackware
Posts: 890

Rep: Reputation: Disabled
Hi,

@chemfire I'm doing almost exactly what you say. I used QEMU to install, customize and configure base installation of Slackware. Then I tar'red everything up. Then I have a script that partitions (SATA attached, hotplug) the target disk and extracts the packed rootfs. Then it installs the kernel using lilo. That's it.

--
Best regards,
Andrzej Telszewski
 
1 members found this post helpful.
Old 07-13-2015, 08:55 AM   #7
kikinovak
MLED Founder
 
Registered: Jun 2011
Location: Montpezat (South France)
Distribution: CentOS, OpenSUSE
Posts: 3,419

Rep: Reputation: 2033Reputation: 2033Reputation: 2033Reputation: 2033Reputation: 2033Reputation: 2033Reputation: 2033Reputation: 2033Reputation: 2033Reputation: 2033Reputation: 2033
I'm using tagfiles all the time for my Slackware-based MLED installations. While Slackware is not really meant to be fully automatized as RHEL, CentOS or SLED, you can design your installations to be as centralized as possible. When I have two dozen desktop clients to install, I usually clone them using G4L (Ghost For Linux). Hostnames, users and files are all managed by the server.
 
2 members found this post helpful.
Old 10-12-2015, 04:40 PM   #8
lazardo
Member
 
Registered: Feb 2010
Location: SD Bay Area
Posts: 210

Rep: Reputation: Disabled
Quote:
Originally Posted by mralk3 View Post
...
I attached a file that talks about automated installation of Slackware by modifying the initrd.img on the installation medium. See section 6.5 of the attached PDF.

Is this still a viable way to execute an automated installation of Slackware?
...
Depending on how much customization is to be done, the following may also be useful. Substitute my location for yours:
Code:
$ mkdir /tmp/slack_installer && cd /tmp_slack_installer &&
zcat /big/slackware/64/14.1/isolinux/initrd.img |
sudo cpio -i -d -H newc --no-absolute-filenames 2> /dev/null
$ ls  etc/ etc/rc.d/ usr/lib/setup
etc/:
DIR_COLORS    fstab	 keymaps.tar.gz  mke2fs.conf	nsswitch.conf  scsi_id.config  udev
HOSTNAME      group	 ld.so.cache	 modprobe.d	passwd	       securetty
dhcpc	      host.conf  ld.so.conf	 motd		pcmcia	       services
dialogrc      hosts	 localtime	 mtab		profile        shadow
disk2	      inittab	 login.defs	 mtools.conf	profile.d      shells
dnsmasq.conf  installer  lvm		 networks	protocols      syslog.conf
dropbear      issue	 mdev.conf	 nfsmount.conf	rc.d	       termcap

etc/rc.d/:
rc.S  rc.S.orig  rc.dropbear  rc.font  rc.ieee1394  rc.inet1  rc.pcmcia  rc.udev  rc.usb

usr/lib/setup:
FDhelp	INSURL	    PXEhelp	SeTconfig  SeTmaketag	  SeTpasswd    migrate.sh  setup
INCISO	INSUSB	    SeTDOS	SeTfdHELP  SeTmedia	  SeTpxe       nopartHELP  slackinstall
INSCD	INSdir	    SeTEFI	SeTfull    SeTnet	  SeTpxemedia  pkgtool	   unmigrate.sh
INSNFS	INShd	    SeTPKG	SeTkernel  SeTnopart	  SeTswap      pxesetup
INSSMB	PROMPThelp  SeTPXEHELP	SeTkeymap  SeTpartitions  installpkg   removepkg
etc/rc.d/rc.S,etc/inittab and usr/lib/setup/setup are good places to start. When done, repack and replace the old initrd.img:
Code:
find . -print | cpio -o --owner root:root -H newc | gzip > initrd.img
Cheers,
 
2 members found this post helpful.
Old 01-08-2016, 12:08 AM   #9
BanjoFox
LQ Newbie
 
Registered: Jan 2016
Posts: 1

Rep: Reputation: Disabled
Does this method also include all of the installed packages?

I ask because I am currently testing Slackware in a VM and it will probably take a while to get everything "just right".
Once I've achieved that I would like to be able to port that over to a physical machine without having to replicate all of my work.

- Banjo
 
Old 01-09-2016, 04:15 PM   #10
lazardo
Member
 
Registered: Feb 2010
Location: SD Bay Area
Posts: 210

Rep: Reputation: Disabled
Quote:
Does this method also include all of the installed packages?
Altering the installer's initrd as previously described is an interesting and somewhat delicate experiment, at least for the first pass.

You can do anything you want, including choice of installed packages. I used this method to make rsync available.

Once the image is modified to your liking, it will be reusable.

Cheers,
 
  


Reply

Tags
automated, installation, installer, unattended


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
unattended installation of redhat 6 dantezyates Linux - Server 2 01-01-2015 12:29 PM
Unattended Installation lahirushanaka Linux - Software 8 05-09-2014 03:24 AM
deploying unattended ubuntu installation... mia_tech Linux - General 6 01-03-2009 12:39 PM
Unattended remote installation [GOD]Anck Slackware 0 08-18-2008 07:49 AM
Automated slackware installation Josephus Ross Programming 5 03-09-2007 05:01 AM

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

All times are GMT -5. The time now is 05:05 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration