Search This Blog

Showing posts with label ubuntu. Show all posts
Showing posts with label ubuntu. Show all posts

Tuesday, March 26, 2013

Installation of Sublime Text editor on Ubuntu 12.10

Update 1:
added how to update alternatives in debian/ubuntu

An absolutely brilliant  installation manual how to install Sublime on Ubuntu:
How to install Sublime Text 2 on Ubuntu

If you want now type 'editor' in bash and start sublime as your default editor you have to update the alternative system that Debian introduces.
 
 update-alternatives --install /usr/bin/editor editor /opt/Sublime\ Text\ 2/sublime_text 55
 update-alternatives --display editor



Friday, February 22, 2013

My GNU gpg recipes

My public GNU gpg key

A link to the always up to date public key can be found here: https://launchpad.net/~radoslaw-tomaszewski  -> EF9C6A5F .

-----BEGIN PGP PUBLIC KEY BLOCK-----
Version: GnuPG v1.4.11 (GNU/Linux)

mQENBFEncHsBCACwCfNU1ThBhqbFclS1xk0FIuk5/OyOSVU5lVsLHMTkQjZpDOSL
IwIgggCI+GIOA/iJ1UMZxTOPX5huqBatQxw3Z7CIXymDv1Gh309OfeNnGgSxGi1r
ebZDYTAqc7tTnjeZLC+dC0e3epZMLO4+tbOgTCRmCAg4JkcT06J77PMcfoc8AFcQ
90XI++1AobGzC2iDEwGtLLImTIDzCV8w4n+uBZ4+zy8IMefozlut3wtEHSFRD7nP
lUGzLQHTidXYWknNhRtnJIFERlzim3juLUTr7LdOhuSlFyqw3gKa8b2exU01qE4p
RZ3aE5enFQ2LnThm8cb5VbYknu3t01okow5bABEBAAG0NVJhZG9zbGF3IFRvbWFz
emV3c2tpIDxyYWRvc2xhdy50b21hc3pld3NraUBnbWFpbC5jb20+iQE+BBMBAgAo
AhsDBgsJCAcDAgYVCAIJCgsEFgIDAQIeAQIXgAUCUSd3dQUJB4TU6wAKCRD40GUG
75xqX3UQB/0U61GULY5UKzjBV4SkQaVqxT0o9B14X1K8Qjnd6E0/rupTNPNNheYR
ClIBhX2lEq7KH/mwvw2Pa9iP1MJkGRspo4JnYQrt6vJ7uJ+tiUMOFWzAe2CUmtuN
uc2eyL7xFkkKujpOyp92ijjLwoRS4qAxt0dUKWa4xSbTxjFSB2dKOQtP+3c3kDIG
ztDdWDVRDZrxsnhws+rnqT67hGi1HoNdxqjMiEnCN7HwqVXhwGS9PBpyf1LIqR63
N3IOIIHgAh/KUixbyNuDOWKv6kXXh94uVxoJduC3isj1a/7PpTIxmOZpVPv1j3iA
7IZRjUPE9ExwGdSrm1nJov4E7iosg8HwuQENBFEncHsBCADSdkDTZE//RQj55Ij8
jz81VsIFkH50diJhWCSkLEfJN0soGqXW95Tcz80KVSz00za6/5+4/c7BWRbj7C4o
h6FYclRxxSXjBIFY2haQSOv/8+EwnlkJGXXJXpp2nKh3OGJqV0o0+S9VRdakza5k
sQbW1mYjOLteyaOx0L/fL9OVOHOsg21G1nvwxdjFrl4SY25iF2Z60IfaUy8aVvJ+
U8c4xNllNTimfMFNkBSeH9ve+JJ1rw/VjiZPiDjjoW6PK1+Vm6W+6oTctvgtGxtE
Dn5k60U6XO/jAUGTvHpTNiS7jLJLihAnXNHfu4rhFCs2+Nvp0nLWkcjGBw+rAGmJ
ZxpXABEBAAGJAR8EGAECAAkFAlEncHsCGwwACgkQ+NBlBu+cal8lLQf+NV0C2wKE
cikExD5rXWzzBwbyYVSlM7AIvGC6ZEQEOi3Lcho+VhxfJqORFPnmhUPjrK+O9qi2
38GIV4Y/yjwkLqtt0rBtWdV5YSIa215iTETOjjjiNxDrONCQFB3tDL6XPu7YFMTh
MGc8BB4Fn6r7K7a/72smuDoufQ7ahjPJ8wy4P6fJEAOEA274uep3VoR2Kp3vjWXL
4WQjax1VPLZcaStS18Sq8coAYBloKmYCnozrWMr+zwA5jJdvpuG+pZudR2ZoqewY
cCGeriKCa4NwoRCa2B+hco2YVxf9ivCMqXMvKi2S797DGTrT49MPz65zxoFLOeM2
mX8NpCOlg9YGcQ==
=dqQx
-----END PGP PUBLIC KEY BLOCK-----

To export a key
 
$ gpg --armor --output rado.pub.key --export EF9C6A5F 
$ gpg --armor --output rado.pri.key --export-secret-keys EF9C6A5F 

To import a pub/priv key
 
$ gpg --allow-secret-key-import --import rado.pri.key 
$ gpg --import rado.pub.key

To list keys
 
$ gpg --list-keys
gpg: checking the trustdb
gpg: no ultimately trusted keys found

$ gpg --list-keys
/home/rado/.gnupg/pubring.gpg
-----------------------------
pub   2048R/EF9C6A5F 2013-02-22 [expires: 2017-02-21]
uid                  Radoslaw Tomaszewski 
sub   2048R/366D1276 2013-02-22

$ gpg --list-secret-keys
/home/rado/.gnupg/secring.gpg
-----------------------------
sec   2048R/EF9C6A5F 2013-02-22 [expires: 2017-02-21]
uid                  Radoslaw Tomaszewski 
ssb   2048R/366D1276 2013-02-22

To encrypt a message with my public key
 
$ gpg --armor -r EF9C6A5F -e file.txt

To decrypt a message with private key
 
$ gpg -d file.txt.asc

Upload your key to Launchpad
 
$ gpg --send-keys --keyserver keyserver.ubuntu.com EF9C6A5F
gpg: sending key EF9C6A5F to hkp server keyserver.ubuntu.com
rado@laptop:~/$ gpg --fingerprint EF9C6A5F 
pub   2048R/EF9C6A5F 2013-02-22 [expires: 2017-02-21]
      Key fingerprint = 978C 670D F864 8723 C2D2  C9F0 F8D0 6506 EF9C 6A5F
uid                  Radoslaw Tomaszewski 
sub   2048R/366D1276 2013-02-22

References
  1. https://help.ubuntu.com/community/GnuPrivacyGuardHowto
  2. http://irtfweb.ifa.hawaii.edu/~lockhart/gpg/gpg-cs.html
  3. http://www.gnupg.org/gph/en/manual.html


Monday, October 22, 2012

How many Linux distributions support Openstack

Ubuntu is one of the first distributions that started to show a support for Openstack. They have been very active from the beginning and continue to expand in the cloud. As an example this video can summarize how Ubuntu and Canonical has been involved in the project:



But is Canonical with Ubuntu the only Linux distribution that is interested in supporting and popularizing a wide adoption of Openstack [2] and open cloud standards? Likely they are not alone. There are already two other main distribution like Red Hat  SUSE that joined the Openstack Platinum Membership club as well ;) [1].



With all these efforts and livid community this is only a matter of time to see this to be come a next Linux of the Internet Cloud in the Open software world ;)

References
  1. http://www.openstack.org/foundation/companies/
  2. http://blog.canonical.com/2012/09/19/why-were-number-one-for-openstack/

Wednesday, May 4, 2011

By using Ubuntu how to create a bootable USB thumb drive with Fedora distro

Although this it has already been possible to use USB thumb drive and boot from it for a longer time, there is still no one unified method to create this USB thumb drive.

Ubuntu has its own method:

"2) Burn your CD or create a USB drive"
http://www.ubuntu.com/download/server/download

Fedora has its own as well:

"3.2.1. Making Fedora USB Media on a Windows Operating System"
http://docs.fedoraproject.org/en-US/Fedora/14/html/Installation_Guide/Making_USB_Media.html

Fortunately for us a separate project unetbootin [1] comes in handy to do this job regardless what OS you are currently using.

To simply install and run follow this instructions bellow.

# aptitude install unetbootin 
# dpkg -L  unetbootin | grep bin
/usr/bin/unetbootin
# unetbootin


References:

[1]
UNetbootin - Homepage and Downloads

Using Fedora's liveusb-creator on Ubuntu Lucid Lynx

Sunday, May 1, 2011

Gdisk error message: Caution: invalid main GPT header, but valid backup; regenerating main header from backup!

At some point when experimenting with partitions on your disk you may get the following error message.

% gdisk /dev/sda
GPT fdisk (gdisk) version 0.7.1

Caution: invalid main GPT header, but valid backup; regenerating main header
from backup!

Caution! After loading partitions, the CRC doesn't check out!
Warning! Main partition table CRC mismatch! Loaded backup partition table
instead of main partition table!

Warning! One or more CRCs don't match. You should repair the disk!

Partition table scan:
  MBR: MBR only
  BSD: not present
  APM: not present
  GPT: damaged

Found valid MBR and corrupt GPT. Which do you want to use? (Using the
GPT MAY permit recovery of GPT data.)
 1 - MBR
 2 - GPT
 3 - Create blank GPT

As always you have to be very careful depending what you did and what do you want to do as next.

The three options for gdisk gives you the choice what partition tables you will examine. Fortunately for us gpart is not going to write on disk anything until we say so by executing the w (write) command (example bellow). The three options only influences how the data on the disk are going to be interpreted and presented for our review.

# gdisk /dev/sda
Command (? for help): h
b    back up GPT data to a file
c    change a partition's name
d    delete a partition
i    show detailed information on a partition
l    list known partition types
n    add a new partition
o    create a new empty GUID partition table (GPT)
p    print the partition table
q    quit without saving changes
r    recovery and transformation options (experts only)
s    sort partitions
t    change a partition's type code
v    verify disk
w    write table to disk and exit
x    extra functionality (experts only)
?    print this menu

At this stage it is save to experiment and have a look how the partition tables look like. Depending on your choise different partitions may be printed ('p') .

REMEMBER to always quit the session with the 'q' (quit) and never with 'w' otherwise your experiments will be permanently saved on the disk.

In my case this error was misleading and confusing only. I could verify that my current partition schema was not GPT at all but the good old MSDOS one [1]. At this stage I knew that 'gdisk' is not the tool I wanted to use and I finished creating new partitions with 'parted'. I didn't have to use gdisk at all.

The reason why I had some parts of GPT data on my disk is unknown. I can only suspect that it was created when I played with the Windows tool 'EasyBCD'.

I could try to delete the GPT data but base on [2] never had to do it.

References
[1] How to find what type of disk partition schema do I use (msdos, gpt)

[2] Wiping Out Old GPT Data

Sunday, November 8, 2009

How to upgrade ubuntu distro

I had to update and upgrade the Ubuntu on my laptop. There are 2 well know options how you can do this.

Using the graphical GUI
# update-manager

Using the text command GUI

# type -a do-release-upgrade
do-release-upgrade is /usr/bin/do-release-upgrade
# dpkg -S /usr/bin/do-release-upgrade
update-manager-core: /usr/bin/do-release-upgrade
root@radexlaptop:/home/radoslaw# do-release-upgrade --help
Usage: do-release-upgrade [options]

Options:
-h, --help show this help message and exit
-d, --devel-release Check if upgrading to the latest devel release is
possible
-p, --proposed Try upgrading to the latest release using the upgrader
from $distro-proposed
-m MODE, --mode=MODE Run in a special upgrade mode. Currently 'desktop' for
regular upgrades of a desktop system and 'server' for
server systems are supported.
-f FRONTEND, --frontend=FRONTEND
Run the specified frontend
-s, --sandbox Test upgrade with a sandbox aufs overlay
root@radexlaptop:/home/radoslaw# do-release-upgrade -d
Checking for a new ubuntu release
No new release found