Klaus Knopper answers your Linux questions

Ask Klaus

Article from Issue 174/2015
Author(s):

Klaus Knopper answers your Linux questions

BIOS Reaction

Klaus: I purchased an HP Notebook 15 AMD. The BIOS was corrupted soon after. Here is how various distros reacted with secure boot and UEFI disabled:

  • Mint – Installed okay with a fuzzy screen appearing in the bootup process. The error message said "the hardware acceleration is disabled and this mode should only be used for troubleshooting." I could use the OS. Mint did not allow me to su to root.
  • Fedora – The install process crashed when a notice appeared saying KVM is disabled.
  • Tisquel – The install was successful, but it reported that I was not root during the install process and tried to fix the problem. I never saw the message again.
  • Yet Another Distro – Reported that the SMBIOS was disabled and crashed.
  • Mageia – Crashed during install.
  • Korora – Reported the KVM message and crashed during install.

With secure boot and UEFI enabled, Windows 8 booted up okay and reported nothing. I have tried flashing the BIOS, but it is blocked using the HP BIOS tool from Windows and Wine.

Can you advise on any fix? I would advise that the developers merge all their error trapping with better advice on the significance of the error message.

Thanks, R

The "KVM" and "SMBIOS" messages are somewhat confusing, as they suggest that you did not boot Linux natively on the HP notebook but used virtualization, or the distro in question just wrongly detects some kind of virtualization and tries to load the corresponding acceleration modules.

Does your computer maybe run some kind of hypervisor from the UEFI firmware, instead of loading operating systems natively? Also, the fact that various distros crash during install may lead to the conclusion that the real hardware is not accessible because of a hypervisor restricting access (not really related to "root," but could be mistaken as missing privileges by installation programs).

If this is the case, there is no simple way to let any Linux distro show a verbose message like "I'm not running natively on this computer, but under a simulation," because from the viewpoint of the OS, there is no difference between a simulated or a real computer.

If, as you say, flashing the BIOS is also impossible using the vendors' own tools, it also indicates that an intermediate software layer is running that blocks access to the real hardware. On the other hand, if the BIOS is defective, it may just give the impression that a hypervisor is blocking hardware access, and it may be the BIOS itself that does this. In either case, a pure software solution of the problem may be unlikely.

You could try to turn in the notebook as a warranty case and get a replacement with an unrestricted BIOS that allows you to boot all operating systems you choose.

Filesystem Repair

Dear Klaus, a little time ago I unplugged a USB extension drive without thinking and without unmounting the drive when the SUSE system indicated that my backup had finished, despite knowing that I should never do this. The backup disk will not mount anymore, and despite all attempts to find an answer, all I have [left] is to try ScanDisk on a Windows computer. Is this really the only answer?

Yours sincerely, Terry

Instead of the very limited ScanDisk, why not use the native filesystem repair tools that come with most Linux distros?

For FAT32 filesystems, you can use dosfsck, for ext2, use e2fsck, and for NTFS, just use ntfs-3g to repair the filesystem.

If your backup disk displays as /dev/sdb1 (cat /proc/partitions), see Table 1 for the commands for repairing the filesystems. Please do not attempt these commands on filesystems that are already mounted, even though the tools are usually clever enough to warn and quit in this case.

Table 1

Commands for Repairing Filesystems

Filesystem Type

Command for Interactive Repair

FAT32

dosfsck -v -r /dev/sdb1

Ext2/3/4

e2fsck /dev/sdb1

NTFS

ntfsck /dev/sdb1

ReiserFS

reiserfsck --rebuild-tree --rebuild-sb /dev/sdb1

Other

fsck.filesystemname /dev/sdb1

If the filesystem is not repairable this way, or if the partition table is corrupt (in which case ScanDisk would also fail), you may try the excellent testdisk utility on the disk device (/dev/sdb in this example) to identify and repair partitions interactively and to salvage data from them.

If your Linux distro requires root access for accessing block devices, prefix each command with sudo to gain root access for the duration of the operation.

Wine Menu, Please

Klaus, I'm trying to create my own Linux distribution that uses LXDE as its desktop and is based on Debian Stable. I noticed with Knoppix 7.4 that when logged into LXDE, you created a "Wine" menu that goes a total of four levels deep. I'm trying to do the same thing in order to provide menu entries for scripts that make it easy to install other programs that there's no room for on the CD (I'm also trying to keep the ISO size to 700MB or less, for those without access to a DVD burner).

I've followed a tutorial I found online for how to do this, but in spite of trying it multiple times and doing everything exactly as shown, I keep leaving myself with just the "Run" and "Logout" options in the menu; that's obviously not what I want, and it's driving me up the wall. Could you please tell me how you did it?

Thanx in advance, Fred in St. Louis

Actually, I didn't create the Wine menu personally, but the Wine package (like some others) adds its own menu structure and manages it via user-defined configuration files, and this is done even if you install Windows programs via the "Windows" installer under Wine, not using Debian's standard installation tools.

You can create menu entries manually, though. I'd recommend NOT messing with the XML-based menu configuration system (/etc/menu-methods/*, /etc/xdg/menus/*, …) that is used by the update-menus utility, but just copy a freedesktop.org-compatible .desktop file to the appropriate directory beneath the .local/share/applications (hidden) directory on your default users home directory.

Listing 1 shows the contents of .local/share/applications/wine/Programs/Java-Editor/Java-Editor.desktop after installing the program under Wine.

Listing 1

Contents of .desktop

[Desktop Entry]
Name=Java-Editor
Exec=env WINEPREFIX="/home/knoppix/.wine" wine \
  C:\\\\windows\\\\command\\\\start.exe /Unix /home/knoppix/.wine/dosdevices/\
  c:/users/Public/Start\\ Menu/Programs/Java-Editor/Java-Editor.lnk
Type=Application
StartupNotify=true
Path=/home/knoppix/.wine/dosdevices/c:/Program Files/JavaEditor
Icon=D416_javaeditor.0

As you can see, the submenus follow the directory hierarchy starting from .local/share/applications, and menu content and start program are determined by the .desktop file's content. Figure 1 shows the resulting menu in Knoppix 7.5.

Figure 1: Screenshot of menu.

Klaus Knopper

Klaus Knopper is an engineer, creator of Knoppix, and co-founder of LinuxTag expo. He works as a regular professor at the University of Applied Sciences, Kaiserslautern, Germany. 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

Buy this article as PDF

Express-Checkout as PDF
Price $2.95
(incl. VAT)

Buy Linux Magazine

SINGLE ISSUES
 
SUBSCRIPTIONS
 
TABLET & SMARTPHONE APPS
Get it on Google Play

US / Canada

Get it on Google Play

UK / Australia

Related content

  • 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

  • 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

  • Ask Klaus!

    Klaus Knopper is the creator of Knoppix and co-founder of LinuxTag expo. He currently works as a programmer, teacher, 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

  • Ask Klaus!

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

  • Interview: Klaus Knopper

    Ten is a fair age for a Linux distribution that doesn’t have massive staff resources to back it up. Klaus Knopper looks back with a sense of satisfaction after just having compiled version 6.4. As a tribute to the community, this version includes only free software.

comments powered by Disqus

Direct Download

Read full article as PDF:

Price $2.95

News

njobs Europe
What:
Where:
Country:
Njobs Netherlands Njobs Deutschland Njobs United Kingdom Njobs Italia Njobs France Njobs Espana Njobs Poland
Njobs Austria Njobs Denmark Njobs Belgium Njobs Czech Republic Njobs Mexico Njobs India Njobs Colombia