Computer >> บทช่วยสอนคอมพิวเตอร์ >  >> ระบบ >> Linux

Grub vs Systemd-boot: ควรใช้ Bootloader ตัวไหน?

Systemd-boot เรียกว่า "systemd" และก่อนหน้านี้ "gummiboot" เป็นคู่แข่งใหม่ของ Grub บน EFI systems ที่เข้ากันได้ systemd-boot ใช้แทน Grub บูท operating system ของระบบ จากมุมมอง high-level systemd-boot link ไป bootloader ที่มีอยู่ใน UEFI แล้ว เสนอ basic feature set สำหรับเลือก OS Grub ด้านโหลดสิ่งที่บรรยายว่า "an entire OS" จัดการบูท OS ของผู้ใช้ ให้ capability มากกว่ามาก

Bootloader คืออะไร?

Bootloader โหลด operating system คัดลอกไป memory จาก special sector บน boot media รันก่อน OS ใดๆ บูต ถ้าตรวจพบ multiple bootable system images bootloader ให้ผู้ใช้เลือก system เริ่มต้น Bootloader แล้วบูท OS และส่งมอบ hardware control ให้ OS บนระบบส่วนใหญ่ bootloader ปรากฏหลัง splash screen ของ motherboard

Grub vs systemd-boot: Grub คืออะไร?

GNU GRUB รู้จักทั่วไปว่า Grub หรือ GRUB 2 ย่อมาจาก GRand Unified Boot Interface 基于 Free Software Foundation's multiboot specification ออกแบบทำงานบน hardware platform ใดๆ บูท Unix OS ใดๆ จาก boot media และ file system เกือบทุกอย่าง เพราะครอบคลุม platforms และ distributions กว้าง Grub มักเป็น default bootloader ที่ ship กับ Linux distros ส่วนใหญ่ ถ้าเคย interact Linux bootloader น่าจะเป็น Grub ให้ options visual configuration เช่น text, background colors, graphical splash images Ubuntu's version ของ Grub ใช้ Canonical-brand purple

Grub รองรับ multiboot systems เขียนเฉพาะเพื่อ purpose นี้ แต tricky หากอะไรผิดปกติ ปัญหาเกิดบ่อยตอนติดตั้ง Grub บน existing multiboot system, ลบ OSes, ติดตั้ง OS ใหม่ Grub ใช้ conf file เดียว ทุก OS รวมในไฟล์เดียว edit สะท้อนการเปลี่ยนแปลง Primary OS bootloader อยู่ใน MBR OS อื่นๆ chain-loaded ผ่าน bootloaders บน partitions ของตัวเอง ทำงานได้ ส่วนใหญ่ use cases sufficient แตระบบที่ upset ได้ง่าย เช่น ไม่ config chain-loaded kernels properly multiple Linux installations "fight" ควบคุม MBR

Grub vs systemd-boot: systemd-boot คืออะไร?

Linux fans อาจเจอชื่อ "systemd" ก่อน systemd ย่อจาก "system daemon" คือ collection fundamental prerequisite daemons รัน Linux system Systemd-boot เป็น code หลายพันบรรทัด ไม่มี dependencies ใน systemd suite แต thanks to simplicity gummiboot เพิ่มเข้า systemd rename "systemd-boot" match component-naming convention ของ systemd เป้าหมาย systemd boot system เร็วโดยเริ่มน้อยลงและเริ่ม parallel มากขึ้น systemd-boot share เป้าหมายนั้น

เป็น text-only bootloader systemd มี appearance old-school obviously Available boot devices listed by title จัดการใน config file ของ systemd-boot systemd-boot คือ interface สำหรับ boot logic ที่อยู่ใน EFI เพราะฉะนั้นใช้ได้กับ compatible EFI systems เท่านั้น ระบบ less configurable dramatically ไม่มี configuration options เกือบเลย

ด้วย limited interface systemd เป็น bootloader ขนาดเล็กกว่า Grub ดรามàtic บางคนติดตั้งเพื่อ speed หรือ manage multiple OSes effectively เพราะ systemd ใช้ split configuration files (single .conf file สำหรับแต่ละ kernel หรือ OS) 简化 maintaining system กับ multiple kernels หรือ OSes manually drop-in config text files copy ไป systemd directory ตอนติดตั้ง kernel ใหม่ ทำให้ configuration ง่ายสำหรับ multi-boot systems

สรุป: Grub หรือ Systemd-boot ใดดีกว่า?

ถ้ามีปัญหากับ Grub systemd-boot ให้ dramatically simplified boot infrastructure ด้วย drop-in file configuration มัน robust กว่า แตไม่ configurable หรือ adaptable เท่า Grub ถ้ารัน multiboot EFI system systemd-boot ให้ easier boot management อาจลด boot times บน system configurations อื่น หรือ uses ที่ต้องการ flexibility มากกว่า systemd-boot ให้ Grub ยังคง best bet