Category Archives: linux boot

Link

Advanced Data Recovery on Linux

It’s the perfect nightmare and everyone do all his best to avoid it but sooner or later it happens.

Loosing data from a hard disk or a USB device is more common than you can image and everyone has experienced it!

Windows has different commercial solutions available to recover data and partitions but, if you use Linux, you need something different.

The best solution I found for Linux is an old but current article by Lifehacker.au that I strongly recommend if you are experiencing this kind of problems and want to solve them.

Continue reading

Configure OpenDNS on your Ubuntu Computer through DDclient in just 6 steps – Tutorial

1 – Why should I change DNS? 
You “use” them in any moment, every time you are in front of a computer but usually you don’t consider to directly manage or change them because you think that it is not worthy to do anything with them. 
On the contrary, you know that many different online companies offer dedicated DNS addresses you can use to substitute the default DNS addresses provided by your ISP.
So, at this point, your main question is “Why should I change DNS on my route or my computer”?
For example, for one or more of these different reasons:
– to have a chance of a possible increasing of speed and reliability when you surf Internet; 
– if you want to delegate to a third “professional” part some security tasks (e.g. third party security filtering to protect yourself against phishing or viruses);
acces websites that are normally geoblocked by commercial policies/agreements or censorship imposed by Governments;
parental monitoring if you prefer to have a rough idea of what websites your children visit or if you whant to filter some specific contenents.
2 – Choose a reliable DNS provider
If you decide that you want to try a different DNS provider you need to choose a reliable one. A quick search on Internet will help you to find the most appropriate DNS Provider for your needs.
In this specific case we are examining how to configure the DNS from OpenDNS.com so, if you want to test it, you have to sign up for a free account on opendns.com or simply copy the DNS addresses you find in the bottom right of their homepage or sign up for a OpenDNS.com free account. In the last case, you have the possibility of monitoring your traffic in a professional statistical way and probably you will satisfy one or more of the reasons that may explain your choice to use different DNS. 
3 – Install DNS from OpenDNS on your router
If you want to use OpenDNS on your LAN you have to configure the router through the its configuration interface. The way you can do this varies from one router to another but in all the popular models you will easily find a specific sub-menu where you could activate the “use predefined DNS” option compiling the two addresses provided by OpenDNS.
In this way all your LAN traffic will be pipelined through OpenDNS and you will not need to singularly configure each computer you have.
dns4

Image from: oriental-press.com

4 – Install DNS from OpenDNS on your Linux computer
4a – Preliminary configuration.
The problem with opendns.com is that it doesn’t provide an official tutorial to correctly install its DNS on a Linux machine. For this reason you can follow this brief notes that I wrote after installing it on a Ubuntu 14.04 LTS Ubuntu computer.
Go to the OpenDNS.com support page dedicated to the installation on Ubuntu and follow their instructions:
I exactly followed all the instruction till the point 8 but, when I had big problems when I typed:
sudo ifdown eth0 && sudo ifup eth0
because this message appeared:
ERROR unknown interface eth0=eth0
The matter is that my ethernet is really named eth0 (I double checked using the commands ifconfig and netstat -r -n) but it was not possible to operate on it.
To solve this problem I used the Poorak’s Blog suggestion and I had to open the interface file via Terminal with:
sudo nano /etc/network/interfaces 

– or if you prefer:

sudo gedit /etc/network/interfaces
and manually add these lines:
auto eth0
iface eth0 inet dhcp
then I restarted my networking
sudo /etc/init.d/networking restart
4b – Install DDclient on Ubuntu if you have a dynamic IP
Normally the Internet Service Provides provides a dynamic IP to users that may change over time. So, if you don’t want to pay more to obtain a static IP, you need to install a software that could constantly communicate your actual IP address to OpenDNS.com. In my case, I dedcided to install DDclient to be able to continue to properly use the OpenDNS.com services.
To install DDclient I preliminarly had to install coreutils through Terminal:
sudo apt-get install coreutils
and the required SSH and SSL sockets:
sudo apt-get install ssh libio-socket-ssl-perl
and finally the DDclient:
sudo apt-get install ddclient
At this point you manually edit the configuration file:
sudo nano /etc/ddclient.conf
(or, if you prefer sudo gedit /etc/ddclient.conf)
typing:

##
## OpenDNS.com account-configuration
##
use=web, web=myip.dnsomatic.com
ssl=yes
server=updates.opendns.com
protocol=dyndns2
login=opendns_username
password=opendns_password
opendns_network_label

where:

– ‘opendns_network_label’ is the label given to the network you’re updating in your account.
If you have spaces in your network label, replace them with an underscore ( _ ) 
You can find the network label in the Settings Tab of the OpenDNS Dashboard.
– the login is your email address with OpenDNS
– the password is your opendns password. 
“If you have special characters in your password wrap the password in single-quotes ( ‘ ). 
If there are any single-quotes in your password, put backslash ( \ ) before the single-quote to escape the character”.
References:
5 – Start OpenDNS and DDclient on your Ubuntu computer
At this point you have all the elements to start  so you can open a Terminal and type: 
sudo /usr/sbin/ddclient chkconfig ddclient on && sudo /usr/sbin/ddclient service start
On the other side, if you want to check the status of DDclient, you will type:
sudo /etc/init.d/ddclient status

6 – Configure Linux OS to start DDclient at boot on Ubuntu

On Ubuntu is really simple to configure DDclient to start at the computer boot. You have to open the Session and Startup manager through the desktop Dash. Now you are able to Add a specific command to the Application Autostart menu to run DDclient at the boot:
sudo /usr/sbin/ddclient chkconfig ddclient on && sudo /usr/sbin/ddclient service start
If you are configuring OpenDNS through DDclient on a different Linux distribution you can google the right tutorial or follow the guide created on aboutLinux.info.
At this point you will automatically use OpenDNS on your Ubuntu computer. 

Recovering the GRUB 2 Boot Loader by cgermany77

AddThis

How to correctly configure and use the Windows Network on Ubuntu 10.04 LTS

At the beginning it appeared as a no-solved mystery because in all the many posts I read, there were no effective solutions. On my Ubuntu 10.04 LTS I was no able to use the external hard disk I had connected to the LAN and every time I tried to mount it I only received this message: Unable to mount location – Failed to retrieve share list from server


In few words it was not possible to use the Windows Network and all the people with the same problem (which is specific for the Ubuntu 10.04) suggested to reconfigure Samba but all the configuration and scripts I tried were no effective to let me use the external hard disk.

At the end I found someone who talked about a possible firewall misconfiguration and I tried in many ways to bypass the situation using ufw commands and opening ports and services over the LAN:

$ sudo ufw status
[sudo] password for *****:
Status: active

To                                      Action            From
—                                        ——                —-
135,139,445/tcp           ALLOW       Anywhere (log)
137,138/udp                  ALLOW       Anywhere (log)
Samba                             ALLOW       Anywhere
192.168.0.3 Samba     ALLOW       10.0.0.0/8
10.0.0.0/8                    ALLOW       192.168.0.3 Samba

Unfortunately, every new permission I granted to Samba on my Firewall was not a real solution but when I tried to stop the Firewall (System –> Administration –> Firewall Configuration) using the default firewall manager, Ubuntu was able to find and work on the external hard disk.

For this reason I made some tests and found this solution:

1 – enter your router settings and find the list of the attached device

2 – find the name and the MAC address of the LAN device you want to connect to your PC

3 – find the menu for the Lan Setup and add an Address Reservation for the above device. Now you are sure that the router will always assign the same address to the device

4 – back to Ubuntu, install and launch Firestarter (for some incomprehensible reasons the default firewall manager is not able to create rules for Samba services and ports)

5 – on Firestarter, go to Preferences —> Policy Editor and click on “Apply policy changes immediately”

6 – try to connect again to Windows Network, obviously (sic) it will not work but then go to Firestarter —> Events and you will notice that the last line is the “missing” external disk which has an “unknown” service

7 – right-click the mouse on this line and “Allow connections from source”. Now the external hard disk is visible from Ubuntu 10.04 LTS and it is possible to work on it!

8 – to be sure that your LAN device will be rightly connected to Ubuntu 10.04 every time you boot up it: go to System –> Preferences –> Startup Applications

9 – add a new Firestarter rule typing the following command: sudo firestarter

That’s all! I hope you can find this post useful! AddThis

Recovering root password under Linux with single user mode

It happens sometime that you can’t remember root password. On Linux, recovering root password can be done by booting Linux under a specific mode: single user mode.
This tutorial will show how to boot Linux in single user mode when using GRUB and finally how to change root password.
During normal usage, a Linux OS runs under runlevels between 2 and 5 which corresponds to various multi-user modes. Booting Linux under runlevel 1 will allow one to enter into a specific mode, single user mode. Under such a level, you directly get a root prompt. From there, changing root password is a piece of cake.
Some Linux distribution, such as Ubuntu for instance, offer a specific boot menu entry where it is stated “Recovery Mode” or “Single-User Mode“. If this is your case, selecting this menu entry will boot your machine into single user mode, you can carry on with the next part. If not, you might want to read this part.
Using GRUB, you can manually edit the proposed menu entry at boot time. To do so, when GRUB is presenting the menu list (you might need to press ESC first), follow those instructions:
– use the arrows to select the boot entry you want to modify.
– press e to edit the entry
– use the arrows to go to kernel line
– press e to edit this entry
– at the end of the line add the word: single
– press ESC to go back to the parent menu
– press b to boot this kernel
The kernel should be booting as usual (except for the graphical splash screen you might be used to), and you will finally get a root prompt (sh#).
Here we are, we have gained root access to the filesystem, let’s finally change the password.
As root, changing password does not ask for your old password, therefore running the command:
# passwd
will prompt you for your new password and will ask you to confirm it to make sure there is no typo.
That’s it, you can now reboot your box and gain root access again. AddThis mp3 link

Damn Small Linux 4.2.5: the new updated version!

Damn Small LinuxToday, in our Linux Page (in Spanish) we have posted a review about the new version (4.2.5) of Damn Small Linux. Damn Small Linux is one of our favourite distribution due to its capability to run on very old PC as 386/486/Pentium with very few hardware resources. This version has updated some features as Monkey Webserver 0.9.2 and is incredibly stable (as the previous ones, I must say). According to distrowatch.com, in the last 12 months Damn Small Linux has been the 10th most downloaded (and consequently used) Linux version also because, with no costs, many people are converting old Windows based machines to new up-to-date computers. Anyway, Damn Small Linux is based on Knoppix but is smaller and contains many improvements. Last but not least, I would like to focus your attention on the five different subversions available:

– dsl.iso is the standard isolinux version

– slinux.iso uses syslinux instead of isolinux (for very old PC’s)

– vmx.zip can be run in VMware Player

– embedded.zip contains QUEMU for running inside Windows

– frugal_lite.sh is the network install script and requires tomsrtbt linux: http://www.toms.net/rb/. AddThis mp3 link