การติดตั้ง Ubuntu 16.04 LTS เกี่ยวกับการแลกเปลี่ยน


8

หลีกเลี่ยงการจัดรูปแบบพาร์ทิชันสลับคนอื่นได้อย่างไร
ฉันมี distro จำนวนมากในฮาร์ดไดรฟ์ของฉัน:

  • วินโดวส์ 10
  • Ubuntu16.10
  • Antergos [Arch Linux]
  • Fedora25
  • ที่ว่าง
  • ข้อมูล

Linux distros ทั้งหมดมีพาร์ติชั่นการสลับ (16GiB แต่ละอัน)
ในพื้นที่ว่างก่อนอื่นฉันสร้าง swap partition ขนาด 16 GiB และส่วนที่เหลือมีไว้สำหรับ root partition (ext4)

  • / dev / sda13
  • / dev / sda14 ป้อนคำอธิบายรูปภาพที่นี่

ป้อนคำอธิบายรูปภาพที่นี่

มันแปลกที่เราไม่สามารถเลือกพาร์ทิชันสลับได้แล้วคลิกที่ปุ่ม "ติดตั้งตอนนี้"

ป้อนคำอธิบายรูปภาพที่นี่

ฉันไม่ต้องการฟอร์แมตการแลกเปลี่ยน Linux ใหม่เหล่านั้นจะหลีกเลี่ยงได้อย่างไร

ฮาร์ดไดรฟ์: 2 TiB MBR
เอาต์พุตของ fdisk -l

ubuntu-gnome@ubuntu-gnome:~$ sudo fdisk -l Disk /dev/ram0: 64 MiB, 67108864 bytes, 131072 sectors Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 4096 bytes I/O size (minimum/optimal): 4096 bytes / 4096 bytes

Disk /dev/ram1: 64 MiB, 67108864 bytes, 131072 sectors Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 4096 bytes I/O size (minimum/optimal): 4096 bytes / 4096 bytes

Disk /dev/ram2: 64 MiB, 67108864 bytes, 131072 sectors Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 4096 bytes I/O size (minimum/optimal): 4096 bytes / 4096 bytes

Disk /dev/ram3: 64 MiB, 67108864 bytes, 131072 sectors Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 4096 bytes I/O size (minimum/optimal): 4096 bytes / 4096 bytes

Disk /dev/ram4: 64 MiB, 67108864 bytes, 131072 sectors Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 4096 bytes I/O size (minimum/optimal): 4096 bytes / 4096 bytes

Disk /dev/ram5: 64 MiB, 67108864 bytes, 131072 sectors Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 4096 bytes I/O size (minimum/optimal): 4096 bytes / 4096 bytes

Disk /dev/ram6: 64 MiB, 67108864 bytes, 131072 sectors Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 4096 bytes I/O size (minimum/optimal): 4096 bytes / 4096 bytes

Disk /dev/ram7: 64 MiB, 67108864 bytes, 131072 sectors Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 4096 bytes I/O size (minimum/optimal): 4096 bytes / 4096 bytes

Disk /dev/ram8: 64 MiB, 67108864 bytes, 131072 sectors Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 4096 bytes I/O size (minimum/optimal): 4096 bytes / 4096 bytes

Disk /dev/ram9: 64 MiB, 67108864 bytes, 131072 sectors Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 4096 bytes I/O size (minimum/optimal): 4096 bytes / 4096 bytes

Disk /dev/ram10: 64 MiB, 67108864 bytes, 131072 sectors Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 4096 bytes I/O size (minimum/optimal): 4096 bytes / 4096 bytes

Disk /dev/ram11: 64 MiB, 67108864 bytes, 131072 sectors Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 4096 bytes I/O size (minimum/optimal): 4096 bytes / 4096 bytes

Disk /dev/ram12: 64 MiB, 67108864 bytes, 131072 sectors Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 4096 bytes I/O size (minimum/optimal): 4096 bytes / 4096 bytes

Disk /dev/ram13: 64 MiB, 67108864 bytes, 131072 sectors Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 4096 bytes I/O size (minimum/optimal): 4096 bytes / 4096 bytes

Disk /dev/ram14: 64 MiB, 67108864 bytes, 131072 sectors Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 4096 bytes I/O size (minimum/optimal): 4096 bytes / 4096 bytes

Disk /dev/ram15: 64 MiB, 67108864 bytes, 131072 sectors Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 4096 bytes I/O size (minimum/optimal): 4096 bytes / 4096 bytes

Disk /dev/loop0: 1.2 GiB, 1246838784 bytes, 2435232 sectors Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes

Disk /dev/sda: 1.8 TiB, 2000398934016 bytes, 3907029168 sectors Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 4096 bytes I/O size (minimum/optimal): 4096 bytes / 4096 bytes Disklabel type: dos Disk identifier: 0xaaf06e0e

Device Boot Start End Sectors Size Id Type /dev/sda1 2048 1026047 1024000 500M 7 HPFS/NTFS/exFAT /dev/sda2 1026048 525314047 524288000 250G 7 HPFS/NTFS/exFAT /dev/sda3 525316094 3907028991 3381712898 1.6T f W95 Ext'd (LBA) /dev/sda5 2644512768 3907028991 1262516224 602G 7 HPFS/NTFS/exFAT /dev/sda6 525316096 557314047 31997952 15.3G 82 Linux swap / Solaris /dev/sda7 557316096 1057314815 499998720 238.4G 83 Linux /dev/sda8 1057314817 1058291377 976561 476.9M 83 Linux /dev/sda9 1058291379 1090291377 31999999 15.3G 83 Linux /dev/sda10 1090291379 1590291377 499999999 238.4G 83 Linux /dev/sda11 * 1590294528 2114582527 524288000 250G 83 Linux /dev/sda12 2114584576 2148139007 33554432 16G 82 Linux swap / Solaris

Partition 3 does not start on physical sector boundary. Partition 8 does not start on physical sector boundary. Partition 9 does not start on physical sector boundary. Partition 10 does not start on physical sector boundary. Partition table entries are not in disk order.

Disk /dev/sdb: 7.2 GiB, 7742685184 bytes, 15122432 sectors Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disklabel type: dos Disk identifier: 0x178e5ca0

Device Boot Start End Sectors Size Id Type /dev/sdb1 * 0 2538431 2538432 1.2G 0 Empty /dev/sdb2 2511036 2515771 4736 2.3M ef EFI (FAT-12/16/32) ubuntu-gnome@ubuntu-gnome:~$


1
นอกเหนือจากการมีพาร์ติชั่นสลับหลายอันซึ่งก็คือถั่วคุณก็มีปัญหาที่ใหญ่กว่าในพาร์ติชั่นที่มีอยู่ของคุณ 4 ตัวนั้นไม่ได้เรียงตัวกันอย่างเหมาะสม เรื่องนี้ส่งผลกระทบต่อประสิทธิภาพ
heynnema

เราจะแก้ไขสิ่งนั้นได้อย่างไรฉันมีพาร์ติชั่น / dev / sd5 สำคัญเพียงหนึ่งตัวเท่านั้น
christianbueno.1

เราจะแก้ไขได้อย่างไรฉันมีพาร์ติชั่น / dev / sd5 (Data) ที่สำคัญเพียงหนึ่งตัวที่ฉันไม่สามารถลบได้ หรือฉันจะต้องลบฮาร์ดไดรฟ์ทั้งหมด
christianbueno.1

มีสองทางเลือก 1) เริ่มใหม่ แบ่งพาร์ติชั่นใหม่ทั้งหมด, โหลดซอฟต์แวร์ซ้ำอีกครั้ง หรือเรียกคืนจากการสำรองอิมเมจพาร์ติชันก่อนหน้า หรือ 2) พยายามทำการผ่าตัดลบพาร์ติชั่นที่ไม่ได้ถูกจัดแนว, แทนที่พาร์ติชั่นที่มีแนว, คืนค่าข้อมูลจากการสำรองอิมเมจพาร์ติชั่นก่อนหน้า.
heynnema

1
ในทางเทคนิค fdisk ใช้สำหรับดิสก์ MBR และ gdisk ใช้สำหรับดิสก์ GPT เช่นเดียวกับที่คุณมี ฉันไม่รู้ว่า gdisk จะให้ข้อมูลการจัดตำแหน่งอย่างรวดเร็วเหมือนกับ fdisk หรือไม่ แต่คุณสามารถลองgdisk -l /dev/sdaได้ คุณอาจต้องตรวจสอบmanหน้า Gparted ควรจัดตำแหน่งอย่างเหมาะสมใน MiB เพื่อความแน่ใจให้ทำการผ่าตัดลบพาร์ติชั่นที่ไม่ตรงแนวหนึ่งสร้างพาร์ติชั่นนั้นขึ้นใหม่แล้วตรวจสอบอีกครั้งด้วย fdisk / แยก
heynnema

คำตอบ:


19

คุณไม่จำเป็นต้องมีพาร์ติชั่นการแลกเปลี่ยนที่แตกต่างกันสำหรับระบบที่แตกต่างกันเช่นเดียวกับที่คุณไม่ต้องการ RAM sticks ที่แตกต่างกันสำหรับระบบที่แตกต่างกัน เพียงแบ่งปันระหว่างพวกเขาทั้งหมด คุณควรใช้สิ่งที่เหลือไว้มากที่สุดเพราะเป็นอันที่มีความเร็วในการอ่าน / เขียนที่เร็วที่สุด (บน HDD)

สิ่งเดียวที่เกี่ยวข้องหลังจากการปิดเครื่องยังคงอยู่ในการสลับคือเมื่อคุณจำศีลพีซีของคุณ (หยุดการทำงานของดิสก์) แต่นั่นเป็นค่าเริ่มต้นที่ปิดใช้งานอยู่แล้ว

ไม่ต้องกังวลกับการจัดรูปแบบ หากไม่มีระบบถูกระงับไปยังดิสก์ (และเฉพาะในกรณีที่ใช้พาร์ติชัน swap เพื่อพักอิมเมจการระงับซึ่งไม่จำเป็นต้องเป็นกรณี) ระบบจะไม่เปลี่ยนแปลงสิ่งใด

การฟอร์แมตพาร์ติชั่นสว็อปเป็นปัญหาถ้ามันถูกเมาท์อัตโนมัติโดยใช้ UUID ในการตรวจสอบว่าเป็นกรณีนี้หรือไม่ให้เปิด/etc/fstabไฟล์ในระบบของคุณ หากมีบรรทัดที่มีคำว่า "สลับ" ซึ่งเริ่มต้นด้วยUUID=UUID จะต้องมีการแลกเปลี่ยนโดยใหม่ โปรดทราบว่าไม่จำเป็นต้องมีบรรทัดดังกล่าว พาร์ทิชันสลับของคุณสามารถระบุได้โดยชื่ออุปกรณ์ของพวกเขา ในกรณีนี้บรรทัดจะเริ่มต้นด้วย/dev/sda12และไม่มีสิ่งใดที่ต้องทำยกเว้นในกรณีที่คุณลบพาร์ทิชันหรือตอนนี้เป็นพาร์ติชันที่แตกต่างกันซึ่งในกรณีนี้จะต้องเปลี่ยนชื่ออุปกรณ์

หากคุณลบทั้งหมดยกเว้นพาร์ทิชันสว็อปเดียวให้เขียน UUID เดียวกันลงในบรรทัดตามลำดับของ/etc/fstabระบบ Linux ทั้งหมดของคุณ ซึ่งสามารถทำได้ทั้งในเซสชันสดหรือในระบบด้วยตนเอง การเปลี่ยนแปลงจะมีผลหลังจากที่คุณบูตในครั้งต่อไป หาก UUID เปลี่ยนไปพาร์ติชัน swap จะไม่ถูกเมาท์ แต่นอกจากไม่มีการแบ่งพาร์ติชันแล้วระบบสามารถใช้งานได้ตามปกติ


สวัสดีเพื่อน ramx เหล่านั้นถูกสร้างขึ้นด้วยตัวเอง
christianbueno.1

จากนั้นเราสามารถไปข้างหน้าอย่างปลอดภัย
christianbueno.1

1
ฉันไม่คิดว่าคุณจะใช้บาร์ RAM ที่แตกต่างกันสำหรับระบบที่แตกต่างกัน แน่นอนคุณทำไม่ได้ ไม่ใช่การพาดพิงถึงคุณ/dev/ramXแต่ฉันพยายามที่จะพูดว่า: "คุณไม่ได้ใช้บาร์ RAM ที่แตกต่างกันสำหรับระบบปฏิบัติการที่แตกต่างกันพาร์ติชัน swap เป็นส่วนเสริมของ RAM ของคุณดังนั้นทำไมคุณถึงใช้พาร์ทิชัน swap ต่างกัน ระบบ?"
UTF-8

อาโอเคเพื่อนฉันเข้าใจคุณ ram bar = memory stick RAM
christianbueno.1

1
การจัดรูปแบบพื้นที่แลกเปลี่ยนจะไม่เปลี่ยน UUID ของพวกเขาหรือไม่ มันจะน่ารำคาญสำหรับระบบที่มี UUIDs สำหรับรายการ swap ใน / etc / fstab
Mark Plotnick
โดยการใช้ไซต์ของเรา หมายความว่าคุณได้อ่านและทำความเข้าใจนโยบายคุกกี้และนโยบายความเป็นส่วนตัวของเราแล้ว
Licensed under cc by-sa 3.0 with attribution required.