Tagged: tutorial

Building My Work Environment (Part 2)

Part 2 - Getting Some Utilities Installed

Now, we've got a base system configured and ready to go. It's time to install some useful utilities.

Disclaimer:
The information in this site is the result of my researches in the Internet and of my experiences. This information below is solely used for my purpose and may not be suitable for others.

Here is the list of items to be instaled.

File Manager:
  • pcmanfm
  • ranger
  • highlight (for ranger)
  • My customized ranger/rc.conf (~/.config/ranger/)

Music:
  • cmus

Terminal:
Text Editor:
  • nvim
  • My customized nvim/init.vim (~/.config/nvim/)

Virtualization:
  • virtualbox-kernel
  • virtualbox

Web Browser:
  • chromium

Others:
  • python3
  • scrot - Command line screen capture

The above list may grow in the future but these are the absolute minimum software that I need to do my daily tasks.

All of these can be downloaded from Slackbuilds.org, and follow the usual procedure to get them installed.

Now move onto the next step to install/configure my favorite window manager.

In next article, let's talk about my favorite window manager, i3.

That's all!
-gibb

Building My Work Environment (Part 1)

Part 1 - Base System

I have been a long time Slackware Linux user, probably since Slackware 9 or so. Because of its UNIX-like architecture and stability, Slackware has always been the main OS for my workstation (although I do distro hoppings on my laptop among Debian, FreeBSD, and Arch Linux).

This is just my notes for a list of steps/software I need to install to create my work environment from fresh install of Slackware.

Disclaimer:
The information in this site is the result of my researches in the Internet and of my experiences. This information below is solely used for my purpose and may not be suitable for others.

Partition Scheme:

On my current system, I have 16GB of RAM. So, theoretically, I don't think I need a swap partition; however, just in case my system goes haywire, I reserve 1GB of swap partition.

/dev/sda1 - swap (1GB)
/dev/sda2 - / (around 80GB)
/dev/sda3 - /backup (Rest of space)

Installation of Slackware:

Nothing needs to be noted. Follow its instruction.

Post Installation:

After rebooting the system, there are some tasks need to be done.

Create a user
A regulsr user to do daily tasks. # adduser ... follow the instructions ...

Switch to a generic kernel
Run the following script to output the mkinitrd command with customized options. In my case it was below: # /usr/share/mkinitrd/mkinitrd_command_generator.sh # # mkinitrd_command_generator.sh revision 1.45 # # This script will now make a recommendation about the command to use # in case you require an initrd image to boot a kernel that does not # have support for your storage or root filesystem built in # (such as the Slackware 'generic' kernels'). # A suitable 'mkinitrd' command will be: mkinitrd -c -k 4.4.14 -f ext4 -r /dev/sda2 -m usb-storage:ehci-hcd:ehci-pci:xhci-pci:ohci-pci:xhci-hcd:uhci-hcd:hid:usbhid:i3c-hid:hid_generic:hid-cherry:hid-logitech:hid-logitech-dj:hid-logitech-hidpp:hid-lenovo:hid-microsoft:hid_multitouch:jdb2mbcache:ext4 -u -o /boot/initrd.gz

Update lilo.conf
Since I have LILO installed (the default bootloader of Slackware), its configuration file needs to be updated to boot into the generic kernel. But first run below command to output example sections that need to be updated: # /usr/share/mkinitrd/mkinitrd_command_generator.sh -l /boot/vmlinuz-generic-4.4.14 ... image = /boot/vmlinuz-generic-4.4.14 initrd = /boot/initrd.gz root = /dev/sda2 label = 4.4.14 read-only ...

While editing /etc/lilo.conf, insert lba32, uncomment compact options, and change the timeout value to 0 (zero):# vim /etc/lilo.conf ... lba32 compact ... timeout = 0 ...

Then, run below command to update LILO:# lilo -v

Black listing nouveau video driver
I have rather old video card from NVIDIA which complains about nouveau video driver during its installation. So, the nouveau driver needs to be black listed before installing the video driver from NVIDIA.

To view the name of video driver:# lspci | grep -i vga 01:00.0 VGA compatible controller: NVIDIA Corporation GF106 [GeForce GTS 450] (rev a1)

Then, download xf86-video-nouveau-blacklist-noarch-1.txz from the extra directory in the source tree:# installpkg xf86-video-nouveau-blacklist-noarch-1.txz ... Package xf86-video-nouveau-blacklist-noarch-1.txz installed.

Run the NVIDIA video driver script that's downloaded from the NVIDIA site:# ./NVIDIA-Linux-x86_64-390.48.run

Download Security Patches from slackware.com:

No need to explain:# mkdir /tmp/patches # cd /tmp/patches # wget ftp://ftp.slackware.com/pub/slackware/slackware64-14.2/patches/packages/*.txz ... # upgradepkg *.txz

In next article, let's talk about installing other utilities.

Things To Be Installed:

Fonts:
Icons:
  • Faenza (Slackbuilds.org)

File Manager:
  • pcmanfm
  • ranger
  • highlight (for ranger)
  • My customized ranger/rc.conf (~/.config/ranger/)

Music:
  • cmus

Terminal:
Text Editor:
  • nvim
  • My customized nvim/init.vim (~/.config/nvim/)

Themes:
Version Control:
  • git

Virtualization:
  • virtualbox-kernel
  • virtualbox

Web Browser:
  • chromium

Window Manager:
  • i3
  • i3status
  • i3pystatus
  • My customized i3/conf (~/.config/i3/)
  • My customized i3pystatusconf.py (~/.config/i3/)

Others:
  • rofi - Replacement for dmenu
  • scrot - Command line screen capture
  • My customized rofi/config (~/.config/rofi/)

That's all!
-gibb

Wifi Disabled on HP Pavilion dm3 – Debian 9 (Stretch)

This happened before with Arch Linux, but when I installed Debian 9 (Stretch) on my HP Pavilion dm3-113us, its wifi device was disabled - there is a wifi button on the side and its LED indicator was orange instead of green.

The system seems to recognize the device:$ lspci ... 08:00.0 Network controller: Qualcomm Atheros AR9285 Wireless Network Adapter (PCI-Express) (rev 01) # dmesg | grep -i ath ... [ 0.092000] smpboot: CPU0: AMD Athlon(tm) Neo X2 Dual Core Processor L335 (family: 0xf, model: 0x6b, stepping: 0x2) [ 11.533147] powernow_k8: Found 1 AMD Athlon(tm) Neo X2 Dual Core Processor L335 (2 cpu cores) (version 2.20.00) [ 11.672233] ath: phy0: Enable LNA combining [ 11.674887] ath: phy0: ASPM enabled: 0x42 [ 11.674890] ath: EEPROM regdomain: 0x69 [ 11.674891] ath: EEPROM indicates we should expect a direct regpair map [ 11.674894] ath: Country alpha2 being used: 00 [ 11.674895] ath: Regpair used: 0x69 [ 11.727078] ieee80211 phy0: Atheros AR9285 Rev:2 mem=0xffffb12042140000, irq=17 [ 13.125760] ath9k 0000:08:00.0 wlo1: renamed from wlan0 ...

It looks like necessary kernel modules were loaded as well:# lsmod ... ath 32768 3 ath9k_hw,ath9k,ath9k_common ath9k 94208 0 ath9k_common 32768 1 ath9k ath9k_hw 446464 2 ath9k,ath9k_common ...

I tried resetting BIOS or following weird steps like taking a battery out and booting it up, etc... but none worked.

I was almost giving up getting the wifi device to work, then I found this website that eventually led me to solve the problem. This site shows how to identify a wifi device (internal or usb), search its firmware driver, and install it.

Hmm... firmware, huh? I have not tried this option so I gave it a shot.

Disclaimer:
The information in this site is the result of my researches in the Internet and of my experiences. This information below is solely used for my purpose and may not be suitable for others.

First, let's search any firmware for my atheros:# apt-cache search atheros collectd-core - statistics collection and monitoring daemon (core system) firmware-linux-free - Binary firmware for various drivers in the Linux kernel firmware-atheros - Binary firmware for Atheros wireless cards firmware-zd1211 - binary firmware for the zd1211rw wireless driver

Yes, there are some hits. Based on their description, I installed firmware-atheros first: # apt-get install firmware-atheros ... Unpacking firmware-atheros ... Setting up firmware-atheros ...

I rebooted the system just in case.

My default Desktop Environment is LXDE (though I'll change it to i3 later) and it comes with wicd application. From wicd, I clicked on the Switch On Wi-Fi option. Nope, it did not enable the wifi device. So, I went back to the firmware list and decided to install another one.

firmware-zd1211 doesn't seem to be for my wifi device. Let's try with firmware-linux-free:# apt-get install firmware-linux-free ... Setting up firmware-linux-free (3.4) ... Update-initramfs: deferring update (trigger activated) Processing triggers for initramfs-tools (0.130) ... Update-initramfs: Generating /boot/initrd.img-4.9.0-3-amd64

A moment of truth... I clicked on the Switch On Wi-Fi option again. Yes, a little LED light for Wifi on the side of my laptop changed from orange to blue, which indicates the wifi device is now enabled!

Now the wifi device is enabled after rebooting.

NOTE: The order and combinations to install these firmware seem to matter. I tried below scenarios:

1. Installed firmware-atheros
2. Installed firmware-linux-free
AND
1. Installed firmware-linux-free
2. Installed firmware-atheros
AND
1. Installed firmware-atheros ONLY
AND
1. Installed firmware-linux-free ONLY

The wifi device was successfully enabled in the 1st scenario but it didn't work for everything else. So, just be careful!

At the very beginning of this post, I mentioned same wifi device didn't work with Arch Linux. Maybe, I needed a firmware for it to work just like this one. When I get a chance, I'll try that option. But for now, I'm very satisfied with the outcome.

That's all!
-gibb

*ERROR* radeon kernel modesetting for R600 or later requires firmware-amd-graphics.

I have just finished a fresh install of Debian 9 (Stretch) on my HP Pavilion dm3-1130us and I noticed an error message during boot up. ... [ 18.670958] [drm:radeon_pci_probe [radeon]] *ERROR* radeon kernel modesetting for R600 or later requires firmware-amd-graphics. ...

Ok, that's no problem. All I need to do seems to install firmware-amd-graphics package. Let's see if that package exists: # apt-cache search firmware-amd-graphics firmware-amd-graphics - Binary firmware for AMD/ATI graphics chips

The package exists. Now time to install it:# apt-get install firmware-amd-graphics ... Setting up firmware-amd-graphics (20161130-3) ...

After rebooting, no more ERROR message shows up.

Disclaimer:
The information in this site is the result of my researches in the Internet and of my experiences. This information below is solely used for my purpose and may not be suitable for others.

That's all!
-gibb

FreeBSD: zzz command

While I was researching on suspend/resume capability for FreeBSD on my notebook, I came across with the zzz command. Guess, what it does! It puts the system in the sleep mode (zzz(8)).

Similar command for APM is:$ apm -z

For ACPI:$ acpiconf -s3

In the FreeBSD wiki page for Laptops, it asks to boot up a laptop with a FreeBSD CURRENT image and gathers some hardware info with the following commands: # mount -u -o rw / # dmesg > /dmesg.out # pciconf -lv > /pciconf.out # devinfo -v > /devinfo.out # acpidump -dt > /acpidump.out # mount -u -o ro / ; sync # zzz

Maybe, I'll give those commands a try next time when I go to a store...

Disclaimer:
The information in this site is the result of my researches in the Internet and of my experiences. This information below is solely used for my purpose and may not be suitable for others.

That's all!
-gibb