สร้าง Partition Linux
- ท้าวความจากเดิม มี Harddisk 1.2 G
ได้ทำการแบ่งพื้นที่เพื่อใช้สำหรับติดตั้ง Linux
จำนวน 420 Mb (ใช้โปรแกรม fips) จากนั้นจะต้องทำการ
สร้าง Partition ของ linux แบ่งออกเป็น 2 ส่วนคือ root
(/) partition จำนวนประมาณ 389 Mb และ swap partition จำนวน 30 Mb
- ที่ Linux prompt (#) ให้พิมพ์ fdisk แล้วกดปุ่ม
Enter จะปรากฏข้อความ
Using /dev/hda as default device
Command (m for help) : |
- กดปุ่ม p แล้ว Enter เพื่อแสดง partition
ที่มีอยู่เดิม
- การสร้าง root partition
- กดปุ่ม n แล้ว Enter เพื่อสร้าง partition ใหม่
จะปรากฏข้อความ
Command action
e extended
p primary partition (1-4) |
- กดปุ่ม p แล้ว Enter จะมีข้อความ
- ให้กดปุ่มเลข 2 แล้ว Enter จะมีข้อความ (partition
1 คือ dos หรือ windows95)
| first cylinder (408-621):
จำนวนในวงเล็บจะมีค่าต่างกัน
ใน harddisk แต่ละตัว |
- ให้ใส่หมายเลขชุดแรก ในที่นี้คือ 408
แล้วกดปุ่ม Enter จะมีข้อความว่า
| last cylinder or +size or +sizeM or +sizeK ([408]-621): |
- ให้ใส่จำนวน Mb ที่จะเป็น root partition ในที่นี้ให้ใส่
+389M แล้วกดปุ่ม Enter
- จากนั้นจะกลับไปที่ command(m for help): อีกครั้ง
- กดปุ่ม p แล้ว Enter จะเห็นว่ามี partition ที่ 2
เพิ่มขึ้นมา
- การสร้าง swap partiton
- ที่ command (m for help) กดปุ่ม n แล้ว Enter
- กดปุ่ม p แล้ว Enter
- กดปุ่ม 3 แล้ว Enter (partition 3 ) จะมีข้อความ
| first cylinder (606-621): |
- ให้ใส่หมายเลขชุดแรก ในที่นี้คือ 606 แล้ว Enter
จะมีข้อความ
| last cylinder or +size or +sizeM or +sizeK ([606]-621): |
- ให้ใส่ cylinder สุดท้าย ในที่นี้คือ 621 แล้วกดปุ่ม
Enter
- การเปลี่ยนคุณสมบัติ ของ swap partition
- ถ้าใช้คำสั่ง p จะปรากฏ partition ขึ้นมาใหม่อีก 2
partition /dev/hda3 ซึ่งเป็น ชนิด linux native อยุ่
ในที่นี้จะต้องเปลี่ยนให้เป็น linux swap
- ที่ command (m for help): ให้กดปุ่ม t แล้ว Enter
จะมีข้อความ
| partition number (1-4): ให้กดเลข 3 แล้ว Enter
(หรือหมายเลข partition ที่ต้องการ) |
- จะมีข้อความ Hex code (type l to list code):
- ให้พิมพ์หมายเลข 82 แล้วกดปุ่ม Enter จะมีข้อความ
| Changed system type of partition 3 to 82 (linux swap) |
- ใช้คำสั่ง w เพื่อเขียน partition ลงบน harddisk
- จากนั้นจะกลับไปที่ linux prompt (#)
|