Answers 105

From LXF Wiki

Answers 105

<title>My desktop disappeared</title>

<question>I have just installed Mandriva 2008 `Free' from the February 2008 cover disc [LXF102] on to my Asus PRO31F Series laptop. It runs Windows Vista Home Premium on 1GB RAM and 100GB of hard drive space. The installer successfully partitioned my hard drive and installed Mandriva. I do not appear to have lost any files in Windows. So far, so good! The step-by-step illustrations on pp.66­67 were very helpful until the very last sentence accompanying figure 8: "Then, after some final configuration steps, you can reboot, log in and enjoy." When the screen comes up requiring log in, all I see is:

localhost login: johnm (my login name)
Password: (I type in my password)
[johnm@localhost ~] 1$

I apparently have to type in a command ­ but I have no idea what it should be! </question>

<answer>This has long been a frustration with Mandriva (and Mandrake before it). During installation, the program failed to identify and automatically configure your graphics hardware. The summary screen, towards the end of the installation, will have indicated this, but the warning is not that obvious, so you were able to proceed without configuring the X Window System environment. As a result, you boot into a console login with no graphical desktop. The good news is that you do not have to waste time re-installing the whole distro in order to fix this. When you see the login prompt, log in as root with the pasword you set for root during installation, then run


The command name is case-sensitive, so the first two letters must be in capitals. This runs a text version of the X configuration tool, which you can navigate using the Tab key to move between options, the Enter key to invoke them and the space bar to select choices, such as video card. Once you have set up the correct monitor and video card (the problem is usually caused by the monitor not being auto-detected) use the Test option to make sure your settings work and Quit to save your settings. Now you can start the X desktop by running

/etc/init.d/dm start

In future, the desktop should load automatically when you boot Mandriva. If not, check whether `Automatically start the graphical interface' is set in the Options section of XFdrake. Once X is running, you can use a graphical version of XFdrake from the Hardware section of the Mandriva Control Centre for any fine tuning you may wish to do. </answer>

<title>Two into one</title>

<question>I recently purchased a 1TB USB desktop hard drive from Iomega, which consists of two 500GB drives strung together using JBOD so that it appears as a single 1TB volume. Naturally it came pre-formatted with a single FAT32 filesystem, which is fine except that I want to store files bigger than 4GB and also have proper file permissions. Can I reformat the drive to ext3 (if possible with multiple partitions) without breaking the JBOD configuration, and if so is it then just a case of firing up a standard disk partitioning tool like DiskDrake and proceeding as normal? I haven't risked trying it yet as I don't want to end up with a single 500GB drive or worse! </question>

<answer>When you connect this drive to your computer, what does dmesg or syslog show? Does it show one drive or two? If it shows as a single drive, the JBOD (Just a Bunch Of Disks) magic is handled by the drive's firmware and the internal configuration is largely irrelevant. If two drives show up ­ say, sda and sdb ­ the joining of the disks is handled by software. From the description on the manufacturer's website, it appears that the former setup is used and the JBOD configuration is internal. In that case, you can safely treat the device as it it were a single drive, the number of drives inside the case is of no more relevance than the number of platters in a drive. 1TB drives are still noticeably more expensive per MB than 500GB ones, so this is probably a cost-saving measure ­ even with the extra cost of the firmware to combine the drives, they would be cheaper to manufacture. Run your favourite disk partitioner ­ DiskDrake, cfdisk or GParted ­ on the disk and see what it shows. If it shows a single 1TB drive, you should have no problems partitioning it. To get a definitive answer, you would have to contact Iomega using one of the addresses listed at and give the exact model number of your drive, but I would feel safe partitioning it if it were my drive. </answer>

<title>Did I hack myself?</title>

<question>Having just purchased my first copy of Linux Format for many months (LXF103) I booted the `Distro Heaven' 14-distro disk to see what I might be missing. I have a Dell Inspiron 6000 with PCLinuxOS 2007 installed, and I found that none of the Live versions offered any improvements over my installed system, so removed the disk and re-booted. Opening a terminal I expected the usual

peter@Laxey $

prompt. I was rather shocked to see a new prompt, which is now

peter@ubuntu $

What on Earth is going on here? Has the Live CD somehow altered my installed system and changed my settings? </question>

<answer>I can see why you would be alarmed. It looks like the Ubuntu Live CD has hijacked your system, but this is not the case. It's all down to the way different distros use DHCP to configure the network, and how your DHCP server works. When a computer broadcasts a DHCP request over the network it can optionally include a hostname, which the DHCP server may use to determine the address to give it. If it doesn't send a hostname, the server may well issue one. What appears to be happening here is that PCLinuxOS is set to not send a hostname with the request, and the DHCP server has not previously sent one back, so the hostname from your settings is used. You've run the Ubuntu Live CD on the same computer and it has sent a hostname of `ubuntu' with its DHCP request. The DHCP server has remembered this, so the next time it gets a request without a hostname from the same computer, it send the same hostname you used last time (the DHCP server uses the hardware MAC address of your Ethernet adaptor to determine that this is the same computer). The easy solution to this occurrence (it doesn't merit the title of problem) is to set PCLinuxOS to behave in the same way as Ubuntu and send a hostname with its DHCP request. This will prevent the DHCP server trying to `help' by looking up the last-used hostname because it thinks you forgot to send it this time. To do this with PCLinuxOS, go to the Network section of the control centre, select `Reconfigure A Network Interface' and go to the DHCP tab. Tick the `Assign Host Name From DHCP Address' box and type your preferred hostname into the box below this. On the next boot, your computer should be correctly named, and will remain so no matter how many Live CDs you throw at it. </answer>

<title>Grubbing around</title>

<question>I have a laptop with the default OS installed on hda1. I installed Debian on hda2 but installed Grub on hda2 instead of the MBR. I wanted to take this opportunity to learn how to install Grub on to a USB stick instead of just re-installing Linux, but after much Googling, I am still unable to do it. Is it possible to get Grub installed on to a USB stick, without also installing Linux to it? </question>

<answer> There are at least three ways to get your Grub setup working. You could modify the existing (Windows?) bootloader to chainload Grub; you could install Grub to the MBR or you could set up Grub on a removable device, like a floppy disk or USB stick. To chainload Grub from Windows NTLDR (New Technology Loader), you need a copy of your Grub boot sector on the Windows drive. Do this while in Debian

 dd if=/dev/hda2 of=lin-boot.img bs=512 count=1

This creates a file called lin-boot.img (the name is unimportant) that contains the first 512 bytes of the partition containing Grub. Copy this file to the Windows C: drive, either by mounting your Windows partition in Debian or copying the file to a USB stick and then copying from that in Windows. Now reboot into Windows, copy lin-boot.img into C: if you haven't already done so, and edit C:\boot.ini in Notepad to add this line to the end

 C:\lin-boot-img="Debian GNU/Linux"

Now the Windows bootloader will have two options, with the second passing control to Grub from hda2. The second option, and the one I prefer, is to let Grub handle everything. Run grub as root to open the Grub shell and install it to the MBR of the first disk with

root (hd0,1)
setup (hd0)

This installs Grub to the first disk, (hd0), after telling it to look for its files in hda2 (hd1,1) remember that Grub counts from zero. Now you need to modify /boot/grub/menu.lst (some distros use /boot/grub/grub.conf) to add the Windows menu entry, like so

title Windows
rootnoverify (hd0,0)
chainloader +1

which simply tells Grub to pass control of the boot process to the bootloader found at /dev/hda1, which is where Windows keeps its bootloader (this is why Windows needs the first partition to be marked bootable, because the bootloader is on the partition, not the MBR). The final option is to place Grub on a removable device, such as a floppy disk or USB stick. This will be slower than using Grub files on the hard disk, but it does provide a useful backup should the MBR bootloader become corrupted. To do this, copy the /boot/grub directory from your hard disk to the removable device (it must still be boot/grub on that device). Now you need to set up Grub on the device. To make it easier to find the correct device number in Grub, first do

touch /media/sda1/findme

replacing sda1 with the actual mountpoint. Now run grub and do

find /findme

which will return the Grub designation for your device, say (hd1,0), then do

root (hd1,0)
setup (hd1)

Grub is now set up and ready to boot on the USB stick, so try it. It is possible you may get a `File not found' error when trying to boot Linux from the new boot menu. This is caused by the BIOS switching the hard disk and USB stick around when booting from the stick. The cure is to replace all calls to hd0 in menu.list with hd1, or remove all absolute paths and put root (hd1,1) at the top of the file. Note that USB booting is a bit of a black art ­ not all BIOSes and USB sticks cooperate, so if it refuses to boot at all, you may need to experiment with BIOS boot settings or try a different stick. If you decide to place Grub on the MBR of the disk and then follow the above steps to put it on a USB device, you will then have to repeat the procedure for the hard disk with the USB device removed, otherwise your hard disk boot will no longer work. </answer>

<title>Bye bye Windows</title>

<question>We are a multiple PC, dual-boot family, and I would like to get rid of Windows, but I have a problem for which I have not yet found an answer. I must keep my email folders intact, and I sometimes change Linux distros. This ties me to Windows/Mozilla. I've tried a networked hard drive, but it was very slow. Would using an old PC as a mailserver (as in LXF102) solve my problem, or do you have a better solution? </question>

<answer> You have two options here, which may be combined. The first is to always install your distros with a separate /home partition. This means that all of your personal data, not just your email, is preserved when you install a different distro, or a newer version of your current favourite. However, this is a one-computer solution and you have several. By setting up your mail server as described in LXF102, each person's mail resides on that server and can be read from any computer using any operating system. Provided you are sensible about security, you can even access it from outside of your local network (mail accounts are password protected, so it is no less secure that reading it from the ISP's server) meaning you have access to all your mail at any you can get on the internet. Not mentioned in the article you refer to, but worthy of consideration if the computer is reasonably powerful, like the example we used but with a little more memory, installing a webmail program, which means you can access your email from an internet cafe or hotel using nothing more than a web browser. There are a number of webmail programs to choose from: SquirrelMail ( is a popular choice, although my favourite is RoundCube ( </answer>

<title>Old kit, new distro</title>

<question>As someone who dislikes bloatware, eye-candy, and other such stuff that clogs and hogs a computer's hardware, I have been considering refurbishing an old computer to run Linux with a lightweight WM. The trouble is, the computer I hope to use (an old machine from work) is an Apple Mac. I know that Linux, BSD, etc have been ported to many CPUs, including the PowerPC, but I don't know if there is anything special about Apple hardware that allows only Mac OS to run on them. Can Linux run on Apple Mac G4 PCI Graphics hardware with 400 MHz PowerPC and 768 MB RAM? </question>

<answer>Apple PPC hardware is can definitely run Linux ­ I ran it on a 1GHz iBook G4 for almost three years, until the hardware failed. With a 400MHz CPU, you'll want something lightweight, but that appears to be your objective anyway. There aren't many distros for PowerPC, but all of them are intended for use on Apple hardware. The main choices are: Yellow Dog Linux ( which is derived from Fedora, Debian ( which runs on just about anything, and Ubuntu. Ubuntu no longer officially support PowerPC but PPC versions are available in the ports directories of their download servers. Your best choice for this would be Xubuntu, which uses the Xfce desktop and is available from http://cdimage. While Xfce is significantly lighter than the likes of KDE and Gnome, it may not fulfil your idea of a truly lightweight WM. However, Ubuntu and Debian in particular have plenty of alternatives available, so you can go as minimalist as you like, whether you want the function of FluxBox ( or IceWM ( or the true minimalism of Ratpoison ( or EvilWM ( Our Roundup of lightweight window managers in LXF103 may help you with this decision. </answer>

<title>SATA for all</title>

<question>I have a Debian GNU/Linux rig on a Celeron based system. I would like to connect an extra SATA hard disk as an upgrade and need a Linux compatible SATA adaptor in PCI form factor, before I break the bank for a new system mainboard. Can you give me guidance on this search, so I can connect the SATA drives with a PCI SATA adaptor and also tell me mainboards have a SATA controller compatible to Linux? </question>

<answer>What counts here is not the individual makes and models of adaptors but the chipsets they use. Manufacturers sometimes switch to a different chipset while keeping the same model name, making decisions based on anything but the chipset somewhat risky. However, most SATA chipsets are supported in Linux, especially those that support the AHCI (Advanced Host Controller Interface) standard. The kernel contains drivers for a number of SATA controllers ­ you can see the ones that are included with your distro with this command

modprobe -l | grep sata

I've used a few low-priced SATA controllers that all utilised the Silicon Image chipset, which has been supported in the Linux kernel for years. Equally, motherboard SATA controllers are well supported, especially if you go for a well-known brand. SATA is no longer new technology, to the point where SATA drives now cost less than their PATA equivalents, so you should have no trouble with anything from a common source. You can look up individual controllers or motherboards, (or just about any kind of hardware) in the Linux Compatibility database at Some distros also list of known working hardware for their kernels on their websites. There are also PATA to SATA adaptors that fit on the back of a SATA drive and provide a PATA interface (and adaptors that do the opposite, so make sure you get the right type), such as this one from Maplins in the UK: Other countries will have similar suppliers that provide similar items. </answer>

<title>Ubuntu desktops</title>

<question>I am a first-time Linux user, having used MacOS and Windows for some time. I have replaced Windows XP with Ubuntu that came with your Christmas 2007 disc [LXF100], but I don't know how to change from Gnome to KDE. How do I do this? </question>

<answer>The disc included, and installed, both the Gnome and KDE desktops, along with Xfce too. To switch between them, there is a discreet `Options' button at the bottom-left of the login screen; click on this and choose `Select Session' from the menu that appears. This allows you to choose the type of session you run for this and future logins until you change it again. If you are already logged in to the KDE desktop, log out by pressing the Shutdown button and select logout, choose a new session type and log in again. </answer>

<title>Windows from afar</title>

<question>It is possible to use a Linux box to run a remote desktop hosted on my company's server? I often work from home by connecting to their IP address, logging on to Windows, then running an application. As I understand it, all the processing is carried out on the remote (Windows 2003) server, and my desktop is basically just painting a screen image and sending off key presses to be interpreted. This sounds to me like something that should be possible from a Linux machine. I have tried searching for a Wine application that would do the trick, but I can't find anything. Can you help me? I could then junk Windows and start cooking! </question>

<answer>You do not need Wine for this, because there are native remote desktop clients (and servers) for Linux. You have a choice of at least one command line program and two graphical clients, and it's highly likely that your distro includes at least one of these, so you may even have it installed already. The command line program is rdesktop (http://rdesktop. and you run it like so rdesktop my.remote.server giving it either a domain name or IP address to which it should connect. You may need to add some options, such as -u followed by the username to connect with, or -s and the name of the application you wish to run. For a more graphical approach, try grdesktop (, a GTK front-end to rdesktop. This provides exactly the same options as rdesktop but with a GUI to set and save your preferred settings. If you use the KDE desktop, you probably already have a remote desktop client installed ­ krdc. This is usually started from the Internet section of the KDE menu and could be labelled `Krdc' or `Remote Desktop Client' depending on whether you have KDE set to display program names or descriptions in the menu. Either way, just start this, give the address of the computer to connect with and it should connect. As with the command line client, the graphical clients may need some extra options to make the connection, but one advantage of the graphical programs is that they remember these for the next session. All of this assumes that the server is running the Windows Remote Desktop software, which is most likely as it is included with Windows Server 2003. The alternative is that it uses VNC, in which case you should install TightVNC ( and run that. This is not an issue if you are using KDE as krdc handles remote desktop and VNC connections from the same program. </answer>

<title>Making room</title>

<question>I have a HP 6710 laptop that already has three primary partitions on it: Vista, HP recovery and another 2GB partition. Am I right in thinking that I can shrink the Vista partition, fill the space with an extended partition, then put three logical partitions inside for root, home and swap? I would install the bootloader to root and use EasyBCD to load this into the Vista boot sector. An alternative solution would be to install to my external 160GB hard drive but I am reluctant to do this, as I want to have access to Linux all the time. Should I partition first from Vista (I have Partition Manager) or let the distro do it all? After a year of trials in VirtualBox I've decided on the testing branch of Debian, as it makes you learn all about APT and the rest of the terminal commands. If it gets too difficult I can always change to Mepis. </question>

<answer>You can do what you ask, and it is a fairly simple process. However, any time you modify filesystems and partitioning, you are taking some risk. If the process should be interrupted, you could suffer data loss. In some ways, this is safer on a laptop, because the battery provides protection against a failure of the power supply, but you must do this with the computer connected to the mains, as a flat battery midway through could be disastrous. You should back up all important data before carrying out any partition resizing operation in any OS. The first step is to boot into Vista and defragment it, as a fragmented filesystem is difficult, sometimes impossible, to resize. Once you have done this, boot from the Debian disc and let it take care of the partitioning. Select the Manual option under Partitioning, select your Windows partition and press enter. You will see a menu with an option to resize the partition; take that and pick the size you want to make it, then use the Guided Partitioning option to have Debian allocate suitable sizes for the root, swap and home partitions. Unless you know exactly what you are doing, it is generally best to leave it to the people who developed the distro to decide how much space to give each of its components. However, I strongly suggest you take the option to use a separate home partition or you will almost certainly regret not doing so at some time. I'm not familiar with EasyBCD, but the Grub bootloader installed by Debian and most other Linux distros is a good way of handing multiple operating system and is well supported. If you want to use EasyBCD, make sure you tell the Debian installer to install its bootloader into Debian's root partition. Otherwise, let it install to the master boot record of the disk and let Grub handle the choice between operating systems. EasyBCD appears to be tied to Windows, so is not a good choice if you plan to drop Windows at some time, whereas Grub is independent of any operating system. As usual with open source software, the choice is yours. </answer>

<title>Software on Fedora</title>

<question>After installing Fedora Core 7 from your magazine I tried to install some additional software in RPM format from the same disk. I received the following error message: "Unable to retrieve software info ­ this could be caused by not having a network connection." That is correct ­ the machine in question is not connected to any network and will be used as a standalone machine. I then went back a version to Fedora 6 and after a painstaking hour of installation was presented with the same problem. Next I tried Fedora Core 5 with the same result. Oh dear! Does this mean that you can only install software on a Fedora installation from the web? My Mandriva installation will allow me to install any RPM package from anywhere, even my USB memory stick. Is Mandriva the only distro that has got it right? Somewhere in there is a file where I can redirect the package management software to another source, I have searched but failed to find, can you please point me in the right direction? </question>

<answer>Most package managers do allow you to install software with a simple click. Yes, they require superuser permissions to do this, but so does Windows. The difference is that Windows lets a user run with admin privileges all the time, which is one of the ways it contributes to its own insecurity. You describe a common and frustrating problem with a simple fix. Fedora 7 and previous installations assumed a network connection and trying to run the software manager without one gave exactly the error you describe. I agree with you that this is wrong, and now it seems so do the Fedora developers, as this is not a problem with Fedora 8. You can fix this with ther releases of Fedora Core by editing the repository files to disable all online sources and add one for the DVD (you need to be root to do this). Load /etc/yum.repos.d/fedora.repo into your favourite text editor, find the section starting [fedora] and comment out the baseurl and mirrorlist lines by placing a hash (#) at the start of each line. Then add a new line reading


This creates a new repository at /media/Fedora 7 i386 DVD, where the DVD is mounted. The spaces in the mount point have to be replaced with %20 to be a valid URL. You then have to edit the other .repo files and change any occurrences of enabled=1 to enabled=0. Now the only repository that is enabled is the one for the DVD, and running Add/Remove Software should allow you to install software from the DVD. Of course, you will not have access to any security updates that Fedora may release, so it would be wise to check the Fedora website from time to time for any updates. You could copy these into a directory on your computer after downloading elsewhere and edit fedora-updates.repo to point to this directory in the same way that you pointed fedora.repo to the DVD. </answer>