Klaus Knopper answers your Linux questions

Ask Klaus!


Klaus Knopper is the creator of Knoppix and co-founder of LinuxTag expo. He currently works as a teacher, programmer, and consultant. If you have a configuration problem, or if you just want to learn more about how Linux works, send your questions to: klaus@linux-magazine.com

Trouble Sharing

Question:

Klaus: I am new to Linux and I enjoy Fedora. I have been able to conquer many tasks, but one is really beating me up. I do not want to go back to Windows, but right now I have two Linux systems that I would like to network to transfer files and share printers. Please help.

Everything I have read on the net is getting me nowhere. If you can point me to a guide or a step-by-step manual, I could try to learn on my own. I just subscribed to your magazine, and this would really help me plenty. Keep up the good work. Thanks in advance, Juan

Answer:

Let's start with sharing printers. Because all current distributions use CUPS (Common Unix Printing System) nowadays, you might succeed by just setting your CUPS server on the system connected to the printers to share printers.

Check for the following options in /etc/cups/cupsd.conf:

These actions should ensure that other computers in your network can see the printer server.

Also, check to see that printing access is allowed, in /etc/cups/cupsd.conf. In the Location section, a line should say AllowFrom your_local_network (e.g., AllowFrom 192.168.1.*).

After issuing the (Fedora-specific) command

service cups restart

the shared printers should now be visible from the printer configuration GUI on the other computer(s) in your network.

File sharing between computers running GNU/Linux can be accomplished in several ways. For example, if you just want to copy a file over from one Linux system to another every now and then, I would recommend Rsync. All you need is the SSH (or OpenSSH) server running on the machine that has the files you want to copy. The command

rsync -HavP username@remote-computer:path/to/file local_directory

will fetch the file from the remote computer and store it on the local computer. It will ask you for the password of the remote user, unless you have set passwordless SSH key authentication. The file or directory name you want to copy is path/to/file. The options -HavP will make sure the copies get identical file dates and attributes, and incompletely transferred files from an interrupted previous run will be completed.

Another way that uses a more or less permanent file sharing folder on two or more computers defines one of them as the "server," and connects to it from one or more "clients."

In this method, only ONE of the computers (the server) holds the data, and the clients all work on the same, original file.

If you have a mixed network with Windows-based computers as well, Samba might be the way to go. If you have a Unix-only network, NFS might be easier.

For Samba, install the Samba server (yum install system-config-samba in Fedora), and configure the Samba server and client settings in your desktop preferences menu. I'll keep the description short here. The share name of your users home directory is

//server-address/username

or (in Konqueror):

smb://server-address/username

Also, you can mount the share manually with

mount -t cifs //server-address/username /mountpoint

where /mountpoint is an existing, unused directory.

For NFS (commonly version 3), directories can be exported without authentication, limited only by the clients address or network.

In Fedora, you can install NFS with

yum install nfs-utils system-config-nfs

and use the preferences menu for NFS.

But instead of the graphical tool, configuring NFS version 3 to share a user directory is as simple as putting a line (see Listing 1) into /etc/exports (192.168.1.0 is the example network your client is supposed to be in; please change it accordingly), and reload the NFS server with the following command:

service nfs restart

To check to see whether the export was successful, use:

showmount -e server-address

To mount on the client side, enter

mount server-address:/home/username /mountpoint

where /mountpoint, again, must be an empty directory. If the client is not running an NFS locking service, you might need the additional option -o nolock to mount. Please note that with this simple method, the user on the NFS client needs to have the same user ID as the directory on the server to have "owner" access rights.

If you prefer multiple computers holding copies of a shared folder, so they work independently of a permanent network connection, a synchronizing filesystem tool like Unison is what you're looking for [1].

Installation in Fedora is:

yum install unison

Unison synchronizes the content of folders on demand, periodically by cron, or (with the help of ip-up-scripts) as soon as computers are connected to the network.

Listing 1: Configuring NFS to Share a User Directory
01 /home/username 192.168.1.0/255.255.255.0(rw,async,no_root_squash,no_subtree_check)

Dell Partition Update

Question:

Hi Klaus: I just read the article with the letter from Mr. I.M. Williams. You write that the GRUB menu.lst file should have:

title    Win
     root    (hd0,0)
    chainloader +1

In this case, it is wrong. The Dell Studio has (as almost all Dell computers) two hidden partitions, so it should be:

title    Win
     root    (hd0,2)
    chainloader +1

My guess is that Mr. Williams cannot boot into Windows with GRUB installed to the MBR. With kind regards, Bert Mariën.

Answer:

Thanks for the update. Yes, menu.lst must contain the partition number of the actual Windows partition in the root entry for booting Windows. In GRUB's menu.lst:

I assumed that Windows claims the first partition (hd0,0), but if the default hard disk partitioning on your computer is to have two hidden partitions and the third one is the first active partition, (hd0,2) is correct, which would be /dev/sda3 in the Linux naming scheme.

GRUB and Splashtop

Question:

Dear Klaus: Congratulations on your excellent column at Linux Magazine. I recently got an HP 2160US laptop that comes with this new wonder called Splashtop. It apparently reads its Linux-based microsystem from the HDD's first partition (sda1, ~120MB). I'm afraid that if I install GRUB to its MBR, it might ruin Splashtop's ability to boot. Also, I don't want to ruin the Windows system that came pre-installed, because it might be necessary for any eventual BIOS upgrade.

Is this an EFI-based system, in which there is no BIOS and the first partition is given the task of booting whatever it knows about? Thanks for any help. Pablo Nehab Hess

Answer:

I did some research and found that Splashtop actually consists of two parts: a graphical boot menu in the firmware and the mini-Linux part loaded from disk. So, installing GRUB on the MBR should not be a problem, as long as you add an entry in GRUB's menu.lst for the Splashtop boot kernel, which apparently is located somewhere on the first partition, no matter which OS actually resides there. Please check your existing installation for files that the file command reports as "Linux kernel x86 boot executable." It could be located on a FAT32 or NTFS-formatted partition inside the splashtop directory, or in the root directory of the partition.

If a partition boot record is on the first partition, you can add an entry for it by specifying a chainloader in /boot/grub/menu.lst

title Splashtop
root (hd0,0)
chainloader +1

and install GRUB on the master boot record. If you found the bootable Splashtop file mentioned before, the following would be a possible menu.lst entry,

title Splashtop
kernel (hd0,0)/ce_bz

where (hd0,0)/ce_bz is the bootable file ce_bz at the root of the first partition of the first hard disk.

If you have mounted the partition, you now can install the GRUB MBR with

grub-install --recheck --no-floppy --root-directory=/path/to/mounted/partition/dev/sda

where /dev/sda is the hard disk (could be /dev/hda if your Linux is using the IDE drivers instead of SATA/PATA).

Additional BIOS configuration might have to be done to change boot priority so that the MBR is read instead of the BIOS-internal boot menu (i.e., change the boot sequence).

The Eee PC also has an option to update the BIOS with new firmware, but I don't think you need to do this with your HP running Splashtop.

Canon Drivers

Question:

Hello: I'm in Costa Rica. I received a lot of "advice" from Linux users and I have consulted a dozen HowTos, but nothing has worked. (Note that I do not read English well.) I had given up, but because I have seen you write about CUPS, I am hoping you can help.

I am new to computers, but I have learned Linux by leaps and bounds. I have tried to set up the Canon PIXMA IP 1200 drivers (yes, I know I should look at least for the IP 2000) with either Ubuntu or openSUSE.

The PC says it is already installed, or something similar, and says it is sending a test page, but the printer does not even blink. I understand that Canon is a problem in Linux and wonder whether we will someday have a solution.

However, somehow, some people have been able to use that printer with Linux. José Gabriel Sánchez Jiménez

Answer:

Unfortunately, the manufacturer of this printer does not seem to provide adequate support for Linux (for me, this means it's a "don't buy!" candidate).

However, a few individuals have attempted to write drivers [2] with step-by-step instructions for those who don't fear experimenting. Also, a proprietary, commercial driver is available in TurboPrint [3].

So, it seems that the easiest solution here is to spend money on a proprietary driver or just get a more compatible printer as a convenient solution.

Toshiba Fan Problems

Question:

Hello Klaus: I'm using Knoppix 6.2.1 and 6.3. It's working really well. Thank you for a great distro. I have an issue with my notebook fan. It jumps to the higher speed setting instead of the lower setting used by Windows. I noticed that another Linux distro, Ubuntu, does the same, but when I install the ATI Mobility Radeon driver, the fan runs at a lower speed just like Windows. Is there a way to resolve this issue in Knoppix? I use a Toshiba A350 notebook with an ATI Mobility Radeon HD3470 graphics accelerator. Any help would be greatly appreciated. Thank you, Louis

Answer:

The fan speed might indeed be related to the graphics chipset and its driver. Unfortunately, ATI as well as nVidia don't reveal too much of their chipset internals, therefore it is difficult (not impossible, but slow) to develop a free driver that takes advantage of all the hardware features. This means, in the short version, that you probably will have to use the proprietary driver to get fan speed down.

However, I found that some ACPI-related options result in different fan speeds, if not in better "automatic" power management of the chipset. Although this is not directly related to the ATI accelerator, you might try checking to see whether the following boot options make a difference on your system (APPEND options; put them after the kernel name in /boot/grub/menu.lst or first check to see if they work in the interactive bootloader):

acpi_osi=Linux
acpi_osi="Windows 2006"
acpi_osi="!Windows 2009"

The first option tells ACPI to use the "Linux"-specific options (if there are any). The second says you are running "Windows 2006" (which is not true, but anyway ...), so the specific optimizations for that operating system are chosen.

With the third option, which means "do not activate Windows 2009-specific optimizations," I had success in activating the "special hotkeys" of some netbooks that refused to send any ACPI events before, so setting brightness and loudness suddenly worked, and as a nice side effect, fan activity was reduced to a minimum.

You might want to determine whether any of these options (or their negative values, by prefixing with an exclamation mark) make a difference before trying proprietary drivers. In some cases, disabling ACPI completely with kernel option acpi=off yields better results, but all of the hardware might not function correctly.

WiFi Glitch

Question:

Dear Klaus: I have always been amazed by your Knoppix discs (so helpful innumerable times!), and I appreciate your column in Linux Magazine, as you can be counted on to give substantive answers.

So, here is my current problem. I have been using Linux (at first, primarily and soon practically exclusively for more than 10 years now), but I am still far from an effective troubleshooter. Still, things go very smoothly, and there is hardly anything I need to do that I can't do in Linux (OK, I can't scan with an HP, which is notoriously impervious to Sane). Currently, I have ended up running Ubuntu on my main computers. Now, I am running into an odd problem with WiFi. Specifically, I have Ubuntu 9.10 on all my main laptops: my Asus Eee PC 910, where it works flawlessly, including WiFi; a Dell XPS, which also used to have flawless WiFi, but not for a couple of months now; and a Lenovo IdeaPad, which also worked perfectly until just a week ago or so.

The last two laptops connect fine at home (first with WEP, now WAP2). The Community Colleges where I teach have open WiFi access, but you have to provide your credentials on a web page if you want to access the full Internet. That has never been a problem. A few months ago, however, my Dell suddenly became unable to get an IP from the hot spot in either college. It used to work fine with Wicd, but no more. Reinstalling Network Manager didn't help either. Originally, I used to connect manually (do a net scan, enter iwconfig with the appropriate ESSID, AP, and channel plus a dhclient request); that doesn't work any more.

When I bought my Lenovo, I found out the hard way how difficult it is to learn - before you have become an owner - what chip a manufacturer uses and how hard it can be to get it to work in Linux. This particular box came with a Broadcom chip that doesn't work with the regular kernel drivers. Others come with Intel chipsets, but I was not that lucky. Besides planning to replace the Broadcom chip as soon as I have some time, I downloaded the closed drivers and messed around a bit, until I finally got them to start automatically, while blocking the competing modules from loading. All was well, and all worked fine, including connecting at my Community Colleges (way after my Dell had started balking). A week ago or so, it also began refusing to get an IP, both via Network Manager, Wicd, or manual instructions. Again, at home, things are fine.

In both cases, I am not aware of having changed anything, and, incidentally, the Asus is still connecting with no trouble. I know I should try some other hotspot, but it still seems a bit strange. I have no idea where to look (e.g., I suppose there is some log that could provide some clue, beyond the fact that no lease could be received, but I haven't found it yet). Any suggestions about what I could do to tackle this issue? Thank you! Federico Marchetti

Answer:

If you try connecting with a different WiFi card (e.g., a new USB WiFi adapter) and succeed in getting an IP assigned, this probably means that your internal WiFi card's MAC address has been put on a hotspot blacklist for some reason.

In any case, please make sure that you don't have wicd and network-manager installed at the same time, because one of them could keep the other from working correctly. I don't think this is the case here, though.

Some schools have a limit of network traffic; some even will put you on a blacklist if they detect your network card is scanning too much or is running in promiscuous mode, because they might assume you are trying to crack other peoples' connections and passwords.

This can be an automatic procedure, so nobody has to feel guilty for filtering your card actively.

To me, it sounds as if the DHCP server simply does not provide an IP because your card is blacklisted. The fact that your card works fine at home tells me there is no "Software error" on your side.

Because you don't even get an IP before getting to the authorization page, it is also unlikely that you are logged in twice. However, it could still be a problem with the hotspot authorization software server side, if you got locked out for not logging out correctly from the hotspot (as if that "security feature" would make sense ...).

My advice is to contact the technical people responsible for the hotspots you are using and ask them if your card is being blocked for some reason.

GRUB and Dual Booting

Question:

Mr. Klaus Knopper: I have just installed Knoppix 6.3 on my second hard drive. Although I am satisfied with its use, I do have a very serious problem. My computer is set up for a dual boot, but I cannot access Windows XP. GRUB offers both operating systems: Knoppix and Windows. I can access Knoppix, but if I highlight Windows and press Enter, I am taken to the GRUB command line. I have tried the Tab key, windows, and a password, but command not recognized is returned. Is there a special command? What is it? Please help me. Thank you, Raul

Answer:

It looks like the Windows partition is not configured correctly in the bootloader grub. Because of this, GRUB does not know how to proceed loading and starting Windows, so it takes you to interactive mode.

If, instead of just hitting Return on the Windows entry, you enter the interactive GRUB menu for the Windows entry by typing the letter e when the entry is highlighted, check for the following:

  1. Root should be set to (hd0,0) in most cases, unless your Windows partition is NOT the first partition on the first hard disk.
  1. A secondary loader called chainloader should point to either +1 (for just selecting the partition boot entry) or, in the case of Windows XP, Windows' own bootloader /ntldr. Both can be combined as
    chainloader (hd0,0)/ntldr
    in a single line. If you edit the entry by (again) hitting the e key, you can use the Tab key after (hd0,0)/ to check that the Windows filesystem can be read from GRUB.

The Tab key should display the file contents of the Windows partition (if (hd0,0) is correct, at least).

After changing the line, you can type b for booting the changed entry. If it works, edit /boot/grub/menu.lst in your Linux installation to make the changes permanent. The file MIGHT be located on your Windows partition, so look there if you can't find it in your Linux installation.

INFO
[1] Unison file synchronizer: http://www.cis.upenn.edu/~bcpierce/unison/
[2] Takushi Miyoshi's Canon driver: http://mambo.kuhp.kyoto-u.ac.jp/~takushi/#canon
[3] TurboPrint for Linux: http://www.zedonet.com/en_p_turboprint_driver.phtml?printer=Canon_PIXMA_iP1200