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.

Friday, 10 July 2015

Basic things to know before installing Linux


    Before I take you on the ride of installing Linux, I would like to tell you some basics of Linux about installing an Unix like operating system. There are few thing I want to pass on to user as they can better understand what exactly happens when you boot-up your computer, I will try to keep it as simple as possible, don't expect much of geeky stuff here as the goal is introduce use to some basic and not blow their minds with loads of technical stuff, when I mean getting started I mostly consider it would be those who may not know much of underlying things like what hardware it's way of functioning etc. So what happens in general scenario when you press that power button to start your computer, It simply start an power circuit and starts an hard carved application on core of your computer's chip which is generally referred to as BIOS (Basic Input Output System) This is like blueprints to basic components on your computer. This program also starts the operating system booting program referred as boot loader. This could had been more detailed explanation from technical point of view but that is not immediate goal here. I am just trying to give some rough idea to those who are not aware about all these things, any ways back to boot loading, In simple word when you install an operating system information related to operating system is stored on Hard Disc, when you power on computer it refers BIOS to find appropriate device from where it can load operating system, to make itself useful and functional for the user. I guess many user here might be from either windows user of may be mac, mac users might have little bit idea about all this but, many may still not know these things. next thing that comes up is initial-ram-disc which is minified version of basic components of operating systems like device drivers etc, which helps in booting kernel with required drivers. after this operating system does mounting of file-system and starts loading services/applications, after which you can find your desktop in usable state.


   Basic architecture of Unix like operating systems, now that you know some what about booting process, lets talk about architecture of the system of your system, Well if you think it's going to be some rocket science calm down, that is not what we are referring to but it's just the information which is going to help you in solving you most of the problems in future, If you are already an windows use you will find this all new, We are going to talk about file-system hierarchy. If you have questions like what the hell is that now? It's nothing great, just the overview of how files are stored/kept on Linux system, unlike windows files are kept in distributed manner in Linux based on their purpose, which all come under single directory denoted by "/" generally referred as "slash" or "root" beneath this directory you can find several directories like "/etc", "/bin", "/boot", "/home", "/lib", "/dev" etc. so what are these? Why so many directories?, well this is the architecture I was talking about, here things are spread out based on their role and isolated from others by putting them in separate directory beneath "/", so how does that help? It helps in keeping files organized and makes finding them easy, other advantages are it helps in securing things by defining strict roles of every zones (directories beneath "/" are referred as zones), like users are given privileges only in certain areas(directories) which they might need to access any where else they are not allowed to do much, This prevents things from getting in the way of each other, rather prevents from things interfering each others, so this keeps the things in their place which makes Linux secure operating system. I am going to present here a short list of some of important directories below "/" and give their purpose in short.


"/"           :- Top most directory in hierarchy everything lies under this.
"/boot"    :- Meant for keeping files which are used to bootup system.
"/etc"      :- You will find most of the configurations files here, you can edit them to configures various services on your operating system almost all of them will be text files.
"/home"  :- Used for keeping personal files of user, you should directory named after name of user beneath this, which will be personal directory of those respective users.
"/tmp"     :- Used for creating temporarily files etc. may be by user or applications
"/dev"      :- Contains files associated with various devices available on your system.
"/bin"      :- This directory contains the binary files( executables) with reference to windows files inside this directory are like start.exe used to launch applications run commands.
"/lib"       :- This contains library files in simple word supporting files used by application.

(I am stopping here, even though I can given details of many more including above, I just want to give you idea, I will leave rest upto you to explore and discover.)


   What would a user do with above information? well this is basic difference between windows and Linux which I think a user must understand, as this is going to help them in many aspects and on their way ahead, All though many thing are un-explained in this post but this would be a good start towards understanding Linux, How would this help user? It makes it easy to classify these directories into different areas/zones by understanding their purpose, one can simply know where to find things and where to do certain  things and where not to do certain things, this is very important for a beginner to keep himself/herself from breaking things, although I would suggest you to go in there and explore things if possible try to break them on purpose to understand your operating system in better way. But it's best to learn few basic thing before you star the roller-coaster ride. Well all of these directory can be mapped to separate partitions which you create on your hard disc, So windows users!! we no longer have concept of "c:" and "d:" here, so understanding this will help you to plan how to partition your computer when using Linux based on the purpose and usage. So simply  during installation we can choose to keep operating systems data on different partition and personal data on separate partition. This can be used to secure operating system as well as make it flexible for recovering data in case. Not only installation but this will also help you in pointing out problems and solving them in future. In terms of completeness this is not a very good document, but this will help those who are not aware of these thing, also telling everything at a time takes away the fun part of exploring, since I've learned most by exploring them my self I don't want you to miss the fun either. So I am closing my conversion here, next time we will possibly see how to do an installation, If you want me to write and post about specific distro please comment your request, I will try to post as per your requests provided I get enough time to download and finish writing down a post about it.

Friday, 3 July 2015

Before you begin!!


    Hello everyone once again. Before you begin your adventurous journey with Linux, I would like to suggest few things to make sure you don't end it, before even getting it started. It's like insuring your journey, I guess everyone does, so why not do it before you begin yours with Linux ? Insurance? do they have different policy for Linux users? will I get more benefit? will I have to pay extra premium? if all this questions are hitting your mind after reading the word insurance then just relax, So what exactly are we going to insure here? Very first thing I am trying to achive here is to prevent the readers from hating Linux. I am trying to prevent the users from experiencing un-necessary pain just on their first start, preventing them from un-necessary frustration. In many cases that I've came across are users trying to get started with some  new things, are turned down due to some silly reason. What I am trying to do over here is take away that fear from users. Is that so? well!! the first fear is about lack of knowledge. fear of new things many of us are often afraid to try new things, if you try to see this exercise beyond Linux, this will also help to built up some self confidence. That is total different area, let me take you back to the topic, so what else is left out? well biggest one for many is not knowing the consequences, well If I try to kick that out of you, I many endup give you some management lecture, but that is not the immediate purpose to write down this post , so I am stopping my self once again from distraction(:P). So what exactly I will be trying to convey in this post is some thing like list of thing you go through before you pack your bags. so what do we have one list? Umm packing bags for journey! get those pair of jeans, get my favourite  trawlers jacket, .. !! WAIT!! that's not the thing on list here, let me put down the list. Insurance plan, return tickets, knowing destination... this can become big list but I am trying to keep it short.

   Insurance plan? does one really need to get insurance before starting Linux? does Linux kills one using it? NO!! when I say insurance plan I literally never meant your General insurance, What I am trying to convey here is the plan to Insure your data. Do you intend to get rich by losing data? no that is not happening here, we are simply going to discuss some methods of saving you from losing data. if anyone of you have ever tried any things like installing windows etc with your computer, you must be aware of what I will be some what talking, first thing you need to figure out what is important data that you have on your computer, this one area is all upto user where he/she keeps the data, if the computer is shared. To me any data that can't be regenerated by again is important of course, so what does counts in this? I was lucky in my initial days of computing that I only had mp3s and and movies and games when I use to do crazy things with computers, thoe they were precious to me like diamond back then specially games :D, as we didn't had internet. So what data is important? or not recoverable? for me it is something like pictures and videos of my friends and family. etc, in some cases it may be emails stored on your computers local folder. you can take backup of these all data. I would suggest as many copies as you can, how can I take backup? I believe almost everyone knows how, in case you don't have much idea keep a copy of your personal videos  and pics on cloud storage provided by many, for something with legal importance like documents, emails I would recommend you to keep a copy on flash drive(pen-drive) or burn them on cd-rom or may be external hard-disk may be a good option. Get a through list of documents, files  check with it twice or thrice, try to ensure your backup is good and can be recovered when required. Now if you want to prevent other users from accessing your data, all through it is not full-proof you can put all the data into zip archive and protected with strong password. Again improper handling of data my lead to corruptions of backups (specially archived zip can lead to losing bulk of data at a time), so if your are doing this for first time best way to try out things with some junk data, with all the suggested possible method and then delete this junk data and try to recover it again. try this few times may be, it might be tedious exercise for many of you but trust me, this will save you from lot of pain in future, I would suggest you to make this an habit to keep backup of important data.


   return tickets! it was, huh? what? well that's the next item I've mentioned on the list, so what is return ticket, simply it's the way back to your home, Yess!! I know you are already home, but when you are trying out fancy things with your computer you may not feel yourself home in sometimes as lot of un-familar things on it  or may be some mishap, or software gone wrong situation, well science I've been doing a lots of fun things with my computer I've sometimes ended up in a mess, my recent fedora installation took me something like 12-15 attempts to properly install it, please don't bother with the numbers I've mentioned, It's just I was trying to achieve some thing which was not happening the way I wanted so I had to keep on trying it for some time. If same things happens to you, and you don't know what to do then again you may find yourself in trouble so better know how to get back to original state, in case of windows, you may most-likely have some tools like norton ghost, windows recovery disc, windows installer disc, etc. back then when I was windows user, after couple of tries we had used simple solution wipe and re-install on "C:". if you don't know how-to's  in this area? try to gather some information is first place before you end up getting into trouble(to me it is exciting experience, lol, but that's me, I know n number of ways to get back my data ans stuff) , I don't want to get your work get hampered again or you getting stuck with nu-usable pc(it's actually good opportunity to learn but you must know where your adventure ends and reality is going to kick you hard) this is second most important thing one must know before getting themselves into trouble. With situation you are stuck in between nowhere to go, many simply give-up(I suggest them to just keep on trying), so if you know how to restore thing to normal, here is where you can end your vacation and go back to work and give it a try on another weekend.


   Destinations? well here I would like to tell you some things about what all you are going to face in this journey, It's basically simple to classify into two types i.e. good or bad, but I leave that upto you. Personally It's all good for me as every trouble/ challenge you face teaches you some thing new and more that that it's fun, to over come these things at-least for me. Here good part can simply be achieving the goal of successful installation and we may have many things on other side things like, losing data (this is common) may be with successful / unsuccessful installation, broken pc, no longer booting any operating systems, if you achieve this then congrats, you have reached one milestone in process of understating your computer little more, try to find out why it is not booting in possible way (if you have another computer may be ) or if you are person with singe pc and have lot to lose, I would suggest to be very sure about your return tickets and insurance  of your data at-least. If you don't have return ticket here,  you will be facing various challenges!. In that case better do your home work, to me it's fun to try out new thing but still I need few things in there place, like scripts etc which I use to reduce my manual work. don't worry too much about scripts, they are  not relevant in here.

   I would like to put up a short summary of what I've been trying to convey over here is taking out fear of users of losing and possible chances of hating Linux because of losing some personal data, This conversation could have been more elaborative or might be omitted completely but for the fact everyone don't know every thing and everyone don't think the same way I wanted to put some awareness about some challenges one may face when they try out things with their computers, I've learned all these from my personal experience with computer I would like to the users to have it first hand like me, without knowledge, but all may not think same way and might lose their courage to step ahead in journey with Linux for them I wanted to at-least save them some important data. Finally simple Advice. One should not be afraid of takings risks, as falling and getting backup up is part of learning to walk, one Just have to keep trying till they succeed, think back then when you were child if you had not taken that risk of falling again and again and getting hurt you would never be able to walk and run, This is no different thing, only difference as grown-up is you are more worried about out-come and that stops you from trying, so let go that fear and you will discover journey full of fun is awaiting for you. This things are not just limited to learning Linux but failure, success are just the part of growth process ,if just want to hug and not the other you will never actually grow to your fullest. I am closing my conversation over here hope you will find your way through this journey, do let me know what you feel about this :).