2013/08/16

Install an Ubuntu server from a pendrive

Did you know that you may install an Ubuntu server image just from a pendrive?

I downloaded the image, inserted a pendrive (be aware, it will be totally erased)...

dmesg

---------------------------------------------------
[25003.567296] usb 2-1.4: new high-speed USB device number 4 using ehci-pci
[25003.676610] usb 2-1.4: New USB device found, idVendor=03f0, idProduct=5307
[25003.676617] usb 2-1.4: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[25003.676622] usb 2-1.4: Product: v165w
[25003.676627] usb 2-1.4: Manufacturer: HP
[25003.676631] usb 2-1.4: SerialNumber: 00000000000064
[25004.248877] Initializing USB Mass Storage driver...
[25004.249075] scsi4 : usb-storage 2-1.4:1.0
[25004.249243] usbcore: registered new interface driver usb-storage
[25004.249247] USB Mass Storage support registered.
[25005.249142] scsi 4:0:0:0: Direct-Access     hp       v165w            0.00 PQ: 0 ANSI: 2
[25005.249627] sd 4:0:0:0: Attached scsi generic sg3 type 0
[25005.250955] sd 4:0:0:0: [sdc] 7892040 512-byte logical blocks: (4.04 GB/3.76 GiB)
[25005.251674] sd 4:0:0:0: [sdc] Write Protect is off
[25005.251683] sd 4:0:0:0: [sdc] Mode Sense: 00 00 00 00
[25005.252410] sd 4:0:0:0: [sdc] Asking for cache data failed
[25005.252417] sd 4:0:0:0: [sdc] Assuming drive cache: write through
[25005.256280] sd 4:0:0:0: [sdc] Asking for cache data failed
[25005.256287] sd 4:0:0:0: [sdc] Assuming drive cache: write through
[25005.746065]  sdc: sdc1 sdc2
[25005.749229] sd 4:0:0:0: [sdc] Asking for cache data failed
[25005.749236] sd 4:0:0:0: [sdc] Assuming drive cache: write through
[25005.749243] sd 4:0:0:0: [sdc] Attached SCSI removable disk

---------------------------------------------------

... that it was identified as a /dev/sdc, then I saved the image into the pendrive:

---------------------------------------------------
cat ubuntu-12.04.2-server-amd64.iso > /dev/sdc
---------------------------------------------------

Just like that! Boot your server and enjoy!

2013/05/11

A DLNA server in Debian GNU/Linux Wheezy for your Samsung Smart TV

Your home server may be configured to be a DLNA server so you can enjoy your own videos, pictures and music in a smart tv.

Of course, it is assumed you have a LAN with a linux server and a smart tv networked.

There are several open source proyects, here I use minidlna that is already available in Debian Wheezy! the new stable version.

Here it is the procedure as described here and here, and it took very little.

apt-get install minidlna

Then, you need to setup the server in /etc/minidlna.conf, my current configuration as example:

root@gatux:~# grep -o "^[a-z].*" /etc/minidlna.conf
media_dir=/srv/shared
log_level=info
port=8200
friendly_name=DLNA Server
serial=12345678
model_number=1
inotify=yes
album_art_names=Cover.jpg/cover.jpg/AlbumArtSmall.jpg/albumartsmall.jpg/AlbumArt.jpg/albumart.jpg/Album.jpg/album.jpg/Folder.jpg/folder.jpg/Thumb.jpg/thumb.jpg
notify_interval=15


(Re)build your database, I will use a cron task every day :-)

/etc/init.d/minidlna stop
minidlna -f /etc/minidlna.conf -R -d
/etc/init.d/minidlna start 


Open the tcp port 8200 in the firewall of your home linux server if it is necessary (sure it is), I use webmin but this may just do the the trick temporarily:

iptables -I INPUT -p tcp --dport 8200 -j ACCEPT

Finally, with your dlna server running, in your smart tv choose the source, a Samsung UN55ES7100 in my case:



















Nice, the Debian icon is diplayed!

Descending into the directories I found my collection... well just one video in my case:















Enjoy!

2013/02/25

Install Subversion 1.7 from wandisco repository on Debian GNU/Linux Wheezy

Debian GNU/Linux Wheezy is still using subversion 1.6.x, here there is a shellscript according the instructions given by this blogger to install subversion 1.7:

----------------------------------------------------------------------

#!/bin/bash
#http://ymartin59.free.fr/wordpress/index.php/2012/11/25/how-to-install-subversion-1-7-from-wandisco-repository-on-debian-wheezy/
apt-get install equivs

cat > libdb4.8-control-wheezy <<EOF
### Commented entries have reasonable defaults.
### Uncomment to edit them.
# Source: <source package name; defaults to package name>
Section: misc
Priority: optional
# Homepage: <enter URL here; no default>
Standards-Version: 3.9.2

Package: libdb4.8
Version: 4.8.30-fake
Maintainer: Yves Martin <guess@free.fr>
# Pre-Depends: <comma-separated list of packages>
Depends: db4.8-util
# Recommends: <comma-separated list of packages>
# Suggests: <comma-separated list of packages>
# Provides: <comma-separated list of packages>
# Replaces: <comma-separated list of packages>
Architecture: all
# Copyright: <copyright file; defaults to GPL2>
# Changelog: <changelog file; defaults to a generic changelog>
# Readme: <README.Debian file; defaults to a generic one>
# Extra-Files: <comma-separated list of additional files for the doc directory>
# Files: <pair of space-separated paths; First is file to include, second is destination>
#  <more pairs, if there's more than one file to include. Notice the starting space>
Description: Link to new package name db4.8-util
EOF

equivs-build libdb4.8-control-wheezy
apt-get install db4.8-util
dpkg -i libdb4.8_4.8.30-fake_all.deb

wget -q -O - http://opensource.wandisco.com/wandisco-debian.gpg | sudo apt-key add -
echo "deb http://opensource.wandisco.com/debian/ squeeze svn17" > /etc/apt/sources.list.d/wandisco-subversion.list
apt-get update
apt-get install subversion subversion-tools

svn help

----------------------------------------------------------------------

Enjoy!