Inlägg

Easy Minecraft installation in Linux

This is an installation script for Minecraft on Linux. It installs the Minecraft launcher in the system, so that all users can easily start and play Minecraft. It creates icons and a shortcut to the launcher. The script is an improved version of this script (github https://gist.github.com/wvega/728367 ) When the user starts Minecraft, it will download a copy of Minecraft to the user's home directory, exactly like when manually installing Minecraft. This script works fine on Fedora, but I imagine it should work on most Linux distros. The only requirement is that Java is installed somewhere. The script assumes there is a link to Java at /usr/java/latest/bin/java or in /usr/bin/java, otherwise it will exit with an error. The script downloads the Minecraft launcher, and installs it system wide. Sometimes the Minecraft launcher address has changed and then of course the script must be updated. Download the shell script here or from github . Do "chmod +x minecraft-insta...

Identifying an unknown Windows hard disk - reading Windows file versions in Linux

What do you do when you have an unkown Windows hard disk or partition, that you don't want to boot or that is unbootable? How do you identify the Windows version installed on the hard disk or partition? In Linux, we are used to mount the hard disk and then look at /etc/issue, /etc/redhat-release or something similar. You can even see the kernel version in the file names of the installed kernel images in /boot. But for a Windows OS? Well, you could look at the version of ntoskrnl.exe, for instance. Here are the version numbers for different versions of Windows [1]: 4.x: NT 4.x 5.0: Windows 2000 5.1: Windows XP 5.2: Windows 2003 Server (and R2), Windows XP 64-bit 6.0: Windows Vista, Server 2008 6.1: Windows 7, Server 2008 R2 6.2: Windows 8, Server 2012 6.3: Windows 8.1, Server 2012 R2 10.0: Windows 10, Server 10  So just mount the hard disk/partition and then look for C:\Windows\System32\ntoskrnl.exe. But how do you read the version number of a Portable Executable (PE) f...

Laptop touchpad stops working after suspend

The MSI GE60 Laptop has an Elantech touchpad that has always had some problems working in Linux after suspending and resuming the laptop. Edit: Found some notes. It seems to have worked fine in Fedora 18, but in Fedora 19 after a synaptics driver update (xorg-x11-drv-synaptics-1.7.1-3.fc19.x86_64) it went totally nuts. Edge scrolling stopped working and after suspend/resume, the touchpad notification icon was flashing over the GDM login prompt, alternating with the on and off icon image. The touchpad was also turned off after reboot and couldn't be turned on except for in the Gnome system settings. After a few updates, some of the problems were fixed, except for the problem that it is turned off after suspend/resume. At least now with Fedora 20, which is currently installed on the laptop, the touchpad always stops working when resuming from suspend, and the hardware button to turn on doesn't affect its state. It is using the psmouse kernel driver and synaptics in Xorg: ...

Commercial software on Linux - RAR

I found that I had an old registration key for WinRAR laying around. Since I don't use Windows any more at home, I checked and found that there is indeed a commercial Linux version of the software available nowadays. RAR is a proprietary archive format that was widely used in the 90's and the next decade when the Internet became a popular place to share software and media files. It has better compression ratio than ZIP, has strong encryption and very good error recovery capabilities. I have some memories from my time as a student of keeping a WinRAR binary on a floppy and use it to decompress and compress files transferred from and to the Internet. I'm not going to debate over FOSS vs. commercial software in this post. If we weigh in such arguments, there are no reasons to use anything else than the LGPL licensed 7Z (p7zip) or tar with bzip2, gzip or xz (and their parallel variants), but that was not the point of this post. There is also a freeware unrar program and l...

Preventing normal users from Shutting Down or Rebooting PC

The default policy in linux is often that normal users can shut down or reboot a PC, even if other people are logged in. When using a desktop PC as a server or if you often leave your applications open, you don't want that to happen. This is a question that comes up many times on the Internet. The problem is that the components in linux change and not every distribution uses the same components. In linux, only root has the power to shut down or reboot. Many linux distributions use Policykit for rules to override this and let the normal users shut down and reboot. In Fedora 21, to override the default rules, create a new rule with the following command: sudo nano /etc/polkit-1/rules.d/60-noreboot_norestart.rules  Paste the following text: polkit.addRule(function(action, subject) {     if (action.id == "org.freedesktop.login1.reboot" ||         action.id == "org.freedesktop.login1.reboot-multiple-sessions" ||   ...

Hard disk Firmware update on the Linux command line

Sometimes you will find that your hard disk is slow, or there are some other issues with disk performance. If you are lucky, the disk is not broken. It could have some firmware bugs, and if you are even more lucky, the manufacturer could have issued a firmware update. I've updated several hard disk firmwares in the past. Usually you have to use a boot disk with DOS or something to update the firmware. Why updating firmware? One of my hard disks in the past needed a new firmware because it was dropping out from a RAID controller. It began working fine after the firmware update. The latest hard disk that needed firmware update was Seagate 15k.7 ST3450857SS SAS. I noticed that the disks sometimes slowed down during writes and even stalled. I use two 450GB disks in software RAID 1. By googling I found that there were other people having similar problems with the same disk and that there were actually a firmware update available from Seagate. Also Dell, HP and IBM seems to ha...

Using IBM ServeRAID M1015 card in Linux

Bild
The FusionMPT SAS2 based cards by LSI are cheap RAID cards that perform well in RAID 0 and 1 under Linux with SSDs and ZFS arrays. They are used in many 1U servers with one or two disks. They are also a popular SAS 6.0 / SATA III controllers for enthusiasts. You can get them cheap on ebay. Before SATA III was common on motherboards, this was THE card to get. It can still be useful if you need SAS disks or additional disks or have a need for disk enclosures. It is identical to the LSI MegaRAID SAS 9220-8i. The same hardware is also used in LSI 9240 and LSI 9211. It is possible to use the BIOS from another card (crossflashing) to change the features of the card. There are a few different BIOS files you can use. Specifications:  Official LSI information 8-lane, 5 GT/s PCI Express 2.0 Identical to LSI 9240-8i card 6 Gb/s per port Two x4 internal SFF-8087 connectors Controller LSISAS2008 Low cost SATA+SAS RAID solution RAID levels 0, 1, 5, 10, 50 and JBOD mode >...