Friday, January 17, 2014

Installing Windows8.1 after Linux Mint

I'm going to wipe the existing winXP partition and substitute it with Win8.1.
The Linux Mint install should be retained, therefore I need to run the installation of the SOs in the generally-not-suggested route: first linux than windows.

There shouldn't be any major issues, also because my PC is quite old and it shouldn'e be starting in EFI mode (aka "Secure boot"), but in the common BIOS mode (aka "legacy boot").

To check the booting mode:
The simplest way is to check for the presence of a /sys/firmware/efi directory. The mere existence of this directory indicates that the computer has booted in EFI mode
 or else:
dmesg | grep -i EFI
A BIOS-based computer will lack most or all of these lines, and certainly the EFI: mem## lines.
Still on EFI booot, check this link.
 
To repair grub:
  • Boot-Repair
  • is it available for my Linux Mint LMDE Mate 64bit install?
  • Rescue dedicated distro, such as Rescatux, UBCD, PartedMagic, Hiren's boot CD, Trinity rescue disc...

To reinstall grub:
Boot  a live CD (mint 64bit in my case) and fire up a terminal.
Identify boot partition with

ls -l /dev/disk/by-label/
Reinstall grub with
sudo grub-install /dev/XXX
 
This should work.....

 

Wednesday, August 7, 2013

Cloning XP and linux to a SSD, part1

I've recently bought a Crucial SSD M500 240GB SATA III to substitute my old IDE HD seagate (120GB). 162e from Prokoo, not bad.
Crucial M500 240GB 2.5-inch Internal SSD
Capacity (Unformatted): 240GB
Interface: SATA 6Gb/s (SATA 3GB/s compatible)
Sustained Sequential Read up to (128k transfer): 500MB/s
Sustained Sequential Write up to (128k transfer): 250MB/s
Random Read up to (4k transfer): 72,000 IOPS
Random Write up to (4k transfer): 60,000 IOPS
Form Factor: 2.5-inch, m-SATA, and M.2
NAND: 20nm Micron MLC NND
Life Expectancy: 1.2 million hours mean time to failure (MTTF)
Endurance: 72TB total bytes written (TBW), equal to 40GB per day for 5 years
Operating Temperature: 0°C to 70°C
Compliance: RoHS, CE, FCC, UL, BSMI, C-TICK, KCC RRL, W.E.E.E., TUV VCCI, IC
Firmware: Field upgradable firmware
Product Health Monitoring: Self-Monitoring, Analysis and Reporting Technology (SMART) commands

The old disk hosted WinXP and Ubuntu 10.04, the latter spread on several dedicated partitions (boot, / and swap on this disk, /home on another, larger, SATA disk).

Cloning
Once connected internally to a SATA port my pc (Fujitsu-Siemens, quite old, Athlon64 X2), the SSD took the first disk position (sda) and the old disk moved to the last (sdc).
Cloning with Parted Magic (pmagic_2013_05_01) live from DVD was fast and easy.
It used partclone to copy "disk to local disk" at the astonishing rate of 3.35GB/min!!
Then I edited the grub.cfg file adding a new instance of linux pointing to the correct disk and to differentiate from the grub in the old disk: this would make evident that I'm actually booting from the SSD.
At this point I rebooted, entered BIOS to set the boot disk priority to let the SSD kick in first, rebooted and the grub from the SSD showed up correctly.
So far, so good.
But here my BIG mistake: I booted firstly windows, with BOTH the new and the old disk (cloned) connected.
WinXP did boot, but it went to the old disk, not the new one.
The reason -I've learned after long internet serach- is probably that I didn't change the UUIDs of the partitions of the new disk, therefore the boot got confused and started the old installation. The problem is that windows apparently realised that there was an identical installation on an identical partition and changed something to prevent -possibly- copy of the system.

Lesson learnt: after cloning NEVER reboot with both disks connected! Start with the new one, restart with a liveCD, change the UUIDs, re-install grub, reboot in the new disk (both OSs) and only ath this point you can safely reconnect the old disk!

Before going into the part2, with the recovery and installation of the lates LinuxMint LMDE 201303 along with XP and Ubuntu, here are the final performances:

Win XP:
was 1'16" from grub to the ethernet icon appearance (=system usable)
is ~45"

Ubuntu:
was ~ 47" from grub to the ethernet connected (=system boot finished)
is ~32"

Mint (not installed originally):
is ~ 27" from grub to the ethernet connected (=system boot finished)


Very, very good!

Monday, January 21, 2013

Thumbnails on Synology NAS

After moving from DSM3 to DSM4.0, the NAS started creating thumbnails of images.
This consumes CPU power for ages: several days may be needed to create thumbs, with the disk continuously scratching and the CPU at 100%.
After 15days of processing I was still left with 20000+ images to process.
Peering through the forums I found that this was an issue everybody met and I was eventually pointed to a great script by Phillips312: synoThumbs.sh, which uses your PC CPU and RAM to create the thumbnails and then moves the thumbs to the proper "@eaDir" on the NAS.

This is the comment I left there, to list what I did to let it work:
This works for DSM4.0 and DSM4.1, both tested on my DS210j.

0. pause the thumbnails creation on the NAS (not actually needed)
1. in your linux box, install nfs-common
2. in your DSM control panel, go to NFS management and create the appropriate rules for your PC. In my case, the NAS is on 192.168.2.10. The PC is on 192.168.2.40. The rule I’ve created allows read/write access to 192.168.2.40. It works with “no mapping” and with “mapping to root account” as well. It didn’t work by mapping the hostname, I had to fill in the real IP address.
3. on your PC:
a) showmount -e 192.168.2.10 (to check that the PC ip address is correctly allowed to access)
b) sudo mkdir /mnt/photo
c) cd /mnt
d) sudo cp /path-to-the-script/synoThumbs.sh .
e) sudo chmod u+x synoThumbs.sh
f) sudo mount -o soft,intr,rsize=8192,wsize=8192 192.168.2.10:/volume1/photo /mnt/photo
g) ./synoThumbs.sh photo
4. the script seems to hang doing nothing, but I guess it is just looking through your files. After a while it will start showing thumbnails already created or creating the new thumbs.
5. relax, take your time and say thanks to Phillips312!!!!


Help on NFS found here.

Now, what I'm thinking of is to completely remove the photostation, which is terribly slow to browse. And all those thumbnails are taking a lot of space, too.
So, two interesting links on the subject:

http://forum.synology.com/enu/viewtopic.php?f=17&t=37379&start=150#p229956
1.I created a directory named Photographs under the Files directory.
2.I moved all my photos into this directory.
3.I turn off Media server long enough to change the properties of the “system created” Phot directory and made it hidden to my network places.
4.I restarted Media Server to allow the Diskstation to be seen as a UPnp device on the network again…. No More Coverting…. Hooray!

http://forum.synology.com/enu/viewtopic.php?f=17&t=52060&start=75

1) SSH in to the NAS as root (as previously in this thread)
2) Stop the thumbnailing service
Code: Select all
/usr/syno/etc/rc.d/S77synomkthumbd.sh stop

3) Disable the thumbnailing service app from running (it's a linux thing, this marks the file as not executable)
Code: Select all
chmod -x /usr/syno/bin/synomkthumbd

4) Optionaly, and at your own risk, go in to your files root directory and delete any previously generated thumbnail folders/directories from the whole directory tree
Code: Select all
cd /volume1/
find ./ -type d -name "@eaDir" -exec rm -rf {} \;

And before removing everything, this is what NERDlogger suggests:
Run the command below and it will “echo” the names of these “@eaDir” folders to the terminal. Then once you’re satistied that it’s working well (no weird filenames/characters/etc.), then replace the “echo” with “rm -rf” to actually remove those folders.
find . -name "@eaDir" -type d -print |while read FILENAME; do echo "${FILENAME}"; done

Monday, February 22, 2010

Grub2: terribly slow at boot

Karmic Koala comes with Grub2, on a fresh install (but it will keep grub legacy on upgrades).

Beside the scarcely comprehensible layer of complexity that grub2 has added to the great old grub, I was very disappointed by the long delay on boot.
After BIOS, the booting process just hanged with a "GRUB starting" message on black screen.
It stays like that for ~15-20 seconds.
Than grub menu shows up.
Amazing, since Karmic was said to be one of the fastest booting experiences one could have....

Now, poossibly the solution is here:

Grub 2 Hangs 10-30 Seconds between Grub 2 Loading and Menu Display.
This is a known bug that can be caused by GRUB 2 and /boot being loaded on different partitions. To fix the problem, run
Code:
sudo dpkg-reconfigure grub-pc
Select to load Grub 2 on the same device as the /boot partition. In your system BIOS, change the drive to boot from first to the drive with the /boot partition.

As it happens, my /boot partition and my /home are on two different disks.
I need to check, but it might actually be that grub got installed on the disk with the /home partition and not the one with /boot and / partitions (which is amazing, since I kept the insalling disk for grub suggested by the installation process....).

Friday, February 19, 2010

Sound issues on Karmic 64bit

Issue and possible solutions, just listed, very few comments.

=================
No sound problem:
=================
Live CD --> everything's fine
Install --> fine
Restart --> install nvidia proprietary --> restart --> no sound!
200+ updates --> restart --> continuous whistle
Disable on board Audio card --> crappy sound, but something, at least.
Movieplayer and Rythmbox ask for additional codecs (to play wma and mp3). I let them download their codecs and reboot.
Still crappy sound (with rythmbox and vlc, no sound at all with movieplayer). See below for sound problem description and possible solutions.

=================
Useful output commands for audio/video troubleshooting
=================
uname -a
aplay -l
arecord -l
amixer -c 0

to check if the system recognizes the soundcard:
aplay -l
lspci -v | less

sounds module installed?:
find /lib/modules/`uname -r` | grep snd


===========
Comprehensive Multimedia & Video Howto
===========
enable medibuntu:
sudo wget http://www.medibuntu.org/sources.list.d/`lsb_release -cs`.list --output-document=/etc/apt/sources.list.d/medibuntu.list; sudo apt-get -q update; sudo apt-get --yes -q --allow-unauthenticated install medibuntu-keyring; sudo apt-get -q update
install all multimedia stuff:
sudo apt-get remove gnash gnash-common libflashsupport mozilla-plugin-gnash swfdec-mozilla && sudo apt-get install alsa-oss faac faad flashplugin-nonfree gstreamer0.10-ffmpeg gstreamer0.10-plugins-bad gstreamer0.10-plugins-bad-multiverse gstreamer0.10-plugins-ugly gstreamer0.10-plugins-ugly-multiverse ia32-libs ia32-sun-java6-bin icedtea6-plugin libmp3lame0 non-free-codecs openjdk-6-jre unrar
install gecko (for audio/video streaming in web browser):
sudo apt-get remove kaffeine-mozilla mozilla-helix-player mozilla-mplayer mozilla-plugin-vlc totem-mozilla xine-plugin
sudo apt-get install gnome-mplayer gecko-mediaplayer
reboot

audio conversion:
sudo apt-get install soundconverter audacity oggconvert
tag editor:
sudo apt-get install exfalso
Video conversion:
sudo apt-get install avidemux ffmpeg winff
DVD playback:
sudo apt-get install libdvdcss2 libdvdread4 libdvdnav4 vlc
alternative to VLC: sudo apt-get install gxine libxine1-ffmpeg
DVD rip
sudo apt-get install dvdrip
alternative: sudo apt-get install k9copy

Firefox add-ons:
NoScript (tick the box entitled "Temporarily allow top-level sites by default");
Screen resolution:
sudo xrandr -s 1280x800 (to set at 1280x/800)
sudo xrandr -q
Use the first command again and set the highest resolution that RandR claims is supported. Once that is set, try setting the resolution you know is correct, as it may now accept that resolution
==============

==============
Possible solutions or approaches to solve the sound issue
==============

Here after, a list of solutions that are reported to have worked at least ones:

1. kernel
check that grub is really starting the latest kernel (2.6.31-14-generic reported to work)
dpkg --get-selections | grep linux-image
uname -r
Edit your menu.lst file so that the kernel version numbers are up to date:
sudo gedit /boot/grub/menu.lst

2. check volumes or mute
gnome-alsamixer
or
alsamixer -Dhw (hw device should be specified)

3. pulseaudio fixes
backup and delete
$ mkdir ~/pulse-backup && cp -r ~/.pulse ~/.asound* /etc/asound.conf /etc/pulse -t ~/pulse-backup/
$ rm -r ~/.pulse ~/.asound*
$ sudo rm /etc/asound.conf
install libreries and utilities
sudo apt-get install libasound2-plugins padevchooser libsdl1.2debian-pulseaudio
purge libflashsupport
sudo apt-get remove --purge libflashsupport flashplugin-nonfree-extrasound
config pulsaudio device chooser (choose default output and input card)
$ pulseaudio & pavucontrol
check alsa PCM volume or mute
alsamixer -Dhw
Note: When the PulseAudio ALSA plugins are active, you must explicitly specify your hardware device in alsamixer (marked in blue above), otherwise it will open the PulseAudio mixer
4. alsa reinstall
backup as in previous item:
mkdir ~/pulse-backup && cp -r ~/.pulse ~/.asound* /etc/asound.conf /etc/pulse -t ~/pulse-backup/
remove alsa:
sudo apt-get --purge remove linux-sound-base alsa-base alsa-utils
shutdown and restart
reinstall alsa:
sudo apt-get install linux-sound-base alsa-base alsa-utils
sudo apt-get install gdm ubuntu-desktop
shutdown and restart
configure:
goto System > Preferences > Sound
goto Hardware tab and goto Profile:
Select "Analog Stereo Duplex"
5. upgrade alsa to 1.0.22
6. modem proprietario
(= switch it off from "Proprietary Driver" dialog)
answer to issued bug:
This problem has been temporarily resolved by disabling the proprietary Smart Link Software Modem driver available in Ubuntu's Hardware Drivers dialog (jockey-gtk).

7. remove pulseaudio
sudo apt-get remove pulseaudio


-----------------
EDIT: approach 4 made the trick and now sound works, even if not perfectly yet.
-----------------

Karmic Koala 64bit: almost fresh install

Fresh install of Karmic Koala, but keeping the previous /home partition unformatted.
Installation quite OK, but a few issues immediately arose.
Most important of which, several sound issues.

More detailed installation description in a later post.

As for now, the overall impression is that compared to 8.04 this Ubuntu release has several improvements, but it's missing loads details and functionalities which for sure would make at least a bad impression on new linux adepts, if not falling back on windows.

Thursday, December 17, 2009

O2Media HMR-600W

o2media HMR-600W

Ho appena comperato l'oggetto qui sopra, con l'idea di fare principalmente un lettore di file video, immagini e magari prepararsi al digitale terrestre.
Una delle caratteristiche interessanti per l'utente finale (genitori) e che lo rende teoricamente molto semplice da connettere, e' la presenza di due scart (in e out) per collegarsi alla televisione e per collegare magari il videoregistratore (e riversare le vecchie videocasssette) o un decoder.

Ieri mi e' arrivato, dalla Spagna, in soli 3gg dall'ordine....!

L'ho collegato alla TV (scart), al decoder sky (sempre scart) e all'antenna per il DVB-T.
Ho pure attaccato la chiavetta wifi allegata.

C'e' un forum interessante, forse l'unico dedicato ai prodotti O2Media. Sul sito e sul forum di 1e2.it ci sono molte informazioni utili e c'e' un'ottima recensione dell'amministratore, Galerio.

Cito velocemente le mie impressioni, magari possono tornare utili a potenziali nuovi utenti.
Orami ho una esperienza pluriennale con Mythtv, e ho recentemente aggiunto un po' di tentativi con VDR,, XBMC e VistaMediaCenter, quindi soprattutto Mythtv e' il mio metro di paragone per un MediaCenter.


L'HD incluso e' un Seagate Barracuda 7200.12 da 1TB.
La formattazione e' andata come preannunciato da Galerio in un altro thread: timeshift swap una grande partizione NTFS.

La qualita' di visione e di registrazione (sia DVB-T che scart) e' ottima, anche il cambio canali e' molto veloce.
Con Mythtv, lo zapping e' praticamente impossibile (a causa del timeshift permanente). Qui invece e' ottimo, anche con il timeshift attivo e' accettabile. Solo VDR forse e' piu' veloce.
Lo scan dei canali a Milano ha trovato circa 80 voci, molte inutili (come Rai Test, et similia)

Il telecomando ha una disposizione (e assegnazione) di tasti non esattamente intuitiva, ma si impara.
La ventola e' abbastanza silenziosa e non si sente l'hard disk "grattare", in registrazione.
Il software e' piuttosto brutto, esteticamente, e non del tutto funzionale. In compenso e' piuttosto intuitivo.
Trovo antipatico che non si possa settare l'avvio del mediacenter direttamente sulla trasmissione TV o sul browsing dei film o altro a scelta.
Anche il metodo di browsing dei file e' un po' poco pratico: le voci al top dello schermo fanno solo da filtro e non ho trovato modo di settare come minimo una directory di default (ad es. sarebbe naturale che il filtro "video" puntasse direttamente a una cartella di video, e non alla root o all'ultima visitata).

La visione delle foto e' veloce, gli effetti di transizione sono ridicoli e anche il tentativo di colonna sonora mi pare un po' poco curato.
Comunque le foto si guardano bene, si ruotano e si fa lo zoom con velocita' e facilita'.

Anche la gestione dei file musicali e' scarsa: non vedo possibilita' di ricerca o ordinamento per teg o creazione di playlist. In compenso legge formati di tutti i tipi e direi con buona resa.

Le registrazioni sono di ottima qualita', ma il fatto di non poter dare un nome alla registrazione in fase di programmazione e' una grave lacuna. Anche registrando dal DVB-T il nome automatico del file non viene preso dall'EPG, ma e' automatico, con data e ora. Non tiene neppure un database con informazioni tipo nome film, trama, attori, durata. Veramente un peccato.
Per altro, l'EPG trasmessa sul digitale terrestre e' davvero scarsa, non si puo' praticamente programmare niente. Se almeno mettessero la possibilita' di usare xmltv... Magari prossimamente lo segnalo nell'apposito thread sui suggerimenti di 1e2.it ....
E per restare in tema, altra pecca enorme e' l'assenza di possibilita' di un editing anche elementare della registrazione, ad esempio per eliminare le parti pre- e post-film oppure marcare e tagliare le pubblicita'.
Se poi mettessero una funzione di transcoding, anche solo per produrre un semplice Xvid senza troppe pretese...
Magari qualche nuova versione del firmware aggiungera' queste funzioni. Chissa'.
Ultimo difetto per la parte registratore e' che apparentemente la funzione OTR non e' ben implementata dato che scadenza del timer l'HMR non si spegne. Invece di 1h30 di registrazione OTR, ha registrato per 7 ore, prima che lo spegnessi.....!!!


Wireless: La gestione wireless e' piuttosto macchinosa, ma funzionale. Peccato che non serva a molto. Vedendo il wireless in bundle col sistema, ho scioccamente creduto che ci fosse un browser o anche solo che si collegasse a you tube, shoutcast e le previsioni meteo.... Invece niente, mi pare di capire che serva solo per collegarsi alla rete domestica, o ai torrent, ad amule testuale, etc. Magari si puo' installare links per fare del browsing testuale, ma bisognerebbe almeno poter aprire un terminale da telecomando, cosa che mi pare non si possa fare.

La connessione di un dispositivo USB, non fa partire automaticamente il browsing dei file.

La possibilita' di connettere una tastiera USB semplificherebbe molte delle operazioni di rename e trasferimento dei file. Anche l'indicazione della durata totale del film in visione sarebbe utile.

Ultima pecca, il manuale e' scarno e troppo essenziale. Ad esempio nulla si dice su come gestire le foto, la colonna sonora delle stesse, la rotazione etc. Bisogna andare per tentativi....
Anche la mancanza di un forum ufficiale in inglese o spagnolo, mi pare una lacuna che O2media dovrebbe colmare.

In generale, pero', l'HMR-600W mi pare funzionale anche se un po' di aspetti andrebbero curati di piu', a cominciare dal software e dalla mancanza di accesso diretto a internet collegato alla GUI.
Prossimamente magari provo a testare i nuovi firmware ufficiali e/o moddati (presente sempre su 1e2.it).


Devo fare ancora delle prova piu' estensive, in particolare con i diversi formati video.

Per finire, alcune questioni aperte che ho riproposte nel forum:

1. A HMR spento (HW, non col telecomando) e TV accesa sul canale AV, sento un sacco di interferenze (canale 5, per la cronaca). Appena accendo la corrente con il tasto HW le interferenze spariscono. Anche in modalita' stand-by non si sentono. Capita anche ad altri?

2. Esiste un modo per associare una particolare funzione a un tasto del telecomando? Ad esempio, vorrei con un tasto andare direttamente al browsing delle immagini in una particolare cartella.

3. C'e' un modo per aprire un browser? Per vedere you tube e meteo o cose simili....