Fix for not able to bundle AMI | utility ‘parted’ not found error

If you ever receive the following error while running ‘ec2-bundle-vol’ command to take an AMI, you need to install ‘GNU parted’ program in the server. GNU parted is a partition manipulation program.

Error:

Please specify a value for arch [x86_64]:
Setting partition type to bundle “/” with…
/opt/aws/amitools/ec2/lib/ec2/platform/linux/image.rb:196:in `verify_runtime’: Required utility ‘parted’ not found in PATH – is it installed? (FatalError)
from /opt/aws/amitools/ec2/lib/ec2/platform/linux/image.rb:194:in `each’
from /opt/aws/amitools/ec2/lib/ec2/platform/linux/image.rb:194:in `verify_runtime’
from /opt/aws/amitools/ec2/lib/ec2/platform/linux/image.rb:256:in `set_partition_type’
from /opt/aws/amitools/ec2/lib/ec2/platform/linux/image.rb:71:in `initialize’
from /opt/aws/amitools/ec2/lib/ec2/amitools/bundlevol.rb:172:in `new’
from /opt/aws/amitools/ec2/lib/ec2/amitools/bundlevol.rb:172:in `bundle_vol’
from /opt/aws/amitools/ec2/lib/ec2/amitools/bundlevol.rb:231:in `main’
from /opt/aws/amitools/ec2/lib/ec2/amitools/tool_base.rb:201:in `run’
from /opt/aws/amitools/ec2/lib/ec2/amitools/bundlevol.rb:239

 

FIX / Solution :

yum install parted

 

You will then be able to bundle the AMI.

1 billion is equal to how much Indian rupees?

US System for counting fortune is quite different from ours.
They Count it as

1000= 1 Thousand
Thousand x 1000 =1 Million
1 Million x 1000 =1 Billion
1 Billion x 1000 =1 Trillion

And now back to your question
1 billion = 100 crore
$ 1 billion = $ X 100 Crore

Whenever you want to calculate Rupees equivalent to 1 Billion USD just multiply 100 crore by the current exchange rate. It varies every day.

How to create swap memory

Steps to create swap memory in linux:
touch /Absolute/Path/to/Folder/SwapFile
dd if=/dev/zero of=/Absolute/Path/to/Folder/SwapFile bs=1024 count=2145728
mkswap /Absolute/Path/to/Folder/SwapFile
swapon /Absolute/Path/to/Folder/SwapFile

 

Example:
touch /swapfile1
dd if=/dev/zero of=/swapfile1 bs=1024 count=2145728
mkswap /swapfile1
swapon /swapfile1

 

Where,

if=/dev/zero : Read from /dev/zero file. /dev/zero is a special file in that provides as many null characters to build storage file called ‘/swapfile1’.
of=/swapfile1 : Read from /dev/zero write storage file to ‘/swapfile1’.
bs=1024 : Read and write 1024 BYTES bytes at a time.
count=2145728 : Copy only 2145728 BLOCKS input blocks.

 

Update /etc/fstab file
To activate ‘/swapfile1’ after Linux system reboot, add entry to /etc/fstab file. Open this file using a text editor such as vi:
# vi /etc/fstab

Append the following line:
/swapfile1 swap swap defaults 0 0

Save and close the file. Next time Linux comes up after reboot, it enables the new swap file for you automatically.

 

How do I Verify Swap is Activated or Not?
Simply use the free command:
free -m

total       used       free     shared    buffers     cached
Mem:          1678       1627         51          0        174       1311
-/+ buffers/cache:        141       1536
Swap:          895          1        894

How can I display swap usage summary on Linux?
Type the following swapon command:
# swapon -s
Display swap usage summary by device. Equivalent to “cat /proc/swaps”.  Not available before Linux 2.1.25.

Filename                                Type            Size    Used    Priority
/swapfile1                              partition       917500  1992    -1

Another option is to view /proc/meminfo file:
$ less /proc/meminfo
$ grep -i –color swap /proc/meminfo

 

How can I disable devices and files for paging and swapping on Linux?

You need to use the swapoff command:
# swapoff /swapfile1
# swapon -s

How do I set swappiness on a Linux server?

The syntax is:
# sysctl vm.swappiness=VALUE
# sysctl vm.swappiness=20

OR
# echo VALUE > /proc/sys/vm/swappiness
# echo 30 > /proc/sys/vm/swappiness

The value in /proc/sys/vm/swappiness file controls how aggressively the kernel will swap memory pages. Higher values increase agressiveness, lower values descrease aggressiveness. The default value is 60. To make changes permanent add the following line to /etc/sysctl.conf:

echo ‘vm.swappiness=30’ >> /etc/sysctl.conf