Ask Klaus!


Klaus Knopper is the creator of Knoppix and co-founder of the 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

Windows Dual-Boot Problems

Question:

Dear Sirs: I have installed SUSE 11.2 64-bit (using your cover disc) onto my Dell Studio 1737 laptop, but I cannot get it to dual boot with Windows 7 Ultimate. The system has two hard drives. The Windows 7 system is installed to a partition on the first hard drive (sda), and SUSE is on the second drive (sdb) with boot on a primary partition sdb1 and root on a logical partition sdb5.

I have been trying to use the Windows bootloader to start both Windows and Linux using GRUB (with GRUB installed to the boot partition, sdb1), but when I choose Linux from the Windows startup I get the error message GRUB GRUB Read Error. Ctrl+Alt+Del will not reboot the system; I have to turn off the power to try again. When I installed GRUB to the MBR (of sda), it would boot Linux but not Windows (I got a black screen with a short line of jumbled characters when selecting to boot Windows). Re-installing GRUB to sdb1 and restoring the Windows bootloader caused the GRUB error to reappear. I could also boot into the installed SUSE via Distribution | Repair installed system | Expert utility. Note that that was when I installed SUSE on partitions formatted as ext3.

I have made two further clean installations (i.e., having formatted the Linux partitions each time) with the same resulting error message from GRUB. Please find attached copies of the files grub.conf and menu.lst. Any guidance and fix would be greatly appreciated. My preference would be to use the Windows 7 bootloader to start both OSes.

There was, however, a further unexpected happening. When I reinstalled Linux (on both occasions), I chose to format the partitions as ext4. Whilst GRUB still failed with the same error message when I tried to boot the installed SUSE with the distribution expert repair utility, I now got two error messages. The first error was Cannot unmount partition /mnt//var with an OK button. (It would seem there is a typo in one of the distribution config files.)

The second, and more serious, error was modprobe: FATAL: Could not open `/lib/modules/2.6.31.5-0.1-default/initrd/ext4.ko': No such file or directory. It would seem that the repair utilities (or at least some of them) cannot recognise or operate with ext4 partitions.

Bear in mind that I have been able to configure and log into Linux at the end of each installation and then wander around both Linux files and Windows partition files with no problems. Is this a known problem or have I done something wrong? Mr. I.M. Williams

Answer:

I think there is rather an error in the distribution's installer. If using ext4, the initial ramdisk SHOULD contain the ext4 module. To stay on the safe side, you could choose ext2 or ext3 instead, which should be included in the default version.

Booting with GRUB on the MBR might be the best option because you will need to have GRUB's second-stage loaders available at boot time (especially the chainloader for switching to the second disk. However, in your GRUB setup, the Windows partition seems to be missing from the menu. This should be in menu.lst in order to jump to the original Windows bootloader from the GRUB menu (regardless of the Windows version), with Windows installed on the first partition of the first disk:

title Win
   root (hd0,0)
   chainloader +1

The Linux entries look correct, if Linux is installed on the first partition of the second disk:

title Desktop -- Linux - 2.6.31.5-0.1
  root (hd1,0)
  kernel /vmlinuz-2.6.31.5-0.1-desktop ...
  initrd /initrd-2.6.31.5-0.1-desktop

However, the initial ramdisk must be configured in order to contain the filesystems that you need to mount the Linux partition; otherwise, you will get a cannot mount root file system kernel panic. Booting Linux from the Windows bootloader is also possible, although it's more complicated because you have to copy parts of the partition boot record of the Linux partition. For details, see documentation on the Port 25 website [1]. Although the article is about Vista, I suspect the bootloader procedure will be the same in Windows 7, but I am not competent enough with Windows to answer this for sure. I would use the GRUB method.

Laptop Hangs Fire

Question:

Klaus: I very much enjoy your Ask Klaus! column. I find it very informative. I'm hoping you could help me with a problem that I've been having with my laptop, a Dell Inspiron 1501 with 1GB of RAM. I'm running Ubuntu 9.10 with kernel 2.6.31-17 and Gnome version 2.28.1.

About a month ago, my laptop started to get stuck during the boot process. My machine will boot to a text-based login and sit there for three minutes (timed). The machine isn't hung, as I can actually login and start X.

However, if I do that, after three minutes expires, I get kicked to the GDM login page and am prompted for a login. If I login here, most applications I open will have problems. If I leave the machine on the text-based login for the three minutes and don't do anything, the GDM login page will finally start and I can log in normally without any other problems. I've got several errors in my GDM logs, but I'm not entirely sure how to interpret them. I've attached the most recent ones (where I know GDM hung). Hopefully you can help point me in the right direction.

I'm not new to computers, I've been working with that operating system from Redmond professionally for over 15 years. I've only been working with Ubuntu and Linux for two years now and only have been on it full time for about a year, so I'm still a bit of a noob on the open source side. Your help would be greatly appreciated! Dave Lamb

Answer:

A three-minute timeout could indicate a network (-setting) problem. GDM, the display manager, might try to resolve your computer's hostname to an IP address or even try to connect to the local host via a network socket that is not available yet.

Now, several mechanisms kick in to make computer names resolvable or bring up a local network, although this could have changed in your case when you updated your system software (e.g., a replacement for a network-related service might have been pulled in).

Candidates are NetworkManager, udev/hal, and avahi-* packages. One of them, or the combination, can reconfigure the network after a failed attempt to connect to the Internet. You can check this using the ifconfig and route commands before and after the GDM display reset.

The local hostname(s) should always be present and resolved in the file /etc/hosts, as in Listing 1.

Listing 1: /etc/hosts Content
01 127.0.0.1             localhost Microknoppix ...
02 <local IP address>       <local Internet hostnames>

This way, your computer does not try to contact a name server for getting a local IP address or hostname mapped.

Also, please check /etc/nsswitch.conf and /etc/resolv.conf for changes or unknown addresses. The /etc/nsswitch.conf file should have the search orders for information with files or compat as the first option.

Everything in the logfiles you sent looks unrelated to the problem; it looks like you are using a non-Gnome window manager, but this only happens after GDM is up and you are successfully logged in, so these error messages can be ignored safely.

The xorg server's EDID (monitor recognition) log looks a little odd with binary strings in the logfile, but this could also be unrelated, unless your monitor causes a timeout during the probe for correct settings.

This would probably be a hardware defect, though. You could check to see whether GDM starts faster if your monitor is not connected to the graphics adapter while booting.

Acer Aspire Overheats

Question:

Hi Klaus: You are perhaps my last hope for help. Last time I decided to upgrade from openSUSE 11.1 to 11.2. Unfortunately, during update, the system shut off. Checking carefully, I noticed what happened - the fan was not working and my laptop shut down to prevent overheating.

My laptop is an Acer Aspire 5315, but as far as I know, the problem is related to many Acer models. During boot, I see the message acerhdf: Bios unsupported, please report..aborting. When I googled about this topic, it seems it is still unresolved - no kernel developer created a patch :( and the only recommended solution I can find on message boards is to upgrade BIOS. Also, no Ubuntu or SUSE repository has a kernel optimized for laptops; that is, I cannot find any. Is there any hope for a "normal" fix of this problem? Upgrading BIOS, which is not a straightforward and safe procedure cannot be the remedy for such problems.

I tried to find help in acerhdf module caretaker, but when I pointed out that MS systems are better because such simple things like a fan works out of the box, I got the reply: "go catch your fish elsewhere." :(

I am counting on your advice. I hope the Linux community is still friendly for users. Because of such problems, I am forced to use XP on my laptop. One word of reflection - I work as a teacher of Informatics in a Polish school. How can I promote Linux and OS software to my students if such things happen? Best regards, Sebastian Szwarc

Answer:

In my eyes, this a warranty case. A computer should not require software to keep the CPU from overheating. Hardware that is designed to auto-destroy itself when no drivers are loaded is very bad, in my humble opinion. The error messages you quoted indicate that the ACPI BIOS is neither able to manage CPU cooling on its own by switching on the fan nor is supported by current operating systems. Therefore, a BIOS upgrade CAN be a valid solution. The BIOS version you have right now seems to be defective. There may be another way, other than upgrading the BIOS: Your Acer 5315 probably has a Celeron CPU with no SpeedStep capability; therefore, it overheats easily. If you replace the CPU by a T6400 or T2310, the problem might be solved.

Video Brightness

Question:

When watching videos in Knoppix after hard disk installation with VLC, they look darker than they should; colour does not seem to be right. The Knoppix VGA boot option at startup is 791; the resolution attained is the maximum for my computer's display. Is there a way to increase colour depth or brightness to improve the display?

Answer:

I think that the dark colors in videos are unrelated to the framebuffer setup at startup, unless you have an unsupported graphics card chipset that only works in framebuffer compatibility mode. You can modify the vga= settings anyway by editing /boot/grub/menu.lst. Change vga=791 to vga=792, which should give you a 24-bit framebuffer of 1024x768 at startup. The setting for graphics mode (xorg) is independent and is configured in /etc/X11/xorg.conf but overwritten at startup in Knoppix unless you remove the created by knoppix line in that file.

The command

xdpyinfo

when X is up will tell you the color depth in use. For most cards, this is autoset to 24. Increasing brightness or gamma can be done in the X server settings as well as in VLC or MPlayer itself. Probably the easiest way is to change this in the player. After you've started VLC once (Knoppix 6.2.1 should use MPlayer as default, though), you have a file called .vlc/vlcrc. Check for these settings:

contrast=1.000000
brightness=1.000000
hue=0
saturation=1.000000
gamma=1.000000
brightness-threshold=0

I think it's best to change the gamma to something like 1.5 for enhanced brightness and color. If there is a # in front of gamma, remove it.

Accent Accident

Question:

Hi Klaus! First, let me thank you for your good columns at Linux Mag and the Knoppix distribution. As a IT guy, I'm often called by family members and friends to debug their non-working Windows installation, and my first tool is the Knoppix Live distro; everyone is amazed when the screen pops up and they see me directly accessing the Internet!

Lately, I've been hitting a small problem, though; I booted the OS to help someone back up his files on a problematic Windows system. After I did the backup, he looked at the copied files and told me directories were missing. In fact, all directories containing the accented character "é" were not accessible using Knoppix. Seeing this, I had to boot from a Fedora Live CD, which saw the directories. Is it possible to include this functionality in Knoppix's next release?

Finally, here's a quick and easy question: I like Linux (I've been using it since 1996) and always use Knoppix as a disaster recovery solution. Is there a way I can make it boot from a USB key? I haven't searched really to make this work, but is there a procedure out there that would let me copy the Knoppix Live CD distro to a stick, and get it working from there? Thanks again for your nice column in LM. It's a perfect one-stop shop to help us solve problems! Regards, Daniel Pelletier

Answer:

Accents and special characters like umlauts are encoded in different ways in different operating systems and distros. Although Knoppix still uses the one-letter-per-character ISO Latin character set, many other distros have switched to UTF-8, in which special characters consist of two letters. This also affects the way file names are handled. If you meet a filesystem that was created in a UTF-8 charset, you might have to add the -o utf8 option to the mount command or set your system's locale to utf8. However, in the latter case, simple text files also will be written with the UTF8 charset, and umlauts could become hard to read on ISO Latin-based systems. So, adding the utf8 mount option manually to the mount command might be the safe option for now. Programs tend to autodetect the character set in newer versions, and I hope filesystems will catch up, too.

About the "Knoppix-on-a-Stick" question: Yes, you can create a bootable USB flash disk from a Knoppix CD or DVD using the flash-knoppix utility, which you can reach by clicking on Preferences | Install KNOPPIX to flash disk (Figure 1). You need a DOS/FAT32-formatted single primary partition because the utility tries to be non-destructive and will not change the partitioning on its own. An additional advantage, apart from the speed gain, of Knoppix running off a USB flash is the possibility of creating a "persistent image," which allows you to install programs and save configurations beyond reboot.

Figure 1: Install Knoppix to a flash disk.
INFO
[1] How to use Windows Vista's Boot Manager to boot Linux: http://port25.technet.com/archive/2006/10/13/Using-Vista_2700_s-Boot-Manager-to-Boot-Linux-and-Dual-Booting-with-BitLocker-Protection-with-TPM-Support.aspx