Instruction
1
One of the fundamental differences between Linux and Windows is that when you work with the "fallen" system taken to repair and not reinstall. To the recovery was quick and painless, this should take care when installing an operating system.
2
Before you install Linux, whichever distro you use, you'll need to correctly partition the drive. Make the following partitions:/boot - size is approximately 130 MB, the file system is ext2. /SWAP – swap, size equal to twice the amount of RAM, but not more than 4 GB./ - root partition size of 50 GB, the filesystem is ext3 or reiserfs./home rest of disk space, ext 3 or reiserfs.Proper partitioning will help you to save custom data from virtually any failure.
3
In that case, if the broken file system, to restore Linux you'll need a LiveCD repair utility, fsck. Boot from the LiveCD, log in to the console with administrator rights. If you don't know the path to your file system, find it with fdisk –l.
4
You have found the file system – for example, its path is /dev/sda1. Now start the procedure of recovery with the command fsck-fy-t ext4 /dev/sda1. Note the specified type of file system – it needs to be the same that you have. The –f switch specifies the automatic verification key –t – file system type, -y automatically answers yes to all questions during the inspection.
5
To restore the bootloader (usually Grub2) boot with your LiveCD. If the /boot partition you have stored on a separate partition, first create the appropriate folder: sudo mkdir /mnt/boot. Then mount the partition with Linux, to do this, enter the command in the terminal: sudo mount /dev/sda1 /mnt/boot. Please note that in the example used, the aforementioned partition sda1. Your may be different. If you can't stand /boot in a separate partition, just mount the partition with Linux command like: sudo mount /dev/sda1 /mnt.
6
Now start the install Grub2: sudo grub-install --root-directory=/mnt/boot /dev/sda. Note that installing the bootloader is on the hard disk (sda) and not partition. After the installation, reboot the system, then update Grub2 sudo update-grub.
7
Given that there are many distributions of Linux, before the system restore, look in the network information on the restoration of your OS version. The above examples designed for widespread distribution of Ubuntu and Kubuntu.