One of the System Architecture admin has to do is to resize AWS volume and like me, we don’t remember steps if you are not doing that frequently in your job. Today I have taken my time to write this blog to list simple steps when extending AWS linux volume. I know there are many blogs you can find in internet but none of the blogs has it simple steps wise and precise step.

Resize AWS volume can be done with downtime and without downtime. Both ways uses similar steps to upgrade your AWS volume.

Please check images as well to refer to visual guides.

  1. Login to AWS and go to list of AWS Instances, select instance that you want its volume to be resize.
  2. After you select instance, you will instance description below.
  3. Within that description, click into Root device or Block devices ( whichever you want to resize )
  4. You will see EBS ID, click into it to go to Volume list with that volume selected.
  5. Your instance volume will be listed and now right click and click Modify Volume.
  6. Your Volume go through process: Modifying, Optimizing and Complete ( Takes minimum 20 minutes to 2 hour ).
  7. Once complete, SSH to your instance.
  8. RUN these command as SUDO or ROOT user.
  9. These are following commands to know about your Volume or disk in linux.
    df -h
    fdisk -l /dev/xvda
As you can see xvda has new volume size 30GB and and xvda1 mounted partition is stilled 20GB.

    10. Now you have type this command to extend your mounted partition: sudo growpart /dev/xvda 1
    11. Now you should have new partition size, check by running: sudo lsblk
    12. Lastly, you should extend your file system depending upon XFS OR EXTs( ext2, ext3 & ext4 ).
    – If you have XFS volume, then run: sudo xfs_growfs /dev/xvda1
    – If you have EXT volume, then run: sudo resize2fs /dev/xvda1

That’s all folks!

Your volume has been resize and these can all be achieved without downtime or shutting down your server.

Here are some of the screenshot I created to help with visual guides:

Happy System Admin-ing !!
Linux is the King ! 🙂

Elon Musk

Posted: December 9, 2020 in General
Tags: , , , , , ,

The Greatest Person of our century.

I would like to stop for a minute in our life, want to thank and appreciate what Elon musk has given us (and still).

Here are the paragraph of who Elon Musk is as he is:

Elon Reeve Musk FRS is a business magnate, industrial designer and engineer. He is the founder, CEO, CTO and chief designer of SpaceX; early investor, CEO and product architect of Tesla, Inc.; founder of The Boring Company; co-founder of Neuralink; and co-founder and initial co-chairman of OpenAI.

This defines him a very successful person and visionary mankind today in our world.

There are numerous break throughs and new invention that he had make it happen. I don’t mean he did it by himself, obviously with his great team and his great leadership to make it happen.

As of now, he is 49 years old and his children names are X Æ A-Xii, Nevada Alexander Musk, Griffin Musk, Kai Musk, Damian Musk, Xavier Musk, Saxon Musk. He already had total of 4 spouses and current one right now is Grimes from 2018.

Some of his motivation I like to list here are:

There need to be things that inspire you.

I want to be able to think about the future and feel good about that.

When something is important enough, you do it even when the odds are not in your favor.

A well thought out critique of whatever you’re doing is as valuable as gold.

I don’t ever give up. I mean, I’d have to be dead or completely incapacitated.

If you like what you’re doing, you think about it even when you’re not working. It’s something that your mind is drawn to, and if you don’t like it, you just can’t make it work.

If other people are putting in 40-hour workweeks and you’re putting in 100-hour work weeks, then even if you’re doing the same thing, you know that you will achieve in four months what it takes them a year to achieve.

I think colonizing Mars would be the most inspiring thing that I can possibly imagine. Life needs to be more than just solving problems every day. You need to wake up and be excited about the future.”

A lot of companies get confused. They spend money on things that don’t make the product better.

You want to wake up in the morning and think the future is going to be great, and that’s what being a spacefaring civilization is all about. It’s about believing in the future and thinking that the future will be better than the past. And I can’t think of anything more exciting than going out there and being among the stars.

There are a lot of negative things in the world. There are a lot of terrible things that are happening all over the world, all the time. There are lots of problems that need to get solved, there are lots of things that are miserable and kind of get you down.

Life can not just be about solving one miserable problem after another, that can’t be the only thing. There need to be things that inspire you, that make you glad to wake up in the morning and be part of humanity.

The main reason I am personally accumulating assets is in order to fund this, I really do not have any other motivation for personally accumulating assets except to be able to make the biggest contribution I can to making life multi-planetary.
That’s what really drives me — trying to figure out how to make sure that things are great and going to be so.

This is one of the video to touch by:

Elon Musk has lived in the Los Angeles area, where SpaceX is headquartered, for two decades. Tesla is headquartered in Palo Alto, California, and the electric-car maker’s flagship auto plant is across the San Francisco Bay in Fremont.
He states that “If a team has been winning for too long, they do tend to get a little complacent, a little entitled and then they don’t win the championship anymore. California has been winning for a long time, and I think they’re taking it for granted.”. Also the beneficial part is Texas might potentially offer some tax reprieve for the world’s second richest man. It does not collect personal income tax, while California has some of the highest state tax rates in the United States.

Here are the 6 productivity rules emailed by the CEO of Tesla to this employees:

Dodge big meetings

“Excessive meetings are the blight of big companies and almost always get worse over time. Please get [out] of all large meetings, unless you’re certain they are providing value to the whole audience, in which case keep them very short.”

Ditch frequent meetings

“Also get rid of frequent meetings, unless you are dealing with an extremely urgent matter. Meeting frequency should drop rapidly once the urgent matter is resolved.”

Leave a meeting if you’re not contributing

“Walk out of a meeting or drop off a call as soon as it is obvious you aren’t adding value. It is not rude to leave, it is rude to make someone stay and waste their time.”

Drop the jargon

“Don’t use acronyms or nonsense words for objects, software or processes at Tesla. In general, anything that requires an explanation inhibits communication. We don’t want people to have to memorise a glossary just to function at Tesla.”

Communicate directly, irrespective of hierarchy

“Communication should travel via the shortest path necessary to get the job done, not through the ‘chain of command’. Any manager who attempts to enforce chain of command communication will soon find themselves working elsewhere.

“A major source of issues is poor communication between depts. The way to solve this is allow free flow of information between all levels. If, in order to get something done between depts, an individual contributor has to talk to their manager, who talks to a director, who talks to a VP, who talks to another VP, who talks to a director, who talks to a manager, who talks to someone doing the actual work, then super dumb things will happen. It must be ok for people to talk directly and just make the right thing happen.”

Follow logic, not rules

“In general, always pick common sense as your guide. If following a ‘company rule’ is obviously ridiculous in a particular situation, such that it would make for a great Dilbert cartoon, then the rule should change.”

To successfully install and generate a Let’s Encrypt SSL cert. for a main domain or main hostname of the server, Please see following steps:

1. Go to “Webmin” at left side menu

2. Click and expand “Webmin” menu and click on “Webmin Configuration”

3. My Webmin configuration shows webmin version as “Webmin 1.851” here. There should be a box options saying “SSL Encryption”, click on this.

4. Click on “Let’s Encrypt” tab to use Let’s Encrypt SSL certificate as we are going to do.

5. Make sure your Hostname is correct. Make sure Website root directory is “/var/www/html” as defaulted in your apache configuration. Make sure monthly renewal is 3 monthly because all Let’s Encrypt SSL certificate expires within 3 months.

6. Click on “Request Certificate” to request for SSL from Let’s Encrypt.

And That’s All.


For Developers: Vagrant

Posted: January 5, 2017 in Programming

Vagrant is a tool for building complete development environments, sandboxed in a virtual machine. Vagrant lowers development environment setup time, increases development/production parity, and brings the idea of disposable compute resources down to the desktop.

With one command, Vagrant does all of the following:

  • Creates a virtual machine for you based on an operating system of your choice.
  • Modifies the physical properties of this virtual machine (e.g., RAM, number of CPUs, etc.).
  • Establishes network interfaces so that you can access your virtual machine from your own computer, another device on the same network, or even from another virtual machine.
  • Sets up shared folders so that you can continue editing files on your own machine and have those modifications mirror over to the guest machine.
  • Boots the virtual machine so that it is running.
  • Sets the hostname of the machine, since a lot of software depends on this being properly set.
  • Provisions software on the machine via a shell script or configuration management solution such as Chef, Puppet, or a custom solution.
  • Performs host and guest specific tweaking to work around known issues that may arise. For example, Ubuntu 12.04 LTS breaks VirtualBox networking defaults, so Vagrant makes minor modifications to some configuration in Ubuntu to make sure networking continues working. Vagrant does these sorts of things for many host/guest pairs.

This is all completed in about a minute, but the time it takes can greatly increase depending on the software being installed.

Once Vagrant finishes setting up the machine, you are left with a completely sandboxed, fully provisioned development environment. Due to the shared folders and networking, you continue using your own editor and your own browser to develop and test your applications, but the code itself runs on the virtual machine.

Vagrant handles the entire lifecycle of the machine for you, so in addition to setting up your development environment, Vagrant can do all of the following:

  • SSH into the machine.
  • Halt (shut down) the machine.
  • Destroy the machine, completely deleting its virtual hard drive and metadata.
  • Suspend or resume the machine.
  • Package the machine state so that you can distribute it to other developers.

Vagrant is a Swiss Army knife for development environments. It does everything you need to create and manage them, and helps enforce good practices by encouraging the use of automation and an environment that more closely resembles production.

If there is something Vagrant can’t do with your development environments, chances are that you can extend Vagrant’s behavior through a plug-in to achieve what you need. If this ends up being something that a lot of people need, then your plug-in could be merged back into Vagrant core, since Vagrant itself is open source. Thus, by using Vagrant, you’re using a tool that thousands of developers have contributed to based on their real-world needs.

Some of the Import Commands of Vagrant and its meanings:

  • box – manages boxes: installation, removal, etc.
  • cap – checks and executes capability
  • connect – connect to a remotely shared Vagrant environment
  • destroy – stops and deletes all traces of the vagrant machine
  • docker-exec – attach to an already-running docker container
  • docker-logs – outputs the logs from the Docker container
  • docker-run – run a one-off command in the context of a container
  • global-status – outputs status Vagrant environments for this user
  • halt – stops the vagrant machine
  • help – shows the help for a subcommand
  • init – initializes a new Vagrant environment by creating a Vagrantfile
  • list-commands – outputs all available Vagrant subcommands, even non-primary ones
  • login – log in to HashiCorp’s Atlas
  • package – packages a running vagrant environment into a box
  • plugin – manages plugins: install, uninstall, update, etc.
  • port – displays information about guest port mappings
  • powershell – connects to machine via powershell remoting
  • provider – show provider for this environment
  • provision – provisions the vagrant machine
  • push – deploys code in this environment to a configured destination
  • rdp – connects to machine via RDP
  • reload – restarts vagrant machine, loads new Vagrantfile configuration
  • resume – resume a suspended vagrant machine
  • rsync – syncs rsync synced folders to remote machine
  • rsync-auto – syncs rsync synced folders automatically when files change
  • share – share your Vagrant environment with anyone in the world
  • snapshot – manages snapshots: saving, restoring, etc.
  • ssh – connects to machine via SSH
  • ssh-config – outputs OpenSSH valid configuration to connect to the machine
  • status – outputs status of the vagrant machine
  • suspend – suspends the machine
  • up – starts and provisions the vagrant environment
  • version – prints current and latest Vagrant version


Install Mercurial

→ recently added a more detailed step-by-step-installation-guide for Mercurial on OSX, Ubuntu and Windows and also how to configure ssh.


Same as using Git we have to tell Mercurial some user informations. Mercurial searches for user data in a file named “hgrc“:

username = ekke <>

I place this file in my  repositories directly below .hg:

(Unix, Windows) yourRepository/.hg/hgrc

more informations about global locations of hgrc see here.

Install HgMercurial

There are also UpdateSites available for HgEclipse – I used the Snapshot Updatesite:

You should use MercurialEclipse 1.7.0 or later – there were huge performance improvements from 1.6.x to 1.7.0.

Unfortunately Intland changed the behaviour of the Updatesite

– now you need an Account and Password from JavaForge :(

From my POV an Updatesite for Open Source Software (EPL) should always be free from registrations – and luckily Andrei Loskutov provides the release and snapshots at EclipseLabs free from password or account :)

Read the rest of this entry »

Login as Root in Ubuntu 11.04 (Natty Narwhal)

This simple tutorial shows you how to login as root (administration) in Ubuntu 11.04 Natty. Even though it’s not recommended to logon to Ubuntu as the administrator, you still have the option to do so if you wish. One big reason why most Linux distributions won’t allow the root user to login is that, root or administrator has complete control of the system. Any small mistake might have huge impact on the stability of your system. So to prevent this, the root account is disabled by default.

Getting started:

To get started,  press Ctrl – Alt – T on your keyboard to open Terminal. Next, type the command below to create a new password for the root user.

sudo passwd root

After that, type the command below to unlock the root account.

sudo passwd -u root

Next, Log Out.

Then select ‘Other’ and type the username ‘root’ and the password you created for the root user.


Its for modifying the bcdedit.exe from command line of windows 7.
I generally wrote it for multi boot option modification.
—–Note: Don’t forget to open Command prompt as “Administrator”.  Just right click the command prompt and click “Run as Administrator”.

Command-line Help

bcdedit /? Shows all commands one is able to use

bcdedit.exe /? CREATESTORE Shows detailed information for the command CREATESTORE or any other command available in bcdedit as shown when running bcdedit /? followed by the particular command more information is required for.

bcdedit or bcdedit /enum all Shows the current structure of your boot configuration data.
The GUID tags {xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx} of all Windows installations present on your computer will be displayed.

Create a Backup

It is strongly recommended that one creates a backup of the BCD store before making any changes to it.

bcdedit /export “D:\BCD Backup\Bcd Backup” Creates a backup to a pre-created folder, in this case “BCD Backup” on drive D:

bcdedit /import “D:\BCD Backup\Bcd Backup” Restores the backup previously created

Making Changes to the Boot Configuration Data

Before making any changes or attempting to use the commands below, run the command bcdedit or bcdedit /enum all to make sure that you use the correct GUID tag. These have been seen to change from build to build and it may be necessary to use {ntldr} instead of{legacy} for example.

bcdedit /set {legacy} Description “Windows XP Professional SP2” Changes the text description of the “Legacy” OS line in the boot menu. The quotation marks must be included in the command

bcdedit /set {current} description “Windows Vista Build 5270 x86” Changes the text of the boot menu line for the Vista or non-Vista installation one is currently booted to, from the default “Microsoft Windows” or other description to that shown in the quotation marks

bcdedit /set {current} description “any name” …. for changing to any name you want.

bcdedit /set {5189b25c-5558-4bf2-bca4-289b11bd29e2} description “Windows Vista Build 5270 x64” Changes the text of the boot menu line for any other Vista installation. One must use the GUID for that particular installation as shown when one runs thebcdedit or bcdedit /enum all command

bcdedit /default {current} Sets the current Windows installation one is booted to as the default Windows boot OS

bcdedit /default {5189b25c-5558-4bf2-bca4-289b11bd29e2} Sets the referenced Windows OS as the {default} Windows boot OS

bcdedit /default {legacy} Sets the legacy (Windows XP) OS as {default} boot item

bcdedit /displayorder Sets the display order of boot menu items for example:

bcdedit.exe /displayorder {legacy} {current}

bcdedit /timeout 15 Changes the default 30 second time-out of the boot menu to 15 seconds or any other value inserted.

Correcting changes to the Partition/Disk structure

Where a partition or a hard drive has been added or removed and has caused the partition/disk structure to change, this can be corrected by running these commands in the order shown:

X:\>X:\boot\fixntfs.exe -lh -all (Where X: is the drive/partition on which the folder “boot” is to be found)

bcdedit /set {5189b25c-5558-4bf2-bca4-289b11bd29e2} device partition=X: Changes boot partition of the OS whose GUID is indicated. (Where X: is new drive/partition required). Must be used together with the osdevice command below

bcdedit /set {5189b25c-5558-4bf2-bca4-289b11bd29e2} osdevice partition=X: Changes boot partition of the OS whose GUID is indicated. (Where X: is new drive/partition required). Must be used together with the device command above

Msconfig – System Configuration Utility

The System Configuration Utility (msconfig) is accessible from the Windows Vista start menu, Start>All Programs>Accessories>System Tools>System Configuration. It has limited funcionality as regards the BCD store however, with the only relevant functionalities being to change the default boot operating system, to delete a boot menu item and to change the timeout display period of the boot menu.

CAUTION: Making incorrect or invalid changes to one’s BCD store can result in the system no longer booting and only those comfortable with using command line entries and who understand the inherent risks of making a mistake should do so.

Advanced Options

Please do not run these commands unless you know what the outcome will be.

bcdedit /set {current} numproc 2

bcdedit /set {current} removememory 0

For information on editing the BCD (Boot Configuration Data) when installing a “legacy” Operating System AFTER Windows Vista see How To: Modify BCD using bcdedit when install XP after Vista

The welcome screen displays all of the local users on the system, except the built-in administrator account that was created during setup. If we want to hide a specific user from the list, we need to create a special value under this registry key:


Under this key you simply create a new DWORD value – the name matches the users name exactly, and the value is one of the following (Decimal format)

0 – Hides the user just from the welcome screen
1 – The user is shown

Before you start putting values in this key, I want to warn you. This tip is particularly dangerous. If you make the wrong move, you could make it nearly impossible to get back into your system. Don’t blame me if you hose your system!

To hide the users I want, I browse to the registry key on my system:

Now I want to hide all of the accounts except Jennifer, so I add each of the accounts shown on the welcome screen, and give them a value of zero.

that’s all we need to do. I log off, and now I only see Jennifer’s account:

Here’s the big question. How do you log on as a hidden user? If you are running windows XP Professional you simply need to press CTRL-ALT-DEL twice, and the standard logon screen will be displayed. This has one pitfall – it will fail to work if a user is still currently logged in. If you are having trouble getting it to show, then reboot and press it twice before any users have logged in. Secondly, if you are running Windows XP Home, you will need to boot in safe mode to use the hidden account. The CTRL-ALT-DEL trick does not work for XP Home.

Have a laptop and want to get more battery life out of it? Windows 7 includes a hidden built-in tool that will examine your laptop’s energy use and make recommendations on how to improve it. To use it:

1. Run a command prompt as an administrator. To do this, type cmd in the search box, and when the cmd icon appears, right-click it and choose “Run as administrator.”

2. At the command line, type in the following:

powercfg -energy -output \Folder\Energy_Report.html

where \Folder represents the folder where you want the report to be placed.

3. For about a minute, Windows 7 will examine the behavior of your laptop. It will then analyze it and create a report in HTML format in the folder you specified. Double-click the file, and you’ll get a report — follow its recommendations for ways to improve power performance.

This guide is divided into 3 steps: installing/tesing Apache, PHP and finally MySQL.

Lets start with Apache:
1. Open the terminal (we will be using it through most of my guide) from Applications > Accessories > Terminal
2. Install apache2 using apt-get by typing the following

sudo apt-get install apache2

Note that you should know the root password.
Now everything should be downloaded and installed automatically.
To start/stop apache2 write:
sudo /etc/init.d/apache2 start
sudo /etc/init.d/apache2 stop

Your www folder should be in: /var/www/

If everything is OK you should see an ordinary HTML page when you type: http://localhost in your firefox browser

Finished with Apache ? lets conquer PHP:
1. Also in terminal write:
sudo apt-get install php5 libapache2-mod-php5

or any php version you like
2. restart apache
sudo /etc/init.d/apache2 restart

This is it for PHP 😀
Wanna test it ? Just create an ordinary PHP page in /var/www/ and run it.
sudo gedit /var/www/test.php

and write in it: < ?php echo “Hello World”; ?>

Now run it by typing http://localhost/test.php in firefox… You should see your ” Hello World ”
66 % is over, lets continue to installing MySQL:
1. Again and again in terminal execute:
sudo apt-get install mysql-server

2. (optional) If you are running a server you should probably bind your address by editing bind-address in /etc/mysql/my.cnf and replacing its value ( by your IP address

3. set your root password (although mysql should ask you about that when installing)
mysql> SET PASSWORD FOR ‘root’@’localhost’ = PASSWORD(‘xxxxxx’);

4. Try running it
mysql -uroot -pxxx

where xxx is your password.
Note: You can install PHPMyAdmin for a graphical user interface of MySQL by executing
sudo apt-get install libapache2-mod-auth-mysql php5-mysql phpmyadmin

5. restart apache for the last time
sudo /etc/init.d/apache2 restart

Congratulions your LAMP system is installed and running 😀

For installing/running phpmyadmin.

sudo apt-get install phpmyadmin

The phpmyadmin configuration file will be installed in: /etc/phpmyadmin
Now you will have to edit the apache config file by typing
sudo vi /etc/apache2/apache2.conf

and include the following line:
Include /etc/phpmyadmin/apache.conf

Restart Apache
sudo /etc/init.d/apache2 restart

Another issue was making mysql run with php5
First install these packages:
sudo apt-get install php5-mysql mysql-client

then edit php.ini and add to it this line : ”” if it isnt already there
sudo vi /etc/php5/apache2/php.ini

Restart Apache
sudo /etc/init.d/apache2 restart

for editing text files …. see “vi” editor guide …… you can download from here,
–> click here:   vi Guide