Warning

If it is not explicitly told in following recipe, setting up services are described for Ubuntu 20.04 server, but applications are described for Xubuntu 20.04 workstation. If you use different Ubuntu version or Linux distribution, settings as well as content, names and places of configuration files may be different!
Got it.

Ubuntu pielāgota diska izveide

Darba vietas sagatavošana

  1. Uzstāda nepieciešamās programmas:

    sudo apt-get install squashfs-tools
    sudo modprobe squashfs
  2. Sagatavo vidi. Oriģinālo *.iso uzmontē uz /tmp/livecd:

    mkdir /tmp/livecd
    sudo mount -o loop /home/inst/ubuntu-12.04.2-desktop-i386.iso /tmp/livecd
  3. Izveido mapi struktūru jaunā diska failiem:

    mkdir -p ~/livecd/cd
  4. Darba mapē pārkopē failus (izņemot casper/filesystem.squashfs) no oriģinālā CD uz darba mapi:

    rsync --exclude=/casper/filesystem.squashfs -a /tmp/livecd/ ~/livecd/cd
  5. Izveido jauno squashfs failu sistēmas mapi struktūru darba mapē:

    mkdir ~/livecd/squashfs; mkdir ~/livecd/custom
    sudo mount -t squashfs -o loop /tmp/livecd/casper/filesystem.squashfs ~/livecd/squashfs/
    sudo cp -a ~/livecd/squashfs/** ~/livecd/custom
  6. Sagatavo chroot vidi:

    sudo cp /etc/resolv.conf /etc/hosts ~/livecd/custom/etc/
  7. Aktivizē jaunu sesiju, ar modificētu saknes mapi, izmantojot chroot:

    sudo chroot ~/livecd/custom
    mount -t proc none /proc/; mount -t sysfs none /sys/
    export HOME=/root; export LC_ALL=C

CD satura pielāgošana

Pakotņu modificēšana

  1. Noņem reti izmantotās pakotnes:

    apt-get purge compiz-core evolution** f-spot gnome-games** pitivi** rhythmbox**
    apt-get purge `dpkg-query -W --showformat='${Package}\n' | grep language-pack | egrep -v '\-en'`
  2. Modificē pakotņu krātuvju sarakstu:

    vi /etc/apt/sources.list
    • Neatbalstītajām krātuvēm saliek main restricted universe multiverse
    • Ja vēlas, precise nomaina uz precise-backports
    • archive.ubuntu.com nomain uz lv.archive.ubuntu.com
  3. Atjauno pakotnes:

    apt-get update; apt-get dist-upgrade
  4. Skatīt arī custom.recipes.WorkstationAdditions

chroot vides sakopšana

  1. Novāc failus:

    apt-get clean; apt-get autoremove
    rm -rf /tmp/**; rm -f /etc/hosts /etc/resolv.conf
  2. Nomontē mapes un iziet:

    umount /proc/; umount /sys/
    exit

ISO faila izveide

  1. Atjauno manifesta failus:

    chmod +w ~/livecd/cd/casper/filesystem.manifest
    sudo chroot ~/livecd/custom dpkg-query -W --showformat='${Package} ${Version}\n' > ~/livecd/cd/casper/filesystem.manifest
    sudo cp ~/livecd/cd/casper/filesystem.manifest ~/livecd/cd/casper/filesystem.manifest-desktop
  2. ja nepieciešams, izdzēš iepriekšējo squashfs failu:

    sudo rm -f ~/livecd/cd/casper/filesystem.squashfs
  3. Un izveido jaunu squashfs failu:

    sudo mksquashfs ~/livecd/custom ~/livecd/cd/casper/filesystem.squashfs
  4. Atjauno /livecd/cd/README.diskdefines failu.
  5. Atjauno MD5 summas:

    sudo rm ~/livecd/cd/md5sum.txt
    sudo -s
    (cd ~/livecd/cd && find . -type f -print0 | xargs -0 md5sum > md5sum.txt)
    exit
  6. Izveido ISO failu:

    cd ~/livecd/cd;
    sudo mkisofs -r -V "Ubuntu Odo" -b isolinux/isolinux.bin -c isolinux/boot.cat -cache-inodes -J -l \
    -no-emul-boot -boot-load-size 4 -boot-info-table -o /home/inst/ubuntu-12.04.2-custom.iso .

Saites


 
 
Tags Ubuntu Sāknēšana Darbstacija
Created by Valdis Vītoliņš on 2009-04-17 08:51
Last modified by Valdis Vītoliņš on 2025-05-10 17:46
XWiki Powered
Creative Commons Attribution 3.0 Unported License