Best of Tech Support

Big Drives?

I am running Red Hat 9.0, Fedora 1 and Debian 3.0r4. I have contacted Intel about running 160GB hard drives. They replied, “The OS is what determines what size the hard drive can be.” And they quoted Windows 2000 and Windows XP, so I thought maybe the BIOS was involved. What is your take on this mater, and where can I find references on the subject?


Georg Robertson


grobertson29@earthlink.net

The machine's BIOS actually defines certain limits for hard disks, from the old Int 13 specification for a DOS (yes, Disk Operating System) capacity limit of around 8GB to the most modern BIOS and drive hardware capabilities of 32-bit sector numbers that allow a theoretical capacity limit of more than 2TB and with it a whole new challenge for software. Of course, the OS disk drivers, bootloader, filesystem and probably other features, such as software RAID, determine the actual available capacity of a disk drive or set of disk drives.


Felipe Barousse Boué


fbarousse@piensa.com

I often can get Linux working on strange drive geometries that give Windows fits, because the kernel can be told what to do with them manually. There is an excellent guide on just this topic, and I suggest you start there: www.tldp.org/HOWTO/Large-Disk-HOWTO.html.


Chad Robinson


chad@lucubration.com

Using a Mobile Phone with a USB Cable?

I am able to connect to GPRS mobile devices, including the Motorola V66 and Timeport, by using a serial cable. But the latest GPRS mobiles come with only USB data cables. I tried but was unable to connect one to a Linux system; I was told the PC could not find the modem. Can you tell me how to connect it or suggest suitable drivers for it?





kimaya@vsnl.com

These devices almost invariably are still serial but include a USB-to-serial-device chip to provide the USB interface. There are two forms of these conversion chips. One, such as the FTDI chipset, is designed to create a virtual serial port through the USB interface. These products usually already are supported under Linux, and if not, it typically is only a matter of time before this happens.

The second type is proprietary and relies on custom software drivers that communicate to the remote chipset. These tend to make portability more difficult, because manufacturers still generally release these drivers only for Windows, and without the driver you cannot communicate with the device. Fortunately, there are fewer of these, but because they can be less expensive than virtual serial port chipsets, some manufacturers will continue to use them. Your best bet is simply to avoid these types of products by monitoring newsgroups, forums and other information sources for Linux user success stories before purchasing them.


Chad Robinson


chad@lucubration.com

Plenty of GPRS phones can be used with Linux; the following Web resources provide a lot of useful information about GPRS phones and their uses. In conjunction with a Linux system, take a look at kotinetti.suomi.net/mcfrisk/linux_gprs.html, users.tkk.fi/~kehannin/bluetooth/bluetooth.html and markus.wernig.net/en/it/usb-serial-handy-ppp.phtml.

I also recommend that you consider using a Bluetooth wireless interface to link your Linux box, with the proper adapter and your phone, which hopefully has Bluetooth capacity.


Felipe Barousse Boué


fbarousse@piensa.com

Tuxmobil.org maintains a list of compatibility reports and how-to documents on connecting using specific mobile phone models.


Don Marti


info@linuxjournal.com

Error from MySQL Client

I am trying to use the GUI MySQL client with Fedora Core 3, but it is failing, returning this:

[anupam@localhost mysqlgui-1.7.5-1-linux-static]$ ./mysqlgui

mysqlgui: dynamic-link.h:57: elf_get_dynamic_info:
Assertion `! "bad dynamic tag"' failed.

Aborted

Any ideas what is wrong?


Anupam De


anupam@sail-steel.com.

Did you download mysqlgui in binary form as opposed to text or ascii? If you transferred text or ascii, your file may have been corrupted. Alternatively, try downloading the statically compiled version of the mysqlgui software package instead of the semi-static binary. You will get rid of some dependencies, as the slightly larger executable includes everything required.


Felipe Barousse Boué


fbarousse@piensa.com

Setting IRQs for Serial Ports

I have Win4Lin running on SUSE 9.2 and am having a hard time changing the IRQ on com port 2. I need Windows for an energy management program and must call out to check several building systems. Linux has the IRQ set at 10, but I need to have it set at 4. Can you tell me how to change the IRQ?


John Langston


jdl.28@cox.net

You should be able to change the IRQ in your BIOS settings. If that doesn't work, use the setserial program on Linux to change this value.


Greg Kroah-Hartman


greg@kroah.com

Do a man setserial to learn your command options. Be aware that if your physical serial ports do have fixed IRQ and/or memory addresses, you may run into conflicts when playing with setserial and/or with other devices.


Felipe Barousse Boué


fbarousse@piensa.com

GigaDrive Doesn't Work

I recently purchased a Linksys GigaDrive on eBay. The unit seems to power up and such, but I cannot access or run any of the applications. I am thinking maybe the drive has been formatted or replaced and I need to reload the Linux software and apps. Do you have any advice on how to do this, other than to send it to Linksys? I am A+ certified, but I don't have much Linux experience. I was thinking that if I could obtain a restore CD, I may be able to rebuild it—is that true? Of course, if I can do that, I need to find such a restore CD. Any suggestions or advice?


Randy Warner


warn4421@bellsouth.net

There is a page on how to load the GigaDrive's “firmware” on the Linksys site: (www.linksys.com/support/support.asp?spid=17).

If that doesn't work, and you have access to an identical hard drive from a working GigaDrive, you could make a bit-for-bit copy by hooking the working drive up to a Linux box as master and the nonworking drive as slave on the secondary IDE interface and doing:

dd if=/dev/hdc  of=/dev/hdd



Don Marti


info@linuxjournal.com

Backing Up a Dual-Boot System

I currently use Microsoft Windows XP Pro with the intent of migrating to Linux after I get used to running it and administering it. The current backup software I use is Norton Ghost from System Works 2004.

I tried installing Fedora Core 1, as it came free with a book I bought. Installation went without a hitch, and I liked what I saw and used. But, when I boot back to Windows to use Ghost, Ghost gives me this error message:

Back-up Failure. Not space in the MBR.

I said, “forget Norton, I'll do my backups with Linux.” But I haven't the faintest idea what to use on Linux. Any suggestions?


Lev Ranara


pinoy_techie@yahoo.com

Backups under Linux are usually straightforward. Unlike Windows, there is no special system data (registry or system configuration) that cannot be copied through traditional means. A straight file copy, in fact, usually is sufficient for a “complete” backup, unless a database server is running. In this case, it may need to be shut down during the backup.

Complex solutions abound and allow managed, catalog-style backups and restores of individual files. These are available as free software (such as Amanda and Bacula), from traditional vendors of Windows backup software (VERITAS, CA and so on), as well as from some vendors specifically focused on Linux (such as BRU). However, since you're using Ghost, it sounds like you're not really doing file-based backup anyway. The simplest solution thus would be a compressed tar archive. Restoring the entire system then is a simple matter of partitioning and formatting the drive, extracting the archive and re-installing the boot loader.

If that's true, start with tar and see if it suits your purposes. A command such as:


tar -jlcvf /tmp/mybackup.tgz /bin /boot /dev /etc \

often suits the most basic needs. Then, simply copy /tmp/mybackup.tgz onto CD, tape or another server. You also can tar directly to tape.


Chad Robinson


chad@lucubration.com

My best experiences in the Linux backup world come from using the good old tar command, the compression utilities such as zip and bzip, and some scripts I have written for each specific backup need. It's reliable, portable, straightforward and free—freedom and money-wise. For more information, see www.linux-backup.net for everything related to Linux and backups. The book Unix Backup and Recovery also deals with the subject; it was reviewed on LJ at /article/3839.

Also, try installing FC3 as FC1 is now deprecated. FC# has a lot of nice features such as drag and drop to burn CDs, which may be useful for backups.


Felipe Barousse Boué


fbarousse@piensa.com

Client Connects, but TFTP Fails

I'm trying to get my TFTP server running properly, and I'm not having any luck figuring out the problem. Here's the scoop. I'm running Fedora Core 3 on a PIII machine. I've installed the latest tftpd server from rpmfind.net, and have configured xinetd/in.tfptd properly (I think). Using a tftp client on another Linux machine, I can connect to my tftp server, but the read requests go unanswered. The client times out after several retries. In /var/log/xinetd, I see the following entries for each read request sent by the client:

05/3/16@14:11:14: FAIL: tftp address from=153.90.196.30
05/3/16@14:11:14: START: tftp pid=20184 from=153.90.196.30
05/3/16@14:11:14: EXIT: tftp pid=20184 duration=0(sec)

Here is what I've done to configure the server. I created a user tftp with home dir of /tftpboot and ran /sbin/nologin. I added an entry to /etc/hosts.allow of in.tftpd:ALL. I created a directory /tftpboot with correct permissions and ownership. I then created the file /etc/xinetd.d/tftp with the following contents:

service tftp
{
  disable = no
  socket_type    = dgram
  protocol       = udp
  wait           = yes
  user           = root
  server         = /usr/sbin/in.tftpd
  server_args    = -s /tftpboot -u tftp
  per_source     = 11
  cps            = 100 2
  flags          = IPv4
  #only_from     = 153.90.196.30
}

I've tried this with only_from both commented and uncommented. I've also made sure that the firewall trusts UDP and TCP on port 69. I verified that the contents of /etc/xinetd.conf are correct, and I verified that tfptd is running via chkconfig. I also verified that port 69 is available via netstat. I've tried running in.tftpd in standalone mode (server_args = -l).

I've been working on this problem for three days and am getting no where. I'm something of a newbie to Linux, but I have asked more experienced folks for insight to no avail and have spent hours trying find instances of this problem on the Internet, also to no avail. So, I'm hoping you folks can point me in the right direction.


Todd Trotter


ishamt@esus.cs.montana.edu

It seems as though you have done almost everything correctly. Some issues come to mind though. First, change the user to nobody on the file /etc/xinetd.d/tftp; otherwise, the in.tftpd dæmon runs as root, which is not safe.

Second, make sure the lines:

tftp            69/tcp
tftp            69/udp

are not commented out in the /etc/services file. Also, I suggest checking the file /etc/hosts.deny to see if you are blocking requests for the in.tftpd dæmon, for all services or for requests from a specific IP (client machine).

For testing purposes only, make sure this file is empty, reload xinetd (service xinetd reload) and try again. Also, for testing only, turn off your firewall (service iptables stop) and test again. Test and make your setup work locally by issuing tftp localhost before testing remotely. Hope this helps.


Felipe Barousse Boué


fbarousse@piensa.com

Is Garbage Collection the Answer?

I learned about garbage collection (GC) from your journal. I do have a problem. Let me explain the situation that exists. Initially, the project occupies 192MB of RAM in Linux. It was allowed to run continuously. Then, after 12 hours, we noticed it was using 335MB. What is the solution for this problem? Is it due to garbage? Will the BDW garbage collector provide a solution? The project includes char pointers, and it doesn't include any malloc functions.

Will BDW GC work only if we include malloc, calloc or realloc functions? Can I have a program that runs along with my project and releases free memory?


Mythily J.


mattuvar@yahoo.co.in

The answer to the last question is no. Unless you do really hairy and hard-to-debug things, only your program can free memory that it allocated.

The others are really good questions, and the only way to know for sure is to try it with your code. Even though you may not be using the malloc family of functions, you might be making library calls that allocate memory and then omitting some of the calls required to free it.

The good news is that you can build a version of your program that uses GC for all memory management, including memory allocated in library code, by “hooking” it in to malloc. See Listing 1 in this article: /article/6679 for an example.


Don Marti


info@linuxjournal.com

Runlevel Editing

In the April 2005 Best of Technical Support, in “Old Red Hat”, Timothy Hamlin suggests changing the /etc/inittab entry from:

x:5:respawn:/etc/X11/prefdm -nodaemon

to:

x:3:respawn:/etc/X11/prefdm -nodaemon

to suppress the X graphical login. I think he made an error here. His reply will launch X at runlevel 3. Instead change:

id:5:initdefault:

to:

id:3:initdefault:

to change the default runlevel.

Also, in “Tweaking inodes and Block Sizes”, Don Marti points out that Red Hat 9 is no longer supported and that this might be an issue for an older 486 system. The bigger issue is the amount of RAM Red Hat requires for the install. I'm not sure if it will install with 32MB of RAM. It definitely won't with 16MB, which is what my old 486 laptop had.


Roland Roberts


roland@astrofoto.org

Either inittab change will work. The second has the advantage of preserving the “runlevel 5 is GUI login” tradition that Red Hat users are used to. The Fedora release notes at fedora.redhat.com/docs/release-notes/fc3/x86 list a Pentium as the minimum processor and 64MB as minimum memory for a text install. (See the last letter for an alternate approach.)


Don Marti


info@linuxjournal.com

What about Fedora Legacy?

In the April 2005 Best of Technical Support, Don Marti writes that “Neither Red Hat 9 nor Red Hat 6.2 is still supported, which means no more security updates.” Although Red Hat has dropped support for Red Hat 9, the community-based Fedora-Legacy Project (www.fedoralegacy.org) is working to provide security updates for Red Hat 9 as well as Red Hat 7.3 and Fedora Core 1 and (soon) 2. Mr Marti does the project a disservice by ignoring its efforts.


John Dalbec


jdalbec@cboss.com

At the time we went to press, Fedora Legacy was not actively releasing security updates.


Don Marti


info@linuxjournal.com

The Best of Technical Support column in the April 2005 issue of LJ contains some incorrect and incomplete statements in response to a user who wants to use Red Hat 9 on 486 computers. Don Marti writes, “[Red Hat's] successor, Fedora, requires a Pentium or better...No matter what you install, this class of machines will be too slow for a modern desktop.” The RULE Project (www.rule-project.org) proves this wrong. One year ago, I ran Red Hat 9 on a Pentium I laptop with 32MB of RAM. Thanks to it, I used KOffice to make a presentation and Firefox for home banking: www.rule-project.org/article.php3?id_article=55 (see the linked screenshot).

Less than one month ago, we announced a version of our installer for Fedora Core 3: www.rule-project.org/breve.php3?id_breve=19.

Now, it certainly is true that full-fledged KDE, GNOME or OpenOffice.org installations under any desktop can be painfully slow, even on much newer computers. It is equally true that video editing or 3-D gaming requires state-of-the-art hardware. But, if by modern desktop, one means modern SOHO functionality—IMAP, digital signatures, HTML4/CSS support, CUPS, IM, Bayesian spam filtering, regardless of eye candy—there is no need to spend money. All it takes is a project such as RULE and efforts made on things such as mini-KDE. In any case, it is possible to run a modern, mainstream distro on slow hardware, with a bit of care and the right approach to the problem.


Marco Fioretti


mfioretti@mclink.it