Sunday, June 23, 2013

Installing Slackware 14 from a USB drive

The following notes collect important tips to consider in the installation of Slackware 14.

Before any modification in my computer I use to load a USB drive with Slax, in case something goes wrong I can use it to fix problems or to find help on Internet.
  1. Download Slax
  2. Install it in a USB drive (this erase all data in it).
    1. Extract Slax inside it.
    2. Run the script for make it bootable.
  3. Boot one time to try it and to verify all works fine.
Downloading Slackware by torrent.
I like download the DVD ISO by using torrent, you can find it in the Slackware official site (~2,3GiB).

Installing the complete distribution in the USB drive and do it bootable
  1. To mount Slackware iso image, it should be done by root user: # mount -t iso9660 -o loop /.../slackware-14.0-iso/slackware-14.0-install-dvd.iso /media/dvd
  2. Go to /../usb-and-pxe-installers folder: $ cd /media/dvd/usb-and-pxe-installers/
  3. Type $ sh -h to getting help.
  4. With the pendrive unmounted run this command as root: $ sh -f -s /media/dvd/ -o /dev/sdc where -s /media/dvd/ is the folder were Slackware tree is mounted, and /dev/sdc the path to the pendrive. -f is the parameter to format the pendrive. Note that pendrive shouldn't be mounted before run this script, if you do it, unplug it and plug it again but without mounting it.
Booting from the USB drive
If the computer doesn't boot automatically from the USB drive, you will have to find the correct configuration inside the BIOS setup. Usually you have to change the order of the devices that can boot the system, put the USB drive in the first place. In some systems the USB drive have to be plugged to appears in the devices list.

Kernel selection
After the Slackware installer boots it will ask you for witch kind of kernel should it use. You have two options: huge.s and hugesmp.s, the first should be used in computer with single processor while the second in multiprocessors computers. I have chose hugesmp.s.

Preparing the hard drive
This time I have change the partitions in the hard drive, I have created one for the / folder (20GiB, ext4), another for swap (2GiB, linux swap), a third for the /home folder (80GiB, ext4) and the rest available space in a fourth partition for a testing area (ext4).

Installing Slackware
I use to avoid the installation of games and FAQs, then I chose the complete installation without prompting.

A good practice is to mount the /home folder in a different partition. This helps when you do an update of the operating system conserving users files and configurations.

Sunday, October 07, 2012

Configuring Slackware 14

Lilo Configuration
By default Lilo gives two options of OS to start, Windows and Linux, and wait a minute to run automatically the first option. I just have Slackware in my PC so it is unnecessary that Lilo asks and wait.

To change the default Lilo behavior you have to change /etc/lilo.conf, this is what I have changed.

1. No waiting until systems starts. Comment prompt line
# Wait until the timeout to boot (if commented out, boot the
# first entry immediately):

2. No Windows option. Comment or delete the Windows section at the end of the config file:
#other = /dev/sdb1
#label = Windows
#table = /dev/sdb

3. Use the command compact to skip memtest and start the system quickly.

To apply any modification to the boot loader it is necessary to run the command lilo.
# lilo

Configuring the system to multi user with session manager
Most of the time I use KDE, so I prefer start KDM it when the system goes up. To do that you have to change the default runlevel configuration in file /etc/initab to the option 4:
# 4 = X11 with KDM/GDM/XDM (session managers)
# Default runlevel. (Do not set to 0 or 6)

After booting in runlevel 4 the computer showed an error with the sound card and didn't play any sound. This is because in runlevel 4 users don't belong the audio group, so you have to add your user to it.

# usermod -aG audio user_name

This problem can affect other resources, as scanners, printers, etc the solution should be adding the user to the appropriate group.

Network manager configuration
In this distribution KDE gets its own network manager, if you want to use it just changes permissions of rc.networkmanager:
# chmod 755 /etc/rc.d/rc.networkmanager

In case you prefer wicd, you have to install it from /extra/wicd folder in the Slackware installation DVD and change permission to /etc/rc.d/rc.wicd to 755 after installation.

Saturday, March 19, 2011

Managing users and groups

To add a new user:
# useradd -m user_name

To set or change a user password :
# passwd user_name

To modify an user account:
# usermod [options] user_name

To delete an user:
# userdel - Delete a user account and related files
# deluser - remove a user from the system

To add an user to a secondary group (append a group to a user):
# usermod -aG group_name user_name

To show the groups that belongs a user:
This show a reduced set of groups (maybe just the secondary groups)
# groups user_name

If the user uses the command groups without a user name, it will show an extended list of groups (maybe the primaries and secondaries groups)

The command id -nG user_name has the same behavior that group.

To remove a user from a group:
it is needed write all the groups the user belongs less the unwanted groups.
# usermod -G {groupname1,groupname2,...} user_name

To add a new group:
 # groupadd group_name

To modify a group:
 # groupmod [options] group_mane

To delete a group:
# groupdel - Delete a group
# delgroup - remove a group from the system

You can edit manually the OS groups file (needs logout-login):
# vi /etc/group

In KDE with HAL: The error that appears when I pugged a USB HDD was solved adding my user to the groups users and plugdev:
# usermod -aG users my_user
# usermod -aG plugdev my_user

Sunday, December 26, 2010

Slackware 13.1+ i810

I have installed Slackware 13.1 six month ago and since that I have a problem with video. Sometimes while I'm working the screen keeps freezing, I can move the mouse and see how the pointer moves, but always the screen shows the same image. In the console I have found the following error:

(EE) intel(0): Failed to submit batch buffer, expect rendering corruption or even a frozen display: Input/output error.

I have tried a pair of times solve the problem, but never successfully. Now I'm going again, taking care of documenting everything.

My graphic card is: Intel Corporation 82852/855GM Integrated Graphics Device (rev 02)

I used to use the i810 driver from Intel, but now this driver is deprecated and replaced by Intel graphic driver that support more cards from Intel.

The configuration:

  • Kernel:
  • Xorg server: 1.7.7
  • xf86-video-intel: 2.11.0

I have found these error in Xorg.0.log :

(II) LoadModule: "fbdev"
(WW) Warning, couldn't open module fbdev
(II) UnloadModule: "fbdev"
(EE) Failed to load module "fbdev" (module does not exist, 0)

I have used xorgsetup to create a xorg.conf file, after that I have not seen the error again. But glxgears goes very slow yet, and possibly the video will fail again.

Listing just directories with "ls"

Basic but not so obvious for me:
For listing only the directories in, for example, /dev:

$ ls -d /dev/*/
/dev/block/ /dev/bsg/ /dev/bus/ /dev/char/ /dev/disk/ /dev/dri/ /dev/fd/ /dev/input/ /dev/mapper/ /dev/pts/ /dev/shm/ /dev/snd/

$ ls -adl /dev/*/
drwxr-xr-x 2 root root 720 2010-12-26 11:41 /dev/block/
drwxr-xr-x 2 root root 140 2010-12-26 11:41 /dev/bsg/
drwxr-xr-x 3 root root 60 2010-12-26 08:31 /dev/bus/
drwxr-xr-x 2 root root 4660 2010-12-26 11:41 /dev/char/
drwxr-xr-x 6 root root 120 2010-12-26 11:41 /dev/disk/
drwxr-xr-x 2 root root 80 2010-12-26 08:31 /dev/dri/
dr-x------ 2 felipe felipe 0 2010-12-26 12:21 /dev/fd/
drwxr-xr-x 3 root root 260 2010-12-26 08:31 /dev/input/
drwxr-xr-x 2 root root 60 2010-12-26 08:31 /dev/mapper/
drwxr-xr-x 2 root root 0 2010-12-26 08:31 /dev/pts/
drwxrwxrwt 2 root root 40 2010-12-26 11:31 /dev/shm/
drwxr-xr-x 3 root root 240 2010-12-26 11:32 /dev/snd/

$ ls -adl /dev/*/*/
drwxr-xr-x 6 root root 120 2010-12-26 08:31 /dev/bus/usb/
drwxr-xr-x 2 root root 300 2010-12-26 11:41 /dev/disk/by-id/
drwxr-xr-x 2 root root 80 2010-12-26 11:41 /dev/disk/by-label/
drwxr-xr-x 2 root root 220 2010-12-26 11:41 /dev/disk/by-path/
drwxr-xr-x 2 root root 120 2010-12-26 11:41 /dev/disk/by-uuid/
drwxr-xr-x 2 root root 100 2010-12-26 08:31 /dev/input/by-path/
drwxr-xr-x 2 root root 60 2010-12-26 08:31 /dev/snd/by-path/

For listing the current directory: ls -d */

Saturday, December 25, 2010

WD My Passport for Mac on Slackware and formatted in NTFS

Ok, yes, this problem was a little weird, but some reasons I have bought an external USB HD for Mac and I want to use it with my Slackware 13.1 machine.
So step by step the problems I had to use it was:
  1. When I plug the disk on my PC appears two devices in /dev :
    1. /dev/sdb1 : hfsplus filesystem; this is the disk I want use.
    2. /dev/sr1 : udf filesystem; this is other small disk, about 600MB, that I don't care by now.
  2. The HD that was formatted for Mac (/dev/sdb1), it use HFS+ filesystem. I want use the disk on Linux and Windows so I need a NTFS filesystem disk. I have used fdisk to change the filesystem of sdb1 to NTFS and then I have formatted it with mkfs.ntfs -f -L Disk_label /dev/sdb1
  3. When I have mounted sdb1 I had no access to the data stored in the disk, but if I did it on windows it works fine, so the problem was the way that is was mounted. I had installed NTFS-3g and the problem was solved with:
    mount -t ntfs-3g /dev/sdb1 /media/hd
    By this way, now I have complete access to the disk, but I have to mount it manually and as root.
  4. On /etc/fstab I had the row:
    /dev/sdb1 /media/memory0 auto noauto,user,exec,rw 0 0
    When the disk was mounted it is did it using the native NTFS filesystem instead of NTFS-3g. I have changed it by:
    /dev/sdb1 /media/memory0 ntfs-3g defaults 0 0
    With it I can mount the drive with mount /dev/sdb1 but just as root. I suppose that with this change I could have problems with volumes with other filesystems (FAT32 for example) linked to the same device (/dev/sdb1). But this is another problem that don't care by now.
Nothing that I have searched and tried have helped.
  1. I have created the file /etc/filesystems like a copy of /proc/filesystem but changing the line ntfs by ntfs-3g, but doesn't work.
  2. From the FAQ of NTFS-3g I have found something that should have help me but it didn't.
  3. Another page referring to the FAQ but with more information. (at the end of the page).
  4. I have changed the group of ntfs-3g to plugdev but doesn't work.
So much time I have gave it to that little problem, so I'm thinking in changing the HDD filesystem to EXT3 or 4.
Finally I have formatted the HDD with EXT4 supposing that it would resolve the problem. But when I have mounted the HDD, I didn't have access to write in it. I have deleted from /etc/fstab the line that define /dev/sdb1 and after mounting the drive for first time, as root, I have changed the owner and permissions to my user and 760. Now the drive is mounted automatically in KDE using HAL. A dirty solution but is ok by now.

The error that appears when I pugged a USB HDD was solved adding my user to the groups users and plugdev and restarting the computer:
# usermod -aG users my_user
# usermod -aG plugdev my_user

Sunday, April 13, 2008

Slackware 12 + i810

Tenía problemas en X, no podía ver videos ni DVD, el openarena colgaba al PC, etc, además al iniciar X salen alguno errores. Buscando en la Internet leí que eso sucede porque el driver de mi tarjeta de video el i810 no estaba presente pues al momento de instalar el SO se instala una versión nueva que se llama intel y que el driver i810 en realidad es un link hacia intel. Para solucionar el problema bajé el paquete original del driver i810 y lo reinstalé.

El paquete está aquí :

Comando de instalación : # upgradepkg --reinstall xf86-video-i810-1.7.4-i486-1.tgz

Referencia :

Sunday, April 06, 2008


Por omisión Slackware no permite a los usuarios no root apagar el computador. Para evitar tener que entrar como root cada vez metí este comando a la lista sudo.

Editar con visudo el archivo sudoers agregando la siguiente línea.

felipe TheEnterprise = NOPASSWD: /sbin/shutdown -h now

Con ello el usuario felipe puede ejecutar el comando /sbin/shutdown -h now en el computador TheEnterprise sin necesidad de password. Claro que puede ser inseguro y más aún publicarlo en internet, pero creo que eso no importa porque mi computador es sólo de uso personal.

Luego hice un script de nombre .poweroff que puse en mi carpeta home y dentro de él agregué la siguiente línea:

sudo /sbin/shutdown -h now

Parece trivial, pero la memoria es frágil.