Archive for English

Dreamhost & git

If you are trying to setup git in your server, think two things first:

  1. Only for your user Vs. multiple users
  2. With or without web-based repository browsing

Why? Because all options are not possible at DH.

Only for your user Vs. multiple users

If only your used will update the repositories, then you can access to your server using SSH o WebDav. If more people will update the repositories, then you need WebDav access. For WebDav access, you need to setup it using the panel BUT, you cannot edit the .htaccess and .htpasswd files, because you don’t have access to this files.

With or without web-based repository browsing

If the web presentation is not important for you, then you can configure your repositories without web browsing. If you want to show your repositories using a web-based repository browsing, like for example GitWeb, then you need edit the .htaccess file. But if you are using WebDav, then, you cannot edit the file!

Summary

Users Only one More than one
Access SSH WebDav WebDav
“GitWeb” Yes No

I hope this table helps.
 

Some links:
http://joemaller.com/990/a-web-focused-git-workflow/
https://github.com/git/git/tags
http://wiki.dreamhost.com/Git


Leave a Comment

Problems with Windows Update – NOD32?

The last week I had some problems with Windows Update and probably NOD32. I installed a NOD32+WindowsUpdate updates and when I rebooted the computer, the Windows logo stops… problem.

After some time booting in Rescue Mode, Safe Mode, Geek Mode,… I discovered that the problem was with Windows Update. A patch cannot continue with the installation, and therefore I cannot use the option to restore a previous Windows status (Restore mode).

How I soved it? I removed (I couldn’t move/rename) the c:windows\winsxs\pending.xml file to reboot the machine. Then I uninstalled the NOD32 (was damaged) and reinstalled it. Some lines to help:

  • The file pending.xml cannot be moved, must be deleted, don’t spend time with it
  • If you cannot change the owner user of the file, you can enable the real Administrator [1]
  • If you cannot uninstall NOD32, probably you need the ESET unnistaller [2]

Real Administrator:

  1. Click START
  2. Type: cmd
  3. Right click cmd, click Run As Administrator
  4. Open the command prompt in Vista and type:
  5. C:\> net user administrator /active:yes
  6. Press enter


[1] http://www.internetfixes.com/administrator_account_vista_home/

[2] http://kb.eset.com/esetkb/index?page=content&id=SOLN2289

Leave a Comment

Installing alone Debian GNU Linux in Mac Mini Server 2011

I followed these steps to install alone Debian GNU Linux in my Mac Mini Server (2011 edition), without MacOS X. Please, read this post first, then do it. Make it at your own risk.

You will need (all steps):

  1. 2 USB memory sticks
  2. Empty CD-Rom to write and USB burning drive (or other USB drive)
  3. Debian boot image file (boot.img.gz)
  4. Debian install image

Step 1 – Download the installation media.

Mac Mini has a bug about installing from CD-ROM (external) and you cannot use this method, therefore, you need to do USB installation. You need for this step:

  1. 1 USB memory sticks
  2. Debian boot image file (boot.img.gz)
  3. Debian install image
  4. Installed operation system (Linux, Windows, MacOS X)

The Mac Mini has “new” hardware, not supported in all Debian versions. With old images you can boot, but the network cards won’t be detected. You need download a newer Debian testing CD and boot.img file. You can download the boot.img.gz file here: http://ftp.nl.debian.org/debian/dists/lenny/main/installer-amd64/current/images/hd-media/ (look the date, is 2011/10/02 or later). Now, the Debian install ISO image. You can use a businesscard image o netinstall image, because are small (you will copy the image in the pendrive). I used the netinstall image. You can download the images here: http://cdimage.debian.org/cdimage/daily-builds/daily/arch-latest/amd64/iso-cd/.

Now is time to create the USB drive with the boot image. You can do it using Windows, MacOS X or Linux. But you need dd or zcat (find them, for your operating system, using your favorite search engine).

Plug the USB drive to the computer. If your are using Linux, type dmesg to find the device. Do not use partitions in the USB drive, use the main device. For example, if the USB plugged is /dev/sdj with the partition /dev/sdj1, you must use /dev/sdj. If you delete the partition, sometimes is better. Now select option 1 or option 2 (sdj is the USB drive):

Option 1, using zcat:

zcat boog.img.gz > /dev/sdj

Option 2, using dd:

You need to uncompress the file first. Then make the USB boot:

gzip -d boot.img.gz
dd if=boot.img of=/dev/sdj

Now, copy the image file (something like debian-testing-amd64-netinst.iso or debian-testing-amd64-businesscard.iso) to the USB drive. Mount the drive first (I will use /mnt as mountpoint). Probably you need mount with the user root or using sudo. Do not forget to write the full path of the debian-testing-amd64-businesscard.iso file in the copy if is not in the current folder:

mount /dev/sdj /mnt
cp debian-testing-amd64-businesscard.iso /mnt

Step 2 – MacOS X recovery/install USB drive.

You need for this step:

  1. 1 USB memory stick
  2. MacOS X or recovery image

At the end of the installation (Step 4), you need run the bless command. It is included in MacOS X, and you can use it form the recovery or install device.

Download the “Lion Recovery Disk Assistant” form Apple at http://support.apple.com/kb/DL1433. Install it in you MacOS X and create the recovery USB drive.

If you don’t have MacOS X, probably you can download a recovery image. Burn it with dd.

Test the image booting the Mac Mini (press Alt key,…), select the recovery disk, your language and of course, cancel the installation.

Step 3 – Create rEFIt drive
You need copy some files from the rEFIt CD-ROM to the EFI partition in your hard drive. You will need to connect these files to the Mac Mini, using a USB stick or USB CD-ROM drive.

You need for this step:

  1. USB memory stick or CD-ROM drive

Download the rEFIt iso form . Now, open the iso file (e.g. with winRAR or mount -t loop) and save the files in a folder in the pendrive or write the ISO in a CD-ROM. You will need some files of this ISO in the step 5. I wrote the ISO in a CD-ROM.

Step 4 – Install Debian

You need for this step:

  1. USB memory stick burned in the Step 1

Ok, we start. Now, your MacOS X will be deleted (and your files!). Now, you cannot go back, therefore, please, check that you made all the previous steps and have the things ready. Insert the USB drive in the Mac Mini, hold the Alt key and press the power button. When the boot manager show the drives, release the Alt button. Select the USB stick (labeled “Windows” :-) ) and boot Debian installation.

Probably you know how to install Debian. I don’t spend time with it. The most important is the partitions:

  1. You need to leave the EFI System Partition in the disks (about 200Mb), do not erase it. Is used by the EFI and you need it in the Step 5.
  2. Delete only the Apple Partitions.
  3. If you setup RAID, you need a /boot partition. Create it in the first drive. About 200Mb.
  4. Do not forget to create a swap drive.
  5. I recommend RAID if you have Mac Mini Server.

Your partition tables (2 disks) should be something like (with comments):

Device Boot Start End Blocks Id System
/dev/sda1 1 409639 204819+ ee EFI System Partition
/dev/sda2 * 409640 800265 195313 83 Linux (/boot)
/dev/sda3 800266 1449823703 724511719 fd Linux raid autodetect (/)

Device Boot Start End Blocks Id System
/dev/sdb1 1 409639 204819+ ee EFI System Partition
/dev/sdb2 * 409640 16795200 16385560 83 Linux raid autodetect (/)
/dev/sdb3 16795201 1449823703 708126159 82 Linux swap

Finish your debian installation. Install GRUB in MBR.

Step 5 – Setup rEFIt

Now, if you try to boot the Mac Mini, the process will fail. Don’t worry. Is time to recover the boot.

You need for this step:

  1. USB memory stick burned in the Step 2 (MacOS X recovery disk)
  2. USB memory stick burned in the Step 3 or the CD-ROM (rEFIt)

Plug the MacOS X recovery USB and boot the Mac Mini pressing the Alt key. Select the recovery drive to boot. Select your language and in the toolbar select “Terminal”.

In the terminal we need to copy some files form the rEFIt ISO to the EFI partition. Mount the partition with the EFI (default /dev/disk0s1) in one folder. Check the EFI partition with:

diskutil list

Now, mount the EFI partition. I created a folder in the tmpfolder of the user to do it (not /tmp because is read-only):

mkdir tmp/efi
sudo mount -t msdos /dev/disk0s1 tmp/efi

Check if is mounted with

mount

Remember the full path of the tmp folder (e.g. /youhomefolder/tmp)

Now you can change to the tmp/efi folder and check the files (sometimes is empty, but I had a APPLE folder, don’t do nothing (erase,…)). Now, create an efi folder in the EFI partition:

cd /yourhomefolder/tmp/efi
mkdir efi

Now mount the ISO or the USB drive (yourEFIdevice):

cd /yourhomefolder/tmp/
mkdir origin
mount yourEFIdevice /yourhomefolder/tmp/origin

and copy:

cp -r /yourhomefolder/tmp/origin/efi /yourhomefolder/tmp/efi/

Now, you will have the efi folder in /yourhomefolder/tmp/efi/. Probably these previous steps could be done using Linux or as first step (with MacOS X), but I did at the end of the process. Time to run bless:

bless --mount /efi --setBoot --file /yourhomefolder/efi/efi/refit/refit.efi --labelfile /yourhomefolder/efi/efi/refit/refit.vollabel

Ok, done. Shutdown the computer, remove the USB/CD-Rom drives and boot the system. Wait. Wait More. Now rEFIt shows their menu (http://refit.sourceforge.net/screen.html)

Don’t boot Linux yet, the partition table must synchronized with the GPT partition table. This gives legacy operating systems and boot loaders access to hard disk partitions. To do this step you have two options, select it in the menu (with keypad and hit enter) or run the rEFIt shell and run “gptsync.efi”.

Reboot your Mac, wait, wait more, rEFIt boot screen, wait more, wait. GRUB is here, wait, Debian is booting. Enjoy.

Comments are welcome.

Leave a Comment

ID3 hooks for gpodder

I had some problems with gpodder because my Philips GoGear do not support mp3 files with id3 version 2 (id3v2) info.

I wrote two different “hooks” to solve the problem:

1. The first hook converts the id3v1 to id3v2 using eyeD3 when the file is transfered to the device. This hook is id3v2toid3v1.py

This hooks works fine if the mp3 file has id3v2 header. The problem is with mp3 files without id3 header, because the id3v1 header will be empty too. Then, I wrote a second hook:

2. The second hook checks if the original mp3 file has id3 headers with a minimum fields filled (album, artist, date and genre). If they are empty, the hook creates them with the information in the podcast rss file. This hook is retagging.py

For this second hook, a new patch for gpodder is needed, because we need access to the database and to the downloaded file. The patch can be found here and has been reported to the gpodder dev team as bug.

Please, do not forget to rename de <file>_py.txt to $home/.config/gpodder/hooks/<file>.py

Enjoy.

Leave a Comment

Installing Office 2007 in Debian Linux

I found some problems in other (good) tutorials … but are a little bit old and then incorrect. A new one using debian testing:

  1. Install the wine packages: apt-get install wine wine-bin wine-utils cabextract
  2. Run winecfg to set the configuration directory (~/.wine)
  3. Now, we need the Microsoft XML Parser. To install it, the best is install the winetricks script. Get it at http://wiki.winehq.org/winetricks
  4. Change the permissions of the winetricks script file: chmod +x winetricks
  5. Run the script and select the MS XML version 3: ./winetricks msxml3. The cabstract package was installed in the first step because winetricks needs it.
  6. Insert the Office 2007 CD-ROM and mount it with the unhide option: mount -t iso9660 -o unhide /dev/cdrom /media/cdrom
  7. Start the installer: wine /media/cdrom/setup.exe

Enjoy it.

Comments (1)

How 2 debug usb @ linux kernel


#!/bin/bash
mount -t debugfs none_debugs /sys/kernel/debug
modprobe usbmon
ls /sys/kernel/debug/usbmon
cat /proc/bus/usb/devices
cat /sys/kernel/debug/usbmon/1t

1t is my device :-)

Leave a Comment

Spotify without invitation / Spotify sin invitación

Just click in the next link. Haz click en el siguiente enlace:

https://www.spotify.com/en/get-started/

Comments (1)