The SELinux support enabled by default in the desktop systems like Fedora Core Linux causes some mysterious file permission errors. If you are unable to execute a file for which you seem to have proper permissions, probably SELinux is in to play. Also it shows some annoying messages on the desktop in the recent distributions. Basically if you encounter some strage file access problems, it is better to disable SELinux and check the same again. For example, when root user attempts to access/execute files which are created as normal user. Another example is sometimes your downloaded PHP/CGI script fails to More >
If you try to install Fedora Core 6 to a virtual machine in VMWare, installer doesn’t detect the hard drive that is attached with default options. The FC6 installer throws an error saying “No Devices Found”.
To get rid of this problem, you need to select different option for hard drive during virtual machine creation. Do the following during the virtual machine creation using VMWare virtual machine creation wizard.
- In Virtual Machine Configuration page, Select Custom.
- In Guest Operating System page, select Linux and in version combo box select Other Linux 2.6.x kernel
- Select LSI Logic based SCSI hard disk.
With this option, FC6 installer will continue normally.
There is a script in “/etc/init.d” directory to control each system service. For example, “/etc/init.d/httpd” script is used to control Apache web service. Typically all the scripts under that directory support basic operations like start, stop, status.
The status of any service can be determined using the “status” option supported by the corresponding script of the system service. For example, to know whether the Apache web service is running or not, the following command can be used.
[neo@techpulp ~]# /etc/init.d/httpd status httpd (pid 4201) is running... [neo@techpulp ~]#
The following command check if SNMP service is active or not.
[neo@techpulp ~]# /etc/init.d/snmpd status snmpd More >
The “rpm” command can be used with “-aq –last” options to list the currently installed RPMs and their install date and time. The following shows output the command in my Fedora 10 Linux. This command lists the latest RPMs first.
[neo@techpulp ~]# rpm -qa --last xinetd-2.3.14-21.fc10 Sun 07 Dec 2008 05:21:11 PM PDT VMware-server-1.0.7-108231 Sat 06 Dec 2008 09:08:06 PM PDT flash-plugin-10.0.12.36-release Sat 06 Dec 2008 05:00:27 AM PDT mplayer-1.0-0.102.20080903svn.fc10 Fri 05 Dec 2008 03:14:56 PM PDT libcaca-0.99-0.5.beta16.fc10 Fri 05 Dec 2008 03:14:55 PM PDT .... filesystem-2.4.19-1.fc10 Thu 04 Dec 2008 09:36:50 PM PDT setup-2.7.4-1.fc10 Thu 04 Dec 2008 09:36:49 PM More >
There is a special file “/proc/partitions” in the proc file system interface exported by Linux kernel. This file contains information of all drives, partitions and their sizes present in the system. A sample file is shown below. This contains only one drive sda which has seven partitions sda1 through sda7 out of which sda4 is Windows extended partition.
[neo@techpulp ~]# cat /proc/partitions major minor #blocks name 8 0 117220824 sda 8 1 13309821 sda1 8 2 34186320 sda2 8 3 18040995 sda3 8 4 1 sda4 8 5 40050013 sda5 8 6 10747453 sda6 8 7 883543 sda7 [neo@techpulp ~]#
If you have More >
It is difficult to keep track of all that is printed in the console session especially if you are debugging a program with lots of debug messages. In such cases, you can use “script” command which spawns a new shell and all the activity on that shell is logged to a file until the shell is closed using “exit” command. By default, the “script” command stores the log in a file “typescript” which is stored in the same directory where the “script” command is run. Once you close the shell newly spawed by “script” command you will go back to More >
The “tail” command can be used to last part of a file. The simple use of this command is to display specified number of lines present at end of the file. However you can use “-f” option to continue monitor for any new data being written in live. i.e This is useful if you would like to see what Linux kernel prints or to monitor log messages in live.
The following command monitors kernel messages. You need to have super user (root) privileges to access /proc/kmsg file which is a PROC file system interface to Linux kernel messages.
[root@techpulp ~]# tail -f More >
First of all find which partition is having NTFS on it using “fdisk” command as shown below.
[root@techpulp ~]# fdisk -l | grep NTFS /dev/hda1 1 2125 4283968+ 07 NTFS/HPFS [root@techpulp ~]#
So I have NTFS file system present in the very first partition “/dev/sda1“. Now check if you have
[root@techpulp ~]# rpm -aq | grep ntfs ntfsprogs-2.0.0-9.fc10.i386 ntfs-3g-1.5012-4.fc10.i386 [root@techpulp ~]#
So I already have NTFS related software installed. If don’t have them installed, use “yum” command to get them installed.
[root@techpulp ~]# yum -y install ntfsprogs ntfs-3g
Now just try quickly whether you can mount the NTFS partition More >
The recent Linux distributions run a service called “cpuspeed”. This program monitors the system’s idle percentage and alters (reduces or raises) the CPUs’ clock speeds and voltages to minimize power consumption. When system needs more performance, it raises the CPU speed automatically.
You can disable the “cpuspeed” service if you don’t want this feature. Once the service is stopped, you will see correct cpu speed/frequency using the battery icon present in the system tray of KDE/GNOME desktops. You can temporarily stop the service (applies only for that boot) as shown below.
[root@techpulp]# /etc/init.d/cpuspeed stop
However it is advised to keep this service More >
The VMWare server 1.0.7 and higher do not install on Fedora 10 smoothly. This is because of the changes in the latest Linux kernel 126.96.36.199 that is shipped along with it. But the VMWare server kernel module sources are not up to date.
You download a patch from insecure.ws site and run “runme.pl” script to apply it. The following shows exactly how to do it. Please note that you should run the script with super user privileges.
[neo@techpulp ~]$ wget -c http://www.insecure.ws/warehouse/vmware-update-2.6.27-5.5.7-2.tar.gz [neo@techpulp ~]$ tar -zxvf vmware-update-2.6.27-5.5.7-2.tar.gz vmware-update-2.6.27-5.5.7-2/ vmware-update-2.6.27-5.5.7-2/services.sh vmware-update-2.6.27-5.5.7-2/runme.pl vmware-update-2.6.27-5.5.7-2/update.c vmware-update-2.6.27-5.5.7-2/vmblock.tar vmware-update-2.6.27-5.5.7-2/update vmware-update-2.6.27-5.5.7-2/vmmon.tar vmware-update-2.6.27-5.5.7-2/vmnet.tar [neo@techpulp ~]$ cd vmware-update-2.6.27-5.5.7-2/ [neo@techpulp vmware-update-2.6.27-5.5.7-2]$ su Password: [root@techpulp vmware-update-2.6.27-5.5.7-2]$ ./runme.pl