Archive for the ‘Linux’ Category

Debian Linux-Intel Atom Processor (Menlow) Support

Wednesday, July 30th, 2008

Purpose: To show resources which might be useful if you are looking to support Debian on Intel’s Atom processor.

Sometime back Intel announced it’s new low power Atom processor. These processors are specifically designed for UMPC (Ultra Mobile PC), MID (Mobile Internet Devices) and other hand-held devices.
I started looking around the Internet to see if there is any kind of support for Linux with regards to the Atom processor. It looks like Ubuntu community has lots of activities going on with regards to this. For example, they have developed a project called Ubuntu Net Remix (UNR), which is derived from Ubuntu 8.04 to work with small screen devices. Canonical, the company behind Ubuntu says:

“Ubuntu Netbook Remix is built to provide a superb user experience leveraging Ubuntu’s reputation for delivering operating systems that ‘just work’ in the desktop environment. The remix is based on the standard Ubuntu Desktop Edition but with a launcher that allows users to get on-line more quickly and have faster access to their favourite applications.”

I was specifically interested in finding out support for Debian. Upon not finding anything related to Debian & Intel Atom processor I decided to shoot an email to the Debian Developer mailing list. There has been a pretty interesting discussion since then with regards to this topic. You can view the entire discussion thread here.

It seems that somebody within the Debian community has started a project called DebianEeePC with a goal to support Debian on Intel Atom processor. Here is a good summarization by one of the members on the Debian mailing list.

Finally Intel has started a Mobile and Internet project called Moblin to develop software optimized for Intel Atom processor to take advantage of the “low power, low footprint, high performance, wireless, and graphics to deliver a full Internet experience”.

Moreover you can see my del.icio.us links on this topic that I have found so far over the Internet.

Please check back again or bookmark this link to find out more upto-date information on this topic.

As usual, please leave a comment/feedback below, if you have any.

Contact Form
  1. (required)
  2. (valid email required)
 

cforms contact form by delicious:days

How to Generate a MD5SUM Checksum File for Linux ISO Images

Tuesday, July 22nd, 2008

Purpose: Suppose you have created your own Custom Linux LiveCD by generating an ISO image file using mkisofs command or any other command. Now you want to distribute these ISOs to people and therefore you upload them to a web site and provide a link for the download. Suppose someone downloads the ISO but how can he/she make sure that he/she is getting the exact same copy that you have uploaded. In short if someone hacks the website on which you uploaded these ISOs and the hacker/cracker changes the contents of the ISOs then you would not want your users to use those ISOs.

Here we will discuss a technique which will enable your users to verify that nothing has changed on the ISOs since you uploaded them. This is a useful technique for large ISO downloads (500MB+) to ensure your users that they are receiving the correct data.

Requirements:

a) Any Linux Distro which has MD5SUM package installed.

b) ISO image that you have downloaded from a Web site.

Step 1: Install MD5SUM package

For Debian based distro do:

#apt-get update

# apt-get install coreutils

Step 2: Create a MD5SUM file

For testing purpose I have uploaded a small DSL (Damn Small Linux) ISO here called “dsl.iso”. You can download this and use this as an example to follow the rest of the post.

Now I will create a checksum file by giving the following command:

# md5sum dsl.iso > MD5SUM

This will generate a file called MD5SUM. You can view the contents of the file by:

# less MD5SUM

61694888aede3e01229865b8e6acd4a1 dsl.iso

Also you can have a single MD5SUM file for multiple ISOs. You don’t need to create an individual file for every ISO image. For example suppose you have another file called “memtest.bin” then you can do the following:

# md5sum memtest.bin >> MD5SUM

# less MD5SUM

61694888aede3e01229865b8e6acd4a1 dsl.iso
32fe76fda886150ffbf47d5c6e7b730f memtest.bin

Basically the append operator “>>” just keeps adding new entry for every new file. You can download the combined MD5SUM file here.

Note: Although I have been mentioning ISO files all the time but this technique can be used for any type of file like a .bin, .doc, .zip, .xls, .pdf, etc.

Step 3: Upload the file on some web server

After creating the ISO and the corresponding MD5SUM checksum file upload them to any web server that you have access to.

Step 4: Verify the MD5SUM checksum

Suppose you download the above ISO files at some different time and would like to verify if the download is correct or not then you need to download the MD5SUM file also that you/originator created in Step 2 above.

Note: Make sure that the ISO files and the corresponding MD5SUM file are downloaded in the same directory otherwise the test will fail. By default if you have not moved around anything then all should be good.

Check the ISO files by giving the following command:

# md5sum -c MD5SUM

You shuold see something like this:

dsl.iso: OK
memtest.bin: OK

In case of a checksum failure you might see something like this:

# md5sum -c MD5SUM
dsl.iso: FAILED
memtest.bin: OK
md5sum: WARNING: 1 of 2 computed checksums did NOT match
#

Step 5: Done

That’s it! You are done and ready to upload your ISOs and MD5SUM checksum file.

As usual, please leave a comment/feedback, if you have any.

Contact Form
  1. (required)
  2. (valid email required)
 

cforms contact form by delicious:days

Access/Mount a Linux ext2/ext3 filesystem from a Windows XP machine over a LAN/Domain network

Saturday, July 19th, 2008

Purpose: This post will explain how you can mount a Linux filesystem (ext2/etx3) on your Windows XP machine over a network.

Note: If you are looking for how to the reverse - Mount a windows share drive on a linux machine over a network then please refer to my previous blog entry.

Also this blog entry does NOT explain how you can access an ext2/ext3 filesystem on your Windows XP partition on the same hard drive - The typical Dual Boot scenario.

Important Note: Before you read any further I strongly encourage you to do the things that I mentioned in my previous blog as noted above. Your chances of success to follow the instructions on this entry will greatly increase. Therefore I strong encourage you to do all the things mentioned in my previous blog.

My Setup:

1. Debian Linux (4.0) running 2.6.24 kernel with IP address 192.168.0.2 and user accounts: “root” and “kushalk”

2. Windows XP SP2 machine on a network domain called “home.net” with IP address 192.168.0.3 and user account: “kkoolwal”

Step 1: Install Samba Package on your Linux machine

#apt-get install samba

Step 2: Stop the Samba Daemon

It is a good idea to stop the Samba daemon since we will be making changes to the Samba configuration file.

#/etc/init.d/samba stop

Step 3: Edit the Samba file /etc/samba/smb.conf (may be required)

This will require two steps:

a) Make sure that your domain/workgroup name is setup correctly in the variable “workgroup”. Also you need to uncomment the line by removing the “;” or “#” symbol.

workgroup = home.net

Make sure you set the name of your workgroup properly. To find out the name of your workgroup/domain do the following on your Windows machine.

To find out the Workgroup name in Windows follow these steps:
- Go to “START”
- Click “Control Panel”
- Click “System”
- Click on the 2nd tab button named: “Computername” and find out the name of your workgroup/domain.

b) Select which directory you want to share

As per the default setting you will be able to access your home directory on your Windows XP machine i.e. the directory of the user from which you connect. If you want to access any other directory other than your home directory then you need to add the following section anywhere in the smb.conf file:

[src]
comment = My Kernel/Module development sources
path = /usr/src/
read only = Yes

Basically by doing the above you are telling your Samba server that you want to share the ‘/usr/src’ directory.

That’s it. Your smb.conf file should now be configured.

Note: It is a good idea to check your smb.conf file for any syntactic error by giving the following command:

# testparm

Here is my output of the above command:

root@debian:~# testparm
Load smb config files from /etc/samba/smb.conf
Processing section “[homes]”
Processing section “[printers]”
Processing section “[print$]”
Loaded services file OK.
Server role: ROLE_STANDALONE
Press enter to see a dump of your service definitions
[global]
workgroup = home.net
server string = %h server
obey pam restrictions = Yes
passdb backend = tdbsam
passwd program = /usr/bin/passwd %u
passwd chat = *Enter\snew\sUNIX\spassword:* %n\n *Retype\snew\sUNIX\spassword:* %n\n *password\supdated\ssuccessfully* .
syslog = 0
log file = /var/log/samba/log.%m
max log size = 1000
dns proxy = No
wins server = eth0:192.168.0.20
panic action = /usr/share/samba/panic-action %d
invalid users = root
include = /etc/samba/dhcp.conf
[homes]
comment = Home Directories
valid users = %S
create mask = 0700
directory mask = 0700
browseable = No
[printers]
comment = All Printers
path = /var/spool/samba
create mask = 0700
printable = Yes
browseable = No
[print$]
comment = Printer Drivers
path = /var/lib/samba/printers
root@debian:~#

Step 4: Add a user to the Samba user list:

You need to tell the Samba server which user you will be using to connect the to Linux filesystem from the Windows machine. I added myself (user: kushalk) to the Samba server by giving the following commands:

smbpasswd -L -a kushalk
smbpasswd -L -e kushalk

Note: By default, Samba does not allow the user “root” to access the filesystem. You will have to change the setting “invalid users = root” in your smb.conf file. I have not tried this.

Step 5: Restart the Samba server

#/etc/init.d/samba start

Step 6: Access your Linux filesystem/folder from Windows XP machine

Finally go to your Windows machine (assuming you have File Sharing and all configured which I think it should be if you were able to follow the steps in my previous blog successfully) and type the following in your “Explorer Windows” and NOT “Internet Explorer” like this:

Linux Filesystem Windows Mount Login Network

Now enter your username and password - the one that you used in the smbpasswd command in Step 4 above. After that you should be able to see your home directory like this:

Linux Ext3 Share connected Windows Mount

That’s it. As usual, please leave a comment/feedback, if you have any.

Mount a Windows Network Share on Linux using SAMBA/CIFS

Monday, May 19th, 2008

Purpose: This post will explain how you can mount a Windows Network Share on to your Linux machine. Note: If you are looking for how to mount a windows partition on your local hard drive on to your Linux filesystem this post may not be for you.

Example - Setup:

1. You have a computer running Windows XP (or may be Vista) on your home/office network on a workgroup or domain.

2. You have another computer running Linux say Debian Linux.

3. You would like to mount a shared folder/drive on your Windows computer on to your Linux machine say on “/mnt/” folder so that you can access (read/write) that folder/drive.

My setup:

1. Debian Linux (4.0) running 2.6.24 kernel with IP address 192.168.0.2

2. Windows XP SP2 machine on a network domain called “home” with IP address 192.168.0.3

Step 1: Share a Windows folder/drive

You will first need to share a folder/drive on your Windows computer so that it can accessed through network. You can do this by right-clicking on the folder/drive that you would like to share and selecting the “Sharing” option. If you don’t know what I am talking about then you can refer to this MS tutorial which explains how to do that.

Step 2: Make sure your Kernel is configured properly

If you are using a standard Linux Kernel from any distribution then it is mostly like already configured. If not then just configure and compile your Linux Kernel with the following options in bold built-in or as a module.

# cat /boot/config-2.6.24 | grep CIFS
CONFIG_CIFS=y
# CONFIG_CIFS_STATS is not set
# CONFIG_CIFS_WEAK_PW_HASH is not set
# CONFIG_CIFS_XATTR is not set
# CONFIG_CIFS_DEBUG2 is not set
# CONFIG_CIFS_EXPERIMENTAL is not set

# cat /boot/config-2.6.24 | grep SMB
CONFIG_SMB_FS=y
# CONFIG_SMB_NLS_DEFAULT is not set

Step 3: Install necessary packages on your Linux machine

You will need smbfs package and also an optional smbclient package by giving the following commands:

#apt-get update

#apt-get install smbfs smbclient

The above command will also install samba-common package. If you are asked to enter a workgroup/domain name while the above packages are installed just enter the relevant infomration, In my case it was “home” as my domain name. You can enter your domain name or a workgroup name depending on your LAN configuration.

Step 4: Check which shares are available for mount

Now before you mount you can also check which shares (folders/drives) are available on your Windows machine that you can mount by giving the following command:

debian# smbclient -L infohighway -U kushal

where

infohighway = Name (NetBIOS Name) of my computer

kushal = Username on my Windows Machine

Password:

You will get an output similar to this:

Domain=[HOME] OS=[Windows 5.1] Server=[Windows 2000 LAN Manager]

Sharename Type Comment
——— —- ——-
myshare Disk
IPC$ IPC Remote IPC
mydownloads Disk
ADMIN$ Disk Remote Admin
C$ Disk Default share

Domain=[HOME] OS=[Windows 5.1] Server=[Windows 2000 LAN Manager]

Server Comment
——— ——-

Workgroup Master
——— ——-

From the above output you can see that I have shared folders called “myshare” and “mydownloads” on my Windows XP machine as highlighted in bold letters. This means that I can mount these folders on my Linux machine.

Step 5: Mount the Windows Share

Now the real thing. There are two ways to mount: The traditional SMBFS or the newer CIFS. It seems that CIFS is going to replace SMBFS which will soon become obsolete. I will show you both the methods:

SMBFS Method Command:

# mount -t smbfs -o username=kushal,password=******** //infohighway/drivers /mnt/

where

kushal = Username on my Windows Machine

******* = Password for the user ‘kushal’

infohighway = Name (NetBIOS Name) of my computer

drivers = Windows folder shared on my Windows XP machine

/mnt = Target mount directory on my Linux Machine

CIFS Method Command:

# mount -t cifs //infohighway/drivers /mnt/ -o username=home/kushal,password=*********

where

home = DomainName/Workgroup of your LAN network

Rest of the parameters are same as in SMBFS

Note: If you get any error messages after you give the mount command refer to the “Some typical errors” section below.

Now you can access the contents of the Windows share now by giving the command:

# ls /mnt/drivers

debian:~# ls /mnt/
audio INFCACHE.1 network Security storage video
debian:~#

Some typical errors:

You might see some typical error messages as follow in case if you missed any steps above:

Error 1: CIFS VFS: cifs_mount failed w/return code = -22

Solution: apt-get install smbfs

Error 2: smbfs: mount_data version 1919251317 is not supported

Solution: apt-get install smbfs

You can see the above error messages (if they do occur) by giving the following command just after you issue the mount command as mentioned in Step 5 above:

# dmesg | tail

Error 3: mount error 13 = Permission denied

Solution: Give the name of your Domain/Workgroup as shown in bold letter in Step 5 when mounting with CIFS method otherwise you will likely get this error message.

HOW-TO: Enabling 3D Acceleration under Debian Linux

Monday, April 28th, 2008

Purpose:

This blog entry will explain:

1. How to enable 3D acceleration under Debian Linux and may be perhaps under any other Linux distribution.

2. How to test if 3D acceleration is actually working or not.

Step 1: Find out if 3D acceleration is already enabled or not?

Give the following command:

# glxinfo | less

or

# glxinfo | less | grep Yes

If you see a line like:

“direct rendering: Yes”

in the following output:
3D Acceleration - Direct Rendering

then 3D acceleration is already enabled and you don’t need to do anything else.

However, if you see a line like:

“direct rendering: No”

then follow the steps to enable the 3D acceleration.

If you don’t have glxinfo installed, you can install it by:

# apt-get install mesa-utils

Step 2: Find out the Graphics chipset name

In order to recognize the proper driver for your Graphics chipset we need to find out it’s name/model by giving the following command:

# lspci

00:00.0 Host bridge: VIA Technologies, Inc. K8M800 Host Bridge
........
00:10.4 USB Controller: VIA Technologies, Inc. USB 2.0 (rev 86)
00:11.0 ISA bridge: VIA Technologies, Inc. VT8237 ISA bridge [KT600/K8T800/K8T890 South]
00:11.5 Multimedia audio controller: VIA Technologies, Inc. VT8233/A/8235/8237 AC97 Audio Controller (rev 60)
00:12.0 Ethernet controller: VIA Technologies, Inc. VT6102 [Rhine-II] (rev 78)
01:00.0 VGA compatible controller: VIA Technologies, Inc. S3 Unichrome Pro VGA Adapter (rev 01)
#

The line in bold above shows the name/model of my graphic card (VGA controller). Note this down.

Step 3: XOrg Configuration

Also make sure that your Xorg server is using the correct driver for your graphic card. You can check this by the following command:

# cat /var/log/Xorg.0.log | grep driver

You should see the name of your driver in the output as shown below:

X.Org XInput driver : 0.6
(II) Loading /usr/lib/xorg/modules/drivers/via_drv.so
ABI class: X.Org XInput driver, version 0.6
ABI class: X.Org XInput driver, version 0.6
(II) VIA: driver for VIA chipsets: CLE266, KM400/KN400, K8M800,
(!!) VIA Technologies does not support or endorse this driver in any way.
(!!) For support please contact the driver maintainer or your X vendor.
(II) VIA(0): [drm] loaded kernel module for “via” driver
(II) VIA(0): [drm] created “via” driver at busid “PCI:1:0:0″

If you have the correct driver installed and still you are not able to get 3D acceleration, then try the following additional steps below.

Step 4: Configure the Kernel to include the support for your Graphics Card

Give the following commands:

# cd /usr/src/linux

# make xconfig (or whatever you use)

and configure the following highlighted options :

Kernel configuration for AGP Support Linux

Kernel Configuration to eable DRI support

In short you need to configure AGP Support and DRI/DRM (Direct Rendering Manager) support under Character Devices in the Kernel configuration menu.

You should do the above for your own Graphic Card make/model like Intel 855GM (i810) etc.

Now compile your kernel and install it. In case if you don’t know how to do it, then here is good link which explains the process.

Step 5: Install the DRI package (optional but may be required)

I have found this to be “required” for my configuration. Generally your 3D acceleration should be enabled at this point of time. You can check it as shown in Step1 above. In case if it is still not enabled then try to install the xlib mesa dri package by giving the following command:

# apt-get install xlibmesa-dri

Now check your 3D acceleration again by giving “glxinfo” command.

If you are still not able to get 3D acceleration then chances are that your card and/or your driver does not support it. Check the documentation of your card and driver and try searching on the Internet.

Other tools to check/measure 3D acceleration performance

Once you get your 3D acceleration going, you can use some of the X based tools to measure the performance.

1. GLXGEARS

# apt-get install mesa-utils

# glxgears

You should see 3 colored rotating gears as your output like this:

GLX Gears

2. XENGINE

# apt-get install xengine

# xengine

This utility will show you the RPM count. You can compare the RPM count with and w/o 3D accelerations to see the effect of 3D acceleration. The piston will rotate much more faster with 3D acceleration (a visual cue).

You should see something like this:

Xengine RPM count

3. Check AGP Support

You can also check if Linux detected your AGP or not by giving the following command:

# dmesg | grep agpgart

You should be able to see some text which talks about agpgart like this:

Linux agpgart interface v0.101 (c) Dave Jones
agpgart: Detected AGP bridge 0
agpgart: AGP aperture is 64M @ 0xe0000000
agpgart: Found an AGP 3.0 compliant device at 0000:00:00.0.
agpgart: Xorg tried to set rate=x12. Setting to AGP3 x8 mode.
agpgart: Putting AGP V3 device at 0000:00:00.0 into 8x mode
agpgart: Putting AGP V3 device at 0000:01:00.0 into 8x mode

As usual, please leave a comment/feedback, if you have any.