Saturday 18 July 2015

Installing Linux for first time.


      I usually try to keep my posts short but this might get bigger, probably because of images that I am going to include in this post. screen-shots from installation. In last post I had introduced used to some basics and underlying things about Linux, we had also spoken about file-system hierarchy so we are going to use that knowledge over, I would like to tell readers, that what ever we discussed about in last post was not complete in many aspects, but what ever teaching experience I had in my previous job tell me to go go short and simple, understand same thing little by little every day. It's as simple as over eating, if you eat too much you have digestion problem, same goes with knowledge, if you have too much at a time you will find it trouble some in comprehending and understanding, so I chose to feed the readers with little knowledge in every post. It's good to start slowly but it's also important to continue same along the way. Revising old list of directories discussed once again. Just for small exercise try to recollect what is significance of each directory mentioned in below list.
"/"
"/boot"
"/etc"
"/home"
"/tmp"
"/dev"
"/bin"
"/lib"
   If you don't remember you can always go back and check it there. Now that you have rough idea about what each directory is meant for, you can plan/decide your partitioning scheme. What scheme? sounds confusing? Don't worry, we are simply going to decide how much space we are going to allot to what partition when installing Linux. Can't Linux do with single partition? this question will hit minds of most of windows user. well to answer this I would say, Linux can be installed on single to multiple partitions it all depends on your needs. Many usually create posts/blogs about installing Linux, but most of them miss out the most interesting part about installing Linux, is what I feel. doing a plain installation would is simple enough to explain, but I would like to explain little bit about different partitioning schemes, some DO's and may be DON'Ts, I am usually little reserve when passing on DONT's as it stops many from exploring, and trying out new things, and ceases them from possibility of understanding things from their point of view, Any ways What I've planned for you guys is 4 partitioned layout, probably most common practice among Linux users, just before you read  ahead what you can do is try to quickly write down three important partitions which you could think of. Confused? what partitions? Well in last post we had discussed about different important directories found in Linux file-system hierarchy, yes!! I am referring to those directories as different partitions. In terms of Linux, directory on which you map your partition is refereed as mount-point / mounting-directory, whatever you call it, it doesn't matter much here, simple thing to understand is that partitions don't appear like C: D: here they are mapped to different directories (even if you happen to see some thing like that it's actually mapped to some directory, I may explain comment in this bracer later if you still feel like knowing you can ask me :D) Hope by now you must have understood that we are going to map three partitions to three of above given directories(list we revised earlier in this chapter). if you think you've, Stop!! you are wrong, we are going to map 3 of the created partitions to 3 of the above directories, or rather I would say we are going to mount 3 partitions under 3 of directories. so which three partitions? any guess write them down now and try to reason your choice, if not I will tell you .

   First one we are going to take is "/boot" you can get it with size ranging from 100MB upto 1GB (paralytically you can give it as much size you want, but won't make sense) recommended is 500MB, whatever gets installed in this would be 100MB, so why such a big partition? why separate partition?, one thing is keeping separate boot partition makes it easy to install multipal distorts/ flavours of Linux at same time. It also make recovery simple and easy.

   Second one would be "/" This is the most important mount point of Linux as every thing else resides under this, if you are want to push every thing in single partition you simply can have this one as partition, and move on, installation may not be possible without having this. There are many thing that are yet to be discussed, understood, about file system hierarchy which will be residing under  inside this.

   Third one  would  be "/home" you may want to keep your personal data intact and separate from everything else. So this one would be a at least recommendation. When you are installing Linux on personal machine, Keeping this separate makes it easy to backup data and also helps in between upgrades and trying different distros without disturbing your personal data.

   Fourth one is Swap!! what swap? we never talked about it before, why not? well it would make more sense when talking about installation, well this is a special type of file-system we use on Linux, If you are aware of page file on windows, this does the same job here, so why not make swap file?, well making swap partitions is always advisable as it gives better performance as compared to swap file. So What is swap?,  In simple words swap is raw volatile file system, used as an substitute to your computer's memory (ram). Whatever data stored on swap is lost after power cycle (reboot/shutdown) Also this file system will is not mounted, you just turn this on and off to put it to use.

   Next question, one might face would be how space to be allotted to all of these partitions, it depends on needs try to understand What purpose you want your computer to serve?, it can be decent data storing, it can be use maximum space available, it can be maximum security, it would be consistence. if you understand the file-system hierarchy you would be in very good position to make these decisions about installation. when planning this layout one must consider future requirements too and not just current needs. So when allotting space to these partitions don't make it to tight, unless you know better way of solving this other than re-installing. There is actually a solution for those who stick to tight configuration, but it's not relevant immediately over here, as post is meant for those who are going to do this for first time. Although I believe many would really understand and find this post more useful after doing few installations and actually using their systems. So once again I am going to throw some recommendations here for those readers who find it difficulty to figure out their plan. So for and average user it would be good to go with 10-20 Gb for "/" and may be rest all to "/home" but we are still missing how much space for swap, well for that it depends if you want to have it or not, if you have very high memory like 4gb-8gb and you may not need it for average desktop usage  you can skip using it,unless you are a web-browser forker (opening hundreds of tabs on web browser) Those who are using Laptop I would recommend them to have at-least amount equal to that of ram or at-least 1 gb more than total size of ram on your system, this is somewhat related to some of features like hibernation / suspension, this works same way with desktop too.

    If searched online one would find numerous guides/ demos for installation of Linux bla bla, so I never intend to actually create another similar "how to?" But I am going to present some walk through snaps of installation, so that one could find all things under one place, on the other hand I've always encourage users to use Linux, guiding them to this would make my life much more easier :P LOL any ways there is also mysterious fun and pleasure in sharing knowledge and this is one of the best way to connect to peoples so I am going ahead with this. Here I am going to show steps involved in installation, with the help of screen-shots. I am going to install Linux mint 17.2 over here. you can download image from here :-  http://www.linuxmint.com/download.php

   Simply download and burn the image on dvd and boot it.

Booting The  live  CD


























Your desktop should look like this when it completely boots-up, You can explore around if you  if you like. click CD like icon to start your installation.

Linux Mint Desktop when booted on Live CD.






   Next you can see installer window like this. Here you will be selecting language.

   Click on Continue button after selecting appropriate language. Next dialogue will prompt some recommendation about disc space and show if your are connected to internet, It's best to disconnect internet connectivity to speed-up the installation process. You can simply click continue.

   Next step would be about partitioning. Here you can Either chose first option "Erase disk and install Linux Mint" This will wipe all the previously installed Operating system softwares partitions, and install mint with defaults settings over it.
   I am going to select "Something else" the last options, then click on continue, this will lead to create a custom layout of partition. Then you will see some thing like give below, here you can see it is showing "/dev/sda" inside window which represents your hard disk if you have multiple hard-drives it can show some more options in list like "/dev/sdb", "/dev/sdc"... and so on. So select appropriate Hard-drive on which you want to install Linux Mint. In the given below image you can see some thing like "/dev/sda1", "/dev/sda2", "/dev/sda3".. and so on These are the partitions on your respective hard disc. Select "/dev/sda" or appropriate  hard drive if you have more than one then click on "New Partition Table",  Again this will wipe all the data on your Hard disk and create fresh partitions on it. you will be prompted with warning which will display some message saying your data on given disk will be lost. you can click on continue button. 


   Once you clear partitions you will see a Clean Layout like this.

   Now select the free space and click on "+" button on bottom-left corner of installer window. This will prompt a new partition dialogue, here you will be adding the partitions as discussed earlier "/boot" then "/" then "swap" if then lastly all the remaining space for "/home".

   Enter the size of partition in MB, next radio buttons are for selecting type of partition you can just ignore them if you don't know much about it. Location should be "Beginning of this space" at the bottom the last thing you can select is Mount point, this specific one is for "/boot" as I have given 500MB of space. Next thing to chose would be filesystem.

   Click on "Use as:" field to choose file-system type, in windows you have options like "NTFS", "FAT32", etc.. Here we are going to use  Etx4, type of file-system, If you want to try other options you can go ahead and be adventurous, but remember one thing Always choose only "Ext" type of file-system for '/boot" if you chose some fancy options your system may not boot in some case. for any other mount point you can always be adventurous. Next thing we will be going for is "swap".

   Having swap would be optional thing, if you have hube amount of RAM. Again there is no mount point needed for swap.

   Well Next partition you may choose would be "/" size to allocate to this has already been discussed, still as a reminder, any thing around 10-20GB would be more than sufficient. Next comes your Home "/home" here I will be giving rest of  the available space to home. After finishing your partition layout it may look some thing like this.


   If you are sure you can go ahead with the given partition Layout, you can click on Install Now, if you thing some thing is not right, you can revert and start over again by clicking "Revert" button next to "New Partition Table" button. Before you hit "Install now" you may also explore "The "Change" and minus "-" buttons, I will not tell you what they do, for many it would be apparent. Finally When you hit "Install Now" button there will be final dialogue displayed on your screen which will confirm if you really want to make modifications to your Hard disc.

   This dialogue show in above screen-shot is is showing you the information about new partition table that will be created, You can choose to go back or if you are confident enough you can go ahead. It's ok even If you don't understand everything in this dialogue as it is just showing you the partition changes made to your hard-disk and part one may find missing is the mount-points to which these are mapped. If it is confusing you, you can go back and review what ever thing you've done you can find more about partitioning if you search online,(Hint: if you are searching online about partitioning, we are using IBM partitioning here.) Next window of installer will ask you about time zone settings.

You can simply choose appropriate time zone and click on continue over here. Next one will be about keyboard layout.

Here you can select Keyboard Layout based on language. Next step would be about user creation.


   Here I've created a user named as test, also you give a host name to your computer, If you don't know what a hostname is, I would simply put is as Name give to computer to identify it over network. If you don't know much about networks simply think of it as something simple like for example in office you would give hostnames like "reception computer", "managers computer", hope that makes some what sense to you. You will also find other options here  like "Log in automatically" (never recommend) "Require my password to log in" I would always recommend to use this options for better security practice. Once you click continue you would see window like this.


   You are almost done with the major installation part over here, here the installer would be copying necessary files to your system's hard disk, if you want to see what is happening,  you can simply click on arrow before "Copying files.." that would expand a little console of logs below it and display  what is happening in installation. Towards bottom right corner of installer window, you can see  skip button, which is not activated her, this would get highlighted mostly when installer would be trying to pull the files from over internet, you can simply hit the skip button if you don't want installer to do so, as it also makes installation process very lengthy and time consuming depending on your internet speed. I personally always skip it to make installation process faster. Any ways what ever you skip here can be upgraded later over internet so choice is again yours. Once installer is done copying necessary files it will prompt you with a dialogue asking if you want to restart/reboot your machine or continue testing. Choice is yours. This ends the installations of Linux Mint.

   Finally I would like to confess that there was lots of stuff which could be explained in details over here but, everything can't be explained at once nor it could be understood at once, so I've skipped some parts. I will try to explain it in future. I hope you have enjoyed this installation session, wish you have a great adventures ahead and lots of fun with Linux. Will try to put of some basic thing one might want to do soon after finishing their installation next time. Here I am closing my conversation  with you guys  see you next time.

No comments:

Post a Comment