How to update Ubuntu 10.10 to Ubuntu 11.04 (Natty Narwhal)

30 04 2011

Hello everybody.

Two days ago, Canonical released the Ubuntu 11.04 (Natty Narwhal) and in this version was include many features that can be checked in ubuntu-news.org. To do the update, open a shell and run:

sudo update-manager -d

After run, will be opened a window called Update Manager. Follow the instructions in this window to complete the update.

However, in my case, when I’ve Installed the Ubuntu by the first time, I’ve divided my hard disk in 3 partitions of the following way:

/
/home
/swap

How I prefer to reinstall the Ubuntu, doing that I just need to install it in / (root partition) and all data kept in /home will be preserved. With that, I will leave the system clean but I will take to reinstall the programs again.

That’s it. I will start my update/installation right now. See you next time.





How to give root privileges to another user in Ubuntu

30 04 2011

Hello folks.

In this post we will see how we can give to another user the root privileges using sudo command. Before of all, let’s explain what is sudo.

In the Linux, there is a account called root. This one, can do anything in your system without restriction. By default, Ubuntu leave this account locked, you cannot do login with it. You will have access as root using the command sudo that was configured when you created the user during the installation.

So, to give access of root to another user, open a shell and run:

sudo adduser [user name] admin

Where user name is the user you would like to give root privileges. For example:

sudo adduser kde-devel admin

The command above will add the user kde-devel to the admin group. After that, if you would like to remove it, run:

sudo deluser kde-devel admin

That’s it folks. See you next time.





How to change the default Operating System to be loaded in the Grub

29 04 2011

Hello everybody. Sometimes we need to change the default operational system to be loaded in the Grub.
However Ubuntu 10.10 uses Grub2 and it does not use anymore the files menu.lst and grub.conf. In my case, the file /boot/grub/grub.cfg has the following menu entries:

Ubuntu, with Linux 2.6.38.3
Ubuntu, with Linux 2.6.38.3 (recovery mode)
Memory test (memtest86+)
Memory test (memtest86+, serial console 115200)
Windows 7

However, the menu above can be seen when the Grub is started.
To make the change, open the file /etc/default/grub as root privileges. You will see something like that:

# If you change this file, run ‘update-grub’ afterwards to update
# /boot/grub/grub.cfg.

GRUB_DEFAULT=0
#GRUB_HIDDEN_TIMEOUT=0
GRUB_HIDDEN_TIMEOUT_QUIET=true
GRUB_TIMEOUT=10
GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`
GRUB_CMDLINE_LINUX_DEFAULT=”quiet splash”
GRUB_CMDLINE_LINUX=”"

# Uncomment to enable BadRAM filtering, modify to suit your needs
# This works with Linux (no patch required) and with any kernel that obtains
# the memory map information from GRUB (GNU Mach, kernel of FreeBSD …)
#GRUB_BADRAM=”0×01234567,0xfefefefe,0x89abcdef,0xefefefef”

# Uncomment to disable graphical terminal (grub-pc only)
#GRUB_TERMINAL=console

# The resolution used on graphical terminal
# note that you can use only modes which your graphic card supports via VBE
# you can see them in real GRUB with the command `vbeinfo’
#GRUB_GFXMODE=640×480

# Uncomment if you don’t want GRUB to pass “root=UUID=xxx” parameter to Linux
#GRUB_DISABLE_LINUX_UUID=true

# Uncomment to disable generation of recovery mode menu entries
#GRUB_DISABLE_LINUX_RECOVERY=”true”

# Uncomment to get a beep at grub start
#GRUB_INIT_TUNE=”480 440 1″

Go to the line GRUB_DEFAULT=0. This value indicate as default “Ubuntu, with Linux 2.6.38.3″. Just for example, let’s leave Windows 7 as default. Change the GRUB_DEFAULT to 4. After that, open a shell and type:

sudo update-grub

Note that, GRUB_DEFAULT follow the sequence of menu entries. In my case is:

[0] Ubuntu, with Linux 2.6.38.3
[1] Ubuntu, with Linux 2.6.38.3 (recovery mode)
[2] Memory test (memtest86+)
[3] Memory test (memtest86+, serial console 115200)
[4] Windows 7

That’s it folks. See you next time.





How to get more than 3 GB of RAM in Ubuntu 32 bits

28 04 2011

Hello everybody. Some time ago I’ve had a computer with 4 GB of RAM and it’s had the Ubuntu 32 bits installed. Unfortunately the linux only accessed about 2.7 GB of RAM. To solve this problem, I’ve done that:

sudo apt-get install linux-image-generic-pae linux-generic-pae linux-headers-generic-pae

After that, I restarted the computer and was ready, more then 3 GB of RAM was accessed by Ubuntu.

That’s it. See you next time.





How to fix Adobe Flash Player in Google Chrome in Ubuntu 64 bits

28 04 2011

Hi folks. Today I will explain about how to watch a video made in Adobe Flash in Google Chrome using Ubuntu 64 bits.

You installed flashplugin-installer but when you tried to watch some video received the message Missing Plugin or something like that.

So, to solve that, download the library from Adobe Labs site.

Open a shell, go to the folder where you downloaded the file flashplayer10_2_p3_64bit_linux_111710.tar.gz and uncompress it:

tar xvf flashplayer10_2_p3_64bit_linux_111710.tar.gz

Still in the shell, run:

sudo mkdir /opt/google/chrome/plugins
sudo cp libflashplayer.so /opt/google/chrome/plugins/

Close the Google Chrome and reopen it again. Go to the youtube site and make a test.

That’s it folks. See you next time.





Mounting a ISO image in Linux

27 04 2011

Hello folks. Today I will show you a simple post about how we can open a ISO image in linux.
Many times we have ISO file and we wouldn’t like to burn a CD/DVD. For that linux provide a way to mount this file type. An ISO image is a file of an optical disc. ISO mean International Organization for Standardization and is taken from the ISO 9660 file system.

So, let’s go to the point. Open a shell and type:

sudo mount -o loop kubuntu-10.10-alternate-amd64.iso /mnt
ls -l /mnt/

In this case I got a Kubuntu image like example. To unmount it:

cd
sudo umount /mnt

Another way to mount is:

sudo mount kubuntu-10.10-alternate-amd64.iso /mnt -o loop=/dev/loop1

This is the same way that was shown in How to create a filesystem to file in Ubuntu. Doing that, you can mount 8 ISO image at the same time because linux provide loop0 to loop7 in /dev. Remember you just need to specify different folders to do that.

That’s it folks. See you next time.





How to create a filesystem to file in Ubuntu

26 04 2011

We are used to create filesystem when we install a new operational system. However, linux provide a way to create a filesystem to file. Between many benefits, we can save confidential data.
To do that, is simple and easy. Open a shell and type:

dd if=/dev/zero of=~/partitionfile bs=1024 count=100000

This will create a file named partitionfile of 100MB with blocksize of 1024B. Now format the partition:

mkreiserfs -f ~/partitionfile

A message will be emitted informing that, this file, is not a block special device. Press y and after enter to continue. how you can realize, I formatted with reiserfs filesystem, but you can format using other type. However reiserfs filesystem requires a minimum size of 32MB.
Everything ok, we just need to mount this file. Still in the shell, type:

sudo mount ~/partitionfile /mnt -t reiserfs -o loop=/dev/loop1

In this case, the option -o loop will use kernel resource to mount the file. How I formatted the partition with reiserfs I specified the type in option -t. If you used another, specify the right partition type.
With that, you have a new partition to be used. You can inside it, create file, copy file, etc…
To check it, type in the shell:

df -T

That’s it folks. See you next time.





Creating a package .deb in Ubuntu

25 04 2011

Hello everybody. Today we will see how we can create a package .deb in Ubuntu.
This type of package is a compacted file that contain softwares, libraries and instruction set for installing them. It is a good way to optimize the installation process.

So, let’s start the package creation. Firstly we need to create the basic structure. Open a shell and type:

mkdir -p ~/pkgdeb/DEBIAN
mkdir -p ~/pkgdeb/usr/sbin

The pkgdeb folder is our base directory where we will mount the structure that will be used to be installed.
Regarding the DEBIAN folder, this one will not be included in the package. It is important to specify information about package control. To do that, inside of this folder, create a file named control and fill it up with the following data (you can use the vim):

Package: pkgdeb
Priority: optional
Section: misc
Version: 1.0
Architecture: amd64
Maintainer: Buildall
Depends: build-essential, qt4-designer
Description: This package, demonstrate how we can create packages

In architecture field you must inform in which kind of architecture this package will be installed. It can be i386, amd64 and all. In my case, I am using 64 bits.
Now, inside of the folder ~/pkgdeb/usr/sbin create a file named pkgdeb and type (again you can use the vim):

echo "This is just a example about how to create a package"

Set the permission to this file:

chmod 777 ~/pkgdeb/usr/sbin/pkgdeb

The file pkgdeb created in ~/pkgdeb/usr/sbin will be copied to the folder /usr/bin during the installation. Any file you put here will be copied too. However you can specify another local like /usr/local/bin but in our base directory we would specify ~/pkgdeb/usr/local/bin.

To complete our example, with the shell opened type:

cd
dpkg -b pkgdeb pkgdeb.deb

Done that, you have a package created. So you just need to test it. Still in the shell, type:

sudo dpkg -i pkgdeb.deb
pkgdeb

You will have this message in the shell:
This is just a example about how to create a package

Remember it is just a example, in the field Depends I just showed how we can use dependency.

That’s it. See you next time.





What happend in the last week in Buildall

24 04 2011

Changing the Grub screen in the Ubuntu 10.10: Here is explained about how we can improve the visual of the Grub screen using the software called Burg.

Removing automatically old Kernels in the Ubuntu 10.10: In this post we learned about how we can remove the old kernels from our computer and also from the grub list.

GLIBCXX_3.4.15 not found after install GCC 4.6: This post is shown a way to fix the problem about GLIBCXX_3.4.15 not found.

Installing GCC 4.6 in the Ubuntu 10.10: This one is a translation about one I have posted in Portuguese. Here is shown step by step how to compile and install GCC 4.6.

WiFi card does not work after install the kernel 2.6.38.3 in Ubuntu 10.10: After install the kernel 2.6.38.3, WiFi card stopped to work. This post explain how we can fix this problem.

Installing Kernel 2.6.38.3 in the Ubuntu 10.10: Here you find in details about how to compile and install the kernel 2.6.38.3.





Changing the Grub screen in the Ubuntu 10.10

23 04 2011

If you are not so happy with the Grub screen in text mode and would like to leave it more elegant, there is a way to do that with the software called Burg.

To install it, firstly, open a shell and type the command below to add the following repository:

sudo add-apt-repository ppa:bean123ch/burg
sudo apt-get update

Now, you have the repository updated, just miss install the Burg.

sudo apt-get install burg

A window called Configuring Burg-pc will be opened. Check if the path to the grub is correct and press enter. The next step press enter again to keep the Linux default command line. After that, the installation will be completed. However, to finish, you will be questioned to inform where the grub was installed. Specify the right place pressing the space bar (in my case is /dev/sda) and after press enter.

Reboot your computer. When the Burg appear, press F2 to change the theme.

That’s it folks. See you next time.








Follow

Get every new post delivered to your Inbox.

Join 37 other followers