Archive for the ‘Hardware’ Category.

Fix Ctrl Alt Backspace behavior in Ubuntu

ubuntu.png

Ubuntu 9.04 disabled the semi-crucial keyboard shortcut, Ctrl+Alt+Backspace, that used to force the X graphical server to restart, and made it wonky to re-enable. Luckily, Ubuntu 9.10, due out in nine days, has a single setting to restore it.

Go to System->Preferences->Keyboard settings, then head to the Layouts tab under Keyboard settings, click the “Key sequence to kill the X server” option to expand it, then check “Control + Alt + Backspace” to set it.

Also see: Ctrl+Alt+Backspace Disabled in Most Distributions [FIX]

How to mount a software RAID with LVM

tux.png

I recently had a hard drive crash on box at work. The important files were on a software raid 5 array, but the root filesystem (with the majority of the OS) were on a separate IDE hard drive.

Only the IDE drive crashed,  but I needed to remount the raid array. Here are the commands needed to reconstruct & remount a raid array with a Gentoo live cd:

Continue reading ‘How to mount a software RAID with LVM’ »

Manually mount a USB flash drive in Linux

tux.png

I recently got hold of a 1 GB USB memory stick. It is a Kingmax 1 GB flash drive (U201G – U2GMHDWG) which is (believe it or not), half the size of my little finger. In fact, it is so small that there is a good chance I might misplace it somewhere if it was not tethered to a chain. Anyway, the USB stick has a FAT partition on it and contain some data which I wanted to access in GNU/Linux. I was using Ubuntu and it straight away detected the device as soon as I inserted it and it was automatically mounted in the /media/USB DISK location.

But when I tried to mount it in a bare bones Linux distribution (a distribution which has just enough software as is needed), it was not mounted automatically. This is because the auto mounting takes place by means of a program known as hotplug which detects the USB device that is inserted in real time and then mounts it in the desired location.
Continue reading ‘Manually mount a USB flash drive in Linux’ »

xorg.conf fix in Fedora 10, Ubuntu 9.04 and others

xorg.png

I’m seeing questions all the time for “where did my xorg.conf go in the latest Ubuntu or Fedora?”

The quick answer… press Ctrl+Alt+F2 or similar to log into a TTY console, or type ‘init 3? into a root X terminal. If you haven’t already, log in as root and  kill X or type ‘init 3? if you want to be heavy handed.  Then run:

X -configure
mv ~/xorg.conf.new /etc/X11/xorg.conf

xorg.config in two commands.  Run the ‘init 5? command to get back to your GUI login (or kdm or gdm or startx, etc if you know what you are doing.  Worst case remove the .conf and restart.)

If you are advanced enough to edit an xorg.conf, the above should be a cakewalk and you shouldn’t complain about it.

Regardless, you should investigate ‘xrandr’ which makes it simple to do runtime adjustments.

If you are a newbie, look into a gui.  KDE has KRandRTray which makes controlling outputs and resolutions a breeze.  Don’t forget to toggle the output on with the Fn key if you are a laptop user.

Ctrl+Alt+Backspace Disabled in Most Distributions [FIX]

xorg.png
The ctrl-alt-backspace key combination was used to restart X-server and was recently disabled because of a upstream (X.org) design decision:

The Ctrl-Alt-Backspace key combination currently “zaps” (hard-restarts) the X server, and thus loses any unsaved data in applications, etc. This key combination is also largely undocumented, so users (probably ex-Windows users) may press this key combination without expecting data loss. This spec proposes to follow upstream’s lead and disable this key combination by default in order to prevent this usability issue from occurring in normal installs.

There are two ways of still using the Ctrl Alt Backspace behavior:

1. Press AltGR + SysRQ + K instead (AltGR is the RIGHT ALT button and SysRQ is labelled “Print Screen” most of the times, and remeber to press and hold the keys in the in the right sequence, eg. starting with ALtGR, and ending with the K(ill) key).

2. I don’t know if this works on other distributions, but on Ubuntu, you can edit you xorg.conf (/etc/X11/xorg.conf) and add the DonZap “False” value. That will make Ctrl + Alt + Backspace work again.

So to do this, edit the xorg.conf file by adding this:

Section "ServerFlags"
      Option          "DontZap"               "false"
EndSection

Unmounting the unresponsive CD/DVD drive

tux.png

The newbie states that when he pushes the Eject button on the DVD drive of a server running a certain Redmond-based operating system, it will eject immediately. He then complains that, in most enterprise Linux servers, if a process is running in that directory, then the ejection won’t happen. For too long as a Linux administrator, I would reboot the machine and get my disk on the bounce if I couldn’t figure out what was running and why it wouldn’t release the DVD drive. But this is ineffective.

Here’s how you find the process that holds your DVD drive and eject it to your heart’s content.

Continue reading ‘Unmounting the unresponsive CD/DVD drive’ »

How to use the Ext4 filesystem

tux.png

Ext4 is the evolution of the most used Linux filesystem, Ext3. In many ways, Ext4 is a deeper improvement over Ext3 than Ext3 was over Ext2. Ext3 was mostly about adding journaling to Ext2, but Ext4 modifies important data structures of the filesystem such as the ones destined to store the file data. The result is a filesystem with an improved design, better performance, reliability and features .

Continue reading ‘How to use the Ext4 filesystem’ »

Find out serial / model number & vendor info for SATA and IDE disks

tux.png

How can i find out hard drive information in linux box? Easy.  Install smartmontools on linux box. On Debian & Ubuntu follow the instructions :

apt-get install smartmontools

vim /etc/defaults/smartmontools

Uncomment the follwing line

# uncomment to start smartd on system startup
start_smartd=yes

start the service, /etc/init.d/smartmontools start

smartctl -i /dev/hda or dev/sda (Gives you information about harddrive model no, serial no/ vendor details)

If its showing any errors like this “SMART support is: Unavailable”

Run this smartctl -i -d /dev/hda or /dev/sda (This should work).

To know detailed information about harddrive smartctl –all /dev/hda

check man smartctl to know more.

How to get your iRiver E100 working nicely in Linux

tux.png

The iRiver E100 is a open standard’s fanatics portable audio player.  It supports OGG and FLAC out of the box.  Though, at first it doesn’t play too well with Linux, this is to help those that have some problems with it connecting and mounting properly.

Continue reading ‘How to get your iRiver E100 working nicely in Linux’ »

Display Number of Processors on Linux

tux.png

If you are wondering how many processors a remote server has, there’s a quick and dirty command you can use to display the number of processors.

On Linux, /proc/cpuinfo contains all of the processor information for all current processors in your computer. This will include the speed, the amount of on-chip cache, processor type, and how many cores.

Here’s the command:

cat /proc/cpuinfo | grep processor | wc -l

The command just looks in the /proc/cpuinfo file, pulls out the number of lines containing the word “processor” and passes them into wc (word count), which returns a count of the CPUs in the system.

Here’s what it returned on my remote server:

[root@root]# cat /proc/cpuinfo | grep processor | wc -l

4

Note that if you have a dual-core processor, it will return each core as a separate processor. You can look at the full output of cat /proc/cpuinfo to see if the chips are dual-core.

Pages: 1 2 3 Next