Showing posts with label operating systems. Show all posts
Showing posts with label operating systems. Show all posts

Wednesday, March 19, 2014

One of the worst nights in case of my own computer repair

Hello Again, my followers and readers! I want to share the experience of my super hectic, one of the worst nights ever I spent yesterday. So why is that? What happened? Actually I will state my ambitions first then will explain the whole.

Ambition :-
I planned to Format my Primary Partition and replace my CPU Thermal Compound, which normally takes 2 hours maximum with other Software installations after format, which is 3 hours maximum. But all of this turned out to take 14 and a Half hours of hectic work. This was just due to bad luck.

Now I will start my story with a bit of theatricality and like the starting of the Legendary NFS Most Wanted 1.

Here it goes :-

30 days ago :- My OS Which was a pirated Windows 7 ultimate like every others around me, started to become unstable. It suddenly gave an "explorer has stopped working"

                                                 "Check an online solution for this program"
                                                                  "Restart the program"

And here my cursor froze every time. I tried everything of my knowledge without any sign of success.

And I should define my specs to go on. My PC specs are Gigabyte H61M - S2P Motherboard, 4*2 GB Starlite RAMs, Intel Pentium Dual Core 2.8 GHZ G2010, Local made Frontech 650 W SMPS, XFX ATI Raedon HD 6670 GDDR3 GPU, Local Foxin Cabinet, 2 Inhale fans of one 80 MM Inhale side, 120MM Inhale front, 2 Exhausts 80 MM. Back and side, And an Intel Stock cooler, which a 10 Rupees (0.16 USD) worth of Zinc thermal compound was applied. It is summer now, CPU heating at 40 Degree minimum, and when playing games, 55 - 60. So My good Friend gave me this Cooler master thermal compound of Rs 450 ( 7.35 USD) worth.

15 Hours ago :- Took the Windows 7 Disk, Restarted my computer, Inserted the disk, Entered into the disk, Selected Install Windows 7, Selected Advanced installation mode, The list of the drives came, And Here is the 1st problem begins. The Installer was saying - Windows cannot be installed in this drive because of MBR Partition table problem. I quit and deleted the C partition from Linux stored in another drive, and don't know why and how, The rest of the drives merged up into a whole 841 GB of un allocated disk space, which I had to create a new volume and format, and My super precious data, My Mom's data, my all software backups, Movies, videos, All gone in 1 minuite. I started to sweat instantly, I turned off my PC and went out for a break. Now in this break, I met my friend who gave me the Cooler Master thermal compound. Came home with it. Now


11 Hours ago :-
Unplugged all my Inputs, Took and placed my Cabinet on my bed, Opened the left cover up, and ((before saying after "and", Let me mention, In India here, we play Holi  on 16th. Holi is a colour festival where people throws flower made colours called "ABIR" and chemical colours all day long and have fun)). Some friends came up and threw me colours and I was on the Open cabinet then, I protected my PC as possible, and fell down by my back to prevent it. Though My whole mother board became red. I bathed my self and came back in the room again. My objective was to open the CPU Cooler, Unplug hook the CPU, Alcohol remove the thermal compound, re apply the compound and re hook and fix it again which normally takes 15 - 25 minuites maximum. Instead of that, I had to open every parts of the cabinet even the Front panel too, Remove every colour powders and strains, After that I had to remove every components of the motherboard except the Cooler and first cleaned with Paint brush and then blew air out of small pipes to remove the rest, After that when I opened the CPU cooler, I say the CPU was red too. This was a risky part. I had to thoroughly remove it, Then as usual removed the paste, re applied it and re assembled my PC. Which took like 4 hours. When I powered it on, It shut itself down with a sound from inside. I had to figure the problem out which took about half an hour. It was the Deepcool Inhale fan which was short circuiting.

6 Hours ago :-
After I fixed all my Hardware problems, I came back with the OS and Software problem part. Now Hands on my head. What to do? what to do? I was just looking on the 840+ GB of Un allocated space and mourned. I finally came up with an Idea, which was damn successful. I got all my partitions back as Intact it was except for the drive letters which I changed later, Formated my Primary partition, and did all the after format stuff, and now it is 5 AM in the morning. I am finally done working. I sat here at noon at 2:30 PM, break for 1 hour at the middle, then again left at 5 AM writing my whole worst experience in my blog. 
  
                   Now for the Geek part, How did I got all my partitions back, I will do a post later. 


THANK YOU

Saturday, February 22, 2014

Installing Virtual Box Guest Additions To Kali Linux.....

Installing Virtualbox Additions in Kali Linux, A Debian Distro

Kali Linux
The Rebirth of
Backtrack


Back track used to be the most popular penetration testing software based on Ubuntu, Which Offensive Security gave a rebirth named as Kali Linux, which is based on Debian. I cannot state all the differences because I am very new to Linux and started with Kali and Mint 16 Petra KDE. I am a computer geek myself and thats why I am digging on these. Now My Main topic is about installing Virtual Box Guest Additions in Kali Linux. What is Virtual Box? I will explain that in upcoming blogs. Now if you google, installing VBox additions in kali linux, there will be many search results, Showing 5 steps to do that. Seems easy right? As I said I am new to linux, when I installed Kali in VBox, I was unable to do what is said over there. After 5 - 8 re installs and trials, And after mixing my own moves, I was successful. Now I am sharing with you all noobies like me who are new to this Enviornment and struggeling about installing This addition.

Step 1 -> After installing Kali, you will see a windowed mode, driver less version of Linux. Go to VBox menu bar, click devices and from the drop down menu, go o install VBox Guest additions. The Image and shortcut of the CDRom will come in the desktop, and will promt you to run. If you click Run, It will say an autorun error. It cannot find the desired autorun progrum. So installing this is not very easy like of Windows.
Dont get frustrated. This was not the right way. I am going to explain the right way now. 

Go to Device - > Insert Guest additions CD


If you Click Run,

This Will Happen.
   

Step 2 -> There is a part during the installation. There is a place during installation, where you will be asked for a mirror link for updates. If you select yes, then Kali itself will figure out the essential repositories. If you click no, then installation will complete way faster and earlier. Now if you click no, you will have to add the repositories manually. This is the most easy technique to add. You can go to this link to see all the repositories, or just copy/paste these two repositories in the place shown in the following picture - 




  1. deb http://http.kali.org/kali kali main non-free contrib
  2. deb-src http://http.kali.org/kali kali main non-free contrib

Copy these two links to the sources list which is located in /etc/apt/sources.list in the following manner shown in the picture, and give hashes in the starting of CD ROM reposite to bypass CD ROM read as shown.

This is the picture of the Sources list file. Do as shown.

Step 3 -> Save and close this file and go to terminal and Run  apt-get update followed by apt-get upgrade. BTW Make sure you have the latest Kali installed and You are running as ROOT. These commands will update the base systems and Other relevant items. Picture as follows -

Go to Terminal

Write apt-get update and press enter.
After update done,
Type apt-get upgrade.
After updates done, go to next step

Step 4 -> Installing the Linux Header files. Now what are headers. Headers are files which help Linux or Any Kernals to Identify, Run, and Work with any Unknown softwares and Drivers. Remember? when you install Graphics drivers? or any unknown drivers, Windows ask you to varify driver signature? But Windows have a laid back attitude so you just click a couple of nexts and you are done. But in linux,  - In Hangover 1 COP accent - "NOT UPP IN HEREEEE" . In Layman language, You are the Kernal, Science is the Subject, Books are the Headers here which helps you to interact with science. Here Virtual Box and its additions are kind of a set of Virtual Rams, HDDs, CPUs, BIOS, and Drivers here, for which Linux needs Headers to interact with VB. So to install Headers -

Type in terminal  -  apt-get install linux-headers-$(uname -r)

There will be a little download session and the headers will be installed soon.



Now, the headers are successfully installed. Its time to install the Additions file now.
As we know, the files to be installed resides in The VBOXADDITIONS CD Rom. So as said in Kali Forums, We will have to first navigate to the file and copy it to the root. Now why to copy? because we have to give it root and read/write permissions which is not possible to do from the CD Rom because its Called ROM - Read Only Memory. To copy it, we will run the command cp. So the whole command will be


  1. cp /media/cd-rom/VBoxLinuxAdditions.run /root/         -   (Its now copied)
  2. chmod 755 /root/VBoxLinuxAdditions.run                     -   (Its given Read/Write Permissions)
  3. cd /root                                                                             -   (Changed directry to to Root)
  4. ./VBoxLinuxAdditions.run                                              -   (Ran the file named VBoxLinuxAdditions.run) 

Now You might have a question What the hell is chmod 775. Basically it has a complex permission protocol. each 7, 7, 5 here have different meanings, which I am currently studying about. You now only know that giving a file 775 or 777 permission means to make the file fully accessible to any users. If you write 777 instead of chmod 775, it will work no matter what.

Now I will post a picture where I used this and it didn't work. In my case, In place of "cd-rom" command, "cdrom0" worked. 

Now give it 2 minuits and Those additions will be installed successfully. Give it a restart. I am posting the pictures. Then will discuss the may come problems.

Did as Directed

Copy Error with cd-rom

In this case, cdrom0 worked for me

This is the case I struggled the most with. There are no blogs saying this cdrom thing. I saw this in a different site where it was stated the ways to Change Directry to CD Rom. I just kept this in mind. This will help you a lot. So This worked.



After the final ./VBoxLinuxAdditions.run    command, This will be the screen for 2 minuits showing successful loading. After this, Just restart. You are done.

Way 2 ->  If the CD ROM thing fails with any of the described ways, or you are too lazy for terminalling or a Passionate Windows user :p , There is another way. Navigate to CD ROM by opening it from My Computer. Copy the VBoxLinuxAdditions.run file to Desktop. Right-click the file on desktop and go to properties. There you will find a permissions Tab, Where change all the Privilages to READ/WRITE/EXECUTE. And Definitely check the "run as program" tick box. If you do not check this option, This will open with a Text Editor. And if you check the tick box, It will open in terminal and install the additions same as terminal installation one. Rest the Pictures will describe.

Go to - Computers/CD ROM and do the following

Copy the file to desktop

Change the file permissions to all read/write
and check allow executing file as program

Here you did the same thing what " chmod775/777 "command does in terminal.

Now you can see OPEN which came there
for enabling run file as program.
Click here and click run or run in terminal on the dialogue box.
Same installation will successfully occur and then restart.

Restart Now. Final Image -->
Full Resolution and
All Drivers Installed.

Possible Failures and Solutions :-

Possible Failure 1 --> The most common here is the Failure during installation of the Kernal Headers. After you write 
 apt-get install linux-headers-$(uname -r), This will appear

Reading package lists... Done
Building dependency tree       
Reading state information... Done
E: Unable to locate package linux-headers-3.7-trunk-686-pae

E: Couldn't find any package by regex 'linux-headers-3.7-trunk-686-pae'

So, what to do. Make sure you have the correct sources and repositories installed. Repeat step 2 here. If you had clicked YES for mirrors during installation, this error is unlikely to happen. But if not, check sources list for correct repositories. Add more from lots of websites available up there. check software package manager for additional options, choose updates to install. etc.etc . Then again Run apt-get update && apt-get upgrade. Then again run the Headers installation. Another thing, Make sure that you have the latest Kali Version installed because, installing the headers of old linux from New updates of the server is a bit complicated.
Possible Failure 2 -->  When installing the Additions by commanding ./VBoxLinuxAdditions.run, If it is successful, It should say stuff like - building guest additions ------ done
bla bla bla  ---------- done
bla bla bla  ---------- done

But in case of failures, the error will be - building guest additions --------- fail . In case of  this fail, means the headers are not successfully installed. Run an apt-get update again and re-install the headers. 
Image samples -
This is the fail I was talking about.

I am currently working and studying on working with kali in Virtual networks : Outer LAN. Like/comment/share/follow to get more updates and ask any questions freely. Will try to answer as easy as I can. 

And - Don't just scan over. Go through it thoroughly or you will fail to understand why and what is done over there.....

THANK YOU