how to mount usb devices in slackware

a small primer or quick steps to mount usb devices on your slackware machine or for any linux distro…

as my personal motto goes: if it works in slackware, you can bet 99.99% its good to go in any other linux or unix flavors too….

before we begin lets switch user (su) to the root user

basically 4 steps to go through:

STEP 1:first, we attach the usb device to our laptop or desktop and check dmesg status to check if the usb is detected. dmesg requires privilege user rights hence we su before we go ahead…..

# dmesg | tail //here, dmesg piped to tail so as to read the last last few lines

usb-storage 2-1.1:1.0: USB Mass Storage device detected
scsi host9: usb-storage 2-1.1:1.0
scsi 9:0:0:0: Direct-Access hp v100w 1100 PQ: 0 ANSI: 4
sd 9:0:0:0: [sdd] 31285248 512-byte logical blocks: (16.0 GB/14.9 GiB)
sd 9:0:0:0: [sdd] Write Protect is off
sd 9:0:0:0: [sdd] Mode Sense: 43 00 00 00
sd 9:0:0:0: [sdd] No Caching mode page found
sd 9:0:0:0: [sdd] Assuming drive cache: write through
sdd: sdd1
sd 9:0:0:0: [sdd] Attached SCSI removable disk

STEP 2: we create a directory in our slackware machine, usually in the /mnt path but yes again you are free to place it anywhere you like..

# mkdir /mnt/usb_device

STEP 3: mount our usb device found from step 1, to this location.
we have seen from the output of step 1 that the usb is attached at sdd
again step 2 is for time use only as when we make this directory it will be available on our machine till we decide to do away with it…you can delete mount point after usage if you want just like how you delete a file….remember everything is treated as a file in *nix (linux or unix)…or keep it for all future usb devices being mounted….if you plan to mount multiple usb’s simultaneously make different mount points for each device….

mount /dev/sdd1 /mnt/ub_device //mounting our usb device to our path created on our machine

STEP 4: now you are good to go…cd to the directory where you mounted your device and browse the contents….

STEP 5: unmount the usb devices from the location using the umount command

umount /mnt/usb_device

happy slacking folks….


how to chroot from installation media( or my installation disk) when my slackware doesnt boot

so, you get situations where you edit your /etc/lilo.conf file and fail to run /sbin/lilo…an example is upgrading the kernel or changing to a generic kernel etc….in such a case your slackware system fails to reboot correctly….and it prompts because of a failed lilo configuration….

selfless and selfish too because i need it posted to come back again cause it recurs way too often:

upgrading kernel without running lilo for me….

Relax, you are in safe quarters if you reached here…

follow the steps here to get back up and running….

quoting from

In order to gain access to your system without booting directly to it, it is possible to use an installation media such as Slackware CD1 or the DVD. Once the installation media loads and starts, you can change the media’s root directory into a mounted hard-disk partition and use it as the root directory, thus running commands directly from it and affecting it.

1. so the first step is to mount your root partition….if you dont know your root partition just enter fdisk -l and check for the linux partition in it….

(let me explain for a single partition….If this is not the case, and you are using LVM/EVMS or an encrypted volume you will need to prepare the volumes before you can mount and chroot into them)

2. if its /dev/sda1, type

mount /mount/sda1 /mnt

3.   next, we need to prepare three virtual directories to be used by the environment. Those are /dev, a directory with virtual files that represent hardware devices, /proc, a directory with virtual files that represent processes and /sys which contains the kernel and other system files:

mount -o bind /dev /mnt/dev

mount -o bind /proc /mnt/proc

mount -o bind /sys /mnt/sys

4. now, since the partitions are mounted now we can chroot to it

chroot /mnt /bin/bash

quoting slackdocs again…..making my life easier…..

“The bash prompt that you see here is a bash prompt started on your system. You can now work on this environment naturally. For example editing /etc/lilo.conf and executing /sbin/lilo will happen on your system, not from the installation media.”

thats all there to it….now with the help of your installation disc you can use your underlying system when it doesnt boot up…

5. when you are done using, dont forget to run lilo again….and then there is the reboot or poweroff command which you can execute as per your needs….

*i was a bit panicky when my slackware failed to start…..but slackware it always surprises you with its tools…..and the folks at LQ…they keep your worries out….

keep slacking!!!

update/upgrade slackware distro through slackpkg utility

today, i will give a post on how to keep your slackware distro up to date quickly to the latest patches (bugs, security fixes if any) released for the distro the really quick way with slackpkg utility ( default in the distro if you have installed the full installation)….

1. open up /etc/slackpkg/mirrors with your fav text editor
vi /etc/slackpkg/mirrors

2. uncomment the mirror for your distro version or if you want the bleeding edge uncomment a link for slackware-current (note, this is not the stable releases but cutting edge developer’s build…where you have to tinker with issues and fix them if any./…dont uncommnet for production environments…not recommended thoughstill stable…yes i can assure you on that cos its current thats running for me and i feel at home for now with it too)

3. once done, save changes and close the file or exit vi…

4. now, run these four commands one by one….

i. slackpkg update gpg
ii. skackpkg update
iii. slackpkg install-new
iv. slackpkg upgrade-all

5. you can do system clean up after this to ensure no orphan files are present…

well, for now you should check for files with *.new extensions in your system….they are new configuration files that are from your updates for your applications and libraries….

the new files come into existence if you have made any changes to the old configuration files of those respective libraries….in such a case, slackware lets you have keep those old files while an update gives you the new configuration files in .new format so that you can see the difference between them and apply the changes as you wish….

eg: /etc/wpa_supplicant.conf usually have changes for your wireless connection or wifi you added like your essid and password….you get a on an update so that you can check the diff and apply them…

i recommend going through each new files to see the changes and then remove old configs….

and now you get a brand new slackware( well, basically means you up to date with your times! )

keep slacking!!!

a distro you can tweak to how you want( and most importantly you are in full control)

wi-fi configuration in slackware

for wireless configuration stay secure stay alert….quoting from slackdocs as is:

if you need to secure your wireless network traffic, WPA2 should be considered the minimum level of protection required

well i just got my wifi configured and thought i would note and also could share the same
you can do it from either of the slackware turoials in slackdocs or arch tutorial…..i had earlier written the configuration based on my reading in arch linux tutorial and its time to move it below and give way for the slackware approach which makes it stick across sessions…..first system on boot defaults to check for a wired connection if it exists else then will try to check for the wireless…..

way one: slackware tutorial for wifi
the original article is found here…..

below is the configuration for the more newer and updated wpa2 configuration….
you can find the configuration for the older form of encryption(wep or wpa) too in the slack docs on the same page……

iwconfig is the command used to configure but it would not automatically configure the wireless network with wpa2 encryption… need a helper daemon namely, wpa_supplicant
for the same…

we have to edit just two files again for the same….then you reboot to get the changes applied…

1. edit /etc/wpa_supplicant.conf file

# /etc/wpa_supplicant.conf
# ========================
# This line enables the use of wpa_cli which is used by rc.wireless
# if possible (to check for successful association)
# By default, only root (group 0) may use wpa_cli

# WPA protected network, supply your own ESSID and WPAPSK here:
psk=”secret passphrase”

2. next we edit one more file namely, /etc/rc.d/rc.inet1.conf
rc.inet1.conf is a very powerful file….you list all your necessary wired and wireless connections you want to manage in this file….

# rc.inet1.conf (excert)
# ======================
## Example config information for wlan0. Uncomment the lines you need and fill
## in your info. (You may not need all of these for your wireless network)
WLAN_ESSID[4]="nest" //replace nest with your wireless network name or essid of the wifi router
#WLAN_RATE[4]="54M auto"
#WLAN_IWPRIV[4]="set AuthMode=WPAPSK | \
# set EncrypType=TKIP | \
# set WPAPSK=96389dc66eaf7e6efd5b5523ae43c7925ff4df2f8b7099495192d44a774fda16"

you are done…..

reboot your system and slackware will attempt to configure your wireless as yours is all setup and running….


another option apart from rebooting your system is to run the following command

/etc/rc.d/rc.inet1 wlan0_restart

below is an earlier post of mine and i edited to add the above part you just read…i was having minor issues with the below solution…it work sin the session in which we do it and some more restarts….after that it just fails…above one is a sureshot!

way two: archlinux tutorial (caution though: doesnt stick well across sessions….)

below is the link if u want to click right away…..

if you still here below are the core steps to follow:

1. check your wireless device(s) is connected or not and is been identified by the system

# iw dev

2. now bring it up

# ip link set wlan0 up

3. to verify its up enter the following command

# ip link show wlan0

from the output.,
The UP in is what indicates the interface is up, not the later state DOWN. scan for available wireless networks

# iw dev wlp3s0 scan | grep SSID

5. connect to a network now with the SSID listed or you think is yours…

# wpa_supplicant -B -i wlan0 -c <(wpa_passphrase "ssid" "psk")

now for the above quotes yes SSSID is your wireless network identifier name
and psk is the password for the same….
check behind the box for a NETGEAR wi-fi router( i.e. again if you havent changed the password since you bought the router) and i think it should be the same with others…more or less the same….check with the vendor…..

6. finally, assign an ip address to it…it can be set manually or automatically through dhcpd….

# dhcpcd wlan0

these are the only 6 simple steps you need to get your wifi up and running in slackware…..
now, try browsing your browser without your wired network card….

if it fails try the below steps….

# echo 'ctrl_interface=DIR=/run/wpa_supplicant' > /etc/wpa_supplicant.conf
# wpa_passphrase "ssid" "psk" >> /etc/wpa_supplicant.conf
# ip link set interface up
# wpa_supplicant -B -D nl80211,wext -c /etc/wpa_supplicant.conf -i interface
# dhcpcd -A interface

so thats it from me for now….
till next post happy slacking to you all too!!!

free cache memory and system cache

simply execute this command

free && sync && echo 3 > /proc/sys/vm/dump_caches && free

*more info on sync

info coreutils ‘sync invocation’


happy slacking…

tinkering with freeBSD and its cool…helps to learn with another GUI with it…freeBSD 9.1 ix86 in vmware in slackware….

slackware no file or directory while trying to run an application that is installed


i have installed a new application or package say skype and all the related dependencies for it..then i try to run skype and i get

/usr/bin/skype : no such file or directory

when you navigate to your /usr/bin directory you see a file there with name skype and so now you are confused….file is listed there in the directory but error says no such file or directory…


well to detail the issue out if the file exists then it is the issue where you run a slackware 64bit os and the file requested is trying to run some file compatible in the 32bit file systems….

alien BOB a trusted contributor to slackware and slackbuilds for years has the resolution in the link below….

i quote here again what he has quoted to make it clearer

the multilib-enabled Slackware64 can compile 32bit binaries,
if you add the right software to it

so what we do here is actually making our slackware64 which is mltilib ready to start interacting with multiple libraries…..

happy slacking!!!

no sound in firefox

well i had this weird issue where i get no sound in firefox but all cool with my chromium browser or my mplayer audio-video application….

posted it on and sure enough i got help soon…

thanks to gegechris99 on for the guidance to the right link….

well the particular solution involves editing your /etc/asound.conf file…

if you still dont have it no worries just make a new one with your fav editor and enter the correct card number and device number…

#my asound.conf file
defaults.pcm.card 0 
defaults.pcm.device 3 
defaults.ctl.card 0
#check the device number 3 here refers to HDMI output in my case...the numbers were taken from aplay -l output

you can check your card and device number running aplay -l output….

happy slacking!!!