Monday, June 20, 2022

Post Slackware Install tips

 After Installing Slackware rather than reboot do these following instead.

0.Before starting the install run the command  network and it will automatically enable the network for you, so if you want to run network install you can do that too.

1. After the installation is finished it will ask you weather you want to shutdown,reboot or  shell and choose the shell option

2. You will be dropped into a shell. chroot in to your install by running 

chroot /mnt

3. Edit /etc/inittab file and change the default runlevel to 4 so that you can login to GUI desktop.

4. Create a local user by running command adduser  

5. The adduser command will take for of setting up your user account.

6. If you feel the need to add your user to extragroups run the command

usermod -aG $GROUP $USER

7a. Edit /etc/default/grub to add the following line

GRUB_DISABLE_OS_PROBER=false 

to allow os-prober to detect your  Windows OS. 

7b. Instead of Lilo you can install Grub as your boot manager in the same chroot run the command

grub-install /dev/sda

grub-mkconfig -o /boot/grub/grub.cfg

then reboot you should now have logged into your GUI desktop. After you have logged in you should first create a local bashrc. Slackware doesn't ships with a bashrc. Here is a sample and a very simple bashrc

# If not running interactively, don't do anything
case $- in
    *i*) ;;
      *) return;;
esac

# Bash version check

if ((BASH_VERSINFO[0] < 4)); then
    echo "This .bashrc file requires at least Bash 4.0"
    exit 1
fi

# Make sure if the history file is deleted...

if [[ ! -f "$HOME/.bash_history" ]]; then
    # Recreate an empty copy so history apps don't show errors
    touch "$HOME/.bash_history"
fi

# enable programmable completion features (you don't need to enable
# this, if it's already enabled in /etc/bash.bashrc and /etc/profile
# sources /etc/bash.bashrc).

if ! shopt -oq posix; then
  if [ -f /usr/share/bash-completion/bash_completion ]; then
    . /usr/share/bash-completion/bash_completion
  elif [ -f /etc/bash_completion ]; then
    . /etc/bash_completion
  fi
fi

# Make sure 256 color terminals are enabled

export TERM=xterm-256color
export use_color=true


PS1="[\D{%d/%m/%Y}-\A] \u@\H-\W:-\$"
PS2="[\D{%d/%m/%Y}-\A] \u@\H-\W:-\$"         

REFERENCE:

https://docs.slackware.com/howtos:slackware_admin:grub_on_first_install 

https://docs.slackware.com/howtos:slackware_admin:installing_with_gpt_without_uefi#grub_2 

                    

Sunday, June 19, 2022

Adding Intel-microcode to your bootloader

 1. Install intel-microcode and its dependency from slackbuilds.org using the sbopkg package manager.

2.  Generate the initrd for the generic kernel by running the pkgtool command and select setup and select the mkinitrd script to generate initrd.

3.  Change into /boot directory

4.  Rename the initrd.gz as initrd-1.gz with mv -v /boot/initrd.gz /boot/initrd-1.gz

5.  now run the command 

 cat /boot/intel-ucode.cpio /boot/initrd-1.gz > /boot/initrd-intel.gz 

6. Remove the old initrd by rm -rvf /boot/initrd-1.gz

7.  Create a symlink ln -sv /boot/initrd-intel.gz /boot/initrd.gz

8. Update Lilo with lilo -v

9. The above steps are for the generic kernel in slackware. For the huge kernel

add the line intird=/boot/initrd-ucode.cpio in the  /etc/lilo.conf 

    image = /boot/vmlinuz
    initrd = /boot/intel-ucode.cpio
    root = /dev/sdaX                          #[X being the linux partition ]
    label = Linux
    read-only 

10. Run lilo -v 

11. To check if the intel-microcode has been applied download the 

spectre-meltdown-checkup script from 

https://github.com/speed47/spectre-meltdown-checker

Run this script as root it should  show STATUS: NOT VULNERABLE 

This how to is from 

https://forum.salixos.org/viewtopic.php?t=8171 


Tips to upgrade kernel in slackware

1. Never update your working kernel.

2. For upgrading the kernel download the patches.

3. Download your kernel with the command slackpkg download kernel*

4. The Downlaoded packages will be in /var/cache/packages/patches/linux-*

5. Change in to the directory as root.

6. In the terminal as root run the pkgtool command.

7. Choose the option to install packages in the current directory.

8. After installing run lilo -v

9. Reboot.

10. Uninstall the old kernel by running the pkgtool command and 

go to the uninstall section and uninstall the old kernel packages.

11. To create the generic kernel run the pkgtool command and goto setup 

and choose the first option "mkinitrd" it will create initrd and will place it in 

/boot.

12. Make a backup of /etc/lilo.conf and then edit the file to add the 

following section for generic kernel.

                    image=/boot/vmlinuz-generic-5.15.*

                    initrd=/boot/initrd.gz

                    root=/dev/sdaX    #[X being the partition no]

                    label=linux-generic

                    read-only

13. Run lilo -v 

14. Now you will have another kernel apart from the Kernel-huge that 

comes by default so if you botch one of them you will have another 

kernel to boot into.

                    


Saturday, June 18, 2022

Things to do after installing slackware

 

1.Install bash-completion from the Extra packages in the official repo. To install google-chrome download the
deb package and run the chrome slackbuild script to create the slackware package and then install with installpkg

2. Install slackpkg+ and use it to enable additional repos
Uncomment mirror you want to use in /etc/slackpkg/mirrors and run
  slackpkg update gpg
  slackpkg update
  slackpkg upgrade-all
  
3. To Install more software in slackware install sbopkg 
4. To optimize the usage of disk space automatically delete unwanted files in /tmp at shutdown. Create a 
file in /etc/rc.d called rc.local_shutdown and add the following line
  
    /usr/bin/find /tmp -mindepth 1 -maxdepth 1 -exec /bin/rm -rf {} +; 
save it and mark it as executable. 
4. Make sure your joystick does not control your mouse by creating a file in /etc/X11/xorg.conf.d called
51-joystick.conf with the following content
          
Section "InputClass"
        Identifier "joystick catchall"
        MatchIsJoystick "on"
        MatchDevicePath "/dev/input/event*"
        Driver "joystick"
        Option "StartKeysEnabled" "False"       #Disable mouse
        Option "StartMouseEnabled" "False"      #support
EndSection
5. Do not use the full Wayland display use X11 for Seamless working of software.

6. For IBus integration in KDE
 
 edit /etc/environment
 add the lines 
 GTK_IM_MODULE=ibus
 QT_IM_MODULE=ibus
 XMODIFIERS=@im=ibus

 edit ~/.bashrc and add the following lines
 
export GTK_IM_MODULE=ibus
export QT_IM_MODULE=ibus
export XMODIFIERS=@im=ibus

To Start IBus at use login create an autostart script with the following contents

      #!/usr/bin/bash
      
      sleep 5;
      /usr/bin/ibus-autostart 
7. If you want to use virtualbox you can use Cristiano urban's shell script to install, update and uninstall
virtual box. As root run the following command other wise it would crash on startup
 
    VBoxManage setextradata global GUI/UpdateDate never
    
Link to Virtual box auto install script
 
      https://github.com/crish4cks/Bash/blob/master/vbox-autoinstall
      
8. Install the Intel-Microcode or the Amd-microcode package from slackbuild to mitigate the spectre 
vulnerability. 
 
By default you would be using the huge kernel so add the following line in /etc/lilo.conf
 
# Linux bootable partition config begins
image = /boot/vmlinuz
initrd = /boot/intel-ucode.cpio
root = /dev/sda1
label = Linux
read-only

and run lilo -v

9. To manage Appimages  download and use the Application manager program from github. Here is the link 

    https://github.com/IVAN-HC/AM-APPLICATION-MANAGER
    
10. Install Xtreme Download Manager for better integration with Firefox and Chrome. the link below

    https://github.com/subhra74/xdm
11. To install more fonts in slackware install the program fnt. This is not in the repo we have to compile it ourselves but the upshot is 
    it will download and install fonts from google and debian repo. Link below 
    https://github.com/alexmyczko/fnt  

Popular Posts