Resizing Loop Back File Systems

11.03.2006 at 21:40

I recently needed to resize an existing loop back file system which was created with dd after some research I came up with the following which worked fine for me.

First you need to get the current image size preferably in megabytes this can be done with

# du -m loop-back-image.img
300 loop-back-image.img

It says the size is 300MB, so here is how we can add another 100MB to it.

# dd if=/dev/zero of=loop-back-image.img bs=1M seek=300 count=100

seek=300 means that dd will start at this point which is the end, and count=100 tells dd to add 100MB to that point, so we end up with a total size of 400MB. Run resize2fs on the enlarged 400MB image, it will resize the ext2 filesystem on it to fill the image.

# resize2fs loop-back-image.img

If you want to reduce the loop back image size you first have to resize the filesystem on it.

# resize2fs loop-back-image.img 200M

Afterwards you can run dd on the 300MB image to reduce it to 200MB.

# dd if=/dev/zero of=loop-back-image.img bs=1M seek=200 count=0

Again seek=200 says dd to start at 200MB and count=0 means that it should add nothing to that point so we end up with a total image size of 200MB.

read more comments

Debian Update and NO_PUBKEY Found

18.01.2006 at 17:14

To fix the error you have to download the archive signing key from, add it to the system as shown below and continue the update.

apt-key add [file-of-key]


read more comments

Running Lotus Notes 6.5.x with Wine

27.11.2005 at 15:34

I recently needed Lotus Notes 6.5.2 for business purposes, I knew that it kind of worked with Wine and so I gave it a try. Here are my tips for others who have to run Notes under a Unix-like operating system:

1) Take a wine version which is known to work (20050725) newer 
   ones like 0.9 don't (at least I couldn't manage to make it work).
2) Install the notes client on a Windows box
3) Adjust all settings on the Windows box
        - set the web browser to notes
        - set the sametime connection to manual
        - configure proper TCP/IP settings and disable everything
          else (NETBIOS)
4) Copy the notes directory over to the Linux machine
5) Copy mfc42.dll and msvcp60.dll from C:WindowsSystem32 to 
6) Launch winecfg and set the Windows version to Win98
7) Run Notes with wine "c:program fileslotusnotesnlnotes.exe"

Additional hints and help may be found in the comments in Wine's AppDB, the Lotus Notes IBM forum or over here.


read more comments

Stopping sshd Brute Forcing with fail2ban

27.11.2005 at 13:58

Today I had enough from those script kiddies trying to break into one of my boxes by brute forcing SSH passwords. So I googled a bit and found fail2ban from the homepage:

Fail2Ban scans log files and bans IP that makes too many password
 failures. It updates firewall rules to reject the IP address.

Of course still better would be to disallow all authentication methods but key-files. Another approach to solve this problem may be portknocking.


read more comments

Installing Official Java on Debian

27.11.2005 at 12:35

First of all whenever possible I would recommend using a free alternative like (classpath, kaffe or gcj) but sometimes this is simply not possible because some features are not yet implemented. Since there are no official Sun Java package in Debian, we have to install it from another source or manually. As always there are different ways to accomplish this, we could for example simply fetch the *.bin file from the Sun page, make it executable and let it extract it's content to /usr/local. Or try to convert the rpm file into a deb with alien and then installing it with dpkg.

Fortunately, there is another solution, namely java-package which will make our life a bit easier. Here is a short description of the package.

apt-cache show java-package

Description: utility for building Java(TM) 2 related Debian packages
 This package provides the capability to create a debian package from
 a Java(TM) 2 distribution by just running make-jpkg <filename>.
 This program currently works with the following Java(TM) 2 Runtime
 Environments and Development Kits:
  * Sun Microsystems(TM) 1.4 and 1.5 Standard Edition
  * IBM(TM) 1.3, 1.4, and 5.0 Standard Edition
  * Blackdown Java-Linux 1.3 and 1.4 Standard Edition
Tag: langdevel::java

As you can read installing java is as simply as executing one command.

make-jpkg <filename-of-java-package>

This simplified my process of installing standard java hope it will help you too.


read more comments

<< 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 >>