Friday, November 20, 2015

Ubuntu 15.10 Desktop Installation Guide

Ubuntu has released its latest version Ubuntu 15.10 code name as “Wily Werewolf” on 22nd Oct 2015. As this version is not LTS, so support will be provided only for 9 months.
Some of its newly improved features are listed below :
  • New Kernel 4.2 is included in this release.
  • Libreoffice 5.0.2 brings lot of improvements
  • Firefox is updated to its latest version Firefox 41
  • Chromium 45
  • Nautilus 3.14.2
  • Fixed small fixes of Unity 7.3.3 in this release.
  • New version of OpenStack “Liberty” is also introduced in this version
In this post we discuss how to install Ubuntu 15.10 on our laptop or desktop.

Step:1 Download Ubuntu 15.10 ISO file from its Official Site.

To download Ubuntu 15.10 go to its office site “http://www.ubuntu.com/download/desktop” and download as per your system architecture.
download-ubuntu-15-10
Now make a bootable drive either on USB or CD-ROM / DVD

Step:2 Boot the system with bootable drive.

When we boot the machine with bootable drive, following windows will appear.
ubuntu-15-10-installation-image

Step:3 Click on “Install Ubuntu”

click-on-install-ubuntu-15-10
In the nextstep it will check whether system has enough free space, connected to Internet & power is plugged in.
check-for-enough-free-space
Click on “Continue”

Step:4 Now partition your disk, for that there are two ways

( 1) Let the Operating System to create the partition – OS will be automatically created partition depending on the disk size.
( 2) Create your own partition.
creation-own-partition-ubuntu-15-10
In my case i am creating own partition , i am using around 62 GB disk.
EFI Partition – 650 MB (only if you use UEFI)
  • /(root) – 30 GB ( Formatted as EXT4 journaling file system )
  •  /var – 10 GB ( Formatted as EXT4 journaling file system )
  •  Swap Partition – double of RAM ( 2 GB in my case )
  •  /home – 20 GB – ( Formatted as EXT4 journaling file system )
Note : These partition will subjected to change according to your disk size.
os-disk-space-ubuntu-15-10
Click On “New Partition Table…” it will display the Warning Message as shown above.
create-partition-ubuntu15-10
Click on “+” symbol and create the partitions.
root-partition-ubuntu-15-10
Click on OK, and repeat the same step for /var and /home partition.
Create Swap Partition :
swap-partition-ubuntu-15-10
Our Final Partition Scheme will look like below:
final-partition-scheme
Click On “Install Now
warning-messsage-partition-scheme
Click on Continue…

Step:5 Set the time zone for the Clock.

time-zone-clock
Click on Continue….

Step:6 Define the language as per your setup.

select-laguage-for-ubuntu-installation
Click on Continue…

Step:7 In this step we will define the followings :

  • Define the System’s Hostname
  • Define the Name of user that will be used after installation
  • Define the password for the user.
  • Set the option “Require my password on Log in”
define-system-hostname
Click on Continue….

Step:8 Installation is in Progress as shown below

When we click on Continue in above step then installation will start.
ubuntu-15-10-installation-progress
When the Installation is completed, we need to take reboot.

Step:9 Reboot the System

reboot-installation-after-15-10

Step:10 Now Login to the System using the credentials that we set in above steps.

login-to-system-using-crendential
installation-completed-ubuntu-15-10
Installation of Ubuntu 15.10 is completed, enjoy and explore it.

Use Fedora 23 Cloud image in Red Hat OpenStack

Fedora 23 Cloud images are available for download. In this post will use fedora 23 cloud image and will launch it from dashboard(Horizon). I am assuming that OpenStack is already up and running.

Step:1 Download the Fedora 23 Cloud image from terminal.

[root@desktop18 ~]# wget https://download.fedoraproject.org/pub/fedora/linux/releases/23/Cloud/x86_64/Images/Fedora-Cloud-Base-23-20151030.x86_64.qcow2

Step:2 Upload the Image from Dashboard.

Login to the dashboard. In my case i am using “Robert” as a User with admin privileges.
Login-OpenStack-Dashboard
Go to Project Tab and select Images option and then Click on create Image,
Images-OpenStack-Dashboard
Specify the Image Name, description and image source (image file) & image Type
image-upload-openstack-dashbaord
Click on create Image.
fedora-23-cloud-image-dashboard
As we can see image is created.

Step:3 Launch Instance of Fedora 23

From the Dashboard go to Instance option from the Project Tab. Click on “Launch Instance
Launch-Instances-OpenStack-Dashboard
Define the Instance Name, Instance Boot source ( Boot image) and Image Name.
fedora-23-instance-properties-openstack
Select the appropriate Security Group and Networking for the instance and then click on Launch.

select-access-security-group-openstack
network-for-instance-openstack

Step:4 Associate Floating or Public ip to the instance.

Once the floating ip is associated with instance then we can access the instance from outside.
associate-floating-ip-openstack-instance
Click on “Associate Floating IP
floating-ip-associated-instance

Step:5 Access the Fedora 23 instance

As we know that we don’t know user’s or root password of cloud images. So we will be accessing it using keys. In my case i have already generate the keys with name “fedora-ssh-keys”. Also we need to make sure that permissions of keys should be “600”.
access-fedora-23-cloud-image

DHCp server installation and configuration on a windows server 2008?

World of Linux Server Management, Windows Server Management, Kernel Programming, Ethical Hacking, Cloud Solutions, Vmware Vsphere ESXi, Xen Servers, Server hardening, Server administration etc.,
Dynamic Host Configuration Protocol (DHCP) is a core infrastructure service on any network that provides IP addressing and DNS server information to PC clients and any other device. DHCP is used so that you do not have to statically assign IP addresses to every device on your network and manage the issues that static IP addressing can create. More and more, DHCP is being expanded to fit into new network services like the Windows Health Service and Network Access Protection (NAP)
Installing DHCP Server in Windows Server 2008:
Installing Windows Server 2008 DCHP Server is easy. DHCP Server is now a “role” of Windows Server 2008 – not a windows component as it was in the past.
To do this, you will need a Windows Server 2008 system already installed and configured with a static IP address. You will need to know your network’s IP address range, the range of IP addresses you will want to hand out to your PC clients, your DNS server IP addresses, and your default gateway. Additionally, you will want to have a plan for all subnets involved, what scopes you will want to define, and what exclusions you will want to create.
To start the DHCP installation process, you can click Add Roles from the Initial Configuration Tasks window or from Server Manager Ã  Roles Ã  Add Roles.

Figure 1: Adding a new Role in Windows Server 2008
When the Add Roles Wizard comes up, you can click Next on that screen.
Next, select that you want to add the DHCP Server Role, and click Next.

Figure 2: Selecting the DHCP Server Role
If you do not have a static IP address assigned on your server, you will get a warning that you should not install DHCP with a dynamic IP address.
At this point, you will begin being prompted for IP network information, scope information, and DNS information. If you only want to install DHCP server with no configured scopes or settings, you can just click Next through these questions and proceed with the installation.
On the other hand, you can optionally configure your DHCP Server during this part of the installation.
In my case, I chose to take this opportunity to configure some basic IP settings and configure my first DHCP Scope.
I was shown my network connection binding and asked to verify it, like this:

Figure 3: Network connection binding
What the wizard is asking is, “what interface do you want to provide DHCP services on?” I took the default and clicked Next.
Next, I entered my Parent DomainPrimary DNS Server, and Alternate DNS Server (as you see below) and clicked Next.

Figure 4: Entering domain and DNS information
I opted NOT to use WINS on my network and I clicked Next.
Then, I was promoted to configure a DHCP scope for the new DHCP Server. I have opted to configure an IP address range of 192.168.1.50-100 to cover the 25+ PC Clients on my local network. To do this, I clicked Add to add a new scope. As you see below, I named the Scope WBC-Local, configured the starting and ending IP addresses of 192.168.1.50-192.168.1.100, subnet mask of 255.255.255.0, default gateway of 192.168.1.1, type of subnet (wired), and activated the scope.

Figure 5: Adding a new DHCP Scope
Back in the Add Scope screen, I clicked Next to add the new scope (once the DHCP Server is installed).
I chose to Disable DHCPv6 stateless mode for this server and clicked Next.
Then, I confirmed my DHCP Installation Selections (on the screen below) and clicked Install.

Figure 6: Confirm Installation Selections
After only a few seconds, the DHCP Server was installed and I saw the window, below:

Figure 7: Windows Server 2008 DHCP Server Installation succeeded
I clicked Close to close the installer window, then moved on to how to manage my new DHCP Server.

How to recover Hyper-V Virtual Machine manually?

How to recover Hyper-V Virtual Machine manually?
1 Option:
Easy enough, you create a new VM choose the option “attach a virtual hard disk latter” or “Use an existing virtual hard disk” and
then map the VM to the disk used before by the other “missing” VM, of course, you can copy the disk to the new VM folder to keep
all files together.
Nah….. I need the VM configuration, those configurations were critical to my tests and I don’t have the configuration paper with me. Let’s try Option 2
**************************************************************
2 Option:
First go to the “missing VM folder\virtual Machines\” and take note
of the file {GUID}.xml (In this scenario is the 71DB1869-534A-4B0B-B2B8-B89170FC0EF0.xml).
Now open the Hyper-V mmc and create a new VM with the same name, and point the new VM to the same drive/folder where
the “missing VM” is at.
Choose the option “attach a virtual hard disk latter” and do a next, next, thing until you finish the VM creation process.
Now go to the VM folder and under “Virtual Machines” folder you have 2 GUIds.xml, the
original 71DB1869-534A-4B0B-B2B8-B89170FC0EF0.xml (that you take note in the first step) and the new (in this scenario)
E5D8FBFC-4E01-4D48-AE95-1CF1630E2C24.xml that refers to the new VM (Note: The GUIDs that you have, will differ from these).
The next step is to copy everything that is inside of the old 71DB1869-534A-4B0B-B2B8-B89170FC0EF0.xml to the
new E5D8FBFC-4E01-4D48-AE95-1CF1630E2C24.xml, yes, everything… Basically you’re replacing the contents of the
new {GUID}.xml with data from the old one. Save the file with the same name in the same place replacing the existing one.
Next step, open the E5D8FBFC-4E01-4D48-AE95-1CF1630E2C24.xml, and the replace everything that has
the 71DB1869-534A-4B0B-B2B8-B89170FC0EF0 with E5D8FBFC-4E01-4D48-AE95-1CF1630E2C24. Save the
file replacing the existing one.
Next step, copy the files that are inside the “F:\VM01\Virtual Machines\71DB1869-534A-4B0B-B2B8-B89170FC0EF0
to “F:\VM01\Virtual Machines\E5D8FBFC-4E01-4D48-AE95-1CF1630E2C24”, you must also rename the files (.bin and .vsv)
that are inside that folder to match the new GUID.
If you have snapshots, then you also need to rename some files and folders inside Snapshots folder. Open “VM01\Snapshots
folder. Rename the folder “VM01\Snapshots \71DB1869-534A-4B0B-B2B8-B89170FC0EF0” to
“VM01\Snapshots\E5D8FBFC-4E01-4D48-AE95-1CF1630E2C24”. Then open the “VM01\Snapshots\{GUIDofTheSnapshot}”
and rename the files inside that folder (.bin and .vsv) to match the GUID of the new VM (If you have multiple snapshots, you have
to repeat the same process to each one).
Now, open “VM01\Snapshots\{GUIDofTheSnapshot}.xml” and replace the values
with “71DB1869-534A-4B0B-B2B8-B89170FC0EF0” with the new VM GUID “E5D8FBFC-4E01-4D48-AE95-1CF1630E2C24”.
(If you have multiple snapshots, you have to repeat the same process to each one).
Now is time to allow access to the Service SID access to all files in VM01, from
cmdline type:Icacls F:\VM01\ /T /grant “NT VIRTUAL MACHINE\E5D8FBFC-4E01-4D48-AE95-1CF1630E2C24″:(F)
The last step is to manually create a symbolic link and grant the proper permissions to each individual snapshot that has a {GUID}.
xml inside the VM01\snapshots folder (in this case there’re 2 snapshots)
.Mklink “C:\ProgramData\Microsoft\Windows\Hyper-V\Snapshots\324E6E76-77EC-4671-9E25-3D4B5D3133BA.xml”
“F:\VM01\Snapshots\324E6E76-77EC-4671-9E25-3D4B5D3133BA.xml
Mklink “C:\ProgramData\Microsoft\Windows\Hyper-V\Snapshots\D6EC4773-75A6-49E7-84D2-3B619D1D450C.xml” “F:\VM01\Snapshots\D6EC4773-75A6-49E7-84D2-3B619D1D450C.xml”


Now give access permissions to the new VM Service SID access.
Icacls C:\ProgramData\Microsoft\Windows\Hyper-V\Snapshots\324E6E76-77EC-4671-9E25-3D4B5D3133BA.xml /grant “NT VIRTUAL MACHINE\E5D8FBFC-4E01-4D48-AE95-1CF1630E2C24″:(F) /L
Icacls C:\ProgramData\Microsoft\Windows\Hyper-V\Snapshots\D6EC4773-75A6-49E7-84D2-3B619D1D450C.xml /grant “NT VIRTUAL MACHINE\E5D8FBFC-4E01-4D48-AE95-1CF1630E2C24″:(F) /L
Go to the settings of the VM01 and assign the proper Network switch.
Start VM01 and you’re DONE!!!!
Are you NUTS!!!! That’s too much work for a VM recovery!!!! And if I had 20 VMs to recover, that process will take the entire month…**************************************************************
Option3:
This method is simpler, we’ll re-assign the “missing” Symbolic links and give permissions to the Service SID.Using Mklink,
create the Symbolic link under “C:\ProgramData\Microsoft\Windows\Hyper-V\Virtual Machines”
Mklink “C:\ProgramData\Microsoft\Windows\Hyper-V\Virtual Machines\71DB1869-534A-4B0B-B2B8-B89170FC0EF0.xml” “
F:\VM01\Virtual Machines\71DB1869-534A-4B0B-B2B8-B89170FC0EF0.xml”
Now give access permissions to the service SID to this Symbolic link.
Icacls “C:\ProgramData\Microsoft\Windows\Hyper-V\Virtual Machines\71DB1869-534A-4B0B-B2B8-B89170FC0EF0.xml”/grant “NT VIRTUAL MACHINE\71DB1869-534A-4B0B-B2B8-B89170FC0EF0″:(F) /L
Then you need to give access permissions to the Service SID to all files in VM01Icacls F:\VM01\ /T /grant “NT VIRTUAL MACHINE\71DB1869-534A-4B0B-B2B8-B89170FC0EF0″:(F)Since VM01 has also Snapshots,
we need to create the correspondent symbolic link and give the necessary permissions to the files
(This process must be done to each snapshot).Mklink “C:\ProgramData\Microsoft\Windows\Hyper-V\Snapshots\324E6E76-77EC-4671-9E25-3D4B5D3133BA.xml”
“F:\VM01\Snapshots\71DB1869-534A-4B0B-B2B8-B89170FC0EF0.xml”
Mklink “C:\ProgramData\Microsoft\Windows\Hyper-V\Snapshots\D6EC4773-75A6-49E7-84D2-3B619D1D450C.xml”
“F:\VM01\Snapshots\71DB1869-534A-4B0B-B2B8-B89170FC0EF0.xml”
Now, assign the permissions:
Icacls C:\ProgramData\Microsoft\Windows\Hyper-V\Snapshots\324E6E76-77EC-4671-9E25-3D4B5D3133BA.xml /grant “NT VIRTUAL MACHINE\71DB1869-534A-4B0B-B2B8-B89170FC0EF0″:(F) /L
Icacls C:\ProgramData\Microsoft\Windows\Hyper-V\Snapshots\D6EC4773-75A6-49E7-84D2-3B619D1D450C.xml /grant “NT VIRTUAL MACHINE\71DB1869-534A-4B0B-B2B8-B89170FC0EF0″:(F) /L
Go to the settings of the VM01 and assign the proper Network switch.
Start VM01 and you’re DONE!!!!