Category: ubuntu backup

Fix ubuntu freezning or hard disk switching to read mode due to bad sector or file system error

This is one of the most common problems that one might encounter these days. This can be due to hardware of software.

If the issue is because of software we can fix it using below mentioned ways..

First print out the output of the command dmesg and see if there are any errors printed in red color which does symbolize that you have a file system error.

Note: sda5 means the disk that you want to check for errors. You can see the name of your disk by using the command df -h

Install smartctl a tool to check your hard disk for errors.

After installing smartctl run the following command.

smartctl -t long /dev/sda5

Then carefully see the output of above command it displays the time it will take to complete the test you have just started. To view the test run the below command.

smartctl -l selftest /dev/sda5

Now run below commands to check the health of your hard disk.

smartctl -a /dev/sda5
smartctl -H /dev/sda5

You can also add a line to your grub file located at /etc/default/grub or modify the line if it already exists.

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash libata.force=noncq"

This will make sure that while rebooting you run a force check for errors in your file system. Be careful because you might need to back up your data as you may lose some of it.

Another way to go into recovery mode is to press ESC while rebooting and choose recovery mode. This will make sure to fix file system errors also you can choose to run fsck/resume normal boot in the options provided.

Creating a backup of installed Ubuntu (ISO image)

1. Download Relinux 0.2 from
http://sourceforge.net/projects/re-linux/?source=directory
OR
http://nchc.dl.sourceforge.net/project/re-linux/relinux_0.2.1b1.tar.gz

2. Create a folder “relinux” on Desktop and extract the content from the above link to this folder.

3. To install, simply type this into a Terminal window( Read file relinux/INSTALL on Desktop for instructions):

  sudo cp -R usr etc /

4. After you have installed it, look at Desktop/relinux/usr/share/doc/relinux/README.
   Type this into a Terminal window to generate the configuration file:

  cp /etc/relinux/relinux.conf ./relinux.conf
  sed -i 's:EXCLUDES="\(.*\)":EXCLUDES="\1 '`readlink -f ./relinux.conf`'":g' ./relinux.conf

5. Install Dependencies for Relinux :

sudo apt-get install libdebian-installer4 casper ubiquity ubiquity-frontend-gtk discover-config xresprobe tree dialog

6. Copy  the file Desktop/relinux/etc/relinux/relinux/splash/splash.png to Desktop

Edit relinux.conf for customisation from Desktop/relinux/

Replace the following line

SPLASHIMAGE=/etc/relinux/relinux/splash/splash.png

 with

SPLASHIMAGE=/home/ebs/Desktop/splash.png

7. Type the following command in terminal:

 sudo relinux squashfs ./relinux.conf

8. Type the following command to prepare an iso file.

sudo relinux onlyiso ./relinux.conf

Reference Video link : http://ubuntutes.com/wp/index.php/2016/12/31/create-backup-of-installed-ubuntu-12-04-12-10-13-04-as-install-iso-using-relinux/

Creating a backup of installed Ubuntu(ISO image)

1. Download Relinux 0.2 from

http://sourceforge.net/projects/re-linux/?source=directory

OR

http://nchc.dl.sourceforge.net/project/re-linux/relinux_0.2.1b1.tar.gz

2. Create a folder “relinux” on Desktop and extract the content from the above link to this folder.

3. To install, simply type this into a Terminal window (Read the file relinux/INSTALL on Desktop for instructions):

$ sudo cp -R usr etc /

4. After you have installed it, look at Desktop/relinux/usr/share/doc/relinux/README.

Type this into a Terminal window to generate the configuration file:

$ cp /etc/relinux/relinux.conf ./relinux.conf

$ sed -i 's:EXCLUDES="(.*)":EXCLUDES="1 '`readlink -f ./relinux.conf`'":g' ./relinux.conf

5. Install Dependencies for Relinux :

$ sudo apt-get install libdebian-installer4 casper ubiquity ubiquity-frontend-gtk discover-config xresprobe tree dialog

6. Copy the file

Desktop/relinux/etc/relinux/relinux/splash/splash.png to Desktop

Edit relinux.conf for customisation from Desktop/relinux/

Replace the following line

SPLASHIMAGE=/etc/relinux/relinux/splash/splash.png

with

SPLASHIMAGE=/home/ebs/Desktop/splash.png

7. Type the following command in terminal:

$ sudo relinux squashfs ./relinux.conf

8. Type the following command to prepare an iso file.

$ sudo relinux onlyiso ./relinux.conf

Reference Video link : http://ubuntutes.com/wp/index.php/2016/12/31/create-backup-of-installed-ubuntu-12-04-12-10-13-04-as-install-iso-using-relinux/