如何制作自定义Ubuntu系统ISO镜像并刻录至DVD且附带哈希值?
Alright, let's break this down step by step—since you’ve already got your Ubuntu setup tuned perfectly, creating a custom ISO and burning it to DVD with a verification hash is totally straightforward. Here’s how to do it:
1. Create Your Custom Ubuntu ISO
You’ll need a tool to package your configured system into a bootable ISO. Systemback is a solid, user-friendly option for this:
- First, add the required PPA (for newer Ubuntu versions that don’t include Systemback in default repos):
sudo add-apt-repository ppa:nemh/systemback sudo apt update - Install Systemback:
sudo apt install systemback - Launch Systemback from your applications menu.
- From the left sidebar, select Live system create.
- Tweak the settings to your needs:
- Check "Include user data files" if you want your personal documents and settings included (skip this if you only want the base system setup).
- Give your ISO a descriptive name under "Live system name".
- Click Create new to start generating the ISO. This might take 10-30 minutes depending on how much data you’re including.
- Once finished, you’ll find your ISO file in
/home/systemback/livefiles/(the tool will also show you the exact path when done).
2. Generate a Hash Value for Verification
A hash ensures that the ISO (and the burned DVD) hasn’t been corrupted. SHA256 is the most secure choice, but MD5 works too:
- Open a terminal and navigate to the folder with your ISO:
cd /home/systemback/livefiles/ - Generate a SHA256 hash and save it to a file:
sha256sum your-custom-iso-name.iso > your-custom-iso-name.iso.sha256 - If you prefer MD5 (older but widely supported):
md5sum your-custom-iso-name.iso > your-custom-iso-name.iso.md5 - You can open the resulting
.sha256or.md5file with any text editor to see the hash string paired with your ISO filename.
3. Burn the ISO and Hash File to DVD
Now let’s get everything onto a DVD so it’s usable on other identical machines:
- Burn the bootable ISO:
- Insert a blank DVD into your optical drive.
- Use Ubuntu’s built-in Disks tool:
- Open Disks from your apps menu, select your DVD drive from the left sidebar.
- Click the three-dot menu in the top right, choose "Restore Disk Image".
- Select your custom ISO, then click "Start Restoring" and follow the prompts to confirm.
- Or use Brasero (if you have it installed):
- Open Brasero, select "Burn image".
- Pick your ISO file, ensure your DVD drive is selected, then click "Burn".
- Add the hash file to the DVD:
- Eject the DVD, then reinsert it—it should mount as a read-write disc (if not, use Brasero’s "Data project" option):
- Open Brasero, select "Data project", drag and drop your
.sha256/.md5file into the project window. - Select your DVD drive and click "Burn" to add the file to the disc.
- Open Brasero, select "Data project", drag and drop your
- If the DVD is full after burning the ISO, print the hash string and include it with the DVD, or save the hash file to a small USB drive paired with the DVD.
- Eject the DVD, then reinsert it—it should mount as a read-write disc (if not, use Brasero’s "Data project" option):
4. Verify the Burned DVD (Optional but Smart)
To make sure the DVD was burned without errors:
- Insert the DVD, mount it, and copy the ISO from the DVD to your local machine:
cp /media/your-username/DVD_LABEL/your-custom-iso-name.iso ~/Downloads/ - Generate a hash for the copied ISO:
sha256sum ~/Downloads/your-custom-iso-name.iso - Compare this hash to the one in your
.sha256file—they should be identical. If they match, your DVD is good to go!
内容的提问来源于stack exchange,提问作者Nikola Tesla Mandici
相关产品推荐
相关产品推荐

