HOW TO : Slackware 14.2 post-install

Forum rules
Share your brain ;)
User avatar
akts
apt-getter
Posts: 76
Joined: Mon Sep 30, 2013 3:51 am
Location: /dev/null
Contact:

HOW TO : Slackware 14.2 post-install

Unread post by akts » Wed Aug 24, 2016 1:09 pm

A friendly note:
The main purpose of this article is to be a reference point for anyone new, looking to dive into slackware. As a pre-requisite they should have installed a spanking fresh copy of slackware 14.2 on their machine. And also, this article will contain use of GUI tools. To my greybeard bretheren of the cult of keyboards, I apologize. I am a noob myself, and I will shift to your ways soon.

Another friendly note:
I did this installation on a Lenovo Ideapad 100, which is not the latest bleeding edge, but it's still recent and it's my only machine (*cries in the corner*). I have also chosen not to install the KDE and EMACS packages during the install.

I partitioned the drive as

Code: Select all

/dev/sda1 - /home
/dev/sda2 - swap
/dev/sda3 - /
This is all that I did before running the setup program from the slackware install media. Now if unetbootin fails to help create a bootable USB key, you can do a

Code: Select all

$ isohybrid slackware.iso
# dd if=slackware.iso of=/dev/sdb bs=4M; sync
The last friendly note, I swear:
The things in this article are my personal steps, which I collected from scavenging the slackware forums and various sites that I stumbled on. This is in no way a replacement for the well set up slackwiki. Seriously, read it. Almost all of the steps in this article are from it.

Post Install Steps:

1. Setup a normal user account
By default, only the root user will be setup. After logging in we issue,

Code: Select all

# useradd -m -g users -G wheel,floppy,audio,video,cdrom,plugdev,power,netdev,lp,scanner -s /usr/bin/bash bob
This creates a user named bob. We assigned bob to the wheel group, so that he could use the sudo command. Now give him a password

Code: Select all

# passwd bob
We then need the members of wheel group to use the sudo command. Bring up the sudoers file

Code: Select all

# EDITOR=nano visudo
and uncomment the line that says

Code: Select all

## Uncomment to allow members of group wheel to execute any command <- definitely read comments
%wheel ALL=(ALL) ALL
damn! that was obvious (*gets a cup of coffee*). Now we logout from root, and login as our user bob.

2. Setup a GENERIC kernel
Inorder to detect the wide range of hardware, a user might have. The default slackware install media as well as the after-install default slackware-kernel comes with all hardware modules pre-loaded into it. This results in a huge kernel. After installation, we can choose which all modules we need to run with the currently installed system.

Inorder to get root privilleges, issue

Code: Select all

$ sudo su -
# enter password for bob
First we generate an init ram disk for the kernel to boot.

Code: Select all

# /usr/share/mkinitrd/mkinitrd_command_generator.sh
This will generate a command, which we need to run to generate the init ram disk. In my case it was

Code: Select all

mkinitrd -c -k 4.4.14 -f ext4 -r /dev/sda3 -m xhci-pci:ohci-pci:ehci-pci:xhci-hcd:uhci-hcd:ehci-hcd:hid:usbhid:i2c-hid:hid_generic:hid-cherry:hid-logitech:hid-logitech-dj:hid-logitech-hidpp:hid-lenovo:hid-microsoft:hid_multitouch:jbd2:mbcache:ext4 -u -o /boot/initrd.gz
Now we ask our boot loader to use our GENERIC kernel and it's init ram disk. Lucky for us the script we ran before can be used to give us hints.

Code: Select all

# /usr/share/mkinitrd/mkinitrd_command_generator.sh -l /boot/vmlinuz-generic-4.4.14
Fire up nano and open /etc/lilo.conf. Add the entry which the script gave us

Code: Select all

image = /boot/vmlinuz-generic-4.4.14
  initrd = /boot/initrd.gz
  root = /dev/sda3
  label = 4.4.14
  read-only
While we're at it, at the top of lilo.conf add the lines

Code: Select all

lba32
compact # this would be commented, uncomment for faster boots
Now we update lilo with the changes by issuing

Code: Select all

# lilo -v
Reboot into your shiny new kernel.

3. Infinality for X fonts
During the installation, I setup my internet connection with NetworkManager. If you have not, try making the init script for NetworkManager executable.

Code: Select all

# chmod +x /etc/rc.d/rc.networkmanager
You'll need internet connectivity for the rest of this guide.

When we normally startx at the command line, the fonts in default xfce-4.12 is not that great as when compared to ubuntu to other distros. Lucky for us, a slackware user has a repo with infinality (something close to it, but I'm happy with it). Download the zip from his github page. Unzip the archive and cd into it.

Become root and install the .sh script

Code: Select all

$ sudo su - 
# cd path/to/infinality/download
# ./build-infinality-fonts.sh
When I did this, a package called beautifulsoup caused errors. As the domain from which it needed to download it's sources was down. Download the tar.gz from here and put it inside the beautifulsoup directory inside the infinality build directory. Do not extract it. Run the script again and it will be done. Restart X or your entire system, and log back into X.

4. Package Management:
With slackware we do not get automatic dependency resolution. But all is not lost, you can get some-sort of that functionality with 3rd party tools like slapt-get. We'll try something else.

(i) slackbuilds: Visit slackbuilds. Search for some package you want and download the tar.gz file for it (You have to choose the archive marked Download Slackbuild). Make sure, that the drop-down in the slackbuild search page is set to 14.2.

What is a SlackBuild ?
It's an archive that contains a .SlackBuild script, which when run, downloads the source for the package and builds the package to /tmp/ as a .tgz file. We then install the package using a utility called installpkg, as root .If I was building a program called redshift (good for your eyes) from slackbuilds, I'd do the following
  • (*) Get the redshift.tar.gz (under Download SlackBuild) from here.
    (*) Extract it to a suitable location.
    (*) Become root and run

    Code: Select all

    # ./redshift.SlackBuild
    
    (*) We'll get an installable archive in /tmp. Install the package with

    Code: Select all

    # installpkg /tmp/redshift-1.8-x86_64-1_SBo.tgz
    
Here too, dependency problems will arise, so make sure to read the README in all slackbuilds before you install them. As with every case in linux, we have alternatives. We get dependency resolution with slackbuilds by using a package called sbotools.

We'll download sbotools from slackbuilds and perform the steps above to get it installed on our system.

sbotools will download the slackbuild repo to our machine. We can then use this, instead of using our web browser to visit slackbuilds. After installing sbotools issue

Code: Select all

# sbosnap fetch 
# sbosnap update # not needed at first
Finding a package and installing it with sbotools is easy as,

Code: Select all

# sbofind packagename
# sboinstall packagename
(ii) binary packages: Slackware by default comes with slackpkg, a utility to install binary packages on our system. But it can only be used to update the existing base installation of slackware. We'll set this up first.

Code: Select all

# nano /etc/slackpkg/mirrors # <- uncomment a mirror closest to you. Uncomment only one!
# slackpkg update gpg
# slackpkg update
There will be patch releases and updates from time to time.

Another cool utility among slackware users is slackpkg+. Download it and install it.

To configure slackpkg+, open /etc/slackpkg/slackpkgplus.conf and make the changes

Code: Select all

...
REPOPLUS=( slackpkgplus multilib restricted alienbob slacky ) # uncomment this
#REPOPLUS=( slackpkgplus ) # comment it
...
# Slackware 14.2 - x86_64
MIRRORPLUS['multilib']=http://bear.alienbase.nl/mirrors/people/alien/multilib/14.2/
MIRRORPLUS['alienbob']=http://bear.alienbase.nl/mirrors/people/alien/sbrepos/14.2/x86_64/
MIRRORPLUS['restricted']=http://bear.alienbase.nl/mirrors/people/alien/restricted_sbrepos/14.2/x86_64/
MIRRORPLUS['slacky']=http://repository.slacky.eu/slackware64-14.2/
# uncomment the above
slackpkg+ is sort of an addon, that allows slackpkg to use 3rd party repos.
Again, do

Code: Select all

# slackpkg update gpg
# slackpkg update
and now we can install packages from those mirrors.

The documentation for slackpkg+ and sbotools are really well written. Consult the man pages if in doubt, first.

NOTE: There are a lot many tools out there that help in making your slackware system more at home. Check salix and slackel, to see how they do things.

Personal Touches
(i) Login Manager - LXDM :

Code: Select all

# sboinstall lxdm
Open /etc/inittab with an editor and change

Code: Select all

id:4:initdefault: # <- by default it'll be id:3:initdefault:
Now tell slackware to use lxdm. Open /etc/rc.d/rc.4 and add

Code: Select all

# Launch lxdm first
if [ -x /usr/sbin/lxdm ]; then
  exec /usr/sbin/lxdm
fi
just below the line that goes : echo "Starting up X11 session manager..."
Now reboot and see your login manager. Choose session as XFCE the first time. We'll have to configure it later.

(ii) Libreoffice & Multilib :
This is more of a preference actually, we can choose to install them with slackpkg+, as we saw above. But incase we need an alternative. We can use wget to download the entire repo and install manually.

Code: Select all

$ wget -r --no-parent --reject index.html* http://www.slackware.com/~alien/slackbuilds/libreoffice/pkg64/14.2/
# cd /path/of/package/download
# installpkg *.t?z
Multilib setup means, running 32-bit apps on a 64-bit system, follow slackware docs to set it up.

(iii) Setting bootscreen resolution with framebuffer :
I recieved an error while setting up lilo's framebuffer resolution, during install. So here's what I did

Code: Select all

# sboinstall hwinfo libx86emu
# hwinfo --framebuffer
This will give me a list of resolutions my install supports.
example :

Code: Select all

...
Mode 0x037f: 1366x768 (+5504), 24 bits
...
We then add 0x037f to /etc/lilo.conf

Code: Select all

# VESA framebuffer console @ 1336x768x24k
vga = 0x037f
Make sure other "vga=" lines are commented. Now run a lilo -v and we are done.

And with that, we have come to the end. Thanks for the time, and if you find the need to shout at me, please do so.

THANKS & CREDITS If I have not given credit to someone, again please do shout out. I'll mention them by updating the post.

Have fun folks,
~akts.
Last edited by ivanovnegro on Mon Sep 05, 2016 10:03 pm, edited 3 times in total.
Reason: fixed spelling (unetbootin)
Everything is funny, as long as it's happening to somebody else. -- Will Rogers

User avatar
wuxmedia
Grasshopper
Posts: 6445
Joined: Wed Oct 17, 2012 11:32 am
Location: Back in Blighty
Contact:

Re: HOW TO : Slackware 14.2 post-install

Unread post by wuxmedia » Wed Aug 24, 2016 1:39 pm

wow, lot's of steps, thanks for posting :)
"Seek, and Ye shall find"
"Github | Chooons | Site"

User avatar
akts
apt-getter
Posts: 76
Joined: Mon Sep 30, 2013 3:51 am
Location: /dev/null
Contact:

Re: HOW TO : Slackware 14.2 post-install

Unread post by akts » Wed Aug 24, 2016 1:45 pm

Thanks wux, that means a lot :)
Everything is funny, as long as it's happening to somebody else. -- Will Rogers

User avatar
ChefIronBelly
Approved BBQer
Posts: 1044
Joined: Mon Jan 13, 2014 6:01 am
Location: Michigan

Re: HOW TO : Slackware 14.2 post-install

Unread post by ChefIronBelly » Thu Aug 25, 2016 1:23 pm

Good stuff thanks for sharing.
(1/1) Installing: LinuxBBQ...................................[69%]==============[/]

User avatar
wuxmedia
Grasshopper
Posts: 6445
Joined: Wed Oct 17, 2012 11:32 am
Location: Back in Blighty
Contact:

Re: HOW TO : Slackware 14.2 post-install

Unread post by wuxmedia » Thu Aug 25, 2016 9:03 pm

yeah can appreciate how long it takes to doc stuff, even with a few copy pasted bits (yes that kernel line)
"Seek, and Ye shall find"
"Github | Chooons | Site"

User avatar
akts
apt-getter
Posts: 76
Joined: Mon Sep 30, 2013 3:51 am
Location: /dev/null
Contact:

Re: HOW TO : Slackware 14.2 post-install

Unread post by akts » Thu Aug 25, 2016 9:31 pm

The love is much appreciated. Thanks guys :)
Everything is funny, as long as it's happening to somebody else. -- Will Rogers

User avatar
Theo
CLIt Licker
Posts: 394
Joined: Wed Nov 11, 2015 10:19 pm
Location: Nieuw-Buinen, Netherlands

Re: HOW TO : Slackware 14.2 post-install

Unread post by Theo » Sat Aug 27, 2016 3:18 pm

A nice list and thanks for sharing!

User avatar
wuxmedia
Grasshopper
Posts: 6445
Joined: Wed Oct 17, 2012 11:32 am
Location: Back in Blighty
Contact:

Re: HOW TO : Slackware 14.2 post-install

Unread post by wuxmedia » Sat Aug 27, 2016 9:49 pm

^ now that you have all this spare time sans GF you can tell us how it goes :)
"Seek, and Ye shall find"
"Github | Chooons | Site"

User avatar
dkeg
Configurator
Posts: 3782
Joined: Sun Nov 18, 2012 9:23 pm
Location: Mid-Atlantic Grill

Re: HOW TO : Slackware 14.2 post-install

Unread post by dkeg » Sat Aug 27, 2016 10:39 pm

Thank you for your contribution

Work hard; Complain less

User avatar
Theo
CLIt Licker
Posts: 394
Joined: Wed Nov 11, 2015 10:19 pm
Location: Nieuw-Buinen, Netherlands

Re: HOW TO : Slackware 14.2 post-install

Unread post by Theo » Sat Aug 27, 2016 11:33 pm

^^ Wux I'm fine and thank you :) Normally there would be a list of 'Theo can you...' :P For now it's only her dog I have to take care of (an Appenzeller Sennenhund/Frisian Stabijhoun mixture) stubborn as hell, but but.. cute :P

User avatar
akts
apt-getter
Posts: 76
Joined: Mon Sep 30, 2013 3:51 am
Location: /dev/null
Contact:

Re: HOW TO : Slackware 14.2 post-install

Unread post by akts » Sun Aug 28, 2016 2:41 pm

Thanks Theo and dkeg. I learned a lot from the bbq and the configs you guys put up on github.

@Theo: She's making you breakfast, the least you could do is to grill her dog :P
(Note to self: get GF without dog)
Everything is funny, as long as it's happening to somebody else. -- Will Rogers

User avatar
ivanovnegro
Minister of Truth
Posts: 5448
Joined: Wed Oct 17, 2012 11:12 pm

Re: HOW TO : Slackware 14.2 post-install

Unread post by ivanovnegro » Mon Sep 05, 2016 10:02 pm

Very nice post Akts. Good work.
I fixed one typo.

User avatar
akts
apt-getter
Posts: 76
Joined: Mon Sep 30, 2013 3:51 am
Location: /dev/null
Contact:

Re: HOW TO : Slackware 14.2 post-install

Unread post by akts » Sat Sep 10, 2016 5:29 am

Sorry about the typo :)

Thanks ivan :)
Everything is funny, as long as it's happening to somebody else. -- Will Rogers

Post Reply