tag:blogger.com,1999:blog-45014965654462486782024-03-05T20:05:02.908-08:00computer science & coAnonymoushttp://www.blogger.com/profile/04196877446003618271noreply@blogger.comBlogger18125tag:blogger.com,1999:blog-4501496565446248678.post-59911918694791633462016-01-04T06:56:00.000-08:002016-01-04T06:59:00.120-08:00Nagios Core 4 service failed on CentOS 7 (EPEL release) Just a quick post to fix problems with Nagios Core 4 service under CentOS 7.<br/>
<br/>
After installing Nagios Core 4 and making some basic configurations the service cannot be started on CentOS 7.<br/>
<br/>
Full description of the Nagios service:<br/>
<br/>
Name : nagios<br/>
Arch : x86_64<br/>
Version : 4.0.8<br/>
Release : 1.el7<br/>
<br/>
CentOS Linux release 7.2.1511 (Core), yum packages updated today on January 4th, 2016.<br/>
<br/>
<br/>
Running the nagios.service gives the following error:<br/>
<br/>
<code>
systemctl status nagios<br/>
● nagios.service - Nagios Network Monitoring<br/>
Loaded: loaded (/usr/lib/systemd/system/nagios.service; enabled; vendor preset: disabled)<br/>
Active: failed (Result: exit-code) since Mon 2016-01-04 09:32:45 EST; 7min ago<br/>
Docs: http://www.nagios.org/documentation<br/>
Process: 10738 ExecStart=/usr/sbin/nagios /etc/nagios/nagios.cfg (code=exited, status=1/FAILURE)<br/>
Process: 10736 ExecStartPre=/usr/sbin/nagios -v /etc/nagios/nagios.cfg (code=exited, status=0/SUCCESS)<br/>
Main PID: 10738 (code=exited, status=1/FAILURE)<br/>
<br/>
Jan 04 09:32:45 localhost.localdomain systemd[1]: Starting Nagios Network Monitoring...<br/>
Jan 04 09:32:45 localhost.localdomain systemd[1]: Started Nagios Network Monitoring.<br/>
Jan 04 09:32:45 localhost.localdomain systemd[1]: nagios.service: main process exited, code=exited, status=1/FAILURE<br/>
Jan 04 09:32:45 localhost.localdomain systemd[1]: Unit nagios.service entered failed state.<br/>
Jan 04 09:32:45 localhost.localdomain systemd[1]: nagios.service failed.<br/>
</code>
<br/>
Reviewing journalctl I can nail down the problem to:<br/>
<br/>
<code>
Jan 04 09:41:25 localhost.localdomain nagios[11123]: Nagios 4.0.8 starting... (PID=11123)<br/>
Jan 04 09:41:25 localhost.localdomain nagios[11123]: Local time is Mon Jan 04 09:41:25 EST 2016<br/>
Jan 04 09:41:25 localhost.localdomain nagios[11123]: qh: Failed to init socket '/var/log/nagios/rw/nagios.qh'. bind() failed: No such file or directory<br/>
Jan 04 09:41:25 localhost.localdomain nagios[11123]: Error: Failed to initialize query handler. Aborting<br/>
</code>
<br/>
Doing an Internet search got me to the following solution:<br/>
<a href="https://bugzilla.redhat.com/show_bug.cgi?id=1291734">bugzilla.redhat.com</a><br/>
<br/>
Here is my detailed steps on how to fix this:<br/>
<br/>
What happened?<br/>
Currently Nagios EPEL version 4.0.8 refuses to start because it cannot create and access its standard socket file located at /var/log/nagios/rw/nagios.qh due to some missing Nagios SELinux policy rule on CentOS 7. <br/>
<br/>
This should be fixed soon (nagios-4.0.8-2.el7 ?) but until then we need to build our own local Nagios Policy module fix:<br/>
<br/>
Open the following file vi /tmp/nagios-socket.te and put in the following content:<br/>
<code>
module nagios-socket 1.0;<br/>
require {<br/>
type nagios_t;<br/>
type nagios_log_t;<br/>
class sock_file { write create unlink };<br/>
class unix_stream_socket connectto;<br/>
}<br/>
allow nagios_t nagios_log_t:sock_file { write create unlink };<br/>
allow nagios_t self:unix_stream_socket connectto;<br/>
</code>
<br/>
Afterwards install the policycoreutils-python YUM package if not available already on your system and type the following commands to compile, build and install the new local Nagios policy module before restarting Nagios – which should work afterwards:<br/>
<code>
yum install policycoreutils-python -y<br/>
cd /tmp;checkmodule -M -m -o nagios-socket.mod nagios-socket.te<br/>
semodule_package -o nagios-socket.pp -m nagios-socket.mod <br/>
semodule -i nagios-socket.pp<br/>
install -d -m 755 -o nagios -g nagios /var/log/nagios/rw<br/>
systemctl restart nagios && systemctl status nagios<br/>
</code>
<br/>
Done!<br/>
Anonymoushttp://www.blogger.com/profile/04196877446003618271noreply@blogger.com0tag:blogger.com,1999:blog-4501496565446248678.post-70497239713291368052015-07-02T04:37:00.001-07:002015-07-02T04:37:21.366-07:00Installing TSM Tivoli Client 6.4 or 7.1 on RHEL7 / CentOS 7 with Failed dependencies: libc.so.6 is needed Today I got a problems installing TSM Tivoli Client 6.4 and also 7.1 on CentOS 7.<br/>
Commands I run<br/>
<blockquote>
rpm -Uhv gskcrypt64-8.0.14.14.linux.x86_64.rpm<br/>
rpm -Uhv gskssl64-8.0.14.14.linux.x86_64.rpm<br/>
rpm -Uhv TIVsm-API64.x86_64.rpm<br/>
</blockquote>
doing than<br/>
<blockquote>
rpm -Uhv TIVsm-APIcit.x86_64.rpm <br/>
</blockquote>
<br/>
gives error message<br/>
<blockquote>
error: Failed dependencies:<br/>
libc.so.6 is needed by TIVsm-APIcit-6.4.0-0.x86_64<br/>
libc.so.6(GLIBC_2.0) is needed by TIVsm-APIcit-6.4.0-0.x86_64<br/>
libc.so.6(GLIBC_2.1) is needed by TIVsm-APIcit-6.4.0-0.x86_64<br/>
libc.so.6(GLIBC_2.1.3) is needed by TIVsm-APIcit-6.4.0-0.x86_64<br/>
libc.so.6(GLIBC_2.2) is needed by TIVsm-APIcit-6.4.0-0.x86_64<br/>
libc.so.6(GLIBC_2.3) is needed by TIVsm-APIcit-6.4.0-0.x86_64<br/>
libc.so.6(GLIBC_2.3.2) is needed by TIVsm-APIcit-6.4.0-0.x86_64<br/>
libdl.so.2 is needed by TIVsm-APIcit-6.4.0-0.x86_64<br/>
libdl.so.2(GLIBC_2.0) is needed by TIVsm-APIcit-6.4.0-0.x86_64<br/>
libdl.so.2(GLIBC_2.1) is needed by TIVsm-APIcit-6.4.0-0.x86_64<br/>
libgcc_s.so.1 is needed by TIVsm-APIcit-6.4.0-0.x86_64<br/>
libgcc_s.so.1(GCC_3.0) is needed by TIVsm-APIcit-6.4.0-0.x86_64<br/>
libgcc_s.so.1(GLIBC_2.0) is needed by TIVsm-APIcit-6.4.0-0.x86_64<br/>
libm.so.6 is needed by TIVsm-APIcit-6.4.0-0.x86_64<br/>
libnsl.so.1 is needed by TIVsm-APIcit-6.4.0-0.x86_64<br/>
libpthread.so.0 is needed by TIVsm-APIcit-6.4.0-0.x86_64<br/>
libpthread.so.0(GLIBC_2.0) is needed by TIVsm-APIcit-6.4.0-0.x86_64<br/>
libpthread.so.0(GLIBC_2.1) is needed by TIVsm-APIcit-6.4.0-0.x86_64<br/>
libpthread.so.0(GLIBC_2.2) is needed by TIVsm-APIcit-6.4.0-0.x86_64<br/>
libpthread.so.0(GLIBC_2.3.2) is needed by TIVsm-APIcit-6.4.0-0.x86_64<br/>
libstdc++.so.5 is needed by TIVsm-APIcit-6.4.0-0.x86_64<br/>
libstdc++.so.5(CXXABI_1.2) is needed by TIVsm-APIcit-6.4.0-0.x86_64<br/>
libstdc++.so.5(GLIBCPP_3.2) is needed by TIVsm-APIcit-6.4.0-0.x86_64<br/>
libstdc++.so.5(GLIBCPP_3.2.2) is needed by TIVsm-APIcit-6.4.0-0.x86_64<br/>
</blockquote>
and after resolving first error I got<br/>
<blockquote>
libgcc_s.so.1 is needed <br/>
...
</blockquote>
and than I got
<blockquote>
libstdc++.so.5 is needed <br/>
...
</blockquote>
this also is true for trying tsm tivoli 7.1 client version<br/>
Solution was to install missing Linux 32-bit libraries [1] as tsm relies on them
<blockquote>
yum install libgcc.i686<br/>
yum install libstdc++.i686<br/>
yum install compat-libstdc++-33-3.2.3-72.el7.i686<br/>
</blockquote>
<br/>
<br/>
sources<br/>
[1] http://www-01.ibm.com/support/docview.wss?uid=swg21608859<br/>
Anonymoushttp://www.blogger.com/profile/04196877446003618271noreply@blogger.com0tag:blogger.com,1999:blog-4501496565446248678.post-5134734860229609962015-06-29T02:31:00.000-07:002015-06-29T02:31:05.421-07:00Fixing installation errors for installing CentOS 7 on Mac Mini 2011 with USB mediaThis morning I tried to install CentOS7 on an Apple MacMini from 2011 with a USB stick.
After grub and the initram fs has been loading there was the following error<br/>
<blockquote>
dracut-initqueue[639]: Warning: Could not boot.
dracut-initqueue[639]: Warning: /dev/root does not exist.
Starting Dracut Emergency shell.
</blockquote>
This error often occurs by a mismatched usb media label and can easily be resolved by using UUID instead of label in grub2 initram fs kernel arguments [1].<br/>
<br/>
The following steps have been taken form unix stackexchange on how to fix this:<br/>
<br/>
1. starting from the Dracut Emergency shell, find out which device name is your installation usb stick.<br/>
2. get the uuid for this device name, write it down.<br/>
3. reboot and replace grub2 initram fs kernel arguments from using LABEL to UUID.<br/>
The exact procedure can be found <a href="http://unix.stackexchange.com/a/209515">here</a><br/>
<br/>
4. start the installation with the changed kernel arguments, this is a bit tricky because running a changed grub2 command line needs the keyboard combination ctrl-x which does not work on a mac computer [2]. <br/>This also does not work when using a PC keyboard on this mac. <br/>Solution was to use a PC keyboard and type F10 instead of CTRL-X work the same on mac to run a changed command line. I tried pressing F10 on a mac keyboard (fn+F10 key) but did not work. <br/>But using a PC keyboard on the mac and hitting F10 worked and booted up the graphical installer.<br/>
<br/>
<br/>
<br/>
sources:<br/>
[1] http://unix.stackexchange.com/a/209515<br/>
[2] https://bugs.launchpad.net/ubuntu/+source/grub2/+bug/722950<br/>Anonymoushttp://www.blogger.com/profile/04196877446003618271noreply@blogger.com0tag:blogger.com,1999:blog-4501496565446248678.post-71936641315799067462015-05-11T01:36:00.002-07:002015-05-11T01:42:49.687-07:00Resolving DRBD error lk_bdev_save (/var/lib/drbd/drbd-minor-0.lkbd) failed: No such file or directory on centos 7 systemHi everyone!
Just a small post here because I have not found anything about this error on the web (at least not on a english-speaking website ;) )
I recently installed and configured drbd on a centos 7 machine.
drbdadm came in version 8.9.2 (api:1)
GIT-hash: de9236084d57a09160b366e5fdf5b481c5cc163d build by mockbuild@, 2015-04-10 06:40:59
when I tried to create my resource I got the following error
<!-- HTML generated using hilite.me --><div style="background: #ffffff; overflow:auto;width:auto;border:solid gray;border-width:.1em .1em .1em .8em;padding:.2em .6em;"><pre style="margin: 0; line-height: 125%"><span style="color: #888888">$drbdadm create-md drbd01</span>
</pre></div>
error msg:
<!-- HTML generated using hilite.me --><div style="background: #ffffff; overflow:auto;width:auto;border:solid gray;border-width:.1em .1em .1em .8em;padding:.2em .6em;"><pre style="margin: 0; line-height: 125%"><span style="color: #888888">initializing activity log<br/>
NOT initializing bitmap<br/>
Writing meta data...<br/>
lk_bdev_save(/var/lib/drbd/drbd-minor-0.lkbd) failed: No such file or directory<br/>
New drbd meta data block successfully created.<br/>
lk_bdev_save(/var/lib/drbd/drbd-minor-0.lkbd) failed: No such file or directory</span>
</pre></div>
searching the internet I found nothing about it so I just looked at the error and resolved it using
<!-- HTML generated using hilite.me --><div style="background: #ffffff; overflow:auto;width:auto;border:solid gray;border-width:.1em .1em .1em .8em;padding:.2em .6em;"><pre style="margin: 0; line-height: 125%"><span style="color: #888888">mkdir /var/lib/drbd/</span></pre></div>
I think the rpm package from ELRepo I installed just missed that command.
Hope this helps anyoneAnonymoushttp://www.blogger.com/profile/04196877446003618271noreply@blogger.com0tag:blogger.com,1999:blog-4501496565446248678.post-77672725928578883382014-08-13T09:49:00.003-07:002015-03-13T01:33:03.839-07:00<h1>How to install Ubuntu 14.04 on an old Macbook 2.1 EFI.</h1>
UPDATE on 13/3/2015:
this instruction method is no longer valid for newer Ubuntu versions > 14.04 (e.g. 14.10)! I will write a follow up soon on this you can find here.
There are lots of instructions and tutorials out there on how to install Ubuntu on Mac computers. Most dont work as stated (mostly because it is not easy to make a bootable ubuntu usb boot stick with a mac), so I wrote this tutorial which I think is the most easy one out there!<br/>
<br/>
This post is basically just a short reminder for myself on how to install Ubuntu 14.04 on Macbook 2.1 EFI.
Maybe it is useful for other people as well.<br/>
<br/>
<b>Requirement/Prequesites:</b><br/>
<br/>
Macbook with Mac Os X >=10.6, the full harddisk is occupied by Mac Os X.<br/>
<br/>
1. start Mac Os X, open Disk utility, shrink Mac Os X partition so much that you can create another two partitions, one for Linux root with at least 30 gb and another one for swap, rule of thumb: available RAM memory equals two. For me it was 2 gb * 2 = 4 gb. Choose Mac Os X journaling as filesystem for the new two partitions.<br/>
2. After partitioning you should now have three partitions, my setup was 65 gb total (SSD): 30 gb for Mac Os X, 30 gb for Linux (root paritions), 4 gb for the swap partition<br/>
3. Install rEFIt, power off computer (do not just restart) to see if rEFIt logo is booting up, if not try again powering off.<br/>
4. Boot back into Mac Os X and download Ubuntu 14.04 64 bit AMD for Mac ISO<br/>
5. download ISO2USB-Efi-Loader and prepare an USB stick with the ISO from step 3 (details here: <a href="http://www.online-pixel.com/bootfehigen-usb-stick-mit-ubuntu-unter-apple-osx-erstellen-ohne-das-terminal/">here (in german)</a> use the boot64bit efi file on the stick. Use google translate if you cannot understand German.<br/>
6. reboot and use the Mac ´ALT´ key during startup and choose the usb-efi stick<br/>
7. install ubuntu, choose ´something else´ as the installation type, then use the linux root partition from step 1. (mine is called /dev/sda4) and format it as ext4 and select root (/). Also define the swap partition from step 1. Most importantly in this step is to select the root parititon for the boot loader (e.g. /dev/sda4) but never NEVER use the whole disk for installation of it!!! (never use the full disk e.g. /dev/sda use a partition e.g. /dev/sda4)<br/>
8. at the end of the installation the installer says it cant install the bootloader at /dev/sda4, click on ´ignore this and continue installation´ (dont install on /dev/sda - the full disk etc.)<br/>
9. after successfully install ubuntu, click on ´test live system´<br/>
10. prepare a boot-repair-disk on your usb stick, install boot-repair as stated <a href="https://help.ubuntu.com/community/Boot-Repair">here</a> (on a usb stick!, you can download the iso and use it similar to step 5 <a href="http://sourceforge.net/p/boot-repair-cd/home/Home/" >here</a>), reboot and start the stick than click on ´Recommended repair´<br/>
11. done! reboot. now a tux symbol will appear at the rEFIt boot menue. Click on it to start ubuntu!<br/>
Anonymoushttp://www.blogger.com/profile/04196877446003618271noreply@blogger.com0tag:blogger.com,1999:blog-4501496565446248678.post-2850885151272715442014-02-11T02:49:00.002-08:002014-02-11T02:49:47.776-08:00Fixing package installation problems 'failed to install' in Architect (architect 0.9.3-10) under Ubuntu 12.04
<h2>Fixing package installation problems 'failed to install' in <a href="http://www.openanalytics.eu/">Architect</a> 0.9.3-10 under Ubuntu 12.04</h2>
<p>for a project I needed "trace into debugging" functionalities in R so I installed the architect 0.9.3-10 deb package within Ubuntu 12.04 using the following <a href="http://deb.openanalytics.eu/howto.html" >instruction</a> which is a standalone eclipse built using the StatEt plugin</p>
<p>started the program, switched in the Embedded R.3.0.2 console typed
<!-- HTML generated using hilite.me --><div style="background: #ffffff; overflow:auto;width:auto;border:solid gray;border-width:.1em .1em .1em .8em;padding:.2em .6em;"><pre style="margin: 0; line-height: 125%"><span style="color: #888888">source("http://bioconductor.org/biocLite.R") </span>
</pre></div>
to install some additional packages I needed for debugging a specific project
</p>
<p>
got following error
</p>
<!-- HTML generated using hilite.me --><div style="background: #ffffff; overflow:auto;width:auto;border:solid gray;border-width:.1em .1em .1em .8em;padding:.2em .6em;"><pre style="margin: 0; line-height: 125%"><span style="color: #888888">The downloaded source packages are in</span>
<span style="color: #888888"> ‘/tmp/RtmpU46P2P/downloaded_packages’</span>
<span style="color: #888888">'biocLite.R' failed to install 'BiocInstaller', use</span>
<span style="color: #888888"> 'install.packages("BiocInstaller",</span>
<span style="color: #888888"> repos="http://www.bioconductor.org/packages/2.13/bioc")'</span>
<span style="color: #888888">Warning message:</span>
<span style="color: #888888">In install.packages("BiocInstaller", repos = a["BioCsoft", "URL"]) :</span>
<span style="color: #888888"> installation of package ‘BiocInstaller’ had non-zero exit status</span>
</pre></div>
<p>also tried out the suggested install.packages("BiocInstaller",repos="http://www.bioconductor.org/packages/2.13/bioc")
which did not work either</p>
<p>
someone suggested that the solution is running R in administrative mode in order to install packages, so I wrote down the R_HOME path from within R
</p>
<!-- HTML generated using hilite.me --><div style="background: #ffffff; overflow:auto;width:auto;border:solid gray;border-width:.1em .1em .1em .8em;padding:.2em .6em;"><pre style="margin: 0; line-height: 125%"><span style="color: #888888"> > R.home()</span>
<span style="color: #888888">[1] "/opt/architect/stable/20131204221312/plugins/eu.openanalytics.architect.r.server.gtk.linux.x86_64_0.9.3.201310150807/R"</span>
</pre></div>
<p>
open a terminal and login as root
</p>
<!-- HTML generated using hilite.me --><div style="background: #ffffff; overflow:auto;width:auto;border:solid gray;border-width:.1em .1em .1em .8em;padding:.2em .6em;"><pre style="margin: 0; line-height: 125%"><span style="color: #996633">$ </span>sudo su
<span style="color: #888888"># set R path extracted from R (R.home()) for convenience </span>
<span style="color: #996633">$ </span><span style="color: #007020">export </span><span style="color: #996633">MY_R</span><span style="color: #333333">=</span><span style="background-color: #fff0f0">"/opt/architect/stable/20131204221312/plugins/eu.openanalytics.architect.r.server.gtk.linux.x86_64_0.9.3.201310150807/R"</span>
<span style="color: #996633">$ </span><span style="color: #007020">cd</span> <span style="color: #996633">$MY_R</span>
<span style="color: #888888">#run the command line R</span>
<span style="color: #996633">$ </span>./bin/R
</pre></div>
<p>got me the following error</p>
<!-- HTML generated using hilite.me --><div style="background: #ffffff; overflow:auto;width:auto;border:solid gray;border-width:.1em .1em .1em .8em;padding:.2em .6em;"><pre style="margin: 0; line-height: 125%">./bin/R: line 236: /opt/architect/architect-stable/plugins/eu.openanalytics.architect.r.server.gtk.linux_stable/R/etc/ldpaths: No such file or directory
ERROR: R_HOME <span style="color: #333333">(</span><span style="background-color: #fff0f0">'/opt/architect/architect-stable/plugins/eu.openanalytics.architect.r.server.gtk.linux_stable/R'</span><span style="color: #333333">)</span> not found
</pre></div>
<p>i opened the R shell command and saw that it sets R_HOME_DIR in line 4</p>
<!-- HTML generated using hilite.me --><div style="background: #ffffff; overflow:auto;width:auto;border:solid gray;border-width:.1em .1em .1em .8em;padding:.2em .6em;"><pre style="margin: 0; line-height: 125%"><span style="color: #996633">$ </span>less bin/R
<span style="color: #888888"># line 4: R_HOME_DIR="/opt/architect/architect-stable/plugins/eu.openanalytics.architect.r.server.gtk.linux_stable/R"</span>
</pre></div>
<p>if i do a </p>
<!-- HTML generated using hilite.me --><div style="background: #ffffff; overflow:auto;width:auto;border:solid gray;border-width:.1em .1em .1em .8em;padding:.2em .6em;"><pre style="margin: 0; line-height: 125%">ls /opt/architect/architect-stable/plugins/eu.openanalytics.architect.r.server.gtk.linux_stable/
</pre></div>
<p>i got a</p>
<!-- HTML generated using hilite.me --><div style="background: #ffffff; overflow:auto;width:auto;border:solid gray;border-width:.1em .1em .1em .8em;padding:.2em .6em;"><pre style="margin: 0; line-height: 125%">No such file or directory<span style="color: #FF0000; background-color: #FFAAAA"></span> error
</pre></div>
<p>if i do a </p>
<!-- HTML generated using hilite.me --><div style="background: #ffffff; overflow:auto;width:auto;border:solid gray;border-width:.1em .1em .1em .8em;padding:.2em .6em;"><pre style="margin: 0; line-height: 125%">ls -al /opt/architect/architect-stable/plugins/eu.openanalytics.architect.r.server.gtk.linux_stable
</pre></div>
<p>i see that the dynamic link is misplaced</p>
<!-- HTML generated using hilite.me --><div style="background: #ffffff; overflow:auto;width:auto;border:solid gray;border-width:.1em .1em .1em .8em;padding:.2em .6em;"><pre style="margin: 0; line-height: 125%"> -> /opt/architect/stable/20131204221312/plugins/eu.openanalytics.architect.r.server.gtk.linux_0.9.3.201310150807
</pre></div>
<p>which does not exist!!!</p>
<p>the right one can be found in the directory /opt/architect/stable/20131204221312/plugins/</p>
<!-- HTML generated using hilite.me --><div style="background: #ffffff; overflow:auto;width:auto;border:solid gray;border-width:.1em .1em .1em .8em;padding:.2em .6em;"><pre style="margin: 0; line-height: 125%">/opt/architect/stable/20131204221312/plugins/eu.openanalytics.architect.r.server.gtk.linux.x86_64_0.9.3.201310150807
</pre></div>
<p>if you compare both, you see that the correct one has the substring 'x86_64' which the wrong one did not have, so there seems something was wrong with a command such as 'uname' (maybe they used a parameter for uname which was not available on all platforms etc. when generating the script)</p>
<p>to fix this remove dynamic link</p>
<!-- HTML generated using hilite.me --><div style="background: #ffffff; overflow:auto;width:auto;border:solid gray;border-width:.1em .1em .1em .8em;padding:.2em .6em;"><pre style="margin: 0; line-height: 125%">rm /opt/architect/architect-stable/plugins/eu.openanalytics.architect.r.server.gtk.linux_stable
</pre></div>
<p>and point to true location</p>
<!-- HTML generated using hilite.me --><div style="background: #ffffff; overflow:auto;width:auto;border:solid gray;border-width:.1em .1em .1em .8em;padding:.2em .6em;"><pre style="margin: 0; line-height: 125%">ln -s /opt/architect/stable/20131204221312/plugins/eu.openanalytics.architect.r.server.gtk.linux.x86_64_0.9.3.201310150807 /opt/architect/architect-stable/plugins/eu.openanalytics.architect.r.server.gtk.linux_stable
</pre></div>
<p>afterwards R is running fine and I can install what I want e.g. using source("http://bioconductor.org/biocLite.R") command</p>
<!-- HTML generated using hilite.me --><div style="background: #ffffff; overflow:auto;width:auto;border:solid gray;border-width:.1em .1em .1em .8em;padding:.2em .6em;"><pre style="margin: 0; line-height: 125%"><span style="color: #996633">$ </span>bin/R
Result:
R version 3.0.2 <span style="color: #333333">(</span>2013-09-25<span style="color: #333333">)</span> -- <span style="background-color: #fff0f0">"Frisbee Sailing"</span>
Copyright <span style="color: #333333">(</span>C<span style="color: #333333">)</span> 2013 The R Foundation <span style="color: #008800; font-weight: bold">for </span>Statistical Computing
Platform: x86_64-unknown-linux-gnu <span style="color: #333333">(</span>64-bit<span style="color: #333333">)</span>
R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type <span style="background-color: #fff0f0">'license()'</span> or <span style="background-color: #fff0f0">'licence()'</span> <span style="color: #008800; font-weight: bold">for </span>distribution details.
Natural language support but running in an English locale
R is a collaborative project with many contributors.
Type <span style="background-color: #fff0f0">'contributors()'</span> <span style="color: #008800; font-weight: bold">for </span>more information and
<span style="background-color: #fff0f0">'citation()'</span> on how to cite R or R packages in publications.
Type <span style="background-color: #fff0f0">'demo()'</span> <span style="color: #008800; font-weight: bold">for </span>some demos, <span style="background-color: #fff0f0">'help()'</span> <span style="color: #008800; font-weight: bold">for </span>on-line <span style="color: #007020">help</span>, or
<span style="background-color: #fff0f0">'help.start()'</span> <span style="color: #008800; font-weight: bold">for </span>an HTML browser interface to help.
Type <span style="background-color: #fff0f0">'q()'</span> to quit R.
> biocLite<span style="color: #333333">(</span><span style="background-color: #fff0f0">"cellHTS2"</span><span style="color: #333333">)</span>
</pre></div>
<p>now I can install all my needed packages from the command line using sudo rights!</p>
Anonymoushttp://www.blogger.com/profile/04196877446003618271noreply@blogger.com0tag:blogger.com,1999:blog-4501496565446248678.post-76186664994776864182012-12-01T08:34:00.002-08:002012-12-01T08:37:44.601-08:00Move an existing Apple Mac Os X Installation from an iMac to White Macbook (Moving installation to different Hardware) Since we had some hardware related issues with an iMac model 2008 we had to bring it to the Apple customer service. As I knew this take some times after they got it fixed but we needed it at work I tried to migrate the existing iMac Lion installation to a white Macbook, both models from 2008.</br>
I thought this would be easy because both have similar hardware and are both from 2008.</br>
After using Disk Utility to create a complete dump from the existing iMac installation I transferred this image to the Macbook but it did not boot. It brought a "Question Mark folder icon" or the "Stop/Prohibitory sign" at boot up and stopped there.
After booting into Single User Mode I learned that it was stuck at the error message:
<!-- HTML generated using hilite.me --><div style="background: #ffffff; overflow:auto;width:auto;color:black;background:white;border:solid gray;border-width:.1em .1em .1em .8em;padding:.2em .6em;"><pre style="margin: 0; line-height: 125%">IOBluetoothHCIController
</pre></div>
So I thought maybe the iMac has a bluetooth controller which has been installed into the OS but the white macbook don't so I deleted the kext file but still not booting with the following error message appeared:
<!-- HTML generated using hilite.me --><div style="background: #ffffff; overflow:auto;width:auto;color:black;background:white;border:solid gray;border-width:.1em .1em .1em .8em;padding:.2em .6em;"><pre style="margin: 0; line-height: 125%"><span style="background-color: #fff0f0">'could not find driver for platform AHCI'</span><span style="color: #303030">.</span>
</pre></div>
So I thought maybe the kernel extensions are not compatible or the kernel is different... </br>
Messing around with mach_kernels and /System/Library/Extension folder It got me nowhere and I lost a whole business day with no results. </br>
So I tried different things but in the end I found the following solution:</br>
The iMac Lion installation was a very early one 10.7.1 and was never really updated. Also I taught that maybe I have to clean up all the systems caches because the hardware seems to be really different.</br>
So first thing I updated the iMac Lion installation to the latest Mac Os X 10.7.5 and updated all software trough the "Software Updates" program. Then I installed CCleaner and deleted all unnecessary files, languages and repaired the permissions. Then I zeroed out the free space in order to get a smaller dmg. After that I installed Onyx and cleaned out all the system caches (Kernel, Boot, etc). I repaired the permissions with this program once again. After that I created the dmg dump using Disk Utility again and installed it on the white macbook. And it worked! Now it booted up nicely and works 100%. </br>
So in the end I think it was due to some cache files which were still there from the iMac or maybe just the old operating system number.</br>
So what I have learned is if you want to transfer/migrate an existing OS X </br>installation from one mac to another tidy up the system first!!!</br>Anonymoushttp://www.blogger.com/profile/04196877446003618271noreply@blogger.com0tag:blogger.com,1999:blog-4501496565446248678.post-71413061910171421972012-11-22T08:38:00.000-08:002012-12-01T07:52:46.897-08:00Installation of Adobe Creative Suite CS5.5 failed on Mac Os X 10.7 Lion because of Font problemsToday I had to install Adobe Creative Suite CS 5.5 at work for some of my colleague on a Mac Os X 10.7 Lion system . He came to me after trying out the Trial version of CS5 on his own and since our company now has official licences for the full CS5.5, he asked me if I can help him install it because the Installer produced some kind of errors.
<br/>
I could help him fix those problems and since I haven't found any useful information about this on the net, I write down what I did in case someone finds it useful.
<br/>
So first thing I tested out was the "Adobe Creative Suite Cleaner Tool" <a href="http://www.adobe.com/support/contact/cscleanertool.html">here</a>.
The installer dialog said: "Installation failed" and "unknown error occured" or in German "Installation fehlgeschlagen", "Ein unbekannter Installationsfehler ist aufgetreten". It happened for all CS products: PS Photoshop,Illustrator and Indesign.
<br/>
So I took a look into the log files at "/Library/Logs/Adobe/Installers/" and found these suspicious lines:
<pre style="font-family:arial;font-size:12px;border:1px dashed #CCCCCC;width:99%;height:auto;overflow:auto;background:#f0f0f0;;background-image:URL(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjefv1KsRgK3g9ttxCYFmwAFmQg6H56hh5d4BFTlgkIDAVpyrBhxUwVdRvjbQiyo_ly3d0CHkU2FP72UQyJyjrFXu5grFnd6RAghRKa4pITHkuf-N7QDkG1vnxyT4d_Pa-nvhfDNqWFAKKT/s320/codebg.gif);padding:0px;color:#000000;text-align:left;line-height:20px;"><code style="color:#000000;word-wrap:normal;"> [...]
DF054: Unable to read Adobe file version for file path '/Library/Fonts/MinionPro-Medium.otf'(Seq 46)
DF024: Unable to preserve original file at "/Library/Fonts/MinionPro-Medium.otf" Error 0(Seq 46)
DF054: Unable to read Adobe file version for file path '/Library/Fonts/MinionPro-It.otf'(Seq 31)
DF024: Unable to preserve original file at "/Library/Fonts/MinionPro-It.otf" Error 0(Seq 31)
WARNING: DF054: Unable to read Adobe file version for file path '/Library/Fonts/MinionPro-Medium.otf'(Seq 46)
ERROR: DF024: Unable to preserve original file at "/Library/Fonts/MinionPro-Medium.otf" Error 0(Seq 46)
WARNING: DF054: Unable to read Adobe file version for file path '/Library/Fonts/MinionPro-It.otf'(Seq 31)
ERROR: DF024: Unable to preserve original file at "/Library/Fonts/MinionPro-It.otf" Error 0(Seq 31)
b110-imac18:src oliverpelz$ grep otf ~/Desktop/Adobe\ Photoshop\ CS5.1\ 12.1\ 11-21-2012
DF054: Unable to read Adobe file version for file path '/Library/Fonts/MinionPro-Medium.otf'(Seq 46)
DF024: Unable to preserve original file at "/Library/Fonts/MinionPro-Medium.otf" Error 0(Seq 46)
DF054: Unable to read Adobe file version for file path '/Library/Fonts/MinionPro-It.otf'(Seq 31)
DF024: Unable to preserve original file at "/Library/Fonts/MinionPro-It.otf" Error 0(Seq 31)
WARNING: DF054: Unable to read Adobe file version for file path '/Library/Fonts/MinionPro-Medium.otf'(Seq 46)
ERROR: DF024: Unable to preserve original file at "/Library/Fonts/MinionPro-Medium.otf" Error 0(Seq 46)
WARNING: DF054: Unable to read Adobe file version for file path '/Library/Fonts/MinionPro-It.otf'(Seq 31)
ERROR: DF024: Unable to preserve original file at "/Library/Fonts/MinionPro-It.otf" Error 0(Seq 31)
[..]
</code></pre>
So after some messing around with DiskUtilitys-File Permission repair tool, chmodding /Library/Fonts and single Fonts etc. and moving around those files above I could not get it to install properly.
<br/>
So in the end the solution was to completely move the Fonts folder around, so it cannot be accessed during installation, then start the installation and after it has installed everything correctly copy all the Fonts back.
<br/>
!!A word of caution: Be careful with those commands, I will not take responsibility if you wreck your Mac installation, you have to know what you do:
<br/>
<pre style="font-family:arial;font-size:12px;border:1px dashed #CCCCCC;width:99%;height:auto;overflow:auto;background:#f0f0f0;;background-image:URL(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjefv1KsRgK3g9ttxCYFmwAFmQg6H56hh5d4BFTlgkIDAVpyrBhxUwVdRvjbQiyo_ly3d0CHkU2FP72UQyJyjrFXu5grFnd6RAghRKa4pITHkuf-N7QDkG1vnxyT4d_Pa-nvhfDNqWFAKKT/s320/codebg.gif);padding:0px;color:#000000;text-align:left;line-height:20px;"><code style="color:#000000;word-wrap:normal;">
$mkdir ~/Desktop/Fonts-Backup;
$sudo mv /Library/Fonts ~/Desktop/Fonts-Backup/
# now install adobe ... after installation is done do the following thing:
$sudo mv /Library/Fonts ~/Desktop/Fonts-Backup-Adobe-fresh-installed
$sudo rsync -rav ~/Desktop/Fonts-Backup/Fonts /Library/
</code></pre>
<br/>
In the end I think the problem was that the trial version installed the fonts listed above but did something wrong with file permissions. The Adobe deinstaller did not remove those files so that it is fair enough to say that the Deinstaller does not remove 100% of the Adobe installations.
Anonymoushttp://www.blogger.com/profile/04196877446003618271noreply@blogger.com0tag:blogger.com,1999:blog-4501496565446248678.post-79980613119612957732011-08-22T01:47:00.000-07:002011-08-22T01:53:14.606-07:00How to debug Linux Init Scripts (in Ubuntu) which fail at bootimeHow to debug Linux Init Scripts (Ubuntu).
<br />
<br />Often you have the problem that you hacked an init script or have to modify an existing one which will work whenever you manually start it but the process seems not be there after rebooting.
<br />
<br />The problem is that your system is not in normal "user mode" during bootime but uses a slim version of your system. For example in most cases for me it is always that my script relies on environment variables such those I usally set in /etc/environment which are loaded after executing the init scripts.
<br />
<br />But here is my actual troubleshooting for init scripts which dont work at bootime (manually executing often works):
<br />
<br />1) you havent set up any runlevels for your script (solution: update-rc.d)
<br />2) you havent made them executable (solution: chmod +x)
<br />3) your script relies on environment variables which are not set at this stage of bootime
<br />4) your script also does not work at manually running - this meens you have general problems with it - script ERRORS -use bashdb tool
<br />
<br />So what to do if it does not run at bootime but runs manually?
<br />
<br />Answer: simulate a bootime environment. You can do this by using the env command [1]
<br /><code>
<br />cd /
<br />env -i LANG="$LANG" PATH="$PATH" TERM="$TERM" /etc/init.d/daemon start
<br /></code>
<br />this simulates the absolut exact situation which are at boottime!!!!
<br />
<br />But often if you run modern scripts it does not output anything also you run it in a bootime-like environment.
<br />So what I usally do I use the bashdebugger bashdb tool [2]. In Ubuntu it is easy to install because it is in the repository under "bashdb".
<br />
<br />So now I run the full thing like
<br />
<br /><code>
<br />cd /
<br />env -i LANG="$LANG" PATH="$PATH" TERM="$TERM" bashdb /etc/init.d/daemon start
<br /></code>
<br />and it works like a charme to see whats going on.
<br />
<br />Often now I can trace down errors but in some cases it was not possible to get the errornous output. Often this is because the error lies in lines which contain the "start-stop-daemon" program which often modern init scripts rely on. But a solution is near [3]. Just single step to the line in bashdb which contains the start-stop-daemon execution and print it out in the shell e.g. the line is called:
<br />
<br /><code>
<br />"start-stop-daemon -S -p/var/run/jetty.pid -cjetty -d/path/to/solr -b -m -a /usr/bin/java -- -Dsolr.solr.home=/path/to/solr/solr -Djetty.logs=/path/to/solr/logs -Djetty.home=/path/to/solr -Djava.io.tmpdir=/tmp -jar /path/to/solr/start.jar --daemon"
<br /></code>
<br />so in bashdb i hop to the line, hold on at there and use the command "x" :
<br /><code>
<br />x start-stop-daemon -S -p"$JETTY_PID" $CH_USER -d"$JETTY_HOME" -b -m -a "$JAVA" -- "${RUN_ARGS[@]}" --daemon
<br /></code>
<br />and it will print me out the translated string code:
<br /><code>
<br />sudo start-stop-daemon -S -p/var/run/jetty.pid -cjetty -d/path/to/solr -v -b -m -a /usr/bin/java -- -Dsolr.solr.home=/path/to/solr/solr -Djetty.logs=/path/to/solr/logs -Djetty.home=/path/to/solr -Djava.io.tmpdir=/tmp -jar /path/to/solr/start.jar --daemon
<br /></code>
<br />so I usally just execut this line then in the shell but often I cannot see any output again:-(. But using this blogpost here [3] I see that I have to get rid of the -b parameter in order to see the output.
<br /><code>
<br />sudo start-stop-daemon -S -p/var/run/jetty.pid -cjetty -d/path/to/solr -v -m -a /usr/bin/java -- -Dsolr.solr.home=/path/to/solr/solr -Djetty.logs=/path/to/solr/logs -Djetty.home=/path/to/solr -Djava.io.tmpdir=/tmp -jar /path/to/solr/start.jar --daemon
<br /></code>
<br />So in my case the JAVA_HOME was set in /etc/environment but could not be seen by this script so it did not know where JAVA_HOME was. So I putted the JAVA_HOME path in the top of the init script and everything worked fine then.
<br />
<br />
<br />[1] http://stackoverflow.com/questions/1421607/erlang-daemon-init-d-script-fails-to-start
<br />[2] http://bashdb.sourceforge.net/
<br />[3] http://greenash.net.au/thoughts/2011/02/solr-jetty-and-daemons-debugging-jettysh/Anonymoushttp://www.blogger.com/profile/04196877446003618271noreply@blogger.com1tag:blogger.com,1999:blog-4501496565446248678.post-19522091856220488312011-08-03T03:09:00.000-07:002011-08-03T04:06:09.045-07:00Installing jetty hightide 7.4.5 under Ubuntu 10.04.3 LTS (Lucid Lynx) with port 80 support (setuid)Installing jetty hightide 7.4.5 under Ubuntu 10.04.3 LTS (Lucid Lynx) with port 80 support (setuid)<br /><br />Since I needed an javax.servlet container on our brand new vServer setup and tomcat needs too much resources in my opinion<br />I wanted to install jetty on this clean ubuntu LTS system.<br />So I installed jetty6 from package with "apt-get install jetty". After a bit of configuring the /etc/default/jetty it was<br />working like a charme but I couldn't get it run on port 80 because my vServer kernel (openvz) did not support NAT out of the box<br />for port forwarding and also I did not want to install apache2 for port forwarding because apache2 would also be needing some amount<br />of memory and since our resources are limited and I need the full power/memory for all the other server applications (mysql etc.) I searched<br />for a alternative. So jetty hightide to the rescue!<br />Jetty 7 hightide has a new feature called setuid so one can run the webserver with normal user under port 80!!!<br />Since I did not find any useful FULL description on how to get it to run I decided to write my own. My basic idea comes from website [1] and<br />since I needed to find out why things were not working I found this beautiful blog entry [2]<br />So here are my details to install the latest jetty 7 under Lucid Lynx server:<br /><br /><code><br />#login with your root account on server<br />#first lets make an update<br />apt-get update<br />#ok my openvz system did not even had these "standard" programs :-D...<br />#install java<br /># open /etc/apt/sources.list and put in:<br />deb http://archive.canonical.com/ubuntu lucid partner<br />deb-src http://archive.canonical.com/ubuntu lucid partner<br />#so we can install java<br />apt-get install less wget unzip sun-java6-jdk<br />#make your shell aware of java: open /etc/environment and alter line:PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games"<br />#put in:<br />PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/lib/jvm/java-6-sun"<br />#add the line:<br />JAVA_HOME=/usr/lib/jvm/java-6-sun<br /><br />#download latest jetty hightide from codehaus<br /><br />wget http://dist.codehaus.org/jetty/jetty-hightide-7.4.5/jetty-hightide-7.4.5.v20110725.zip<br />unzip jetty-hightide-7.4.5.v20110725.zip<br />#copy the start script to the init scripts so it will later run on server startup<br />cp jetty-hightide-7.4.5.v20110725/bin/jetty.sh /etc/init.d/jetty<br />#move the jetty to system dir<br />mkdir /opt/jetty<br />mv jetty-hightide-7.4.5.v20110725/* /opt/jetty<br />#add a user for security reasons one should not run as root<br />useradd jetty<br />#change permissions<br />chown -R jetty /opt/jetty<br />chmod -R ugo+rw /opt/jetty<br />mkdir -p /var/log/jetty<br />chown jetty /var/log/jetty -R<br />#create an jetty config file<br />touch /etc/default/jetty<br />vi /etc/default/jetty<br /><br />#set in this file<br />DEBUG=1<br />JAVA=$JAVA_HOME/bin/java<br />JETTY_HOME=/opt/jetty<br />JETTY_LOGS=/var/log/jetty<br />JETTY_PORT=8080 #we will change this later<br />JETTY_USER=jetty #we will change this later<br /></code><br />#add t server startup init levels<br />update-rc.d jetty defaults<br /><br />#ok after this jetty is ready to start "/etc/init.d/jetty start" so test it under port 8080 before proceeding<br /><br />Now to the second part: enable port 80 setuid feature<br />#move the seuid jar to a different location since it is at the wrong one in the hightide package (see [5] for a why)<br />cp /opt/jetty/lib/setuid/jetty-setuid-java-7.4.5.v20110725.jar /opt/jetty/lib/ext/<br /><br /><code><br />#open /etc/default/jetty again and add the following line:<br />JETTY_SETUID=/opt/jetty/etc/jetty-setuid.xml<br />#change the following line:<br />JETTY_PORT=8080 => JETTY_PORT=80<br />#this is f**** crucial and took me a long time: you have to start jetty now as "root" user but it will actually set<br />#the jetty user as owner of the jetty server...without setting to root the setuid feature will not work<br />JETTY_USER=root<br /></code><br />#now open /etc/init.d/jetty<br />#after those lines:<br /><code><br />#####################################################<br /># Add jetty properties to Java VM options.<br />#####################################################<br />JAVA_OPTIONS+=("-Djetty.home=$JETTY_HOME" "-Djava.io.tmpdir=$TMPDIR")<br /><br />[ -f "$JETTY_HOME/etc/start.config" ] && JAVA_OPTIONS=("-DSTART=$JETTY_HOME/etc/start.config" "${JAVA_OPTIONS[@]}")<br /></code><br /><br />#insert the following lines:<br /><code><br />##################################################<br /># enable setuid<br />##################################################<br />if [ -z "$JETTY_SETUID" ]<br />then<br /> JETTY_SETUID=<br />fi<br /></code><br /><br />#change the line: RUN_ARGS=(${JAVA_OPTIONS[@]} -jar "$JETTY_START" $JETTY_ARGS $"${CONFIGS[@]}") to<br /><code><br />RUN_ARGS=(${JAVA_OPTIONS[@]} -jar "$JETTY_START" $JETTY_SETUID $JETTY_ARGS $"${CONFIGS[@]}")<br /></code><br /><br /><br />#now go back to the shell<br />id jetty <br />#write out for uid for example mine was: uid=1000(jetty) gid=1000(jetty) groups=1000(jetty)<br />vi /opt/jetty/etc/jetty-setuid.xml<br />#insert following code (replace USERID with uid from the command above)<br />#actually the original description on jetty homepage [3]does no longer work for hightide (was written for jetty6)<br />#one has to change the XML attribute id from tag Configure from "Server" to "org.eclipse.jetty.server.Server"<br />#otherwise there will be errors (thanks the post on [4]) <br /><br /><code><br /><Configure id="org.eclipse.jetty.server.Server" class="org.mortbay.setuid.SetUIDServer"><br /> <Set name="uid">UID</Set><br /></Configure><br /></code><br />#now change the following lines using your actual uid of user jetty with the lines above: <br /><code><br /><Configure id="org.eclipse.jetty.server.Server" class="org.mortbay.setuid.SetUIDServer"><br /> <Set name="uid">1000</Set><br /></Configure><br /></code><br /><br />chown jetty /opt/jetty/etc/jetty-setuid.xml<br /><br />restart jetty and then port80 will work (/etc/init.d/jetty restart)<br />You can make proof of this by going to the stderr logfile less /var/log/jetty/20xx_xx_xx.stderrout.log after you restarted the server and there you will see:<br /><br />2011-08-03 10:26:18.478:INFO::Started SelectChannelConnector@0.0.0.0:80 STARTING<br />2011-08-03 10:26:18.479:INFO::Setting UID=1000<br />2011-08-03 10:26:18.487:INFO::jetty-7.4.5.v20110725<br /><br /><br />Note:<br />In any case there are errors always "tail" the "/var/log/jetty/" start.out and error log files. Also for some errors produced by startup script<br />its best to debug the jetty init script, see [2] for a very good guideline to do so!<br /><br /><br />Sources:<br />[1]http://webcache.googleusercontent.com/search?q=cache:-YW2xPMZYk0J:ubuntuforums.org/showthread.php%3Ft%3D466143+jetty+init+script&cd=1&hl=de&ct=clnk&gl=de&client=firefox-a&source=www.google.de<br />[2]http://greenash.net.au/thoughts/2011/02/solr-jetty-and-daemons-debugging-jettysh/<br />[3]http://docs.codehaus.org/display/JETTY/port80<br />[4]http://dev.eclipse.org/mhonarc/lists/jetty-users/msg00787.html<br />[5]http://groups.google.com/group/cometd-users/browse_thread/thread/8ae7677f60c5100bAnonymoushttp://www.blogger.com/profile/04196877446003618271noreply@blogger.com2tag:blogger.com,1999:blog-4501496565446248678.post-88949724313556384422010-09-21T03:16:00.000-07:002010-09-21T04:34:06.180-07:00How to install Centos 5.5 on any GPT partition table harddrive by patching the CentOS 5 anaconda installerCentos is a free derivate of the most used server linux red hat (commercial).<br />Therefore I do not understand why the Centos people have disabled GPT<br />support for their latest Centos 5.5 release because almost every modern<br />server have big raid disks which often are bigger than 2.2 TB so no msdos<br />partition table can be used here....<br />They have disabled it because Centos uses an old Grub version which cannot handle<br />GPT tables thats all....in general the CentOS 5.5 installer called anaconda can install CentOS on GPT tables (as you will see).<br />But there are ways to fix this limitations on your own.<br />I first heard about it from <a href="http://richardjhblog.wordpress.com/2010/08/25/install-centos-onto-large-partitions-using-gpt-disk-layout/">Richards blog </a>where he showed a nice way on how to install Centos 5.0 on large GPT partitions because the CentOS 5.0 version did not check for GPT tables<br />and he uses a patched Grub from the LinuxRescueCD Project to fix the grub (which does not support GPT) installed by centos.<br />So this just works like a charme in most cases.<br /><br />But unfortunately Richard's approach didn"t work on my HP proliant DL 380G6 Server. As I need to install Centos 5 on our servers and I could not install Centos5.0 because the smart array raid system build into the server hardware is not supported from the centos5.0 kernel I<br />just found out another approach on my own on how to install centos5.5 on every machine.<br />As I am mainly a programmer and not a system administrator it was very easy for me to tweak the anaconda installer routine (installer scripts are written in python) a bit to let me and possible you reading<br />this install centos5.5 on any gpt tables disk. So tweaking anaconda was the easy part but understanding the anaconda installation cd build process in the first plance, understanding anaconda concepts such as buildstamps, rpm packaging, re-generating new installer and generating a new cd was the harder part for me :-) (I am not a linux guru....yet)<br /><br />Here is a screenshot of what happens if you try to install Centos > 5.0 on a machine with a GPT partitioning table.<br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgvUvdZWQzhJ8NpHN6XhtdgOZUWkXD2EqR7uPVlka-MZJCCq6zNCzTfpFmN2rAELM_omsMeNV0cgQj1iI7WvR3pEHuZ1UVpOJ0VVsqG_27ybVbBXMjjuto2_DLaGR_siU_UVhA4QWHjKD8/s1600/Bild+18.png"><img style="cursor: pointer; width: 320px; height: 218px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgvUvdZWQzhJ8NpHN6XhtdgOZUWkXD2EqR7uPVlka-MZJCCq6zNCzTfpFmN2rAELM_omsMeNV0cgQj1iI7WvR3pEHuZ1UVpOJ0VVsqG_27ybVbBXMjjuto2_DLaGR_siU_UVhA4QWHjKD8/s320/Bild+18.png" alt="" id="BLOGGER_PHOTO_ID_5519302402082908770" border="0" /></a><br /><br />Everything works fine at the begin of the installation but when it comes to partitionating your harddrive the following error occurs:<br />"The following critical errors exist with your requested partitioning scheme. These errors must be corrected prior to continuing with your install of CentOS. Your boot partition is on a disk using the GPT partitioning scheme but this machine cannot boot using GPT."<br />and you cannot go on!<br /><br />So the solution is to get rid of this error message in the anaconda installer by modifing the anaconda installation code.<br /><br />Here are an overview of the concept and steps I used.<br />1. First partitionate your GPT harddisk using a linux rescue disk ...(mklabel gpt etc....)<br />you can read <a href="http://richardjhblog.wordpress.com/2010/08/25/install-centos-onto-large-partitions-using-gpt-disk-layout/">richards blog</a> on how to do this in general.<br />2. I use a virtualbox environment to hack the centos5.5 installer (anaconda),<br />you can also use a normal centos5.5 install but for tweaking and hacking<br />I find a virtual environment more safe as to worki on a real install<br />as you can mess around without any side-effects.<br />2a) Install Centos5.5 in a virtual environment or boot up a normal installation.<br />if you install it new for this purpose, deselect all packages, choose custom<br />and select:<br />Development libs, Development tools, Editors...<br />you only need to install anaconda, a text editor and the squash fs system support..... you do not need more<br />3) mount the centos5.5 installation cd and modify the anaconda pyhton code<br />4) rebuild the installation cd...we will create a bootable iso<br />5) install centos5.5 with the new modified installer...no gpt errors will occur and installation can be made<br />6) after installation of centos5.5 you will have to patch the grub loader<br />7) reboot into your new centos5.5 working on a gpt table and enjoy<br /><br /><span style="font-weight: bold;">Here are all the EXACT steps I did.</span><br /><br />after booting up a centos5.5 installationand login as root use the following commands:<br /><blockquote><br />#some prequisites<br />#change to homedir first<br />cd<br />yum install anaconda anaconda-runtime anaconda-helper<br />PYTHONPATH=/usr/lib/anaconda<br />PATH="$PATH:/usr/lib/anaconda-runtime"<br />#choose your arch: i386 or x86_64<br />ARCH=x86_64<br />BUILDBASE=`pwd`<br />mkdir -p $BUILDBASE/linux/$ARCH/SRPMS<br /><br />#insert and mount the first centos5.5 install cd in your centos5.5 installation<br />mkdir /media/cdrom<br />mount /dev/cdrom /media/cdrom<br />#make a copy we can edit<br />rsync -avr /media/cdrom/ $BUILDBASE/linux/$ARCH<br />#now mount the full anaconda suite from the installation cd into a new directory<br />mkdir /media/anaconda<br /><br />mount -o loop -t squashfs $BUILDBASE/linux/$ARCH/images/stage2.img /media/anaconda<br />#copy the anaconda mount to a place we can edit<br />mkdir $BUILDBASE/anaconda<br />rsync -avr /media/anaconda/ $BUILDBASE/anaconda to get rid of the GPT check<br />#now edit the following anaconda python script file:<br />emacs $BUILDBASE/anaconda/usr/lib/anaconda/partitions.py<br /></blockquote><br />#In the editor go to line:1082 and change:<br /><br /><blockquote><br />errors.append(<br />_("Your boot partition is on a disk "<br /><br /><br />change to=><br />warnings.append(<br />_("Your boot partition is on a disk "<br /></blockquote>#After that save and close the editor.<br />#now back at the shell do:<br /><blockquote><br />yum install squashfs-tools<br />cd $BUILDBASE/anaconda<br />mksquashfs . ../stage2.img<br /><br />#backup original stage2<br />mkdir $BUILDBASE/backup<br />cp $BUILDBASE/linux/$ARCH/images/stage2.img $BUILDBASE/backup<br /><br />#now rebuild the cd<br />DISCINFO=`head -1 $BUILDBASE/linux/$ARCH/.discinfo`<br />createrepo -u “media://$DISCINFO” -g $BUILDBASE/linux/$ARCH/repodata/comps.xml $BUILDBASE/linux/$ARCH/<br /><br />#copy the new stage2 we generated to the cd installation<br />cp $BUILDBASE/anaconda/../stage2.img $BUILDBASE/linux/$ARCH/images/stage2.img<br /><br />#now make a new iso<br />ISOFILENAME = $BUILDBASE/c5.5-custom.iso<br />cd $BUILDBASE/linux/$ARCH<br />mkisofs -r -R -J -T -v \<br />-no-emul-boot -boot-load-size 4 -boot-info-table \<br />-V “Centos 5.5 GPT fix″ -p “Oli P” \<br />-A “Centos 5.5 GPT fix - 2010/21/09″ \<br />-b isolinux/isolinux.bin -c isolinux/boot.cat \<br />-x “lost+found” -o $ISOFILENAME $BUILDBASE/linux/$ARCH<br /><br />implantisomd5 $ISOFILENAME<br /></blockquote><br />#transfer the iso to a place where you can use it in virtual box or burn the cd of it<br /><br />Now partitionate your GPT harddrive with a Linux resue CD or pmagic linux cd see Richards Blog for an overview<br />(Install CentOS onto large partitions using gpt disk layout).<br />#boot the rescue cd<br />#select your harddrive e.g. /dev/sda or when using pmagic cd: /cciss/c0d0 etc.<br />#here is my configuration of parted<br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjlzkeye9S9C8tkBx0RszBGGuXrEbjD8EXQ94I9dh6xwcs_g-Lz0VauAP_N7wgdiGDXyS2qp2wVvSAp0KG8X93aUb_GuogZC-cQKiaW5qOutupJA-BFi36vUBvdu2aBePkwiy2ieTjCc8s/s1600/Bild+29.png"><img style="cursor: pointer; width: 320px; height: 245px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjlzkeye9S9C8tkBx0RszBGGuXrEbjD8EXQ94I9dh6xwcs_g-Lz0VauAP_N7wgdiGDXyS2qp2wVvSAp0KG8X93aUb_GuogZC-cQKiaW5qOutupJA-BFi36vUBvdu2aBePkwiy2ieTjCc8s/s320/Bild+29.png" alt="" id="BLOGGER_PHOTO_ID_5519307337321006402" border="0" /></a><br />#after setting up partitons quit parted "type q" and in the shell format your new partitions as follow:<br />mkfs.ext3 /dev/sda1<br />mkfs.ext3 /dev/sd3<br />mkswap /dev/sda2<br />#the last partition "data" will take a long time so pick up a coffee.....<br />mkfs.ext3 /dev/sda4<br /><br />reboot and insert the modified Centos 5.5 installer cd.<br />At the Welcome to CentOS 5.5 screen press OK :-D<br />Choose Language and keyboard layout.<br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgFjA4m4FQWFgWfhsRc76IB7jRYUGOyUfCT-K43BnUPXqb2AnlmDpO3Ea1GxD7i_9YfZ_BgE-y08gaylsp-Zylyfqx8QzAhJTdrogX0K9YMKWLtO3v9nP6nG0qNyUXhh9XCM5uc6aTeFUk/s1600/Bild+19.png"><img style="cursor: pointer; width: 320px; height: 240px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgFjA4m4FQWFgWfhsRc76IB7jRYUGOyUfCT-K43BnUPXqb2AnlmDpO3Ea1GxD7i_9YfZ_BgE-y08gaylsp-Zylyfqx8QzAhJTdrogX0K9YMKWLtO3v9nP6nG0qNyUXhh9XCM5uc6aTeFUk/s320/Bild+19.png" alt="" id="BLOGGER_PHOTO_ID_5519304560072387474" border="0" /></a><br />Now at the next screen "Partitioning type" choose "Create custom layout".<br /><br />Select the partitons and create mount points (/boot,/,/data etc.) but do not chose format, leave this because you have already formatted everything.<br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgI-vK5Vv3QYGux1YslyscrYpsbiABfoFZFH4tADkmPv9b7N1fPvgtG5hTT5nbw-Y5g2IYmMxyAjM0Z0BHpttNYP_7hVxGAkm9NpycJg_8_sPUgF4qe7mbIZs9x84gQJv8nh06mbJVB4UA/s1600/Bild+20.png"><img style="cursor: pointer; width: 320px; height: 238px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgI-vK5Vv3QYGux1YslyscrYpsbiABfoFZFH4tADkmPv9b7N1fPvgtG5hTT5nbw-Y5g2IYmMxyAjM0Z0BHpttNYP_7hVxGAkm9NpycJg_8_sPUgF4qe7mbIZs9x84gQJv8nh06mbJVB4UA/s320/Bild+20.png" alt="" id="BLOGGER_PHOTO_ID_5519305126723378866" border="0" /></a><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgjELJDfVi6Pkalnmm0f1GcFupFfdqoh4Iz5Q9piT0ZVly4RHTrfBz-F2uEjyS1Tkl5JqC9827U8_d9aRz9fzIEN3Z3VFa4CMAlKptRTo5hZXQHtHzRjeGNNTLbWSG9tSC9O8QQkgphLz0/s1600/Bild+21.png"><img style="cursor: pointer; width: 320px; height: 245px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgjELJDfVi6Pkalnmm0f1GcFupFfdqoh4Iz5Q9piT0ZVly4RHTrfBz-F2uEjyS1Tkl5JqC9827U8_d9aRz9fzIEN3Z3VFa4CMAlKptRTo5hZXQHtHzRjeGNNTLbWSG9tSC9O8QQkgphLz0/s320/Bild+21.png" alt="" id="BLOGGER_PHOTO_ID_5519305339458200562" border="0" /></a><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjkO1k4rjCVrj83YWkZfYDLjaUlihY6a49M49d_bLV2EHoc8Ik3kU8Hz6KaidfjKv1ffgKbul2t06wMiLRO2iZeEmCghr6fhxC8tVEd7JQpY6liBgmhPkqgW4HpGEW_4XadLlw9SkJFH6g/s1600/Bild+22.png"><img style="cursor: pointer; width: 320px; height: 246px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjkO1k4rjCVrj83YWkZfYDLjaUlihY6a49M49d_bLV2EHoc8Ik3kU8Hz6KaidfjKv1ffgKbul2t06wMiLRO2iZeEmCghr6fhxC8tVEd7JQpY6liBgmhPkqgW4HpGEW_4XadLlw9SkJFH6g/s320/Bild+22.png" alt="" id="BLOGGER_PHOTO_ID_5519305560430791314" border="0" /></a><br /><br />And now the next screen:<br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgBhdeF65FgtXYJMvVhb1dofwF3gCb5nszkBeqQGhAD4fzwA1ju0CEmsoMHQGrg-GtGYBnBa6lENXa76n0DwgqvwMo_sIG60AzZKUYT-sPPfDmzOKXiY7l-ib3lZcy321niHsxToMAhg58/s1600/Bild+23.png"><img style="cursor: pointer; width: 320px; height: 242px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgBhdeF65FgtXYJMvVhb1dofwF3gCb5nszkBeqQGhAD4fzwA1ju0CEmsoMHQGrg-GtGYBnBa6lENXa76n0DwgqvwMo_sIG60AzZKUYT-sPPfDmzOKXiY7l-ib3lZcy321niHsxToMAhg58/s320/Bild+23.png" alt="" id="BLOGGER_PHOTO_ID_5519305850286150674" border="0" /></a><br />oh no this thing didnt work....did it?<br />If you watch closely and compare to the <a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgvUvdZWQzhJ8NpHN6XhtdgOZUWkXD2EqR7uPVlka-MZJCCq6zNCzTfpFmN2rAELM_omsMeNV0cgQj1iI7WvR3pEHuZ1UVpOJ0VVsqG_27ybVbBXMjjuto2_DLaGR_siU_UVhA4QWHjKD8/s1600/Bild+18.png">original message</a> at the beginning of this document you will see a difference in the heading: it was "Error" no it is "Warning" and we have a "YES" button to continue!!!<br />Error will stop the installer going any further, warning message can be ignored and you can go on in the installer!!! So click OK NOW!<br /><br />So you will no longer get the Error that you cannot do this on a GPT table....but instead get a nag screen with a warning only :-) ...successfully hacked...because its a warning only the system let you continue<br />installing !!!!!<br />so next steps are to Install Centos:<br />Next important steps are "Use Grub Boot loader" and after some other steps the next important step is "Boot Loader Configuration".<br /><br />Question is "Where do you want to install the boot loader?" HEre you have to chose "First sector of boot partition" THIS IS IMPORTANT<br />DO NOT INSTALL IT IN THE MBR!! WE USE BOOT SO WE CAN FIX IT LATER!!!<br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgXpBjDCrr53dp0rih1s0AflyDOTwWsNomZJpT1cLg_zDxWToyn3mrSigca-0p8oLTe-sDMVT_xENmjiNy2rBAU7KCgeL4ssnhz4BZd92ReQ4lilikoRnytY73OmZik0RHKhwamJalMung/s1600/Bild+24.png"><img style="cursor: pointer; width: 320px; height: 239px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgXpBjDCrr53dp0rih1s0AflyDOTwWsNomZJpT1cLg_zDxWToyn3mrSigca-0p8oLTe-sDMVT_xENmjiNy2rBAU7KCgeL4ssnhz4BZd92ReQ4lilikoRnytY73OmZik0RHKhwamJalMung/s320/Bild+24.png" alt="" id="BLOGGER_PHOTO_ID_5519306947608186658" border="0" /></a><br />After Installation has finally finished remove Centos5.5 cd and insert RescueCD and reboot to fix the GRUB.<br />If you boot without fixing grub the boot partition and grub will just not be recognised so you have to do the following steps....<br /><br />I fixed it using the steps at http://www.rodsbooks.com/gdisk/booting.html (section Linux, GRUB, and LILO) because the instructions at<br />http://www.sysresccd.org/Sysresccd-Partitioning-EN-The-new-GPT-disk-layout (section Installing a patched Grub-0.97) did not produce fast results.<br />Here are my commands:<br />at sysrescue bootup chose your architecture type (I use 64-bit kernel with standards).<br />Then when you got a shell type:<br /><br />#instructions from site:http://www.rodsbooks.com/gdisk/booting.html (section Linux, GRUB, and LILO)<br />#copy the boot partition from the live cd to a safe place<br /><blockquote><br />mv /boot /boot_livecd<br />mkdir /boot<br />#my boot partition is on sda1 to find out yours: parted with print command<br />mount /dev/sda1 /boot<br />#make a backup of grub...in a worst case scenario...always make a copy of this... never just move to grub!<br />cp -r /boot/grub /boot/grub_original<br />#edit /boot/grub/devices.map and replace entry "cc0011/c0d0" with "sda"...in general replace your harddisk device name with sda<br />nano /boot/grub/devices.map<br />#now install the fixed grub from the rescue cd on your boot partition<br />grub-install /dev/sda<br /><br /></blockquote><br /><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjwUL82Rffz_GV7sHy6aeuKCCU0t8_E5hi_8LAK4v3c-51jdi7gwaQuecaFTypgxgyRdRbUO6rW9QUyabuN_8WMDbZ3ebfwOx-U6gyms67O92S7_1YAJtWsLzta8C6bGUKBGfNIY5H5qqA/s1600/Bild+25.png"><img style="cursor: pointer; width: 320px; height: 223px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjwUL82Rffz_GV7sHy6aeuKCCU0t8_E5hi_8LAK4v3c-51jdi7gwaQuecaFTypgxgyRdRbUO6rW9QUyabuN_8WMDbZ3ebfwOx-U6gyms67O92S7_1YAJtWsLzta8C6bGUKBGfNIY5H5qqA/s320/Bild+25.png" alt="" id="BLOGGER_PHOTO_ID_5519327569327468338" border="0" /></a><br />this was the file /boot/grub/devices.map showing before editing<br />you have to replace your actual device name with sda so in my case the complete new<br />line will be (without the quotes):<br />"(hd0) /dev/sda"<br /><br />after running grub-install you should get the following success status:<br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgJp-ngT4800WdUB5I4AQAo9TPLEUa47TydpiRdOVbvigYwoFEJR7wvin0pPUCcQrOSL-07N17dhlQxWEd5qjGUnO_E5Wz-OU6slV69MqVAtAhJfkp5RR9CUk4aHYtBbZd0j-shJc_P9pg/s1600/Bild+26.png"><img style="cursor: pointer; width: 320px; height: 94px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgJp-ngT4800WdUB5I4AQAo9TPLEUa47TydpiRdOVbvigYwoFEJR7wvin0pPUCcQrOSL-07N17dhlQxWEd5qjGUnO_E5Wz-OU6slV69MqVAtAhJfkp5RR9CUk4aHYtBbZd0j-shJc_P9pg/s320/Bild+26.png" alt="" id="BLOGGER_PHOTO_ID_5519328144153888978" border="0" /></a><br />reboot....your gpt table will load and finally centos5.5 is working!!!<br /><br /><br />Note: I can share the modified installer CD on a one-click-hoster if there is high demand for it.<br /><br />References:<br />[1] Distribution Hacking 101: disecting anaconda, http://k12linux.mesd.k12.or.us/at/roswell-ltsp.html<br />[1] Build a custom CentOS 5 install CD, http://www.sirius.pe.kr/v5/tt<br />[3] Install CentOS onto large partitions using gpt disk layout, http://richardjhblog.wordpress.com/2010/08/25/install-centos-onto-large-partitions-using-gpt-disk-layout/<br />[4] Booting from GPT (Linux, Grub and Lilo), http://www.rodsbooks.com/gdisk/booting.htmlAnonymoushttp://www.blogger.com/profile/04196877446003618271noreply@blogger.com3tag:blogger.com,1999:blog-4501496565446248678.post-86064374102125605642010-09-07T04:02:00.000-07:002010-09-21T03:38:06.480-07:00How to install Centos 5 onto large partitions using GPT layout (HP proliant DL 3xx G6 server system)UPDATE: this approach is deprecated and does not work on SINGLE GPT partitions bigger<br />than 2.2 TB.<br />Use my updated guide to install Centos5.5 instead:<br />http://oliverpelz.blogspot.com/2010/09/how-to-install-centos-55-on-any-gpt.html<br /><br />I completely wasted a lot of time trying to get Centos5 running on some HP proliant server system.<br />After reading endless tutorials and tips I gave up...none of them worked...its impossible (at the moment) to install Centos5.x on a GPT system like mine (as others also stated).<br />In the end after partitoning or doing installer tricks such as erasing MBR with dd to pass the GPT check etc. I always stuck at the point that the installer does not recognize my smart array HP raid5.<br />So after all this approaches do not work I found the following solution:<br /><br />-Install centos 4.8 which works perfectly well with GPT layout.<br />But before you can do this you have to upgrade your firmware to the latest edition because otherwise centos anaconda installer will fail with some GPT/MSDOS recognition problems.<br />-So I updated my clusters which come with a firmware from march2010 to the latest 9.03.<br /><br />-Use a boot partition and install grub in this partition.<br />-After installation of some base packages immediately put in the latest linux rescue cd (http://www.sysresccd.org) and install new grub with GPT support because the one shipped with 4.8 does not support GPT partitions and grub will not load (red screen of death) the system.<br /><br />Immediately after installation has finished installing insert linux rescue cd, reboot, I have 64 so chose 64bit version from the rescue cd menue and install a patched grub with gpt support:<br /><br />mv /boot /boot_livecd<br />mkdir /boot<br />mount /dev/sda1 /boot (my boot partition is on sda1 to find out yours: parted /dev/sda print)<br />#make a backup of grub...for worst case scenario..<br />cp -r /boot/grub /boot/grub_original<br />edit /boot/grub/devices.map and replace entry "cc0011/c0d0" with "sda1"<br />grub-install /dev/sda<br />reboot<br /><br />grub will work and load the OS<br /><br />Reboot and update your centos installation from 4 to 5 using a good other tutorial which can be found plenty of on the net.Anonymoushttp://www.blogger.com/profile/04196877446003618271noreply@blogger.com0tag:blogger.com,1999:blog-4501496565446248678.post-49711358677979117222009-10-20T06:51:00.000-07:002009-10-20T07:12:51.075-07:00Caused by: org.hibernate.MappingException: Could not determine type for: XXX, at table: XXXX, for columns: YYYYThis is a common hibernate mapping exception and in most cases you simply forgot to implement<br /><br />toString()<br />hashCode()<br />equals()<br /><br />in your class you are using a relation to another class (only when using annotations)<br /><br />Another thing what could be the cause of this could be to mix the annotations between above the fields and above the getter MEthods.<br />Try to put all the annotations consistent above the getter methods AND not above the data fields.<br /><br />So:<br />instead of :<br />@Id<br /> @GeneratedValue(strategy = GenerationType.AUTO)<br /> @Column(name = "count")<br /> public long id;<br /><br /> public long getId() {<br /> return id;<br /> }<br /><br />alter all of them to:<br /><br /><br /> public long id;<br /><br /> @Id<br /> @GeneratedValue(strategy = GenerationType.AUTO)<br /> @Column(name = "count")<br /> public long getId() {<br /> return id;<br /> }Anonymoushttp://www.blogger.com/profile/04196877446003618271noreply@blogger.com0tag:blogger.com,1999:blog-4501496565446248678.post-10820974203133297672009-10-14T12:48:00.000-07:002009-10-14T12:52:33.999-07:00Running Jetty 5 under Ubuntu 9.04 JauntyOk another weird thing just happened.<br />I have installed jetty5 and some war applications via jetty webapps folder as also via maven2 jetty plugin but just cant connect through any webbrowser via localhost:8080 (mvn2) or localhost:8280 (jetty). So i tried and tried but just cant connect to it. Here is what happened: Though jetty describes itself as a complete full integrated http webserver I think it is not configured right on ubuntu because i just found out that you need to install apache2 package in order to run localhost jetty applications!Anonymoushttp://www.blogger.com/profile/04196877446003618271noreply@blogger.com0tag:blogger.com,1999:blog-4501496565446248678.post-30256110822804042402009-02-15T09:30:00.001-08:002009-02-15T09:35:55.696-08:00Using Joomla and the Strato website providerToday I had the problem that I had to alter my php.ini because the joomla pony gallery plugin needed extra memory when generating thumbnails and the strato memory size was too low for processing.<br /><br />So I did some research and found out that Strato allows own php.ini files which can overwrite their values. Problem was only that I could not get my own php.ini to work with the website or backend, I got a lot of internal server failures. So I did some research again and here are the correct settings to use own customized .htaccess and php.ini:<br /><br />create a .htaccess in your root dir :<br /><pre class="alt2" style="border: 1px inset ; margin: 0px; padding: 4px; overflow: auto; width: 640px; height: 50px;">Directoryindex index.php , index.htm, index.html<br />AddType application/x-httpd-php5 .php .php4 .php3 .php5</pre>next create a php.ini in your root dir and in your administrator dir where you now do what you like and it actually will work:<br /><br /><pre class="alt2" style="border: 1px inset ; margin: 0px; padding: 4px; overflow: auto; width: 640px; height: 114px;">register_globals = Off<br />safe_mode = Off<br />memory_limit = 16M<br />upload_max_filesize = 10M<br />max_execution_time = 30 <br />max_input_time = 60</pre>so have phun with this!!Anonymoushttp://www.blogger.com/profile/04196877446003618271noreply@blogger.com0tag:blogger.com,1999:blog-4501496565446248678.post-51128655552435521262008-01-27T05:56:00.000-08:002008-01-27T06:22:39.162-08:00Using VPN in Ubuntu 7.10Today I tried to get a VPN connection to my university to work.<br /><br />So first I tried to make the connection over ubuntu's network manager using the vpn-plugins.<br />Therefore I installed the plugins described in the ubuntuusers wiki:<br /><ul><li><p class="line891"><strong>network-manager-pptp</strong> <span class="anchor" id="line-19"></span></p></li><li><p class="line891"><strong>network-manager-openvpn</strong> <span class="anchor" id="line-20"></span></p></li><li><p class="line891"><strong>network-manager-vpnc</strong></p></li></ul><br />After I installed and configured everything and loading my universities config file the whole network manager crashed when I tried to connect to the vpn-network. Looking into /var/log/syslog I recognised something:<br /><br /><span style="font-weight: bold;">Jan 27 14:29:36 xxx NetworkManager: file nm-vpn-service.c: line 475 (nm_vpn_service_stage3_connect_cb): assertion failed: (service != NULL)</span><br /><br /><br />O.k. googling some time I find out this is a unresolved bug.<br /><br />So okay then what next??<br /><br />Next thing I did was trying to install cisco-vpn-client. Trying to compile it failed with a lot of compile errors<br /><span style="font-weight: bold;">/xxx/vpnclient/linuxcniapi.c: In Funktion »CniInjectReceive«:</span><br />...<br /><span style="font-weight: bold;">Fehler: »struct sk_buff« hat kein Element namens »nh«<br /><br /><span style="font-weight: bold;"></span><br /></span>Ok, after searching the internet again I found out that Cisco doesn't update this package with every kernel release.<br />There are some sites out there which offering patches but I thought to myself that I would not install bugfixes to vpn software out of security reasons from private non-offical sites.<br /><br />So, okay what then.<br />Then I found out about vpnc terminal client.<br />So I installed it via apt and ran it.<br />After playing around some times I found out that I need to convert my universities pcf file to a fileformat (.conf) which can be read by vpnc.<br />This can be made with a conversation tool provided by the vpnc packet under:<br />/usr/share/vpnc/pcf2conf<br /><br />So after I converted this everything works fine. So forget about other solutions vpnc works perfectly.<br /><br />have a great time<br />OliAnonymoushttp://www.blogger.com/profile/04196877446003618271noreply@blogger.com0tag:blogger.com,1999:blog-4501496565446248678.post-39048934440875012008-01-06T01:02:00.000-08:002008-01-06T01:51:32.475-08:00Ubuntu 7.10 (Gutsy Gibbon) Live CD Intel Pro/Wireless 2200 Acer Travelmate 292 radio off problemHi everybody,<br /><br />Yesterday a friend of mine asked me if I could look over his problems with the<br />new Ubuntu Gutsy Gibbon Live CD (7.10) release regarding the not working<br />Intel Pro/Wireless 2200 wlan card.<br />His laptop is an Acer Travelmate 292 and I think it is a notebook specific problem but after I saw that a lot of other people with other laptop brands have the same problems I think this could be interesting for those too.<br /><br />After booting the Ubuntu live cd could detect and install the modules for this wlan network adapter correctly<br />and everything under "<span style="font-family: arial;">dmesg | grep ipw2200</span> " looked fine but I couldn't see any access points although we were in the near of one.<br /><br />When I looked under "<span style="font-family: arial;">iwlist scan</span>" I saw an interesting<br /><span style="font-weight: bold;"> eth1 radio off ESSID:"" </span><br /><span style="font-weight: bold;">line.</span><br /><br />So what did this meant? After searching mainly english sites I became aware that this was an common problem without any real solution.<br />But then I found the solution under the second german hit on google <a href="http://wiki.ubuntuusers.de/Acer_Hotkeys">click</a><br />so I will explain it in english that hopefully a lot of people can profit from it.<br /><br />"<span style="font-weight: bold;">radio</span>" is the status of your laptops' wireless radio switches, a lot of laptops have those hardware switches to power the wlan card on / off manually. This Acer Laptop model we worked one had an hardware switch on the left side but neither on nor off position changed the situation so it isn't supported it by default.<br /><br />In the case of the Intel Pro/Wireless 2200 we have a hardware switch which isn't supported by the Live CD's kernel automatically although the correct driver module "ipw2200" was loaded.<br /><br />So what we have to do is to trigger the card on by software instead of really triggering on by hardware. This is done with the kernel module "<span style="font-weight: bold;">Acer Hotkeys</span>" (acerhk kernel module) which means this module can trigger the wlans hardware state on or off.<br /><br />To do this there is this site <a href="http://rfswitch.sourceforge.net/?page=laptop_matrix">CLICK</a> where you can get special parameter settings for the acerhk module for a lot of different acer laptop models:<br /><br />for our acer model (Travelmate 292) it is :<br /><br /><pre class="code">modprobe acerhk force_series=290 usedritek=1 verbose=1 <span style="font-family: georgia;">(loads the kernel module)</span><br />echo 1 > /proc/driver/acerhk/wirelessled <span style="font-family: lucida grande;"><span style="font-family: georgia;">(powers the hardware really on)</span></span></pre><br />there are a lot of other laptop brands on that site too: Acer,Asus,BenQ,Dell, HP,Samsung, Sony so have a look.<br /><br />So after doing this "<span style="font-family: arial;">iwlist scan</span>" showed all near access points correctly and could be connected too.<br /><br />So with this little fix you have a real good Live CD linux with full wlan support on Acer Travelmate 292.<br /><br />Loading the acerhk (Acer Hotkey) kernel module as shown above is only needed<br />if you power off your laptop so if you just reboot while the lapton is on you have not to make this again unless you power it manually off with:<br /><pre class="code">echo 0 > /proc/driver/acerhk/wirelessled (switches it on)</pre><br />have phunAnonymoushttp://www.blogger.com/profile/04196877446003618271noreply@blogger.com0tag:blogger.com,1999:blog-4501496565446248678.post-28335840011859416522008-01-06T00:59:00.000-08:002008-01-06T01:01:56.531-08:00hello world>Hello world,<br /><br />I am an bioinformatics student from Germany and would like to use this blog for everything about my studies and work.<br /><br />I would like to mainly use it for solutions in a lot of computer areas which I have found out and where hard to find in literature or by searching the internet.Anonymoushttp://www.blogger.com/profile/04196877446003618271noreply@blogger.com0