JHF’s homepage

Just another WordPress weblog
  • rss
  • Home

Last call for linux und ich contest

admin | December 10, 2011

In the past I’ve often found interesting blog posts on linux und ich, even sometimes hints on some issues I’ve been experiencing.

Following a blog is something I’m not really used to – no time for it, using wrong tools ? Now since I’m using Google+ on my android device, I can follow more timely the author’s posts.

This year, he started a christmas contest. Deadline to participate is tomorrow (!), but the gift list is worth it ! Simply send a picture of your old PC and enter the contest !

Chances are even quite good (currently 0.5%) for winning a new computer box (Cyrrus 7 one) that may replace my sheevaplug based fileserver.

Comments
No Comments »
Categories
Linux
Comments rss Comments rss
Trackback Trackback

Install debian squeeze on a sheevaplug

admin | February 18, 2011

Ext4 support is only officially available since debian squeeze (6.9) release.

Instructions on how to setup a new debian using the official installer were found here. The installer method was prefered over the lenny tarball installation to get a better control over the installation. Only difference to the method proposed in the article was the usage of the squeeze installer instead of the lenny installer in order to get the ext4 support.

Nice to see that the kirkwood platform is still supported by the debian project !

Comments
No Comments »
Categories
Hardware, Linux
Comments rss Comments rss
Trackback Trackback

Trouble with SATA-II disk

admin | June 4, 2010

Switching from a SATA-I to a SATA-II disk (Samsung HM641JI 640 GB) showed incompatibilities between chipset used in laptop and HDD : 1+ time per second, syslog shows SATA trabsfer errors, leading to SATA bus reset et resync. Funny : this only occurs when reading bigger data (1MB+), but write accesses seem OK so far.

Slight hope however : even after 1 RMA, technical support suggests a 2nd RMA of the HDD, arguing that the error code suggests defect HDD PCB

Update : even 3rd disk showed the same error code (AJ36). Data transfer was as low as 30MB/s. Fortunately I could test a Seagate Momentus 7200.4 ST9500420ASG 500GB. Two cool things :

  • no more SATA issues, even after trasnfering 10GB (dd if=/dev/sda of=/dev/null was the easiest test for the problem, and works even on non-partitioned devices)
  • 95+MB/s transfer rate

Of course this is only a 500G device, but at least it’s working fine with my older laptop (Fujitsu Amilo 1437G)

Comments
No Comments »
Categories
Hardware, Linux
Comments rss Comments rss
Trackback Trackback

Change in apache vhosts files’ format!!

admin | June 12, 2009

Looks like there was a quite silent change in the format of apache’s config files from ubunutu hardy to intrepid (maybe related to the move from debian to its etch release).

Ports.conf now has a statement

NameVirtualHost *:80

Which means all the vhost files (as in /etc/apache2/sites-enabled) need a directive :

<VirtualHost *:80>

Important part is the :80 statement. If missing, this leads to strange

[warn] _default_ VirtualHost overlap on port 80, the first has precedence

error messages

Comments
No Comments »
Categories
Linux
Tags
Apache, Linux
Comments rss Comments rss
Trackback Trackback

Tracking down apache segfaults

admin | March 17, 2009

Delivery ends in the middle of a PHP page. Where’s the rest of it ?

After some research, it came out that the apache logfile was reporting segfaults from the child processes. Unfortunately, this is not done in the domain’s error.log, but in /var/log/apache2/error.log :-(

Lot of googling showed several possible causes for segfault in apache :

  • PHP4 compatibility as set in httpd.conf or /etc/apache2/conf.d/…
  • Conflicting Berkeley DB libraries installed. However… which subpart is using this ?
  • Getting out of memory, having somewhere a malloc() returning NULL, and not catched by code (bad programming)
  • Using rewrite rules and doing bad matching. This can be monitored by setting XXXXXX
  • Releasing memory from recursive objects leads to memory leaks in PHP (< 5.3)
Comments
No Comments »
Categories
Linux
Tags
Apache, Linux, webdesign
Comments rss Comments rss
Trackback Trackback

Another way of managing passwords

admin |

Instead of storing your passwords, why not re-generate them each time you need them ? It’s the concept behind passwordmaker.

Sounds good, question is how good is the implementation of the hashes, as the safety of the generated passwords is directly related to it.

Comments
No Comments »
Categories
Linux
Tags
Apps, Crypto, Linux
Comments rss Comments rss
Trackback Trackback

Compacting a virtualbox volume

admin | March 16, 2009

One nice feature about virtualbox is that volume files only grow up to their size as you use them. However, after a certain time, it can be that a volume containing 1GB of data occupies 8GB on disk.

This is not really related to virtualbox but rather to the way the filesystem is allocating the blocks on the disk : it not necessarilly reuses blocks, so when new ones are allocated, the volume’s size increases.

Decreasing the size of a volume file (compacting) is not that easy. Virtualbox will only “forget” sectors that contain all zero’s. Doing this on linux is straight forward (dd), but there is no Windows equivalent.

In fact there is ! run sdelete -c C:\ to zero all available blocks on the disk. It will write to all free blocks, therefore the size of the volume will reach the maximum. It will also take some time.

Then, the volume file can be compacted :

VBoxManage modifyvdi <path to VDI file> compact
Comments
No Comments »
Categories
Linux
Tags
Linux, Virtualbox
Comments rss Comments rss
Trackback Trackback

Emacs and PHP/HTML mode

admin | February 8, 2009

(X)Emacs can basically handle only one major mode. While this is fine for most applications, it is not very practicable for editing mixed HTML and PHP files, especially concerning indentation of lines.

Several possibilities exist to handle this situation :

  • Multi-purpose multiple mode modes
    • MMM-mode (Multiple Major Modes) makes it possible to load several major modes at the time. It is not restricted to HTML/PHP. However, last activity on this project was back in 2004 !
    • MuMaMo (Major Multiple Modes)
  • Dedicated modes
    • nXhtml mode for editing Xhtml files. Homepage
Comments
No Comments »
Categories
Linux
Tags
Apps, Emacs, Linux, webdesign
Comments rss Comments rss
Trackback Trackback

Power consumption due to boinc running on host

admin | February 7, 2009

Very pragmatic measurement of power (W) consumption of my server with and without boinc client running (99% CPU load on idle) shows 40W difference !
CPU is a 2GHz Intel celeron, no idea how this scales for more up-to-date processors and boards.
However, with current energy costs, disabling boinc means savings in the order of a free 8GB USB stick per year !

Comments
No Comments »
Categories
Linux
Tags
Linux
Comments rss Comments rss
Trackback Trackback

Calling bash from SUID program

admin | January 9, 2009

How do you make a shell script SUID ?

Unfortunately you can’t directly set the ‘s’ bit on the script. That is… you can but it will be ignored :-)

One of the possible hacks is to write a small C programm that will call the shell script. This executable can then be set SUID.
One caveat exists when calling a bash script. From the manpage :

If the shell is started with the effective user (group) id not equal
to the real user (group) id, and the -p option is not supplied, no
startup files are read, shell functions are not inherited from the
environment, the SHELLOPTS variable, if it appears in the environment,
is ignored, and the effective user id is set to the real user id. If
the -p option is supplied at invocation, the startup behavior is the
same, but the effective user id is not reset.

So don’t forget to call the script with the ‘-p’ option !

Comments
No Comments »
Categories
Linux
Tags
Bash, C, Linux, Unix
Comments rss Comments rss
Trackback Trackback

« Previous Entries

Tags

Apache Apps Bash C Crypto Emacs Linux Unix Virtualbox webdesign

Recent posts

  • Last call for linux und ich contest
  • Firefox not saving passwords
  • Install debian squeeze on a sheevaplug
  • Trouble with SATA-II disk
  • Change in apache vhosts files’ format!!

Pages

  • About
  • Deutsch
    • CV
  • English
  • Français
    • CV
    • MFC
  • Impressum
  • Linux
    • Crypto
    • Linux User Group
  • Photography
    • Fine art

Archives

Categories

  • Hardware (2)
  • Linux (11)
  • Uncategorized (1)

Meta

  • Log in
  • Entries RSS
  • Comments RSS
  • WordPress.org

Blogroll

  • Development Blog
  • Documentation
  • Plugins
  • Suggest Ideas
  • Support Forum
  • Themes
  • WordPress Planet
rss Comments rss valid xhtml 1.1 design by jide powered by Wordpress get firefox