Some basics of MBR v/s GPT and BIOS v/s UEFI

MBR

A master boot record (MBR) is a special type of boot sector at the very beginning of partitioned computer mass storage devices like fixed disks or removable drives intended for use with IBM PC-compatible systems and beyond. The concept of MBRs was publicly introduced in 1983 with PC DOS 2.0.

The MBR holds the information on how the logical partitions, containing file systems, are organized on that medium. Besides that, the MBR also contains executable code to function as a loader for the installed operating system—usually by passing control over to the loader’s second stage, or in conjunction with each partition’s volume boot record (VBR). This MBR code is usually referred to as a boot loader.

The organization of the partition table in the MBR limits the maximum addressable storage space of a disk to 2 TB (232 × 512 bytes). Therefore, the MBR-based partitioning scheme is in the process of being superseded by the GUID Partition Table (GPT) scheme in new computers. A GPT can coexist with an MBR in order to provide some limited form of a backwards compatibility for older systems. 

GPT

GUID Partition Table (GPT) is a standard for the layout of the partition table on a physical hard disk, using globally unique identifiers (GUID). Although it forms a part of the Unified Extensible Firmware Interface (UEFI) standard (Unified EFI Forum proposed replacement for the PC BIOS), it is also used on some BIOS systems because of the limitations of master boot record (MBR) partition tables, which use 32 bits for storing logical block addresses (LBA) and size information.

MBR-based partition table schemes insert the partitioning information for (usually) four “primary” partitions in the master boot record (MBR) (which on a BIOS system is also the container for code that begins the process of booting the system). In a GPT, the first sector of the disk is reserved for a “protective MBR” such that booting a BIOS-based computer from a GPT disk is supported, but the boot loader and O/S must both be GPT-aware. Regardless of the sector size, the GPT header begins on the second logical block of the device. 


GPT uses modern logical block addressing (LBA) in place of the cylinder-head-sector (CHS) addressing used with MBR. Legacy MBR information is contained in LBA 0, the GPT header is in LBA 1, and the partition table itself follows. In 64-bit Windows operating systems, 16,384 bytes, or 32 sectors, are reserved for the GPT, leaving LBA 34 as the first usable sector on the disk. 

MBR vs. GPT

Compared with MBR disk, A GPT disk can support larger than 2 TB volumes where MBR cannot. A GPT disk can be basic or dynamic, just like an MBR disk can be basic or dynamic. GPT disks also support up to 128 partitions rather than the 4 primary partitions limited to MBR. Also, GPT keeps a backup of the partition table at the end of the disk. Furthermore, GPT disk provides greater reliability due to replication and cyclical redundancy check (CRC) protection of the partition table. 

The GUID partition table (GPT) disk partitioning style supports volumes up to 18 exabytes in size and up to 128 partitions per disk, compared to the master boot record (MBR) disk partitioning style, which supports volumes up to 2 terabytes in size and up to 4 primary partitions per disk (or three primary partitions, one extended partition, and unlimited logical drives). Unlike MBR partitioned disks, data critical to platform operation is located in partitions instead of unpartitioned or hidden sectors. In addition, GPT partitioned disks have redundant primary and backup partition tables for improved partition data structure integrity. 

BIOS

In IBM PC compatible computers, the Basic Input/Output System (BIOS), also known as System BIOS, ROM BIOS or PC BIOS, is a de facto standard defining a firmware interface. The name originated from the Basic Input/Output System used in the CP/M operating system in 1975. The BIOS software is built into the PC, and is the first software run by a PC when powered on.

The fundamental purposes of the BIOS are to initialize and test the system hardware components, and to load a bootloader or an operating system from a mass memory device. The BIOS additionally provides abstraction layer for the hardware, i.e. a consistent way for application programs and operating systems to interact with the keyboard, display, and other input/output devices. Variations in the system hardware are hidden by the BIOS from programs that use BIOS services instead of directly accessing the hardware. Modern operating systems ignore the abstraction layer provided by the BIOS and access the hardware components directly. 

UEFI

The Unified Extensible Firmware Interface (UEFI) (pronounced as an initialism U-E-F-I or like “unify” without the n) is a specification that defines a software interface between an operating system and platform firmware. UEFI is meant to replace the Basic Input/Output System (BIOS) firmware interface, present in all IBM PC-compatible personal computers. In practice, most UEFI images provide legacy support for BIOS services. UEFI can support remote diagnostics and repair of computers, even without another operating system.

The original EFI (Extensible Firmware Interface) specification was developed by Intel. Some of its practices and data formats mirror ones from Windows.] In 2005, UEFI deprecated EFI 1.10 (final release of EFI). The UEFI specification is managed by the Unified EFI Forum.

BIOS vs. UEFI

UEFI enables better use of bigger hard drives. Though UEFI supports the traditional master boot record (MBR) method of hard drive partitioning, it doesn’t stop there. It’s also capable of working with the GUID Partition Table (GPT), which is free of the limitations the MBR places on the number and size of partitions. GPT ups the maximum partition size from 2.19TB to 9.4 zettabytes.

UEFI may be faster than the BIOS. Various tweaks and optimizations in the UEFI may help your system boot more quickly it could before. For example: With UEFI you may not have to endure messages asking you to set up hardware functions (such as a RAID controller) unless your immediate input is required; and UEFI can choose to initialize only certain components. The degree to which a boot is sped up will depend on your system configuration and hardware, so you may see a significant or a minor speed increase.

Technical changes abound in UEFI. UEFI has room for more useful and usable features than could ever be crammed into the BIOS. Among these are cryptography, network authentication, support for extensions stored on non-volatile media, an integrated boot manager, and even a shell environment for running other EFI applications such as diagnostic utilities or flash updates. In addition, both the architecture and the drivers are CPU-independent, which opens the door to a wider variety of processors (including those using the ARM architecture, for example).

However, UEFI is still not widespread. Though major hardware companies have switched over almost exclusively to UEFI use, you still won’t find the new firmware in use on all motherboards—or in quite the same way across the spectrum. Many older and less expensive motherboards also still use the BIOS system. 

Converting from MBR to GPT

One of the more unusual features of gdisk is its ability to read an MBR partition table or BSD disklabel and convert it to GPT format without damaging the contents of the partitions on the disk. This feature exists to enable upgrading to GPT in case the limitations of MBRs or BSD disklabels become too onerous—for instance, if you want to add more OSes to a multi-boot configuration, but the OSes you want to add require too many primary partitions to fit on an MBR disk.

Conversions from MBR to GPT works because of inefficiencies in the MBR partitioning scheme. On an MBR disk, the bulk of the first cylinder of the disk goes unused—only the first sector (which holds the MBR itself) is used. Depending on the disk’s CHS geometry, this first cylinder is likely to be sufficient space to store the GPT header and partition table. Likewise, space is likely to go unused at the end of the disk because the cylinder (as seen by the BIOS and whatever tool originally partitioned the disk) will be incomplete, so the last few sectors will go unused. This leaves space for the backup GPT header and partition table. (Disks partitioned with 1 MiB alignment sometimes leave no gaps at the end of the disk, which can prevent conversion to GPT format—at least, unless you delete or resize the final partition.)

The task of converting MBR to GPT therefore becomes one of extracting the MBR data and stuffing the data into the appropriate GPT locations. Partition start and end points are straightforward to manage, with one important caveat: GPT fdisk ignores the CHS values and uses the LBA values exclusively. This means that the conversion will fail on disks that were partitioned with very old software. If the disk is over 8 GiB in size, though, GPT fdisk should find the data it needs.

Once the conversion is complete, there will be a series of gaps between partitions. Gaps at the start and end of the partition set will be related to the inefficiencies mentioned earlier that permit the conversion to work. Additional gaps before each partition that used to be a logical partition exist because of inefficiencies in the way logical partitions are allocated. These gaps are likely to be quite small (a few kilobytes), so you’re unlikely to be able to put useful partitions in those spaces. You could resize your partitions with GNU Parted to remove the gaps, but the risks of such an operation outweigh the very small benefits of recovering a few kilobytes of disk space.

add swap space ubuntu

I increased/add the swap size to 8 GB with the following sequence ( If you look at your system monitor swap space you will see Ubuntu emptying out your swap space as you run the first command):

sudo swapoff /swapfile
sudo fallocate -l 8G /swapfile
sudo chmod 600 /swapfile
sudo mkswap /swapfile
sudo swapon /swapfile

Verify it:

 sudo swapon --show
 free -m

Make it permanent:

echo '/swapfile none swap sw 0 0' | sudo tee -a /etc/fstab

Usefull Commands for UBUNTU / APACHE

Conventions

  • # – requires given linux commands to be executed with root privileges either directly as a root user or by use of sudo command
  • $ – requires given linux commands to be executed as a regular non-privileged user

Example 1

Open incoming TCP port 10000 to any source IP address:

$ sudo ufw allow from any to any port 10000 proto tcp

Example 2

Open incoming TCP port 443 to only specific source IP address eg. 10.1.1.231:

$ sudo ufw allow from 10.1.1.231 to any port 443 proto tcp

Example 3

Open incoming UDP port 53 to source subnet eg. 10.1.1.0/8:

$ sudo ufw allow from 10.1.1.0/8 to any port 53 proto udp

Example 4

Open incoming TCP ports 20 and 21 from any source, such as when running FTP server:

$ sudo ufw allow from any to any port 20,21 proto tcp

UFW blocking port 8001 until I login to ubuntu

What I would recommend doing, just to make sure we get the correct setup, is running

ufw disable

Then

ufw reset

The above stops ufw and then resets all rules. With a clean slate, we setup our default policies first.

ufw default deny incoming \
&& ufw default allow outgoing

With those rules in place, we then add the rules we need to work for whatever our purposes are. To start, I recommend allowing SSH in first.

ufw allow 22/tcp

We can then allow application-specific ports, such as 80, 443, 8001, etc. I’ll start with those three.

ufw allow 80/tcp \
&& ufw allow 443/tcp \
&& ufw allow 8001/tcp

We could also run just one command (copy and paste directly)

ufw disable \
&& ufw reset \
&& ufw default deny incoming \
&& ufw default allow outgoing \
&& ufw allow 22/tcp \
&& ufw allow 80/tcp \
&& ufw allow 443/tcp \
&& ufw allow 8001/tcp

Now, if you need to add any other ports, now’s the time to go ahead and add them. If nothing more needs to be added, we can then run

ufw enable

When prompted to confirm, type y, hit enter, and ufw is active once again.

IRCTC Recruitment 2019: Fresh Vacancy Announced; Check Walk-In Dates

The Indian Railway Catering and Tourism Corporation (IRCTC) has invited applications from interested and eligible candidates for the positions of Supervisor (Hospitality).

Candidates having full time B. Sc. in Hospitality and Hotel Administration from a recognized university can appear for the interview.

Those having the required eligibility criteria mentioned above can walk-in for an interview for the positions from August 5 to August 29, 2019, the notification read.

IRCTC Recruitment 2019 Vacancy Detail

Name of Post: Supervisor (Hospitality)

No of Posts: 92

Age Limit

The upper age limit for candidates to appear for the IRCTC recruitment is 30 years. Age relaxation is there for candidates. Check it by clicking the link given below.

Selection Process

Selection of the candidates will be based on their performance in the personal interview followed by document verification and other formalities, if any.

Walk-in Interview Details

Click HERE, for more details related to the IRCTC Recruitment 2019 vacancy.

Source:- odishatv

ITR forms for AY 2019-20 notified – Complete list of ITR forms and their usage

New Delhi: The Income Tax department has notified various forms related to I-T return filing for individuals as well as companies for the assessment year 2019-20.

The Tax department has made no change in ITR-1 form or Sahaj, however it has rationalised some sections in ITR 2, 3, 5, 6 and 7.

The last date of filing Income Tax Return (ITR) is July 31 for those who are not required to get their accounts audited.

Here are various types of ITR forms and their usage

ITR-1 for AY 2019-20

This form is to be filed by individuals total income upto Rs 50 lakh, having Income from Salaries, one house property, other sources (Interest etc.), and agricultural income upto Rs 5 thousand.

You can download the form here.

ITR-2 for AY 2019-20

This form is to be filed by individuals and HUFs not having income from profits and gains of business or profession.

You can download the form here.

ITR-3 for AY 2019-20

This form is to be filed by individuals and HUFs having income from profits and gains of business or profession.

ITR-4 or Sugam for AY 2019-20

This form is to be filed by individuals, HUFs and Firms (other than LLP) having total income upto Rs 50 lakh and having income from business and profession which is computed under sections 44AD, 44ADA or 44AE.

You can download the form here.

ITR-5 for AY 2019-20

This form is to be filed by persons other than,- (i) individual, (ii) HUF, (iii) company and (iv) person filing Form ITR-7

You can download the form here.

ITR-6 for AY 2019-20

This form is to be filed by Companies other than companies claiming exemption under section 11.

ITR-7 for AY 2019-20

This form is to be filed by persons including companies required to furnish return under sections 139(4A) or 139(4B) or 139(4C) or 139(4D) only.

Turn Your Browser Into a Phone With the Sinch JS SDK

This tutorial will walk you through building a web app to make VoIP calls between browsers. There are many scenarios in which this is useful, including anonymously connecting users on a dating website, securely connecting buyers with sellers in a marketplace and allowing users to make low-cost international calls.

The UI isn’t anything to write home about, but the finished web app will looking something like this:

overview

The finished code for this tutorial can be found on our Github.

Setup

  1. If you don’t have a Sinch developer account, sign up and register a new app here
  2. Download the SDK from here
  3. Create an index.html file with references to jQuery and the Sinch JavaScript SDK:
<head>
    <title>Sinch Web Calling</title>
    <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
    <script src="sinch.min.js"></script>
</head>

Create the UI

There are two parts to the UI for this app: a login form and a call screen. Users will first see the login screen and after successfully logging in, they will see the call screen:

<form id="auth">
    <input id="username" placeholder="username">
    <input id="password" type="password" placeholder="password">
    <button id="loginUser">Login</button>
    <button id="createUser">Signup</button>
</form>

<div id="call" style="display:none;">
    current user: <span id="username"></span>
    <button id="logout">Logout</button>

    <form>
        <input id="callUsername" placeholder="username"><br>
        <button id="call">Call</button>
        <button id="hangup">Hangup</button>
        <button id="answer">Answer</button>

        <audio id="incoming" autoplay></audio>
        <div id="callLog"></div>
    </form>
</div>

Login and user registration

This section will demonstrate how to log in and register users using the Sinch SDK. For this tutorial, you will use a very basic backend for user management to get started. You should not use this in a production environment. In production, you should use your own user authentication. You can find a .net sample project here.

First, create an instance of the Sinch client:

sinchClient = new SinchClient({
    applicationKey: 'your-app-key',
    capabilities: {calling: true},
});

Then, either create or log in the user and start the Sinch client:

//store the username of the current user
var global_username = '';

$('button#createUser').on('click', function(event) {
    event.preventDefault();
    $('button#createUser').attr('disabled', true);
    $('button#loginUser').attr('disabled', true);
     clearError();

     var username = $('input#username').val();
     var password = $('input#password').val();

    var loginObject = {username: username, password: password};
    sinchClient.newUser(loginObject, function(ticket) {
          sinchClient.start(ticket, function() {
            global_username = username;
               showCall();
          }).fail(handleError);
    }).fail(handleError);
});

$('button#loginUser').on('click', function(event) {
    event.preventDefault();
    $('button#createUser').attr('disabled', true);
    $('button#loginUser').attr('disabled', true);
    clearError();

    var username = $('input#username').val();
    var password = $('input#password').val();

    var loginObject = {username: username, password: password};
    sinchClient.start(loginObject, function() {
          global_username = username;
        showCall();
    }).fail(handleError);
});

//handle errors
var handleError = function(error) {
     $('button#createUser').attr('disabled', false);
     $('button#loginUser').attr('disabled', false);
     $('div.error').text(error.message);
}

//clear out old errors
var clearError = function() {
    $('div.error').text("");
}

//show the call screen
var showCall = function() {
    $('form#auth').css('display', 'none');
    $('div#call').show();
    $('span#username').append(global_username);
}

Make outgoing calls

Once a user is authenticated, you will use the Sinch call client to make outgoing calls. First, define a custom call listener. This lets you make decisions based on whether a call is ringing, connected or ended:

var callListener = {
    onCallProgressing: function(call) {
        $('div#callLog').append("<div>Ringing...</div>");
    },
    onCallEstablished: function(call) {
        $('audio#incoming').attr('src', call.incomingStreamURL);
        $('div#callLog').append("<div>Call answered</div>");
    },
    onCallEnded: function(call) {
        $('audio#incoming').removeAttr('src');
        $('button#call').removeAttr('disabled');
        $('button#answer').removeAttr('disabled');
        $('div#callLog').append("<div>Call ended</div>");
    }
}

Then, define the Sinch call client and a variable to store the current call:

var callClient = sinchClient.getCallClient();
   var call;

When the call button is clicked, disable the call and answer buttons, tell the user who they are calling and initiate the call. Lastly, add a call listener to the current call.

$('button#call').click(function(event) {
    event.preventDefault();
    clearError();

    $('button#call').attr('disabled', 'disabled');
    $('button#answer').attr('disabled', 'disabled');
    $('div#callLog').append("<div>Calling " + $('input#callUsername').val() + "</div>");

    call = callClient.callUser($('input#callUsername').val());
    call.addEventListener(callListener);
});

To hang up the call:

$('button#hangup').click(function(event) {
    event.preventDefault();
    clearError();

    call && call.hangup();
});

Receive incoming calls

Your app should also listen for incoming calls:

callClient.addEventListener({
    onIncomingCall: function(incomingCall) {
    $('div#callLog').append("<div>Incoming call from " + incomingCall.fromId + "</div>");

    call = incomingCall;
    call.addEventListener(callListener);
    }
});

Test it

To test your app, open two browser windows, log in as two different users and make the call. Some browsers will ask for permission to use the microphone on your computer when you place the call.

Happy coding! If you have any questions, feel free to reach out to us on Twitter or via our help page.

Separate Registration of GST in each state of India, for each business.

India is a sovereign country with many powers for states. Unlike many other countries, GST in India is implemented as duel tax system. Means, two types of GSTs are implemented in India. As you know, there are IGST, CGST and SGST. Each taxable transaction of goods and services in India attracts duel GST – CGST and IGST or SGST. So the main reason for duel GST is to account the share of state governments. Ie, SGST (State Goods and Service Tax) and the share of IGST (Integrated Goods and Service Tax).

So, an account of GST Tax payers is to be accounted separately. At present government insists separate GST registration in each state, if a person operates his business. For example, if XYZ company has business transaction of goods or services in Maharashtra, West Bengal and Tamil Nadu, he has to take registration of GST in all the three states. Means a separate GST registration number has to be obtained in each state, although the Permanent Account Number, PAN is same.


As per sub section 1 of section 19 of GST Law explains that every person who is liable to take a Registration will have to get registered separately for each of the States where he has a business operation and is liable to pay GST

background gradient css

 .card-inner {

    position: absolute;

    width: 100%;

    padding: 5px 15px;

    background-size: 50% 50%;

    border: inset .5em transparent;

    background-color: #1a82f7;

    background: url(images/linear_bg_2.png);

    background-repeat: no-repeat;

    background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#1a82f7), to(#2F2727));

    background: -webkit-linear-gradient(top, #2F2727, #1a82f7);
    background: -moz-linear-gradient(top, #2F2727, #1a82f7);
    background: -ms-linear-gradient(top, #2F2727, #1a82f7);
    background: -o-linear-gradient(top, #2F2727, #1a82f7);
} 

how to check laravel version

Introduction

Artisan is the name of the command-line interface included with Laravel. It provides a number of helpful commands for your use while developing your application. It is driven by the powerful Symfony Console component.

Usage

Listing All Available Commands

To view a list of all available Artisan commands, you may use the list command:

php artisan list

Viewing The Help Screen For A Command

Every command also includes a “help” screen which displays and describes the command’s available arguments and options. To view a help screen, simply precede the name of the command with help:

php artisan help migrate

Specifying The Configuration Environment

You may specify the configuration environment that should be used while running a command using the --env switch:

php artisan migrate --env=local

Displaying Your Current Laravel Version

You may also view the current version of your Laravel installation using the --version option:

php artisan --version

sarkariresult.com doing job scam. they submit job on website which is not verifed or trusty.

sarkariresult.com doing job scam. they submit job on website which is not verifed or trusty.

sarkariresult.com जॉब घोटाला कर रहा है। वे वेबसाइट पर नौकरी प्रस्तुत करते हैं जो सत्यापित या भरोसेमंद नहीं है।

SCAM 1

SCAM 2

All Links directed to wrong website.