062-065_ask-klaus by xumiaomaio

VIEWS: 1 PAGES: 4

									Features
      Ask Klaus!




 Ask Klaus!
 Klaus Knopper answers your Linux questions                                                      File sharing between computers run-
                                                                                              ning 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
                                                trouble Sharing
                                                     Klaus: I am new to Linux and I            rsync ‑HavP   U
                                                     enjoy Fedora. I have been able to            username@remote‑computer:path/U

                                                conquer many tasks, but one is really             to/file local_directory

                                                beating me up. I do not want to go back
                                                to Windows, but right now I have two          will fetch the file from the remote com-
                                                Linux systems that I would like to net-       puter and store it on the local computer.
                                                work to transfer files and share printers.    It will ask you for the password of the
                                                Please help.                                  remote user, unless you have set pass-
                                                  Everything I have read on the net is        wordless SSH key authentication. The
                                                getting me nowhere. If you can point me       file or directory name you want to copy
                                                to a guide or a step-by-step manual, I        is path/to/file. The options ‑HavP will
                                                could try to learn on my own. I just sub-     make sure the copies get identical file
                                                scribed to your magazine, and this            dates and attributes, and incompletely
                                                would really help me plenty. Keep up the      transferred files from an interrupted pre-
                                                good work. Thanks in advance, Juan            vious run will be completed.
                                                                                                 Another	way	that	uses	a	more	or	less	
                                                       Let’s start with sharing printers.     permanent file sharing folder on two or
                                                       Because all current distributions      more computers defines one of them as
                                                use CUPS (Common Unix Printing Sys-           the “server,” and connects to it from one
                                                tem) nowadays, you might succeed by           or more “clients.”
                                                just setting your CUPS server on the sys-        In this method, only ONE of the com-
                                                tem connected to the printers to share        puters (the server) holds the data, and
                                                printers.                                     the clients all work on the same, original
                                                   Check for the following options in         file.
                                                /etc/cups/cupsd.conf:                            If you have a mixed network with
                                                •	 Browsing	should	be	set	to	on.              Windows-based computers as well,
                                                •	 BrowseAddress	should	be	set	to	your	       Samba might be the way to go. If you
                                                   local networks address (like               have a Unix-only network, NFS might be
                                                   192.168.1.255.                             easier.
                                                •	 BrowseAllow should be set to allow all        For Samba, install the Samba server
                                                   computers in your network (e.g.,           (yum install system‑config‑samba in
                                                   192.168.1.*).                              Fedora), and configure the Samba server
                                                These actions should ensure that other        and client settings in your desktop pref-
                                                computers in your network can see the         erences menu. I’ll keep the description
                                                printer server.                               short here. The share name of your users
                                                   Also,	check	to	see	that	printing	access	   home directory is
                                                is allowed, in /etc/cups/cupsd.conf. In
                                                the Location section, a line should say        //server‑address/username

                                                AllowFrom your_local_network (e.g.,
                                                AllowFrom 192.168.1.*).                       or (in Konqueror):
                                                   After	issuing	the	(Fedora-specific)	
      KLAUS KnoPPER                             command                                        smb://server‑address/username

  Klaus Knopper is the creator of Knoppix
  and co-founder of LinuxTag expo. He cur-
                                                 service cups restart                         Also,	you	can	mount	the	share	manually	
  rently works as a teacher, programmer,                                                      with
  and consultant. If you have a configura-      the shared printers should now be visi-
  tion problem, or if you just want to learn    ble from the printer configuration GUI         mount ‑t cifs     U
  more about how Linux works, send your         on the other computer(s) in your net-             //server‑address/username   U
  questions to: klaus@linux‑magazine.com        work.                                             /mountpoint




 62         august 2010             issue 117                               linux-magazine.com | linuxpromagazine.com
                                                                                              Features
                                                                                                                   Ask Klaus!

where /mountpoint is an existing, un-           Installation in Fedora is:                    •	 (hd0,0) matches the first partition on
used directory.                                                                                  the first disk,
  For NFS (commonly version 3), direc-         yum install unison                             •	 (hd0,1) is the second partition, etc.
tories can be exported without authenti-                                                      I assumed that Windows claims the first
cation, limited only by the clients ad-       Unison synchronizes the content of fold-        partition (hd0,0), but if the default hard
dress or network.                             ers on demand, periodically by cron, or         disk partitioning on your computer is to
  In Fedora, you can install NFS with         (with the help of ip-up-scripts) as soon        have two hidden partitions and the third
                                              as computers are connected to the net-          one is the first active partition, (hd0,2)
 yum install nfs‑utils   U                    work.                                           is correct, which would be /dev/sda3 in
    system‑config‑nfs                                                                         the Linux naming scheme.
                                              Dell Partition Update
and use the preferences menu for NFS.             Hi Klaus: I just read the article with      GRUB and Splashtop
   But instead of the graphical tool, con-        the letter from Mr. I.M. Williams.                Dear Klaus: Congratulations on
figuring NFS version 3 to share a user di-    You write that the GRUB menu.lst file                 your excellent column at Linux
rectory is as simple as putting a line (see   should have:                                    Magazine. I recently got an HP 2160US
Listing 1) into /etc/                                                                          laptop that comes with this new won-
exports (192.168.1.0
is the example net-          “File sharing between                                             der called Splashtop. It apparently
                                                                                               reads its Linux-based microsystem from
work your client is
supposed to be in;           computers running                                                 the HDD’s first partition (sda1,
                                                                                               ~120MB). I’m afraid that if I install
please change it ac-
cordingly), and reload       GNU/Linux can be                                                  GRUB to its MBR, it might ruin Splash-
                                                                                               top’s	ability	to	boot.	Also,	I	don’t	want	

                             accomplished in several
the NFS server with                                                                            to ruin the Windows system that came
the following com-                                                                             pre-installed, because it might be nec-

                             ways: Rsync, Samba
mand:                                                                                          essary for any eventual BIOS upgrade.
                                                                                                  Is this an EFI-based system, in which
                                                                                               there is no BIOS and the first partition
                             or NFS, a synchronizing
 service nfs restart

                                                                                               is given the task of booting whatever it
To check to see                                                                                knows about? Thanks for any help.
whether the export
was successful, use:
                             tool … .”                                                         Pablo Nehab Hess

                                                                                                      I did some research and found
 showmount ‑e server‑address                                                                          that Splashtop actually consists
                                               title    Win                                   of two parts: a graphical boot menu in
To mount on the client side, enter                  root      (hd0,0)                         the firmware and the mini-Linux part
                                                   chainloader +1                             loaded from disk. So, installing GRUB on
 mount   U                                                                                    the MBR should not be a problem, as
    server‑address:/home/username   U         In this case, it is wrong. The Dell Studio      long as you add an entry in GRUB’s
    /mountpoint                               has (as almost all Dell computers) two          menu.lst for the Splashtop boot kernel,
                                              hidden partitions, so it should be:             which apparently is located somewhere
where /mountpoint, again, must be an                                                          on the first partition, no matter which
empty directory. If the client is not run-     title    Win                                   OS actually resides there. Please check
ning an NFS locking service, you might              root      (hd0,2)                         your existing installation for files that
need the additional option ‑o nolock to            chainloader +1                             the file command reports as “Linux
mount. Please note that with this simple                                                      kernel x86 boot executable.” It could be
method, the user on the NFS client            My guess is that Mr. Williams cannot            located	on	a	FAT32	or	NTFS-formatted	
needs to have the same user ID as the di-     boot into Windows with GRUB installed           partition inside the splashtop directory,
rectory on the server to have “owner”         to the MBR. With kind regards, Bert             or in the root directory of the partition.
access rights.                                Mariën.                                           If a partition boot record is on the first
  If you prefer multiple computers hold-                                                      partition, you can add an entry for it by
ing copies of a shared folder, so they              Thanks for the update. Yes, menu.         specifying a chainloader in /boot/grub/
work independently of a permanent net-              lst must contain the partition            menu.lst
work connection, a synchronizing file-        number of the actual Windows partition
system tool like Unison is what you’re        in the root entry for booting Windows.           title Splashtop

looking for [1].                              In GRUB’s menu.lst:                              root (hd0,0)

                                                                                               chainloader +1

   LiStinG 1: Configuring nFS to Share a User Directory
 /home/username 192.168.1.0/255.255.255.0(rw,async,no_root_squash,no_subtree_check)
                                                                                              and install GRUB on the master boot re-
                                                                                              cord. If you found the bootable Splash-



linux-magazine.com | linuxpromagazine.com                                                  issue 117          august 2010              63
Features
      Ask Klaus!

 top file mentioned before, the following       provide adequate support for Linux (for        nel name in /boot/grub/menu.lst or first
 would be a possible menu.lst entry,            me, this means it’s a “don’t buy!” candi-      check to see if they work in the interac-
                                                date).                                         tive bootloader):
  title Splashtop                                 However, a few individuals have at-
  kernel (hd0,0)/ce_bz                          tempted to write drivers [2] with step-         acpi_osi=Linux

                                                by-step instructions for those who don’t        acpi_osi="Windows 2006"

 where (hd0,0)/ce_bz is the bootable file       fear	experimenting.	Also,	a	proprietary,	       acpi_osi="!Windows 2009"

 ce_bz at the root of the first partition of    commercial driver is available in Turbo-
 the first hard disk.                           Print [3].                                     The	first	option	tells	ACPI	to	use	the	
   If you have mounted the partition, you         So, it seems that the easiest solution       “Linux”-specific options (if there are
 now can install the GRUB MBR with              here is to spend money on a proprietary        any). The second says you are running
                                                driver or just get a more compatible           “Windows 2006” (which is not true, but
  grub‑install ‑‑recheck   U                    printer as a convenient solution.              anyway …), so the specific optimiza-
      ‑‑no‑floppy   U                                                                          tions for that operating system are cho-
      ‑‑root‑directory=U                        toshiba Fan Problems                           sen.
        /path/to/mounted/U                           Hello Klaus: I’m using Knoppix               With the third option, which means
        partition /dev/sda                           6.2.1 and 6.3. It’s working really        “do not activate Windows 2009-specific
                                                well. Thank you for a great distro. I have     optimizations,” I had success in activat-
 where /dev/sda is the hard disk (could         an issue with my notebook fan. It jumps        ing the “special hotkeys” of some net-
 be /dev/hda if your Linux is using the         to the higher speed setting instead of the     books	that	refused	to	send	any	ACPI	
 IDE	drivers	instead	of	SATA/	                                                                        events before, so setting bright-
 PATA).
    Additional	BIOS	configura-
                                      “Fan speed might be                                             ness and loudness suddenly
                                                                                                      worked, and as a nice side effect,
 tion might have to be done to
 change boot priority so that the
                                      related to the graphics                                         fan activity was reduced to a min-
                                                                                                      imum.
 MBR is read instead of the
 BIOS-internal boot menu (i.e.,
                                      chipset and its driver.”                                           You might want to determine
                                                                                                      whether any of these options (or
 change the boot sequence).                                                                           their negative values, by prefixing
    The Eee PC also has an option to up-        lower setting used by Windows. I no-           with an exclamation mark) make a dif-
 date the BIOS with new firmware, but I         ticed that another Linux distro, Ubuntu,       ference before trying proprietary drivers.
 don’t think you need to do this with           does	the	same,	but	when	I	install	the	ATI	     In	some	cases,	disabling	ACPI	com-
 your HP running Splashtop.                     Mobility Radeon driver, the fan runs at a      pletely with kernel option acpi=off
                                                lower speed just like Windows. Is there a      yields better results, but all of the hard-
 Canon Drivers                                  way to resolve this issue in Knoppix? I        ware might not function correctly.
       Hello: I’m in Costa Rica. I received a   use	a	Toshiba	A350	notebook	with	an	
       lot of “advice” from Linux users and     ATI	Mobility	Radeon	HD3470	graphics	           WiFi Glitch
 I have consulted a dozen HowTos, but           accelerator.	Any	help	would	be	greatly	             Dear Klaus: I have always been
 nothing has worked. (Note that I do not        appreciated. Thank you, Louis                       amazed by your Knoppix discs (so
 read English well.) I had given up, but                                                       helpful innumerable times!), and I ap-
 because I have seen you write about                   The fan speed might indeed be re-       preciate your column in Linux Maga-
 CUPS, I am hoping you can help.                       lated to the graphics chipset and       zine, as you can be counted on to give
    I am new to computers, but I have           its	driver.	Unfortunately,	ATI	as	well	as	     substantive answers.
 learned Linux by leaps and bounds. I           nVidia don’t reveal too much of their             So, here is my current problem. I have
 have	tried	to	set	up	the	Canon	PIXMA	IP	       chipset internals, therefore it is difficult   been using Linux (at first, primarily and
 1200 drivers (yes, I know I should look        (not impossible, but slow) to develop a        soon practically exclusively for more
 at least for the IP 2000) with either          free driver that takes advantage of all the    than 10 years now), but I am still far
 Ubuntu or openSUSE.                            hardware features. This means, in the          from an effective troubleshooter. Still,
    The PC says it is already installed, or     short version, that you probably will          things go very smoothly, and there is
 something similar, and says it is sending      have to use the proprietary driver to get      hardly anything I need to do that I can’t
 a test page, but the printer does not even     fan speed down.                                do in Linux (OK, I can’t scan with an HP,
 blink. I understand that Canon is a prob-         However,	I	found	that	some	ACPI-re-         which is notoriously impervious to
 lem in Linux and wonder whether we             lated options result in different fan          Sane). Currently, I have ended up run-
 will someday have a solution.                  speeds, if not in better “automatic”           ning Ubuntu on my main computers.
    However, somehow, some people have          power	management	of	the	chipset.	Al-           Now, I am running into an odd problem
 been able to use that printer with Linux.      though this is not directly related to the     with WiFi. Specifically, I have Ubuntu
 José Gabriel Sánchez Jiménez                   ATI	accelerator,	you	might	try	checking	       9.10	on	all	my	main	laptops:	my	Asus	
                                                to see whether the following boot op-          Eee PC 910, where it works flawlessly,
       Unfortunately, the manufacturer          tions make a difference on your system         including WiFi; a Dell XPS, which also
       of this printer does not seem to         (APPEND options; put them after the ker-       used to have flawless WiFi, but not for a



 64          august 2010            issue 117                                linux-magazine.com | linuxpromagazine.com
                                                                                               Features
                                                                                                                     Ask Klaus!

couple of months now; and a Lenovo             WiFi adapter) and succeed in getting an         am taken to the GRUB command line. I
IdeaPad, which also worked perfectly           IP assigned, this probably means that           have tried the Tab key, windows, and a
until just a week ago or so.                   your	internal	WiFi	card’s	MAC	address	          password, but command not recognized
   The last two laptops connect fine at        has been put on a hotspot blacklist for         is returned. Is there a special command?
home	(first	with	WEP,	now	WAP2).	The	          some reason.                                    What is it? Please help me. Thank you,
Community Colleges where I teach have             In any case, please make sure that you       Raul
open WiFi access, but you have to pro-         don’t have wicd and network‑manager in-
vide your credentials on a web page if         stalled at the same time, because one of                It looks like the Windows partition
you want to access the full Internet. That     them could keep the other from working                  is not configured correctly in the
has	never	been	a	problem.	A	few	months	        correctly. I don’t think this is the case       bootloader grub. Because of this, GRUB
ago, however, my Dell suddenly became          here, though.                                   does not know how to proceed loading
unable to get an IP from the hot spot in          Some schools have a limit of network         and starting Windows, so it takes you to
either college. It used to work fine with      traffic; some even will put you on a            interactive mode.
Wicd, but no more. Reinstalling Network        blacklist if they detect your network card         If, instead of just hitting Return on the
Manager didn’t help either. Originally, I      is scanning too much or is running in           Windows entry, you enter the interactive
used to connect manually (do a net scan,       promiscuous mode, because they might            GRUB menu for the Windows entry by
enter iwconfig with the appropriate            assume you are trying to crack other            typing the letter e when the entry is
ESSID,	AP,	and	channel	plus	a	dhclient         peoples’ connections and passwords.             highlighted, check for the following:
request); that doesn’t work any more.             This can be an automatic procedure,          1. Root should be set to (hd0,0) in most
   When I bought my Lenovo, I found            so nobody has to feel guilty for filtering         cases, unless your Windows partition
out the hard way how difficult it is to        your card actively.                                is NOT the first partition on the first
learn – before you have be-                                                                                 hard disk.
come an owner – what chip a
manufacturer uses and how
                                   “Make sure you don’t have                                                2.	A	secondary	loader	called	
                                                                                                            chainloader should point to ei-
hard it can be to get it to work
in Linux. This particular box
                                   wicd and network-manager                                                 ther +1 (for just selecting the
                                                                                                            partition boot entry) or, in the
came with a Broadcom chip
that doesn’t work with the
                                   installed at the same time.”                                             case of Windows XP, Windows’
                                                                                                            own bootloader /ntldr.
regular kernel drivers. Others                                                                              Both can be combined as
come with Intel chipsets, but I was not           To me, it sounds as if the DHCP server
that lucky. Besides planning to replace        simply does not provide an IP because            chainloader (hd0,0)/ntldr

the Broadcom chip as soon as I have            your card is blacklisted. The fact that
some time, I downloaded the closed             your card works fine at home tells me           in a single line. If you edit the entry by
drivers and messed around a bit, until I       there is no “Software error” on your            (again) hitting the e key, you can use the
finally got them to start automatically,       side.                                           Tab key after (hd0,0)/ to check that the
while blocking the competing modules              Because you don’t even get an IP be-         Windows filesystem can be read from
from	loading.	All	was	well,	and	all	           fore getting to the authorization page, it      GRUB.
worked fine, including connecting at my        is also unlikely that you are logged in           The Tab key should display the file
Community Colleges (way after my Dell          twice. However, it could still be a prob-       contents of the Windows partition (if
had	started	balking).	A	week	ago	or	so,	       lem with the hotspot authorization soft-        (hd0,0) is correct, at least).
it also began refusing to get an IP, both      ware server side, if you got locked out           After	changing	the	line,	you	can	type	b
via Network Manager, Wicd, or manual           for not logging out correctly from the          for booting the changed entry. If it
instructions.	Again,	at	home,	things	are	      hotspot (as if that “security feature”          works, edit /boot/grub/menu.lst in your
fine.                                          would make sense …).                            Linux installation to make the changes
   In both cases, I am not aware of hav-          My advice is to contact the technical        permanent. The file MIGHT be located
ing changed anything, and, incidentally,       people responsible for the hotspots you         on your Windows partition, so look
the	Asus	is	still	connecting	with	no	trou-     are using and ask them if your card is          there if you can’t find it in your Linux in-
ble. I know I should try some other            being blocked for some reason.                  stallation. n n n
hotspot, but it still seems a bit strange. I
have no idea where to look (e.g., I sup-       GRUB and Dual Booting
pose there is some log that could provide            Mr. Klaus Knopper: I have just in-           inFo
some clue, beyond the fact that no lease             stalled Knoppix 6.3 on my second           [1] Unison file synchronizer: http://www.
could be received, but I haven’t found it      hard	drive.	Although	I	am	satisfied	with	            cis.upenn.edu/~bcpierce/unison/
yet).	Any	suggestions	about	what	I	could	      its use, I do have a very serious problem.       [2] Takushi Miyoshi’s Canon driver:
do to tackle this issue? Thank you! Fed-       My computer is set up for a dual boot,               http://mambo.kuhp.kyoto‑u.ac.jp/
erico Marchetti                                but I cannot access Windows XP. GRUB                 ~takushi/#canon
                                               offers both operating systems: Knoppix           [3] TurboPrint for Linux: http://www.
      If you try connecting with a differ-     and Windows. I can access Knoppix, but               zedonet.com/en_p_turboprint_driver.
      ent WiFi card (e.g., a new USB           if I highlight Windows and press Enter, I            phtml?printer=Canon_PIXMA_iP1200




linux-magazine.com | linuxpromagazine.com                                                   issue 117         august 2010                65

								
To top