Ubuntu Customization System ISO Production

Source: Internet
Author: User

一、安装工具

Apt-get Install Squashfs-tools
Apt-get Install Mkisofs
Second, Mount and unzip the system ISO file

  1. Operate in opt directory
    cd/opt/
    mkdir mnt LiveCD Tool
  2. Upload the system to be customized ISO to/opt/tool/
  3. Mount ISO image to/opt/mnt/
    mount/opt/tool/ubuntu-16.04.2-server-amd64.iso/opt/mnt/
  4. Copy all the image files to/opt/livecd/
    cp-rp/opt/mnt/. /opt/livecd/
  5. Cancel Mirroring Mount
    umount/opt/mnt/
    Iii. Custom Systems
  6. Unzip the FILESYSTEM.SQUASHFS file to the current directory and extract the directory as Squashfs-root
    cd/opt/livecd/install/
    UNSQUASHFS FILESYSTEM.SQUASHFS
  7. Switching into a new system
    Chroot Squashfs-root
    MOUNT-T proc None/proc
    Mount-t Sysfs None/sys
    Mount-t devpts none/dev/pts
  8. Modify DNS, install source files, replicate the DNS and installation sources that have been configured for the machine to be customized
    Exit the Squashfs-root system first
    Exit
    Cp/etc/apt/sources.list/opt/livecd/install/squashfs-root/etc/apt/sources.list
    Cp/etc/resolv.conf/opt/livecd/install/squashfs-root/etc/resolv.conf
  9. Switch to the new system, install the required software, and so on to the system to make customized changes
    Chroot Squashfs-root
    APT Update
    Apt Install Software-properties-common

    APT Update
    Aptitude hold Linux-generic

  10. Purge system
    Apt-get Clean
    Apt-get Autoremove
    rm-fr/tmp/*
  11. Back to the original system
    Umount/proc
    Umount/sys
    Umount/dev/pts
    Exit
  12. Reconfigure and compress the root file system
    Cd/opt/livecd/install
    RM FILESYSTEM.SQUASHFS
    MKSQUASHFS Squashfs-root FILESYSTEM.SQUASHFS
    printf $ (du-sx--block-size 1 squashfs-root |cut-f1) >filesystem.size
    Rm-r Squashfs-root
    cd/opt/livecd/
    RM md5sum.txt
    Find-type f-print0 | xargs-0 md5sum|grep-v isolinux/boot.cat |tee md5sum.txt
    8. Creating an ISO image
    cd/opt/livecd/
    mkisofs-d-r-v "Ubuntu-16.04.2-server-amd64.iso"-cache-inodes-j-l-b isolinux/isolinux.bin-c isolinux/boot.cat-no-e Mul-boot-boot-load-size 4-boot-info-table-o ". /rdcloudinstallos.iso ".

Ubuntu Customization System ISO Production

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.