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

สร้าง Ubuntu ISO ตามใจด้วย Cubic – คู่มือขั้นตอนละเอียด

หนึ่งในสิ่งที่ดีที่สุดของ Linux คือมันให้คุณ customize ระบบได้อย่างเต็มที่ ไม่เหมือน users ของ OS อื่นๆ ที่ถูกจำกัดด้วย corporate-mandated desktop environment, file manager, หรือ office suite

โดยปกติ คุณทำการเปลี่ยนแปลง distro หลังติดตั้งบนฮาร์ดแวร์แล้ว แต่กับ Cubic คุณสร้าง custom ISO ที่สมบูรณ์แบบสำหรับความต้องการของคุณได้

ทำไมต้องสร้าง Custom Ubuntu ISO?

ด้วย Linux distro landscape ที่ varied และ fragmented มาก มี distros ที่เหมาะกับ virtually any available use case คุณติดตั้ง Linux distro based on Debian, Arch, Ubuntu, Slackware, หรือ Fedora ได้ง่าย เลือก side ใน great war ระหว่าง systemd และ anti-systemd เลือก Wayland distro หรือเก็บ graphics stack แบบดั้งเดิมกับ X.org ไม่ขาด options

นี่คือ big choices ที่จะเป็นรากฐานของ Linux experience ทั้งหมดของคุณ แต่ถ้ามี distro ที่เกือบ perfect สำหรับคุณ แต่ต้องการ tweaks นิดหน่อย?

อาจ distro โปรดของคุณมาพร้อม browser ที่คุณไม่ชอบ หรือขาด editing tool เฉพาะที่คุณคิดว่า essential หรือคุณมี vast collection of wallpapers ที่อยากให้พร้อมทันทีตอนเปิด laptop ใหม่ครั้งแรก

แน่นอน คุณทำการเปลี่ยนแปลงได้ง่ายหลังติดตั้ง distro บนเครื่อง แต่ถ้าคุณมี multiple computers และชอบ consistent experience หรือคุณ administer PCs หลายเครื่องที่ต้องมี standard set of software เช่นในโรงเรียนหรือธุรกิจ มันดีที่จะสร้าง customized ISO ของตัวเอง ซึ่งจะติดตั้ง exactly สิ่งที่คุณอยากได้โดยไม่ต้องมานั่งตั้งค่า

Cubic คืออะไร?

เหมือน open-source projects ที่ดีทั้งหมด Cubic เป็น backronym - ในกรณีนี้คือ Custom UBuntu ISO Creator และเหมือนที่ชื่อขยายบ่งชี้ มันคือ tool ช่วยสร้าง customized live ISO image สำหรับ Ubuntu-based distributions

Ubuntu เป็น distro ที่ได้รับความนิยมมาก และนอกจาก main Ubuntu download และ flavors ที่ปรับแต่งแล้วอย่างมาก รวมถึง Kubuntu, Lubuntu, Xubuntu, Ubuntu Studio, Budgie, และ MATE มันยังเป็นพื้นฐานของ distros เช่น elementary OS, Linux Mint, และ KDE Neon อื่นๆ อาจเป็น exactly สิ่งที่คุณหา - ถ้ามัน slightly different

Cubic รันเป็น GUI wizard ช่วยกับ "effortless navigation through the ISO customization steps และ features an integrated virtual command line environment" แค่เลือก Ubuntu-based distro โปรดและทำตาม step-by-step guide เพื่อได้ exactly สิ่งที่คุณต้องการ

วิธีติดตั้ง Cubic บน Linux

Cubic รันบน distributions based on Ubuntu 18.04.5 Bionic และใหม่กว่า และแม้จะ possible ที่จะรัน Cubic ใน virtual environment ไม่แนะนำ เริ่มต้นด้วยการ enable Universe repository และ Cubic PPA:

sudo apt-add-repository universe
sudo apt-add-repository ppa:cubic-wizard/release

ตอนนี้ update ระบบ และติดตั้ง Cubic:

sudo apt update
sudo apt install --no-install-recommends cubic

คุณเข้าถึง Cubic ได้ผ่าน menu system หรือพิมพ์:

cubic

...เข้า terminal

สร้าง Custom Ubuntu ISO ด้วย Cubic

ตอนเริ่ม Cubic ครั้งแรก คุณจะถูกถามให้ select project directory ทำแล้วคลิก Next เพื่อ select source ISO และ details ของ ISO ที่คุณจะผลิต เลือก ISO file และ fields จะ auto-populate

คุณเปลี่ยนค่าสำหรับ custom ISO ให้สะท้อน purpose ของ ISO หรือแค่เพราะอยากให้มันมี cool name สำหรับ source ISO เราเลือก Vanessa release ของ Linux Mint Cinnamon custom name คือ "MUO Linux Initial release"

คลิก Next และ Cubic จะ extract ISO ไป working directory ที่คุณระบุล่าสุด และให้คุณ chroot - a sort of contained terminal - ที่คุณ execute commands ได้

ตัวอย่าง หากคุณอยาก custom ISO มีแค่ freshest software คำสั่งแรกที่ควรรันคือ:

sudo apt update && sudo apt upgrade

Mint มาพร้อม pre-installed software ที่มีประโยชน์มาก และส่วนใหญ่ useful แต่คุณอาจชอบ tools ต่างๆ

ตัวอย่างหนึ่งคือ IRC client HexChat หากคุณเกลียด HexChat เพราะ GUI และชอบ IRSSI ใน terminal คุณจะ purge HexChat ก่อน:

apt purge hexchat

...แล้วติดตั้ง IRSSI:

apt install irssi

มันเหมือนใช้ terminal บน desktop machine ของคุณ ยกเว้นการเปลี่ยนแปลงที่คุณทำจะสะท้อนใน ISO ที่ Cubic ผลิต

คุณทำได้กับ software ใดๆ ที่ชอบ - หรือไม่ชอบ Swap Transmission ให้ qBittorrent, Pix ให้ Ristretto, หรือ Firefox ให้ Falkon!

มันยังเป็น good idea ที่จะกำจัด bloat ในรูปแบบ apps ที่คุณไม่เคยใช้ หรือไม่อยากให้ users ใช้:

apt purge rhythmbox timeshift celluloid notes thunderbird

คุณไม่ต้องใช้ package manager ติดตั้ง software คุณ pull packages จาก internet เพิ่มเข้า path และทำให้ executable เพื่อให้คุณดาวน์โหลด YouTube videos ได้ง่ายบน machines ที่ติดตั้ง custom ISO ของคุณ:

wget https://github.com/yt-dlp/yt-dlp/releases/latest/download/yt-dlp -O /usr/local/bin/yt-dlp
chmod a+rx /usr/local/bin/yt-dlp

เราอยากได้ glorious MUO-themed desktop พร้อม pre-set default wallpaper ไปที่ wallpaper directory:

cd /usr/share/backgrounds

...และคลิก copy icon ถัดจากปุ่ม Back มุมซ้ายบนของ Cubic interface เลือก files ที่อยาก copy เข้า directory นี้ และคลิก Copy บนหน้าจอถัดไป

เมื่อ copy wallpaper files แล้ว ตั้ง wallpaper ที่อยากได้โดยพิมพ์:

gsettings set org.cinnamon.desktop.background picture-uri file:///usr/share/backgrounds/muo_wallpaper.jpg

หากใช้ desktop อื่น เช่น GNOME คุณต้อง modify command:

gsettings set org.gnome.desktop.background picture-uri file:///usr/share/backgrounds/muo_wallpaper.jpg

Finalize Custom Ubuntu ISO ของคุณ

เมื่อคุณเสร็จสิ้นการเปลี่ยนแปลง wallpaper และพอใจกับ packages ที่เพิ่มหรือ purge แล้ว คลิก Next อีกครั้ง

คุณจะเห็นรายการ packages ทั้งหมดที่จะอยู่บน live ISO คุณเพิ่ม checkmark ถัดจากแต่ละอันซึ่งจะเห็นมันถูกลบระหว่าง typical หรือ minimal installation

เมื่อพอใจกับรายการแล้ว กด Next อีกครั้ง และเลือก kernel ที่อยากใช้

ตัวเลือกสุดท้ายคือ compression type ที่อยากใช้ ตั้งแต่ XZ ซึ่งจะผลิต ISO ขนาดเล็ก แต่ใช้เวลานานในการ pack และ unpack ไปจนถึง LZ4 ซึ่งให้ ISO ใหญ่กว่า แต่ใช้เวลาน้อยที่สุด GZIP เป็น compromise ที่ดี

ในจุดนี้ คุณจะสังเกตว่า ever-present Next button ถูกแทนที่ด้วยปุ่ม Generate กดมัน แล้วไปทำน้ำชาดื่มขณะ Cubic สร้าง ISO!

หลังไม่กี่นาที ISO ของคุณจะปรากฏใน Cubic directory พร้อมติดตั้ง

Cubic ทำให้สร้าง Custom Ubuntu ISOs ง่าย

Cubic เป็น excellent tool ที่ทำให้ simple เพื่อรับรองว่าคุณได้ experience ที่คุณอยากได้ทันทีที่เครื่องใหม่บูท คุณใช้มันสำหรับตัวเอง หรือสร้าง images เพื่อ deploy ในองค์กร เพื่อให้นักเรียนและ staff มี tools ที่ต้องการเพื่อทำงานทันที

เพื่อให้แน่ใจว่า ISO ของคุณทำงานได้และมีทุกอย่างที่คุณน่าจะต้องการ (และไม่มีอะไรที่ไม่ต้องการ) คุณควรใช้เวลาทดสอบมันใน virtual machine ก่อน deploy หรือ distribute ISO file