From owner-freebsd-doc Tue Sep 11 5: 7: 3 2001 Delivered-To: freebsd-doc@freebsd.org Received: from radwaste.oaep.go.th (TruPPPv92-227-86.inet.co.th [203.151.227.86]) by hub.freebsd.org (Postfix) with ESMTP id E3BB337B412 for ; Tue, 11 Sep 2001 05:06:24 -0700 (PDT) Received: (from pirat@localhost) by radwaste.oaep.go.th (8.11.3/8.11.3) id f8BCJD006372; Tue, 11 Sep 2001 19:19:13 +0700 (ICT) (envelope-from pirat@access.inet.co.th) X-Authentication-Warning: radwaste.oaep.go.th: pirat set sender to pirat@access.inet.co.th using -f Date: Tue, 11 Sep 2001 19:18:40 +0700 From: psr To: David Greenman Cc: docs@freebsd.org Subject: Re: : Ask for permission : translate some documents into Thai Message-ID: <20010911191840.A6250@radwaste.oaep.go.th> References: <20010908152122.A4424@radwaste.oaep.go.th> <20010908105336.U76779@nexus.root.com> <20010909081836.A1550@radwaste.oaep.go.th> <20010909022833.V76779@nexus.root.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="r5Pyd7+fXNt84Ff3" Content-Disposition: inline Content-Transfer-Encoding: 8bit User-Agent: Mutt/1.2.5i In-Reply-To: <20010909022833.V76779@nexus.root.com>; from dg@root.com on Sun, Sep 09, 2001 at 02:28:33AM -0700 X-Operating-System: FreeBSD radwaste.oaep.go.th 4.3-STABLE FreeBSD 4.3-STABLE Sender: owner-freebsd-doc@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org --r5Pyd7+fXNt84Ff3 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline hi sirs, i really apologize for your time. my zeroth document is `make world' instruction. i wrote from my experience. i choose html format since that is a small one. if you have some thai here or if you could read and understand it, please feel free to review and edit. if it were of any small value to freebsd community, took it please. with best regards psr On Sun, Sep 09, 2001 at 02:28:33AM -0700, David Greenman wrote: > Date: Sun, 9 Sep 2001 02:28:33 -0700 > From: David Greenman > To: psr > Cc: mwm@mired.org > Subject: Re: : Ask for permission : translate some documents into Thai > > >hi, > > > >thanks. > > > >i will start with fips.doc since Siamese like installing multi os on a single hard disk. and if there were existing already, sorry for my bad English, inform me please. i do not want to repeat any finished tasks. > > I am not aware of any other effort to translate the documentation into > Thai or Siamese, but this is also not my area of expertise so I could be > missing something. > > -DG > > David Greenman > Co-founder, The FreeBSD Project - http://www.freebsd.org > President, TeraSolutions, Inc. - http://www.terasolutions.com > Pave the road of life with opportunities. > --r5Pyd7+fXNt84Ff3 Content-Type: text/html; charset=iso-8859-1 Content-Disposition: attachment; filename="cvsup.html" Content-Transfer-Encoding: 8bit Build Your System from sources สร้างโลกใหม่ ให้กับเครื่องของท่าน

สร้างโลกใหม่ ให้กับเครื่องของท่าน

การสร้างโลกนั้น แบ่งเป็นสามตอน
  • ตอนแรกเป็นการดูด source programmes ทั้งระบบมา
  • ตอนสองจึงเป็นการลงมือสร้างทุกสิ่งทุกอย่าง โดยถือว่าเริ่มจากความว่างเปล่า
  • ตอนสุดท้าย เป็นการจัดการบริหารระบบโดย mergemaster
งานตอนนี้ ต้องการ super user ดังนั้นความปลอดภัยของระบบ ท่านต้องรับผิดชอบด้วยตัวท่านเอง
  1. source programmes

    ก่อนอื่นต้องทึกทักเอาว่า ท่านทราบ หรือ มี ในสิ่งเหล่านี้
    1. minimal installation เป็นอย่างน้อย
    2. /usr/src file system ขนาดประมาณ 500 megabytes
    3. /usr/obj file system ขนาดประมาณ 800 megabytes
    4. โปรแกรม cvsup โดยไปติดตั้งได้จาก พอร์ท /usr/ports/net/cvsup
    5. sup file นี้ (ชื่อว่า /var/tmp/stable-supfile)
      *default host=cvsup.FreeBSD.org
      *default base=/usr
      *default prefix=/usr
      # The following line is for 4-stable.  If you want 3-stable or 2.2-stable,
      # change "RELENG_4" to "RELENG_3" or "RELENG_2_2" respectively.
      *default release=cvs tag=RELENG_4
      *default delete use-rel-suffix
      
      # If your network link is a T1 or faster, comment out the following line.
      *default compress
      
      ## Main Source Tree.
      #
      # The easiest way to get the main source tree is to use the "src-all"
      # mega-collection.  It includes all of the individual "src-*" collections.
      # Please note:  If you want to track -STABLE, leave this uncommented.
      src-all
      
    6. internet connection ที่ค่อนข้างเร็ว เข้าใจว่า หากใช้โมเด็มห้าสิบหกเค คงพอ
    ตัวอย่าง file system และขนาดที่ใช้อยู่คือ
    %df
    Filesystem  1K-blocks     Used    Avail Capacity  Mounted on
    /dev/ad0s1a    127023    37294    79568    32%    /
    /dev/ad0s1f   5081581    22237  4652818     0%    /home
    /dev/ad0s1e   5081581  1290524  3384531    28%    /usr
    /dev/ad0s1d   1073607   329637   658082    33%    /usr/local
    /dev/ad0s1h    889263   339010   479112    41%    /usr/obj
    /dev/ad0s1g   2032623    10737  1859277     1%    /var
    procfs              4        4        0   100%    /proc
    %
    ในนี้ไม่ได้แยก /usr/src ออกมาเป็นพิเศษ แต่รวมอยู่ใน file system /dev/ad0s1e แล้ว
    เมื่อท่านพร้อมหมายถึงท่านต่อกับ internet ได้แล้ว ให้ login เป็น root แล้วใช้คำสั่งต่อไปนี้ ที่ console
    cvsup -g -L 2 /var/tmp/stable-supfile
    
    ปกติงานเช่นว่านี้ ไม่ต้องเสียเวลารอ จึงนิยมทำกลางดึก พอรุ่งเช้าก็เรียบร้อย และหากเป็นการทำครั้งแรกจริงๆ อาจเปลืองเวลามาก จึงขอแนะให้ต่อ internet โดยหมุนโมเด็มใน auto mode

    หากทุกสิ่งจบลงด้วยดี ที่ console ท่านจะพบ

    Finished successfully
    ซึ่งหมายความว่า ท่านได้ source programmes ทั้งระบบของ FreeBSD มาไว้ในเครื่องท่านแล้ว
    บางที repository ที่ท่านต่อไปนั้น ยุ่งมากอาจจะตัดสายของท่านออกเสีย ในกรณีเช่นนี้ cvsup ก็รอ รอจนกว่า repository จะว่างต่อให้ท่านได้อีกครา เมื่อนั้น cvsup ก็จะดูด source programmes ต่อจนจบซึ่งท่านสามารถทราบได้จาก message ข้างบนนั้น
    ตัวอย่างที่ผมทำคือการติดตั้งให้กับ PII 133, 32MB ram, 15 GB hdd โดยผ่าน LAN สายกลมเล็ก โมเด็มที่ใช้ความเร็วห้าสิบหกเค เวลาที่ใช้ตอนนี้สองวัน แต่เป็นสองวันของการหมุนโมเด็มด้วยมือ มิได้ตั้ง auto mode แต่อย่างไรเลย เครื่องนี้ลงทีแรกแบบ minimal
  2. making world

    ตอนนี้ก็แบ่งเป็นสองช่วง เช่นกัน
    1. สร้างระบบ (make world)
    2. สร้าง kernel (make kernel)
    ท่านจะพบกับความพิลึกพิลั่นอย่างไม่น่าเชื่อ ของงานในช่วนนี้ โดยในการสร้างระบบใหม่นั้น มีขั้นตอนดังนี้
    #
    # 1. bootstrap-tool stage
    #	This stage is responsible for creating programs that are needed for backward compatibility reasons.
    #	They are not built as cross-tools.
    # 2. build-tool stage
    #	This stage is responsible for creating the object tree and building any tools 
    #	that are needed during the build process.
    # 3. cross-tool stage
    #	This stage is responsible for creating any tools that are needed for cross-builds.
    #	A cross-compiler is one of them.
    # 4. world stage
    #	This stage actually builds the world.
    # 5. install stage
    #	This stage installs a previously built world.
    #
    
    เวลาที่ใช้ในตอนนี้ ขึ้นกับ memory, swap area, cpu, processes อื่นๆ สำหรับเครื่องดังกล่าวนั้น กินเวลาประมาณเก้าชั่วโมงในการสร้างระบบทั้งระบบ และประมาณชั่วโมงในการสร้าง kernel อีกตัวอย่างคือ make buildworld;make KERNCONF=Firak kernel;make install world ลงบนเครื่อง PIII 650, 160MB ram, 15GB hdd ไม่ถึงสามชั่วโมง

    ข้อที่ดีสำหรับ FreeBSD 4-stable คือสามารถ make world ได้ใน multi users mode แม้กระนั้น ก็ใคร่ขอแนะนำให้มีเพียง super user เท่านั้นและ servers ต่างๆขอให้หยุดบริการชั่วขณะ ระหว่างนี้

    make world

    ที่ console ขอให้ใช้คำสั่ง
    cd /usr/src
    make world
    
    จากนั้น ท่านใช้เวลาว่างส่วนนี้ไปทำกิจกรรมอื่นได้ ถ้า hardware ของท่านไม่ด้อยมากนัก ในที่สุดแล้ว ท่านก็จะได้ทราบเองว่า เวลา ที่ใช้ไปตอนนี้กี่ชั่วโมงที่ console เดิม

    make kernel

    ที่ console เดิมกับที่ make world ขอให้ใช้คำสั่ง
    cd /usr/src
    make kernel
    ขอทึกทักเอาเช่นกันว่า ไม่มี error เลยในช่วงนี้
  3. mergemaster

    งานตอนนี้ เป็นส่วนที่เกี่ยวกับ system administration ของระบบทั้งหมด เช่น DNS, /etc/rc ฯลฯ ในตอนนี้ ท่านต้อง shutdown operating system และ reboot ขึ้นมาอีกครั้งเพื่อใช้ kernel และ ระบบใหม่ที่ท่านสร้างขึ้น

    ที่ console เดิมกับที่ make world ขอให้ใช้คำสั่ง

    shutdown -r now
    เมื่อระบบเรียบร้อยแล้วขอให้ login เป็น root จากนั้นให้ใช้คำสั่ง
    mergemaster -vi
    เมื่อ mergemaster ถามขอให้ท่านรับทุกข้อเสนอก่อน
    ทึกทักเอาอีกเช่นกันว่า ท่านยังไม่จัด DNS ดังนั้น แฟ้มต่างๆจึงติดตั้ง โดยอัตโนมัติ โดยไม่เสียหาย
    เมื่อเรียบร้อยแล้วให้
    shutdown -r now
จากจุดนี้ท่านก็ได้ระบบใหม่ที่สร้างจาก source programmes ล้วนๆ อนึ่ง หากมีปัญหาในขั้นตอนใด ขอให้เปิดหน้าแฝกดูได้

สรุปคำสั่งที่ใช้

  1. cvsup -g -L 2 /var/tmp/stable-supfile
  2. cd /usr/src
  3. make world
  4. make kernel
  5. shutdown -r now
  6. mergemaster -vi
--r5Pyd7+fXNt84Ff3-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-doc" in the body of the message