Document:

<PAGE>
                                                                    Exhibit 10.5

                             [Pemstar Letterhead]
                                  May 10, 2002

Smithfield Fiduciary LLC
c/o Highbridge Capital management, LLC
9 West 57th Street, 27th Floor
New York, NY 10019

Citadel Equity Fund Ltd.
c/o Citadel Investment Group, L.L.C.
225 West Washington Street
Chicago, IL 60606

Gentlemen:

         Reference is made to the letter agreement, dated as of May 8, 2002 (the
"Letter Agreement"), by and among Pemstar, Inc. (the "Company") and Smithfield
Fiduciary LLC and Citadel Equity Fund Ltd. (each, a "Buyer," and together the
"Buyers") and to the Securities Purchase Agreement (the "Purchase Agreement"),
dated as of May 3, 2002, by and among the Company and the Buyers. Capitalized
terms used but not otherwise defined herein shall have the respective meanings
ascribed to such terms in the Purchase Agreement.

         In consideration of the premises and the covenants contained herein and
other good and valuable consideration, the receipt and sufficiency of which are
hereby acknowledged, the Company hereby agrees that (i) at or before 8:30 a.m.,
New York Time, on May 13, 2002, the Company shall file a Current Report on Form
8-K with the SEC disclosing the terms of the Amendment No. 4, dated May 10,
2002, to the Amended and Restated Revolving Credit Agreement, dated June 29,
2001, between IBM Credit Corporation, the Company, Turtle Mountain Corporation
and Pemstar Pacific Consultants Inc. (the "Amendment No. 4") and the terms of
the Letter Agreement and this agreement, and including the Amendment No. 4, the
Letter Agreement, the form of warrant referred to in the Letter Agreement, the
registration rights agreement referred to in clause (ii) of the last sentence of
the Letter Agreement and this agreement as exhibits to such Form 8-K and (ii) on
and as of the date of this agreement the Company is deemed to make to each Buyer
such representations and warranties (subject to the exception relating to
Section 3(l) of the Purchase Agreement set forth in the officer's certificate,
dated May 10, 2002, delivered pursuant to Section 7(a)(vii) of the Purchase
Agreement) and to make and covenant to each Buyer such agreements and covenants
relating to the Warrants (as defined in the Letter Agreement), the Underlying
Shares (as defined in the Letter Agreement) and the registration rights
agreement (referred to in clause (ii) of the last sentence of the Letter
Agreement) as if the Warrants (as defined in the Letter Agreement) were issued
pursuant to the Purchase Agreement, the Underlying Shares (as defined in the
Letter Agreement) were "Warrant Shares" (as defined in the Purchase Agreement)
and such registration rights agreement were the "Registration Rights Agreement"
(as defined in the Purchase Agreement) as such representations, warranties,
covenants and agreements were made as of the Initial Closing Date (as defined in
the Purchase Agreement).

         Please indicate your agreement to the foregoing by executing the
acknowledgment below.

<PAGE>

                                       Sincerely yours,

                                       PEMSTAR, INC.

                                       By: /s/ William J. Kullback
                                           -------------------------------------
                                       William J. Kullback
                                       Vice President--Finance and
                                       Chief Financial Officer

Accepted and agreed to:

SMITHFIELD FIDUCIARY LLC               CITADEL EQUITY FUND LTD.

By: /s/ Adam J. Chill                  By: /s/ Kenneth A. Simpler
    ------------------------------         -------------------------------------
    Name:  Adam J. Chill                   Name: Kenneth A. Simpler
    Title: Authorized Signatory            Title: Vice President<PAGE>

                                                                    Exhibit 10.6

                                 AMENDMENT NO. 4
                                       TO
                 AMENDED AND RESTATED REVOLVING CREDIT AGREEMENT

         This Amendment No. 4 ("Amendment") to the Amended and Restated
Revolving Credit Agreement is made as of May 10, 2002 by and among Pemstar lnc.,
duly organized under the laws of the State of Minnesota ("Customer"), Turtle
Mountain Corporation, duly organized under the laws of the State of North Dakota
("Turtle Mountain") and Pemstar Pacific Consultants Inc., duly organized under
the laws of the State of California ("Pemstar Pacific Consultants") (Customer,
Turtle Mountain and Pemstar Pacific Consultants, collectively the "Credit
Parties", individually a "Credit Party") and IBM Credit Corporation, a Delaware
corporation ("IBM Credit").

                                    RECITALS:

         A. The Credit Parties have entered into that certain Amended and
Restated Revolving Credit Agreement dated as of June 29, 2001 (as heretofore
amended, modified and supplemented, including, without limitation, as amended by
Amendment No. 3 to Amended and Restated Revolving Credit Agreement dated May 3,
2002 and as such agreement may be further amended, modified or supplemented from
time to time, the "Agreement").

         B. The parties have agreed to modify the Agreement as more specifically
set forth below, upon and subject to the terms and conditions set forth herein.

                                    AGREEMENT

         NOW THEREFORE, in consideration of the premises and other good and
valuable consideration, the receipt and sufficiency of which is hereby
acknowledged, the Credit Parties and IBM Credit hereby agree as follows:

Section 1. Definitions. All capitalized terms not otherwise defined herein shall
have the respective meanings set forth in the Agreement.

Section 2. Amendment. The Agreement and Attachment A are hereby amended as
follows:

A. Section III Financial Covenants of Attachment A is amended in its entirety to
read as follows:

"Ill. Financial Covenants:

Definitions: The following terms shall have the following respective meanings in
this Attachment A. All amounts shall be determined in accordance with generally
accepted accounting principles (GAAP).

         "Capital Expenditure" shall mean any amount debited to the fixed asset
         account on the Customer's consolidated balance sheet in respect of: (a)
         the acquisition (including, without limitation, acquisition by entry
         into a capitalized lease), construction, improvement, replacement or
         betterment of land, buildings, machinery, equipment or of any other
         fixed assets or capitalized leaseholds; and (b) to the extent related
         to and not included in (a) above, materials, contract labor and direct
         labor (excluding expenditures charged to repairs or maintenance in
         accordance with GAAP.

         "Consolidated Net Income" shall mean, for any period, the net income
         (or loss), after taxes, of Customer on a consolidated basis for such
         period determined in accordance with GAAP.

         "Current" shall mean within the ongoing twelve month period.

Amendment No. 4                   Page 1 of 7                         05-10-2002

<PAGE>

         "Current Assets" shall mean assets that are cash or expected to become
         cash within the ongoing twelve months.

         "Current Liabilities" shall mean payment obligations resulting from
         past or current transactions that require settlement within the ongoing
         twelve month period, as determined in accordance with GAAP.

         "EBITDA" shall mean, for any period (determined on a consolidated basis
         in accordance with GAAP), (a) the Consolidated Net Income of Customer
         for such period, plus (b) each of the following to the extent reflected
         as an expense in the determination of such Consolidated Net Income: (i)
         the Customer's provisions for taxes based on income for such period;
         (ii) Interest Expense for such period; and (iii) depreciation and
         amortization of tangible and intangible assets of Customer for such
         period.

         "Fixed Charges" shall mean, for any period, an amount equal to the sum,
         without duplication, of the amounts for such as determined for the
         Customer on a consolidated basis, of (i) scheduled repayments of
         principal of all Indebtedness (as reduced by repayments thereon
         previously made), (ii) Interest Expense, (iii) capital expenditures
         (iv) dividends, (v) leasehold improvement expenditures and (vi)all
         provisions for U.S. and non U.S. Federal, state and local taxes.

         "Fixed Charge Coverage Ratio" shall mean the ratio as of the last day
         of any fiscal period of (i) EBITDA as of the last day of such fiscal
         period to (ii) Fixed Charges.

         "Interest Expense" shall mean, for any period, the aggregate
         consolidated interest expense of Customer during such period in respect
         of Indebtedness determined on a consolidated basis in accordance with
         GAAP, including, without limitation, amortization of original issue
         discount on any Indebtedness and of all fees payable in connection with
         the incurrence of such Indebtedness (to the extent included in interest
         expense), the interest portion of any deferred payment obligation and
         the interest component of any capital lease obligations.

         "Long Term" shall mean beyond the ongoing twelve month period.

         "Long Term Assets" shall mean assets that take longer than a year to be
         converted to cash. They are divided into four categories: tangible
         assets, investments, intangibles and other.

         "Long Term Debt" shall mean payment obligations of indebtedness which
         mature more than twelve months from the date of determination, or
         mature within twelve months from such date but are renewable or
         extendible at the option of the debtor to a date more than twelve
         months from the date of determination.

         "Net Profit after Tax" shall mean Revenue plus all other income, minus
         all costs, including applicable taxes.

         "Revenue" shall mean the monetary expression of the aggregate of
         products or services transferred by an enterprise to its customers for
         which said customers have paid or are obligated to pay, plus other
         income as allowed.

         "Subordinated Debt" shall mean Customer's indebtedness to third parties
         as evidenced by an executed Notes Payable Subordination Agreement in
         favor of IBM Credit including, without limitation, the Subordinated
         Debt (2002).

         "Tangible Net Worth" shall mean:

                  Total Net Worth minus;

Amendment No. 4                   Page 2 of 7                         05-10-2002

<PAGE>

                           (a) goodwill, organizational expenses, pre-paid
                           expenses, deferred charges, research and development
                           expenses, software development costs, leasehold
                           expenses, trademarks, trade names, copyrights,
                           patents, patent applications, privileges, franchises,
                           licenses and rights in any thereof, and other similar
                           intangibles (but not including contract rights) and
                           other current and non-current intangible assets as
                           identified in Customer's financial statements;

                           (b) all accounts receivable from employees, officers,
                           directors, stockholders and affiliates; and

                           (c) all callable/redeemable preferred stock.

         "Total Assets" shall mean the total of Current Assets and Long Term
         Assets.

         "Total Liabilities" shall mean the Current Liabilities and Long Term
         Debt less Subordinated Debt, resulting from past or current
         transactions, that require settlement in the future.

         "Total Net Worth" (the amount of owner's or stockholder's ownership in
         a n enterprise) is equal to Total Assets minus Total Liabilities.

         "Working Capital" shall mean Current Assets minus Current Liabilities.

Customer will be required to maintain the following financial ratios,
percentages and amounts as of the last day of the fiscal period under review by
IBM Credit:

On a consolidated basis:

         Covenant
         --------                           Covenant Requirement
                                            --------------------

   (a)   Net Profit after Tax               Equal to or Greater than 0.75
         to Revenue                         percent quarterly and Equal to
                                            or Greater than 1.25% annually

   (b)   Total Liabilities to Tangible Net  Greater than Zero and
         Worth                              Equal to or Less than 2.50:1.0

   (c)   Current Assets to Current          Greater than 1.50:1.0
         Liabilities

   (d)   Fixed Charge Coverage Ratio        Equal to or Greater than 1.30:1.0

   (e)   Maximum Capital                    Less than or equal to
         Expenditures                       $32,000,000 for the fiscal year
                                            ending March 2002

   (g)   Net Profit After                   Equal to or greater
         Tax to Revenue                     than 0.1 percent
         (U.S. Credit Parties
         operations only)

On and after the date the initial tranche of Subordinated Debt (2002) is closed
(provided that such date is on or prior to May 10, 2002 ("Initial Funding Date")
and IBM Credit and US Bank provide written consent to the Subordinated Debt
(2002) and the gross cash proceeds received by the Customer on the Initial
Funding Date from the initial tranch a of Subordinated Debt (2 002) is at least
$5,000,000 and the conditions to effectiveness set forth in Section 5 of
Acknowledgment, Waiver #2 and Amendment to Financing Agreement dated March 29,
2002 between the Credit Parties have been satisfied (except that

Amendment No. 4                   Page 3 of 7                         05-10-2002

<PAGE>

Customer shall only be required to receive gross cash proceeds from the initial
tranche of Subordinated Debt (2002) in an amount equal to $5,000,000 by May 10,
2002), Customer will be required to maintain the following financial ratios,
percentages and amounts as of the fiscal period under review by IBM Credit:

On a consolidated basis:

         Covenant
         --------                   Covenant Requirement
                                    --------------------

   (a)   Net Profit after Tax      Equal to or Greater than 0.75
         to Revenue                percent quarterly for the fiscal quarter
                                   ending September 30, 2002 and all fiscal
                                   quarters thereafter and Equal to or Greater
                                   than .6 percent for the fiscal year ending
                                   March 31, 2003 and 1.25 percent for all
                                   fiscal year ends thereafter

   (b)   Total Liabilities to      Greater than Zero and
         Tangible Net Worth        Equal to or Less than 1.6:1.0

   (c)   Current Assets to         Greater than 2.0:1.0
         Current Liabilities

   (d)   Fixed Charge              Equal to or Greater than 1.00:1.0
         Coverage                  Ratio for each fiscal month beginning
                                   December 31, 2002, including the fiscal
                                   months ending January 31, 2003 and February
                                   28, 2003, and 1.30:1.0 for each fiscal month
                                   beginning March 31, 2003 and for all fiscal
                                   months thereafter

   (e)   Maximum Capital           Less than or equal to
         Expenditures              $40,000,000 for the fiscal year
                                   ending March 31, 2002 and $18,000,000 for the
                                   fiscal year ending March 31, 2003 and all
                                   fiscal year ends thereafter

   (g)   Net Profit After          Equal to or greater
         Tax to Revenue            than 0.1 percent for the fiscal
         (U.S. Credit Parties      quarter ending December 31, 2002
         operations only)          and all fiscal quarters thereafter

   (h)   EBITDA                    Equal to or Greater than ($ 7,300,000) for
         (U.S. Credit Parties      fiscal quarter ending March 31, 2002 and
         operations only)          ($9,100,000) for the six months ending
                                   June 30, 2002

   (i)   EBITDA                    Equal to or Greater than ($12,300,000) for
                                   Fiscal quarter ending March 31, 2002 and
                                   ($8,850,000) for the six months ending
                                   June 30, 2002""

B. The definition of Subordinated Debt (2002) is amended by adding the word
"unsecured" immediately before the word "indebtedness."

C. (a) The definition of "Termination Date" in the Agreement is amended in its
entirety to read as follows:

""Termination Date": shall mean June 29, 2003 or such other date as IBM Credit
and Customer may agree from time to time in writing."

Amendment No. 4                   Page 4 of 7                         05-10-2002

<PAGE>

(b) Section 8.2. of the Agreement is amended in its entirety to read as follows:

"8.2. Disposition of Assets. No Credit Party will (nor will any Credit Party
permit any of its direct or indirect Subsidiaries, including without limitation,
Foreign Subsidiaries to) directly or indirectly, sell, lease, assign, transfer
or otherwise dispose of any assets other than (i) sales of inventory in the
ordinary course of business and short term rental of inventory as demonstrations
in amounts not material to it, and (ii) voluntary dispositions of individual
assets and obsolete or worn out property in the ordinary course of business,
provided, that the aggregate book value of all such assets and property so sold
or disposed of under this section 8.2 (ii) in any fiscal year shall not exceed
5% of the consolidated assets of such Credit Party or Subsidiary as of the
beginning of such fiscal year. Notwithstanding the foregoing, to the extent any
sale is permitted by clause (i) or (ii) above, in no event shall any Credit
Party or any other direct or indirect Subsidiaries of any Credit Party
(including, without limitation, Foreign Subsidiaries) sell assets for less than
fair value."

(c) Section 8.14. of the Agreement is amended in its entirety to read as
follows:

(degree)8.14. Indebtedness. No Credit Party will create, incur, assume or permit
to exist any Indebtedness except for (i) Permitted Indebtedness and (ii)
Subordinated Debt (2002) issued by the Customer up to $50,000,000 provided that
the debt is unsecured and the first tranche of debt must be issued by the
Customer by no later than May 10, 2002 in an amount of not less than $5,000,000
and the Customer shall have received $5,000,000 of gross cash proceeds from such
issuance of Subordinated Debt (2002) by no later than May 10, 2002."

(d) Section 9.1.(X) of the Agreement is amended in its entirety to read as
follows:

"9.1.(X) The Customer shall have failed to issue an initial tranche of
Subordinated Debt (2002) in an amount at least equal to $5,000,000 by May 10,
2002 and receive gross cash proceeds of $5,000,000 from such issuance by no
later than May 10, 2002."

Section 3. Amendment to Acknowledgment, Waiver #2 and Amendment to Financing
Agreement dated March 29, 2002 among IBM Credit and the Credit Parties
("Amendment No. 2"). Section 5 of Amendment No. 2 is amended as follows:

         (i) Clause (iii) is amended in its entirety to read as follows:

         "(iii) IBM Credit shall have given its written consent to the Proposed
Debt Issuance and the transactions contemplated thereby and the Proposed Debt
Issuance shall have closed on or prior to May 10, 2002, all on terms and
conditions satisfactory to IBM Credit and the Customer shall have received gross
cash proceeds from the initial issuance of the Proposed Debt Issuance at least
equal to $5,000,000 on or before May 10, 2002 and"; and

         (ii) Clause (iv) is amended by changing the date referred therein to
May 4, 2002.

Section 4. Representations and Warranties. Each Credit Party makes to IBM Credit
the following representations and warranties all of which are material and are
made to induce IBM Credit to enter into this Amendment.

Section 4.1 Accuracy and Completeness of Warranties and Representations. All
representations made by each Credit Party in the Agreement were true and
accurate and complete in every respect as of the date made, and, as amended by
this Amendment, all representations made by each Credit Party in the Agreement
are true, accurate and complete in every material respect as of the date hereof,
and do not fail to disclose any material fact necessary to make representations
not misleading.

Amendment No. 4                   Page 5 of 7                         05-10-2002

<PAGE>

Section 4.2 Violation of Other Agreements. The execution and delivery of this
Amendment and the performance and observance of the covenants to be performed
and observed hereunder do not violate or cause any Credit Party not to be in
compliance with the terms of any agreement to which any Credit Party is a party.

Section 4.3 Litigation. Except as has been disclosed by the Credit Parties to
IBM Credit in writing, there is no litigation, proceeding, investigation or
labor dispute pending or threatened against any Credit Party, which, if
adversely determined, would materially adversely affect any Credit Parts ability
to perform any Credit Party's obligations under the Agreement and the other
documents, instruments and agreements executed in connection therewith or
pursuant hereto.

Section 4.4 Enforceability of Amendment. This Amendment has been duly
authorized, executed and delivered by the Credit Parties and is enforceable
against each Credit Party in accordance with its terms.

Section 5. Ratification of Agreement. Except as specifically amended hereby, all
of the provisions of the Agreement shall remain unamended and in full force and
effect. Nothing herein shall be deemed a waiver of any default or consent. Each
Credit Party hereby ratifies, confirms and agrees that the Agreement, as amended
hereby, represents a valid and enforceable obligation of each Credit Party, and
is not subject to any claims, offsets or defenses.

Section 6. Governing Law.This Amendment shall be governed by and interpreted in
accordance with the laws which govern the Agreement.

Section 7. Counterparts. This Amendment may be executed in any number of
counterparts, each of which shall be an original and all of which shall
constitute one agreement.

Section 8. Additional Requirements. The Agreement is hereby amended by inserting
therein the following new sections:

Additional Covenants.

(a) The Credit Parties shall have paid (and IBM Credit shall have received) an
amendment fee in immediately available funds to IBM Credit in the amount of
Ninety-seven Thousand Five Hundred Dollars ($97,500.00) on or prior to May 13,
2002 ("Amendment Fee"). Such Amendment Fee will be non-refundable and in
addition to any other fees IBM Credit may charge the Credit Parties.

(b) Notwithstanding Section 6 (c) of Acknowledgment, Waiver #2 and Amendment to
Financing Agreement dated March 29, 2002 between the Credit Parties, the Credit
Parties shall provide draft financial statements from Ernst & Young to IBM
Credit for Customer's fiscal year end March 31, 2002, in form and substance
satisfactory to IBM Credit, on or prior to May 17, 2002.

(c) The Credit Parties shall notify IBM Credit in writing of any default under
the Subordinated Debt Documents or under the financing agreement with U.S. Bank
or any other holder of Senior Indebtedness (as defined in the Securities
Purchase Agreement).

The failure by any of the Credit Parties to comply with any of the above
covenants or the failure of any of the above requirements to be satisfied
(within the above time frames) in IBM Credit's determination in its sole
discretion shall constitute an immediate Event of Default under the Agreement.

Section 9. Conditions to Effectiveness. This Amendment shall only become
effective upon the fulfillment of the following conditions precedent to the
satisfaction of IBM Credit:

         1. This Amendment shall have been executed by all the parties hereto;

Amendment No. 4                   Page 6 of 7                         05-10-2002

<PAGE>

         2. Before and after giving effect to this Amendment, the
representations and warranties in Section 6 of the Financing Agreement shall be
true and correct as though made on the date hereof. The execution by the Credit
Parties of this Amendment shall be deemed a representation that the Credit
Parties have complied with the foregoing condition;

         3. Before and after giving effect to this Amendment, no Default or
Event of Default shall have occurred and be continuing under the Financing
Agreement. The execution by the Credit Parties of this Amendment shall be deemed
a representation that the Credit Parties have complied with the foregoing
condition; and

         4. IBM Credit confirms that its consent letters dated May 3, 2002 in
respect of the Subordinated Debt (2002) remain effective for a closing of the
Subordinated Debt (2002) on May 10, 2002.

         IN WITNESS WHEREOF, this Amendment has been executed by duly authorized
officers of the undersigned as of the day and year first above written.

Pemstar, Inc.                              Turtle Mountain Corporation

By:  /s/ Allen J. Berning                  By:  /s/ Allen J. Berning
     ---------------------------------          --------------------------------

Print Name:  Allen J. Berning              Print Name:  Allen J. Berning
             -------------------------                  ------------------------

Title:  CEO                                Title:  CEO
        ------------------------------             -----------------------------

Date:  May 10, 2002                        Date:  May 10, 2002
       -------------------------------            ------------------------------

ATTEST:                                    ATTEST:

/s/ Linda U. Feuss                         /s/ Linda U. Feuss
--------------------------------------     -------------------------------------

Print Name:  Linda U. Feuss                Print Name:  Linda U. Feuss
             -------------------------                  ------------------------

Pemstar Pacific Consultants, Inc.          IBM Credit Corporation

By:  /s/ William J. Kullback               By:  /s/ Lue Grenon
     ---------------------------------          --------------------------------

Print Name:  William J. Kullback           Print Name:  Lue Grenon
             -------------------------                  ------------------------

Title:  CFO                                Title:  Director of Credit, Americas
        ------------------------------             -----------------------------

Date:  May 10, 2002                        Date:  May 10, 2002
       -------------------------------            ------------------------------

ATTEST:                                    ATTEST:

/s/ Linda U. Feuss
--------------------------------------     -------------------------------------

Print Name:  Linda U. Feuss                Print Name:
             -------------------------                  ------------------------

Amendment No. 4                   Page 7 of 7                         05-10-2002

Source: [{"source": "alea-institute/alea-institute/kl3m-data-edgar-agreements/train-00039-of-00352.parquet"}, [{"source": "alea-institute/alea-institute/kl3m-data-edgar-agreements/train-00039-of-00352.parquet"}]]