Showing posts with label grub. Show all posts
Showing posts with label grub. Show all posts

Tuesday, 20 August 2013

How to reset root password

1. Boot the machine and wait until GRUB Boot Loader comes up. Select recovery mode and then press e to edit.

2. Change the permission mode from ro to rw and modify boot loader file in init=/bin/bash and then F10 make the changes and reboot the system.

3. Once the system reboot, shell prompts you for the password to manage the system. Type passwd root and then type the desired password of your choice. Confirm the password and then hit enter. If new password and retype new password matches correctly, then you will get the message password updated successfully. Type shutdown -h now to press power button to shutdown the system and then boot the system again.

4. Type root and the new password. If you type the new password correctly, then you will desktop screen of Kali Linux.

Thursday, 23 May 2013

A brief tutorial on GRUB boot loader

A boot loader is a software program that runs when a computer boot. It's responsible for loading and transferring control to an operating system kernel software. The kernel, in turn, initializes the rest of the operating system. 
GRUB (GRand Unified Boot-loader) or GNU GRUB is a very powerful multi-boot loader, which can load a wide variety of free operating systems, as well as proprietary operating systems with chain-loading. GRUB is designed to address the complexity of booting a personal computer. One of the important features in GRUB is flexibility; GRUB understands filesystems and kernel executable formats, so you can load an arbitrary operating system the way you like, without recording the physical position of your kernel on the disk. Thus you can load the kernel just by specifying its file name and the drive and partition where the kernel resides.
When booting with GRUB, you can use either a command-line interface or a menu interface. Using the command-line interface, you type the drive specification and file name of the kernel manually. In the menu interface, you just select an OS using the arrow keys. The menu is based on a configuration file which you prepare beforehand. While in the menu, you can switch to the command-line mode and vice-versa. You can even edit menu entries before using them.

Contents of GRUB
Installed programs:              
grub-bios-setup, grub-editenv, grub-fstest, grub-install, grub-kbdcomp, grub-menulst2cfg, grub-mkconfig, grub-mkimage, grub-mklayout, grub-mknetdir, grub-mkpasswd-pbkdf2, grub-mkrelpath, grub-mkrescue, grub-mkstandalone, grub-ofpathname, grub-probe, grub-reboot, grub-script-check, grub-set-default, grub-sparc64-setup


Installed directories:                
/usr/lib/grub, /etc/grub.d, /usr/share/grub, /boot/grub

Short Descriptions
grub-bios-setup                 Is a helper program for grub-install
grub-editenv                      A tool to edit the environment block
grub-fstest                         Tool to debug the filesystem driver
grub-install                        Install GRUB on your drive
grub-kbdcomp                   Script that converts an xkb layout into one recognized by GRUB
grub-menulst2cfg              Converts a GRUB Legacy menu.lst into a grub.cfg for use with GRUB 2
grub-mkconfig                   Generate a grub config file
grub-mkimage                   Make a bootable image of GRUB
grub-mklayout                   Generates a GRUB keyboard layout file
grub-mknetdir                   Prepares a GRUB netboot directory
grub-mkpasswd-pbkdf2    Generates an encrypted PBKDF2 password for use in the boot menu
grub-mkrelpath                 Makes a system pathname relative to its root
grub-mkrescue                  Make a bootable image of GRUB suitable for a floppy disk or CDROM/DVD
grub-mkstandalone           Generates a standalone image
grub-ofpathname               Is a helper program that prints the path of a GRUB device
grub-probe                         Probe device information for a given path or device
grub-reboot                        Sets the default boot entry for GRUB for the next boot only
grub-script-check              Checks GRUB configuration script for syntax errors
grub-set-default                 Sets the default boot entry for GRUB
grub-sparc64-setup           Is a helper program for grub-setup

EDIT GRUB File
GRUB configuration file is located in grub directory. Pathname: /boot/grub/grub.cfg. This file is required when you want to change the order in boot menu.

Tuesday, 9 April 2013

Installing Kali Linux- A step-by-step instruction

Kali Linux, ver.: 1.0.3

Prerequisites:
  • Minimum 8 GB of HDD space to install Kali Linux
  • For i386 or amd64 architecture, a minimum of 512 MB RAM (1024 MB RAM recommended)
  • An ISO or VMWare image can be downloaded from Kali Linux site
Here, I am going to guide you step by step to install Kali Linux (ver. 1.0.2) in a virtual machine. Procedure of installation is very much similar to Backtrack.
Click on the above link to download Kali Linux. When you goto this link it will ask you to register, however registration is not mandatory to download Kali Linux. Either, you can register by giving your name or email address to receive information updates or simply you can skip this step and click on "No thanks, just want to download!". Depending on the type, you can customize your download in ISO or VMWare format. Click on "Download Kali". Once Kali Linux is downloaded you are ready to install it in a virtual machine. I am using VMWare Player version: 5.0.2 build-1031769 here.

1. Open VMWare Player and click on Click a New Virtual Machine. It will open New Virtual Machine Wizard.

2. On this screen select I will install the operating system later and the click on Next.

3. Select Guest operating system as Linux (kernel of Kali Linux is based on Linux) and then select Version as Ubuntu. Click on Next to goto next screen


4. Type Virtual machine name and specify the Location where you want install Kali Linux, however you can leave the default Virtual machine name and Location. Click on Next to proceed to the next screen

5. Specify Disk Capacity. Default is 20 GB. Select Split virtual disk into multiple files where file transfer is a major issue. Click on Next

6. On this screen, either you can click on Customize Hardware to customize settings and then to goto step no. 8 or click on Finish to complete the process of creating virtual machine


7. Click on Edit virtual machine settings

8. This is the screen where you can customize or edit your Hardware Settings. As mentioned above, the minimum system requirement is uni-processor of i386 or amd64 architecture processor, so click on 

(a) Memory, to select minimum 1024 MB of RAM;
(b) Processors, as 1 or 2 (depending upon the processing speed) and Preferred mode as Automatic;
(c) Click on CD/DVD IDE. Now, on right hand panel you will Connection. It has two options: 
      Use physical drive- select this option if you have Kali Linux is in your CD or DVD drive; or
      Use ISO image file- select this option if you have downloaded Kali Linux on your hard drive. Click on Browse to locate the ISO file 
(d) Floppy drive is optional, as now a days most of the computers do not floppy drive
(e) Select NAT if you have network adapter for Internet

Other Hardware settings can be modified once installation process is completed. Now click on OK.


9. Select kali linux on left side panel screen and then click on Play virtual machine

10 VMWare setup will startup


11. You will be greeted with Kali Linux boot screen. Choose either Graphical or Text-Mode install and press Enter to boot


12. Select your preferred language and click on Continue

13. Select your location and click on Continue


14. Select option to configure your keyboard and click on Continue


15. Once disc is detected by operating system, it will copy the image to your hard disk and probe your network interfaces

16. Enter hostname to configure your network and click on Continue


17. If you have a domain name, then enter here in the box. Make sure that you have a correct domain name. You can enter the domain name later and leave this box blank. Click on Continue

18. Enter robust password for your root account

19. It will auto-detect time from network time server

20. Installer will probe hard disk and offer you four choices of partitioning of disk. Beginner can select Guided- use entire disk however experienced user can setup partition as Manual

21. Below are the screenshots of manual partition. I have created three partitions

      a. /boot (a partition from where your operating system will boot)
      b. / (root partition for super user or admin)
      c. swap (a portion where buffering is done)





22. This is the screen where you’ll have last chance to review your disk configuration before the installer makes irreversible changes. After you click Continue, the installer will go to work and you’ll have an almost finished installation.






23. Configure network mirror to give additional software that is included on the CD-ROM



24. Install GRUB boot loader


25. Finally, click on Finish to reboot Kali Linux installation





26. Login screen of Kali Linux