Sunday, 29 April 2012

Linux: VNC connection to OpenSuse (and RedHat world)


VNC connection with Gnome systems in the RedHat world is easy. Just search in the Gnome menu for the Remote Desktop setting (different location depending on distribution, usually in systems settings or administration or accessories or likewise). Ignore any VNC application for now. On the system you want to remote-control, click on the necessary settings allowing remote view and control of the desktop; probably choose that the connection must be confirmed or setup a password.

Firewall needs to be disabled or configured accordingly.

On the system to be in control (remote system) just type in a terminal:

#vncviewer :0

You can see the local user’s typing and mouse movement on the screen and can interfere!


If the remote system is OpenSuse (i.e. 11.1) the process is the same. But if the system to-be-controlled is OpenSuse (problem occurred with 11.1 32-bit) then more work is necessary.

Also make sure the “vino” software package and other remote control packages are installed on the system (use Yast2 software manager to search, type “remote”). Package names depend on version number.

1) Switch off firewall or configure accordingly.
2) In Yast2 settings search the remote control server and configure it to allow for remote connections
3) In Yast2 search for the local security settings and allow for remote start of GUI and remote access (takes testing out which setting is really needed here to re-fine this procedure).
4) Type
# vncserver
It will say:
You will require a password to access your desktops.

Type the password.
It will then say:

Would you like to enter a view-only password (y/n)? n
New 'X' desktop is suselinux:1

Creating default startup script /root/.vnc/xstartup
Starting applications specified in /root/.vnc/xstartup
Log file is /root/.vnc/suselinux:1.log


5) change startup script:
# vi .vnc/xstartup
You will see:

#!/bin/sh \
xrdb $HOME/.Xresources
xsetroot -solid grey
xterm -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &
twd &

Replace twd or whatever desktop is chosen there by “gnome-session” or “startkde” depending on what is your preference.

6) Kill current vncserver:
# vncserver -kill :1

7) Start new vnc server:
# vncserver

You can try to access the target system with # vncviewer

If you choose  #vncviewer  :2  or likewise you might get other sessions with simpler GUIs, especially if there was a problem starting up Gnome or KDE for remote access.

Thursday, 26 April 2012

Virtual stuff: VM machine refuses to get NIC added

On RedHat 6.2 64-bit adding a network card via add hardware ->Host device -> PCI ->05:10:0 Interface eth*(82576 Virtual Function) has led to a nasty error when starting the virtual machine:


Error starting domain
Unable to read from monitor
Connection reset by peer


...Traceback...:
File .../asyncjob.py: line 44, in cb_wrapper

etc...


Solution was to upgrade kernel to 2.6.35.13 (http://kernel.org, take over old config and re-compile it).


Another solution is said to be to edi
kvm_iommu_ap_guest.conf and set the option
kvm_allow_unsafe_assigned_interrupts=1



I did not try it out by myself, sounds like the conf file is in /etc/modprobe.d or wherever. I just tried out the kernel upgrade which worked.




There are a lot of similar issues out there in the field and some other solutions:



It has been found in Fedora 12  and it was expected to be solved in Fedora 14 or later (not sure if solved or not).

Here is the Fedora description in RedHat Bug database:  https://bugzilla.redhat.com/show_bug.cgi?id=573850

Fedora lists such phenomenon as a known-problem here:  https://fedoraproject.org/wiki/How_to_debug_Virtualization_problems#PCI_device_assignment (scroll down above last paragraph).


Fedora suggests the following workarounds:

Quote start:

If that isn't sufficient, onemay want to try the following:


This also happens on Ubuntu, in this case they suggest an upgrade of the "libvirt" library (to 0.97-2) somewhere.


Tuesday, 12 July 2011

Backing up a Linux file system flash disk

Let us assume you possess a USB flash disk with a Linux file system. Mine even had a little two partition RedHat Linux system on it to startup a network device. Never mind the details, it had an ext3 file system on it.

So how to make a backup?

You plug in the flash disk, but you do not mount it! We assume the flash disk will be called /dev/sdb on your system (you can check that with #fdisk -l)

Never type the #, it just indicates a command line

#dd if=/dev/sdb conv=sync,noerror bs=64K | gzip -c > yourimage.img.gz

Notably some distributions may need a small k in 64K (try it out). OpenSuse is fine like this.

To make sure you can copy the mater boot record, but you should not need it;

#dd if=/dev/sdb of=yourimage_mbr.img bs=512 count=1

And be very careful with the dd command, it can easily destroy all data on your disks. If you feel the urge to type dd .... of=/dev/sda or something like that than take a cold shower and do NOT to it, otherwise your HDDs are screwed up.

How to write the backup to restore the disk?

You may want to make the flash disk empty with #fdisk /dev/sdb and use p to print the partition table and then d to delete all partitions.

#gzip -cd ./yourimage.img.gz | dd of=/dev/sdb

Be very careful here to write to the correct disk! Here our empty flash disk is /dev/sdb.
 Otherwise you destroy all data on the target disk!

Reading and writing takes very long, so if you want to see the progress open another terminal window and type:


#pkill -USR1 -x dd

Assuming you have only one dd application running. Otherwise "-x dd" can be replaced by the process number.

The dd process will show you its status.

Monday, 14 February 2011

Popcorn as Notebook protection

It seems some people are referring to the foam chips which are used to protect fragile devices when sending them by mail as "popcorn". Unfortunately a customer sending in his laptop to tech support had taken this literally. It was quite a surprise for the tech guys here to find popcorn all over and in the laptop. The little crumbs and salt or sugar particles are not the best for a computer of course.


And inside is a real laptop computer!

All you need is a coke and install that video player...

Quite a surprise, but not as good as this huge BUG we had a while ago.... (LINK).

Wednesday, 25 August 2010

Really erasing Linux from XP/Linux dual-boot system


Still want to get rid of Suse?

In advance you have removed the Linux (tested with openSuse 11.1) partitions from XP HDD manager and end up with the Grub cursor instead of booting into Windows.


Boot with XP CD and press r finally to go into recovery console.
Select your OS and type:

fixboot C:
fixmbr
bootcfg /rebuild



Just press enter when being asked questions.


XP will probably still not start and the computer should say "missing OS" or similar.

Now boot with the "SPFBoot_Disk" (LINK leads to ISO file) and type "fdisk" without the "." Say yes to large OS support.
Then select item (2). Then select which partition should be active (number), usually that is the first one (1).
You can take a look what you have on your disk, if you have 1:NTFS and 2:FAT and your XP is an NTFS partition you must clearly choose 1.


The problem is usually Linux removal leaving two partitions active/bootable, which this procedure cures (it should leave only C:/ active).

That should fix XP bootup.

Note: The SFP bootdisk is Chinese-traditional, but should be working for you if you follow the instructions above. It should be open Software, but I could not find the English version any more. Notify me if you have objections of posting the software here.

Wednesday, 9 June 2010

Diskless Linux cluster with Linpack benchmark software






Linux, Networking, Thermal testing:

There are basically two ways of setting up a -diskless- Linux cluster, one is by preparing an image for the diskless clients which is resting on the server and the second way is to directly share the Linux file system of the server. Here, we follow the second way.
Linpack is a benchmarking software which can also be used very well to create thermal stress to the machine, like for testing in a temperature chamber, if the parameters are adjusted well.

So you can picture one server with an HDD and the clients (here only having command line) seeming to be independent workstations. You can also use the Linux Desktop GUI on the clients, in which case you have to adjust the xorg.conf file in the /etc/X11/ folder (here OpenSuse Linux). Note: You can put the xorg.conf file there even if there is none for standard (in more recent OpenSuse versions).

Diskless Linux and Linpack PowerPoint presentation
Diskless Linux and Linpack HOW TO PowerPoint (v0.6)
Diskless Linux and Linpack ... startup cluster

Monday, 1 February 2010

Double-booting Centos and openSUSE



I had installed openSUSE 11.1 on hda7 (root) and hda8 (home). The partition hda1 was empty, as it once had contained a Windows installation which was now obsolete. I removed the partition (you can use fdisk to do that of course***) and then installed CentOS 5.3 on hda1. Swap partition is hda6 but it seems only openSUSE is using that one right now (must look into that).

I took over default settings for the installation and finally only CentOS was shown by grub. However you can easily make Suse bootable as well:

1. Mount the Suse partition from a CentOS terminal:
for me that was (being root):
#mkdir /suse
#mount /dev/hda7 /suse
#vi /suse/boot/grub/menu.lst

Now leave the editor vi open and open a second terminal being root as well:

#vi /boot/grub/menu.lst

Copy what it says about the Suse standard boot entry from the first terminal and paste that into the second terminal. Now you have two boot entries. Should work fine.

*** or remove it during CentOS intall. Do not reuse the Windows partition.

Troubleshooting: After doing an automatic kernel update on /dev/hda7 (openSuse), the system could not bootup Suse anymore. Reason: the copied entry in /boot/grub/menu.lst (on the CentOS partition /dev/hda1 and not on the Suse partition!) was not updated automatically and so the VMLINUZ-x.y.z file could not be found.
Remedy: Bootup CentOS and correct the entry, taking /suse/boot/grub/menu.lst (that is /dev/hda7) as a blueprint.