<PAGE>
 
                                                                    Exhibit 10.1

         AMENDED AND RESTATED STOCK RESTRICTION AND BUY SELL AGREEMENT



This agreement is made this 18th day of March, 1999 by and among The GSI Group,
Inc., a Delaware corporation ("GSI" or the "Company"), Jorge Andrade, an
individual residing at 3209 Falcon Point, Springfield, Illinois 62707
("Andrade"), Howard Buffett, an individual residing at 407 Southmoreland,
Decatur, Illinois 62521 ("Buffett"), John Funk, an individual residing at 152
Southmoreland, Decatur, Illinois 62521 ("Funk"), and Craig Sloan, an individual
residing at #10 DuClaire, Decatur, Illinois 62521 ("Sloan")


This agreement and the shareholders agreement entered into on the date hereof
replace all prior stock restriction and buy sell agreements and stock
restriction and cross purchase agreements and any amendments thereto relating to
the parties hereto and their voting stock.


The parties intend for this agreement to address the rights the stockholders and
the corporation have upon the death, disability or termination of employment
from GSI of a stockholder.  The shareholders agreement addresses corporate
governance matters that were contained previously in the stock restriction and
buy sell agreement.

This agreement is written in plain English instead of complicated legalese to
make sure the stockholders and their families and advisors can read and
understand its provisions.  The phrase "stockholder" as used in this agreement
refers to each of Andrade, Buffett, Funk and Sloan as long as he owns stock and,
collectively, the "stockholders".  Reference to "stock" is to shares of GSI
voting and nonvoting stock.  The phrase "event" refers to the death, permanent
disability or termination of employment (whether by firing or resignation) of a
stockholder.

It is our primary goal for all parties to this agreement to be treated fairly
and with respect regarding the matters addressed herein.  We would also like to
avoid disputes arising out of confusion or lack of clarity.

1.  Share Price.  We agree that the price per share of the voting common stock
    -----------                                                               
of GSI is $37.50 for all purchases and sales of stock except as specifically
provided for in paragraph 6(a) below.  We will not change this price until March
2000 unless we all agree in writing between now and then that the price should
be adjusted.  The price may be changed in March 2000 and every March thereafter
(but at no other time) if Sloan plus all but one of the other stockholders agree
to change it after considering GSI's prior year's 

                                       1
<PAGE>
 
performance, valuations of our competitors, future prospects for the business
and any other factors we think are relevant.

2.  Death.  If a stockholder dies, the life insurance owned by the trust that we
    -----                                                                       
established in 1996 will pay the surviving stockholders the death benefit.  Each
of the surviving stockholders must use the death benefit he receives to purchase
his pro rata share of the dead stockholder's shares from his estate. This will
be true even if a stockholder is not an employee of GSI when he dies. This
purchase will take place within 30 days after the surviving stockholders receive
the payment from the insurance company of the life insurance proceeds and will
be all cash.

     a.  Life Insurance Proceeds Not Enough to Buy All Stock.  If the life
         ---------------------------------------------------              
insurance proceeds aren't enough to purchase all the dead stockholder's GSI
stock, each of the surviving stockholders will have the right to buy from the
estate up to his pro rata portion (based on those electing to purchase) of the
remaining stock owned by the estate.  The surviving stockholders will have three
months after the payment by the insurance company of the life insurance proceeds
to buy and pay for the additional stock. GSI will have the right to buy any
stock not purchased by the surviving stockholders.

     After subtracting the stock that is paid for with the insurance proceeds,
no less than the first 30% in value of the dead stockholder's remaining GSI
stock must be paid for in cash, with the balance in the form of a promissory
note.  The form of the note is attached to this agreement as Exhibit A.  The
note will be payable in monthly installments over a five year period at an
annual interest rate equal to LaSalle National Bank's prime rate at the time of
the purchase.

     Any stock purchased by means of delivering a promissory note shall be
pledged to the dead shareholder's estate as collateral for payment of the note.
This means that if the surviving stockholder fails to make the note payments on
time, the surviving stockholder will forfeit to the estate the additional stock
that was purchased from the estate. The purchaser of stock will agree to sign
any documentation necessary to perfect the pledge and to deposit the share
certificates with a third party escrow agent.

     b.  Life Insurance Proceeds More Than Enough to Buy Stock.  If the life
         -----------------------------------------------------              
insurance proceeds are more than the total value of the dead shareholder's
stock, the surviving stockholders will contribute as capital to GSI the amount
left over.  If GSI or a stockholder has purchased some or all of the dead
stockholder's stock prior to his death through delivery of a promissory note,
the excess life insurance proceeds will be used to prepay the note.

     c.  Death of Sloan.  If Sloan dies and, after the stockholders purchase his
         --------------                                                         
stock using the proceeds from the life insurance, Sloan's estate or heirs (the
"Estate") still own over $10 million worth of stock, the Estate will have the
right to sell GSI to the highest bidder after 18 months after Sloan's death.
The surviving stockholders will be allowed to purchase the remaining stock
during this 18 month period for no less than 80% cash at 

                                       2
<PAGE>
 
closing with the balance payable pursuant to a promissory note payable in equal
monthly installments over a five year period at an interest rate of the prime
rate of LaSalle National Bank at the date of Sloan's death. The remaining stock
will be pledged to the Estate pending the payment in full of this note. The
Estate will be allowed to sell the remaining stock during this 18 month period
but GSI and the remaining stockholders will be allowed to match the terms of the
sale but shall not be required to pay more than 80% of the purchase price in
cash with the balance financed as described above. If the Estate obtains
identical offers from bona fide purchasers, GSI shall be allowed to elect the
purchaser of stock.

3.  Permanent Disability.  If a stockholder (other than Sloan) becomes
    --------------------                                              
permanently disabled while still an employee, the remaining stockholders will
have the right to buy from the disabled stockholder up to their respective pro
rata portion of the disabled stockholder's stock.  The remaining stockholders
will have three months after the stockholder is determined to be permanently
disabled to buy and pay for the stock.  GSI will have the right to buy any stock
not purchased by the remaining stockholders.

     The first 10% in value of stock purchased must be in the form of cash at
closing.  The remaining 90% may be in the form of the note attached to this
agreement as Exhibit A.  The note will be payable in monthly installments over a
ten year period at an annual interest rate equal to LaSalle National Bank's
prime rate at the time of the purchase.

     Any stock purchased by means of delivering a promissory note shall be
pledged to the disabled shareholder as collateral for payment of the note.  This
means that if the remaining stockholder fails to make the note payments on time,
the remaining stockholder will forfeit to the disabled stockholder the stock
that was purchased from the disabled stockholder. The purchaser of stock will
agree to sign any documentation necessary to perfect the pledge and to deposit
the share certificates with a third party escrow agent.

     a.  Determining When a Stockholder is Permanently Disabled.  A stockholder
         ------------------------------------------------------                
is permanently disabled if he hasn't been able to perform his duties as an
employee, officer and/or director of GSI for 6 consecutive months.  If we can't
agree about whether a stockholder is permanently disabled, the stockholder will
be considered to be permanently disabled when at least two out of three medical
doctors (one chosen by GSI, one chosen by the stockholder and one chosen by the
two doctors if they disagree) agree that the stockholder is physically or
mentally incapable on a permanent basis of performing the duties which he is
currently assigned by GSI under the terms of his Employment Agreement.  GSI and
the stockholder must choose their doctors in a timely manner.  The doctors named
by GSI and the stockholder must be considered experts in the disability that the
stockholder has.

4.  Termination of Employment.  If a stockholder (other than Sloan) is fired or
    -------------------------                                                  
resigns from GSI, the remaining stockholders will have the right to buy from the
exiting stockholder up to their respective pro rata portion of the exiting
stockholder's stock.  The 

                                       3
<PAGE>
 
remaining stockholders will have three months after the stockholder leaves GSI
to buy and pay for the stock. GSI will have the right to buy any stock not
purchased by the remaining stockholders.

     The first 30% in value of stock purchased must be in the form of cash at
closing (unless a stockholder is terminated "for cause", and then it's the first
10%).  The balance may be in the form of the note attached to this agreement as
Exhibit A.  The note will be payable in monthly installments over a five year
period (ten year period if the termination is "for cause") at an annual interest
rate equal to LaSalle National Bank's prime rate at the time of the purchase.

     Any stock purchased by means of delivering a promissory note shall be
pledged to the exiting shareholder as collateral for payment of the note.  This
means that if a remaining stockholder fails to make the note payments on time,
the remaining stockholder will forfeit to the exiting stockholder the stock that
was purchased from the exiting stockholder.  The purchaser of stock will agree
to sign any documentation necessary to perfect the pledge and to deposit the
share certificates with a third party escrow agent.

     The definition of "for cause" termination shall be the definition from the
stockholder's employment agreement.

     If Sloan quits, is fired or becomes permanently disabled, the other
stockholders and GSI will have the right to buy all his stock but if they choose
not to, the stockholders agree to sell GSI to the highest bidder within 18
months of the event.

5. Right of First Refusal.  If a stockholder receives a bona fide offer to sell
   ----------------------                                                      
all or any portion of his stock to a third party, he must notify the other
stockholders and GSI in writing of all of the terms of the offer.  The other
stockholders and GSI will have the right to buy his stock at the lesser of the
Purchase Price or the price of the bona fide offer.  If the other stockholders
or GSI want to purchase his stock, they must do it within sixty days from the
date they receive notice of the offer.  The terms of the purchase will be cash
at closing for the first 30% in value of the stock being sold and, for the
balance, delivery of a promissory note in the form of the note attached to this
agreement as Exhibit A.  The note will be payable in monthly installments over a
five year period at an annual interest rate equal to LaSalle National Bank's
prime rate at the time of the purchase.  GSI has the first right to purchase,
then the other stockholders.  If GSI or the other stockholders want to buy the
stock, the stockholder must sell to them within the 60 day period.  If they
don't buy all of the offered stock in the 60 day period, the stockholder can
sell his stock to the person who made the bona fide offer but at the same price
and other terms as set forth in the original offer.  This purchase must take
place within 60 days after the other stockholders and GSI choose not to or fail
to purchase the stock.  If it doesn't, the bona fide offer is null and void.

                                       4
<PAGE>
 
The stockholders cannot sell their stock under this Section to anyone who would
cause GSI to lose its S election.

If the stock is purchased by someone not a party to this agreement, that person
must become a party to this agreement at the time of his purchase of stock.  The
proposed new purchaser must also do whatever is necessary to maintain GSI's S
election.  If he doesn't, he cannot buy the stock.

Sloan can only sell voting shares under this section if, after giving effect to
such sale, he would still own a majority of the voting stock of GSI.

If on the date of an event (other than a "for cause" termination), GSI has
outstanding debt that is guaranteed personally by  Sloan, Andrade and Funk, each
of the remaining stockholders who has personally guaranteed debt agrees to use
good faith efforts to obtain the release of the selling stockholder's personal
guaranty, but shall not be required to offer a pledge of his residence or his
spouse's guaranty to secure such release.  The ability to secure the release
will not effect GSI's option to purchase the stockholder's stock.

6.  GSI's Right to Purchase Stock.  GSI should not buy more stock than it is
   ------------------------------                                           
able to afford.  We all agree that GSI can only afford to buy stock when the
purchase price per share is equal to or less than five times GSI's trailing four
quarters EBITDA less debt divided by total shares outstanding:    ((5 x EBITDA)
- debt)/total shares outstanding.  The average balance on any lines of credit
over the trailing four quarters shall be included in debt.

The term "EBITDA" shall mean, for the period of four consecutive fiscal quarters
most recently ended on or prior to the date of determination, GSI's earnings
before interest, taxes, depreciation and amortization, and notwithstanding any
non-cash charge for increase in value of stock appreciation rights (or similar
rights), but accounting for same as a charge against earnings when paid,
determined in accordance with GAAP.  Prior to the first anniversary of the
consummation of an acquisition, the historical financial results of the acquired
entity or assets for the relevant period will be included for purposes of
calculating EBITDA (but without any adjustment to such historical results for
cost savings or other synergies).

Because of certain restrictions in the high yield indenture, GSI will only be
allowed to consummate its purchase of stock at the end of any calendar year
(although the decision to purchase (which is binding on GSI) may be made at any
time, subject to GSI being able to afford such purchase).  If GSI has the
opportunity to buy stock from more than one stockholder, it must exercise its
options on a pro rata basis.  This means that if two stockholders become
disabled in one year and one's stock is worth $10 million and the other's is
worth $5 million and the high yield indenture restricts the corporation's
purchases to $6 million, GSI, if it chooses to exercise any options, would
purchase $4 million of stock from the first stockholder and $2 million from the
second stockholder at the end of that year.

                                       5
<PAGE>
 
     a.  What Happens if an Event Takes Place When GSI Can't Afford to Purchase
         ----------------------------------------------------------------------
Stock.  If a stockholder experiences an event during a period when GSI can't
-----                                                                       
afford to purchase stock, GSI will automatically begin (without any need for
approval or any other action) to pay the stockholder or his representative an
amount equal to what was paid as his salary as originally set forth in his June
6, 1996 employment agreement on a monthly basis until all his stock is
purchased.  If, three years after the event, GSI still can't afford to purchase
the stock, the amount paid pursuant to the previous sentence will double until
all his stock is purchased.  These payments will continue until all of the
affected stockholder's stock has been purchased.  Such payments do not in any
way reduce the purchase price payable to the stockholder or his estate for his
stock, and are made without any obligation on the part of the affected
stockholder or his estate (including without limitation any performance of
services).  These payments will be made solely in consideration of the delay in
GSI's ability to purchase the stockholder's stock.  For GSI to purchase stock
during the period when it can't afford to, all the stockholders must agree.  If
three years after the event GSI still hasn't purchased all the stockholder's
stock, the purchase price of the remaining shares will be allowed to adjust to
the then current purchase price but only if it is greater than the purchase
price in effect at the time of the event.  This is the only way that the
purchase price of shares of stock changes for a stockholder after an event takes
place for such stockholder.  Once GSI can afford to purchase stock, paragraph b
shall apply.

     b.  What Happens When GSI Can Afford to Purchase Stock.  Whenever GSI can
         --------------------------------------------------                   
afford to purchase stock, the decision as to whether GSI will purchase stock
will be made by the affirmative vote of any one of the four stockholders or his
representative at a duly called and held meeting of stockholders, which all of
the stockholders agree to call upon any one stockholder's or his
representative's request.  During this period, if GSI exercises its option, it
must purchase all of a stockholder's stock, unless GSI and the holder of the
stock agree otherwise.

7. Rights of Stockholder After Event Takes Place.  As long as a stockholder or
   ---------------------------------------------                              
his estate, heirs or legal representatives own stock, such stockholder or his
estate, heirs or legal representative shall be allowed one seat on the board of
directors regardless of the number of heirs.  Once all his stock is purchased
and paid for (either by delivery of cash or a note as provided for in this
agreement), he will resign from the board.  As long as a non employee director
is on the board, the board will hold regular monthly meetings to discuss the
operations and financial condition of the business.  On the date of the event,
the affected shareholder will resign from any offices he holds with GSI or any
related entity and will resign as a director from any related entity.

8. Follow Along Rights and Obligations.  Stockholders owning greater than 50%
   -----------------------------------                                       
of the voting stock of GSI can sell all their stock as long as the other
stockholders have the right to sell their stock too on the same terms and
conditions.  Stockholders owning greater than 50% of the voting stock of GSI can
sell all their stock and require the other stockholders to sell their stock on
the same terms and conditions. Stockholders owning 

                                       6
<PAGE>
 
greater than 50% of the voting stock of GSI can also cause GSI to register their
shares under the Securities Act of 1933, as amended.

9.  Prohibition on Transfer.  A stockholder cannot sell, pledge, hypothecate,
    -----------------------                                                  
transfer, encumber, assign, give away or in any way dispose of his shares of
stock nor shall such shares of stock be transferrable, voluntarily or
involuntarily, by operation of law or otherwise, except in strict compliance
with the covenants, terms and conditions set forth in this Agreement and the
Contribution Agreement dated June 6, 1996 between Sloan, Buffett, Funk and
Andrade.  Any attempt to do so in violation of this Agreement shall not be
recognized by the Corporation and shall be null and void and of no force or
effect whatsoever.

10. Closing and Sale.  Upon the closing of the sale and purchase, the selling
    ----------------                                                         
stockholder, GSI and the remaining stockholders will sign and deliver to each
other the various documents, which shall be required to complete the
transactions.

11. Miscellaneous.
    ------------- 

     a.  Termination of this Agreement.  This agreement will terminate if any of
         -----------------------------                                          
the following events happen: i. adoption of a plan of dissolution of GSI, as
long as the plan is carried out diligently and all assets remaining after
payment of or provision for liabilities are distributed to the stockholders
within a reasonable time thereafter; or ii. all stockholders agree in writing,
or iii. permanent cessation of the business of GSI, or iv. sale of all or
substantially all of the assets or business of GSI, or v. a single stockholder
becomes the legal and beneficial owner of all the issued and outstanding shares,
or vi. a public offering takes place. Termination of this agreement for any
reason will not affect any right or remedy existing before the effective date of
the termination.

     b.  Piggyback Registration Rights.  If GSI wants to make a public offering
         -----------------------------   
of shares, each stockholder will be notified and will be allowed to have
included in the offering as many of his shares as the underwriter of the
offering shall permit at no cost or expense to the stockholder. If the
underwriter permits less than all of the shares to be registered, the number of
shares allowed to be registered by each stockholder will be reduced on a pro
rata basis. GSI will furnish each stockholder with at least thirty days prior
written notice of the filing of the initial registration statement and any
future registration statements. A stockholder must notify GSI in writing within
twenty days after his receipt of the notice if he wants to participate in the
offering.

     c.  Entire Agreement.  Except for the Contribution Agreement and the Stock
         ----------------                                                      
Purchase Agreement dated the date hereof among the parties hereto, the terms,
conditions and covenants contained herein are the full and complete terms of the
agreement between the parties hereto regarding the subject matter hereof and
supersede any and all prior agreements by and among GSI and the stockholders
concerning the ownership, sale or other disposition of the shares.  No
alterations, amendments or modifications of this agreement (other than Section
1, which has its own rules) shall be binding on the parties 

                                       7
<PAGE>
 
hereto unless reduced to writing and approved by Sloan and, at a minimum, all
but one of the other stockholders. No alterations, amendments or modifications
to this agreement shall effect a stockholder after that stockholder experiences
an event.

     d.  Binding Effect.  This agreement shall be binding on the parties hereto
         --------------
and their respective heirs, legal representatives, successors and assigns. All
persons bound by this agreement shall execute the instruments and perform the
acts as may be reasonably necessary or desirable to effectuate the terms and
provisions of this agreement.

     e.  Adoption by the Corporation.  By signing this agreement, the
         ---------------------------
shareholders hereby unanimously approve the entering into of this agreement by
GSI and hereby direct Sloan to execute this agreement on behalf of GSI.

     f.  Reference in Will.  Each stockholder will reference this agreement in
         ----------------- 
his will and will direct his executor or trustee to comply with all of the terms
and provisions contained in this agreement.

     g.  Notices.  Notices given in connection with this agreement will be
         -------
deemed to have been given only if in writing and personally delivered, sent by
first class registered or certified mail, postage repaid, return receipt
requested; sent by facsimile, as long as a hard copy is mailed on that date to
the party for whom the notice is intended or sent by other means at least as
fast and reliable as first class mail. The address to which notices should be
sent are:

     Name                     Address
     ----                     -------

     GSI                      The GSI Group, Inc.
                              P.O. Box 20
                              Assumption, IL  62510
                              Attn:  CEO

     Andrade                  Jorge Andrade
                              3209 Falcon Point
                              Springfield, IL  62707

     Buffett                  Howard Buffett
                              407 Southmoreland Place
                              Decatur, IL  62521

     Funk                     John Funk
                              152 Southmoreland
                              Decatur, IL  62521

     Sloan                    John C. Sloan
                              #10 DuClaire

                                       8
<PAGE>
 
                              Decatur, IL  62521

or to such other address as the person to whom notice is given may have
furnished to the other in writing in accordance herewith.  A written
communication given by any other means shall be deemed duly given when actually
received by the addressee.

  h.  Specific Performance.  The shares cannot be readily purchased or sold in
      --------------------                                                    
the open market, and for that reason, among others, the parties will be
irreparably damaged if this agreement is not specifically enforced.  If any
dispute arises concerning whether a proposed sale or disposition of the shares
would violate this agreement, the parties agree that an injunction may be issued
restraining any sale or disposition pending the determination of such
controversy.  If any controversy concerning the right or obligation to purchase
or sell any of the shares arises, the right or obligation shall be enforceable
in a court of equity by a decree of specific performance.  This remedy shall by
cumulative and not exclusive, and shall be in addition to any other remedy which
the parties may have at law, in equity or otherwise.

  i.  Governing Law.  This agreement will be interpreted, governed and construed
      -------------                                                             
in all respects by the internal laws of the State of Illinois, and any action
commenced to enforce any of the provisions hereof shall have as its venue
Christian County, Illinois.

  j.  Payment of Legal Costs and Expenses.  If any action is commenced to
      -----------------------------------                                
challenge or enforce the terms and provisions hereof, the party who is
successful in such action based upon a final, unappealable court order, shall be
reimbursed by the unsuccessful party for his fees, costs and expenses
(including, without limitation, reasonable attorneys' and accountants' fees,
costs and expenses) incurred in connection with the legal proceeding.

  k.  Gender.  Any pronouns, wherever used herein, shall include the
      ------                                                        
corresponding masculine, feminine or neuter pronouns and the plural shall
include the singular, and vice versa.

  l.  Headings.  Article and paragraph headings are included herein solely for
      ---------                                                           
convenience and shall not be construed to modify or explain any of the
substantive

                                       9
<PAGE>
 
provisions hereof.

          IN WITNESS WHEREOF, GSI has caused this agreement to be signed by its
duly authorized officer, and the stockholders have signed their names, all on
the day and year first above written.

                                        THE GSI GROUP, INC.
                  
                  
                                        BY /s/ Craig Sloan
                                           -------------------------
                                        ITS    CEO
                  
                  
                                        /s/ Jorge Andrade
                                        ----------------------------
                                        JORGE ANDRADE
                  
                  
                                        /s/ Howard Buffett
                                        ----------------------------
                                        HOWARD BUFFETT
                  
                  
                                        /s/ John Funk
                                        ----------------------------
                                        JOHN FUNK
                  

                                        /s/ Craig Sloan
                                        ----------------------------
                                        CRAIG SLOAN

                                      10