Tuesday, December 2, 2014

Mysql: quick backup with mysqldump

You need to do a quick backup of a mysql table?
Give this command:

mysqldump database_to_backup_name -u root -p > ./filename_with_dumped_db.sql

this will produce a file(filename_with_dumped_db.sql) with all the backupped db(database_to_backup_name).

Please refer here to the mysql manual pages.

Bye..

Monday, December 1, 2014

linux: make a symbolic link to a directory

From command line this give you a link to a folder:

ln -s /home/user/workspace/original_folder_to_link/ /var/www/linked_folder

Bye...

Thursday, October 23, 2014

Debian, gnome3: system settings menu icon disappeared....

We are under gnome3.
If for any reason the System settings menu icon under
Applications menu --> System Tools menu --> Preferences menu
is disappeared;
you need to install the gnome-control-center
by giving simply...:

apt-get install gnome-control-center 

Bye..

Saturday, October 18, 2014

Debian Wheezy 64 bit: installing correctly skype

I assume you've downloaded skype from site.
The Debian 7 multiarch package.

I have some problem during skype installation on my 64 bit architecture.
Something like this:

package architecture (i386) does not match system (amd64)
Errors were encountered while processing:
skype

So, I need to do these steps:

dpkg --add-architecture i386
apt-get update
apt-get install qt-at-spi:i386
dpkg -i  skype-debian_4.3.0.37-1_i386.deb
(where skype-debian_4.3.0.37-1_i386.deb is the file version I currently downloaded..)

Now It goes like a charm....

Bye...

Debian Wheezy a good cd ripper(but not with default installation): setup asunder

Hi all,

I need to rip some old cds.
But I don't like the default installed sound-juicer.
It cannot give me(easly) the way to set the bitrate.

So I remove it and I try another: asunder
Very very simply and good!!!
apt-get remove sound-juicer
apt-get install asunder
dmesg | grep CD
give me this output
[    2.229627] scsi 1:0:0:0: CD-ROM            HL-DT-ST DVDRAM GUA0N     AL00 PQ: 0 ANSI: 5
[    2.252941] cdrom: Uniform CD-ROM driver Revision: 3.20
[    2.253162] sr 1:0:0:0: Attached scsi CD-ROM sr0
You see the last word..? Is sr0.
It's indicate where asunder have to read the cd
So after the installation launch asunder, go under Preferences
General tab, and insert /dev/sr0 (or what is for you) in the CD-ROM device text field.

All is done.

Bye....

Debian Wheezy and Lenovo G50: setup sound card

One of the problem I have after debian installation is that it seems controller and sound card seems to be recognize.
Giving the commands:

lspci | grep audio
lsmod | grep snd
speaker-test  
 
may help you to see what has been recognized.
In my case all seems to be recognized, but I hear no sounds.

From gdm right-clicking up on the right, on the volume control and choosing sound preferences I see only this voice:
Built-in Audio Digital Stereo(HDMI)
and above in the combo menu list I see only
HDMI / Display port

This not give me assurances.
So after some try I install some other modules:

apt-get install firmware-linux-nonfree
dpkg-reconfigure alsa-base
aslactl init
alsamixer

Into alsamixer giving F6 key I see that there were 2 sound card.
Now I see that I have two sounds card(exactly the same I see with the other commands by sheel).

Now clicking on the volume icon(sound preferences) I see also here(and I select it(under Output and Hardware tabs)) the view on the correct sound card(in my case Built-in Analog Stereo, and under connector the possibility to choose among Headphones or Speakers).

Now all seems solved....

Bye

Monday, October 13, 2014

Dual Boot: Windows 8 and Debian 7.6.0 Wheezy in Legacy Mode under my new Lenovo G50

Hi all, I want to share with all my hard experience to find the correct way to have Windows 8 and Debian Wheezy correctly installed on my new laptop Lenovo G50.
All in correct dual boot, rigorously with Grub 2, and in Legacy Mode(NO UEFI).

Premise: I bought the laptop with Windows 8 pre-installed. I just copy the product key(right click on my computer, see on the right frame, down) of my Windows 8 version. For laziness I forgot to do the correctly procedure to download the Windows 8 distribution(recover dvd) from the site....
So when I run Easus Partition to resize my partitions(I only resized the major, where windows 8 was installed), after rebooting, no o.s. was found....
It's the begin of my "some days of madness".
Why?
Beacause I'll never "played" before with windows 8 installation and UEFI technology....
Well(and I end my premise) I reinstalled windows 8 and debian 7, I don't know how much time.....
I don't know how much isos of different distribution I downloaded....
How many repair tools and other.....
At the end..... I will use only what already were in my possession... an old distribution of parted magic, that's now is no more a free distribution...
But we see also how to do all without this really magic distribution....

Are you ready?

1)Go under your bios and disable Secure Boot and UEFI boot. Choose Legacy mode. Choose dvd reader as first boot option.
2)Insert a copy of your PartedMagic or any other live distribution. We need to backup the system reserved data(on another hard disk, an external..).
In my case I backup completely all the data contained in the other partition pre-created by the manufacter.
The most important: the reserved partition were UEFI files are stored.
But most of all the reserved partition of all drivers for windows 8(so when I reinstall the windows 8 I already have all drivers ready to install...)
3)Ended the backup(really is a copy on another hard disk) we need to have 2 things to download:
- the windows 8 distribution(that you can download from here; it's a magnet link for torrent; It's a Windows 8 enterprise).
- the debian 7 live distribution
4) Now we can install Windows 8. Insert dvd, I prefere to don't connect the pc to the net. It will be a more quickly installation.
During the setup you have to erase all the hard disk.
You can do this also before starting installation with another partitioner tool.
5) Ended the windows 8 installation, you have to disable the windows 8 fast startup.
Next you need to modify(erase) the GPT table; so you have 2 chances:
first one is to go with gparted cd and start the partitioner tool.
second one is to start the live cd of debian. Install the gparted and start it.
When gparted starts, a message will show to you:

/dev/sda contains GPT signatures, indicating that it has a GPT table. However, it does not have a valid fake msdos partition table, as it should. Perhaps it was corrupted - possibly by a program that doesn't understand GPT partition tables. Or perhaps you deleted the GPT table, and are now using an msdos partition table. Is this a GPT partition table?

Where /dev/sda depends of your system. It should be /dev/sdb or anything other...
Yes we have to erase GPT table. To do this give this command:
sgdisk --zap /dev/sda

sgdisk is equipped already from gparted distribution.
If we proceeded with the live distribution(as in our case Debian live) we have also to install it(from 7.6 it is in debian repository)
apt-get install gdisk

6)Now we removed the gpt table. Now our debian live distribution will be able to see windows partition.
Start it and proceed with a normal installation.
Preserve(do not move or resize) windows partitions.
Install(as default) grub boot loader into master boot record.

At the end of installation, reboot and you will have a "normal" dual boot with Windows 8 and Debian 7 Wheezy.

P.S.: only in this moment I proceed with Windows 8 activation(after I replace the product serial id with mine).

Bye..