1 / 28

Lab #1 Install Linux & How to Build Live CD

Lab #1 Install Linux & How to Build Live CD. Operating System Lab. Install Linux. Install Linux(1/6). There are two methods to install and execute Linux. Directly Install with CD or DVD By VM Install Linux on a VM (Virtual Machine) VM (Virtual Machine)

nathan
Télécharger la présentation

Lab #1 Install Linux & How to Build Live CD

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Lab #1 Install Linux & How to Build Live CD Operating System Lab

  2. Install Linux

  3. Install Linux(1/6) • There are two methods to install and execute Linux. • Directly • Install with CD or DVD • By VM • Install Linux on a VM (Virtual Machine) • VM (Virtual Machine) • A virtual machine is software that creates a virtualized environment between the computer platform and its operating system. NCHU System & Network Lab

  4. Install Linux(2/6) NCHU System & Network Lab

  5. Install Linux(3/6) NCHU System & Network Lab

  6. Install Linux(4/6) NCHU System & Network Lab

  7. Install Linux(5/6) NCHU System & Network Lab

  8. Install Linux(6/6) Select swap & ext3 Swap:1024MB / :20480MB NCHU System & Network Lab

  9. Install Linux with VM(1/5) • Use VMware NCHU System & Network Lab

  10. Install Linux with VM (2/5) NCHU System & Network Lab

  11. Install Linux with VM (3/5) The data of VM will be save there NCHU System & Network Lab

  12. Install Linux with VM (4/5) NCHU System & Network Lab

  13. change set Install Linux with VM (5/5) NCHU System & Network Lab

  14. Build Live CD

  15. What is Live CD • Live CD is a simple and small operating system • Executed upon boot, without installation on a hard drive. • It saves a lot of time to install OS and save the space of HD. • When your OS has some mistakes that make your PC can not boot, we can use Live CD to save your important data. • We can build a Live CD which is easy to customise with the user's preferred applications. NCHU System & Network Lab

  16. Live CD-Step1-1 • Live-cd tools RPM • Squashfs-tools and yum are needed by Live-cd tool • Squashfs is a file system for Live CD • yum install squashfs-tools • yum install yum • Get live-cd tools RPM • http://people.redhat.com/davidz/livecd/i386/ • Get and install livecd-tools-001-1.i386.rpm . • wget -c http://people.redhat.com/davidz/livecd/i386/livecd-tools-001-1.i386.rpm • rpm -ivh livecd-tools-001-1.i386.rpm NCHU System & Network Lab

  17. Live CD-Step1-2 • livecd-creator commands • livecd-creator • No packages specified. usage: livecd-creator [--help] [--repo=<name1>,<url1> ...] [--repo=<name2>,<url2>] --package=<p1> [--package=<p2> ...] [--exclude-package=<e1>] --exclude-package=<e2> ...] [--base-on=<path-to-iso-file>] [--fslabel=<label>] • --help : Print usage and exit • --repo : Path to yum repository • --package : Include this package • --exclude-package : Exclude this package • --base-on : Add packages to an existing live CD iso9660 image • --fslabel : File system label (default: livecd-YYYYMMDD-HHMI) NCHU System & Network Lab

  18. Live CD-Step2 • Create the local data storage of fedora core 6 • Get and install createrepo. • wget -c http://tqmcube.com/files/createrepo-0.4.3-5.1.noarch.rpm • rpm -ivh createrepo-0.4.3-5.1.noarch.rpm • Creating a local repository of core packages • mkdir –p /var/www/html/repo/core/ • cp <PATH TO RPMs> /var/www/html/repo/core/ • Can download form internet or fedora core 6 • createrepo /var/www/html/repo/core/ • It may need some time to copy. NCHU System & Network Lab

  19. Live CD-Step3 • Createrepo • Creating a local repository of configuration packages • mkdir –p /root/Desktop/base_packages • cd /root/Desktop/base_packages • wget -c http://people.redhat.com/davidz/livecd/i386/fedora-livecd-6-1.i386.rpm • createrepo /root/Desktop/base_packages NCHU System & Network Lab

  20. Live CD-Step4 • Creating a minimal Live CD • livecd-creator --repo=c6,file:///var/www/html/repo/core --package=bash --package=kernel --package=grub --repo=lcd6,file:///root/Desktop/base_packages --package=fedora-livecd --fslabel=Fedora-minimal-LiveCD NCHU System & Network Lab

  21. Live CD with GNOME • Createrepo • Creating a local repository of configuration packages • mkdir –p /root/Desktop/newbase_packages • cd /root/Desktop/newbase_packages • wget -c http://people.redhat.com/davidz/livecd/i386/fedora-livecd-6-1.i386.rpm • wget -c http://people.redhat.com/davidz/livecd/i386/fedora-livecd-gnome-6-1.i386.rpm • wget -c http://people.redhat.com/davidz/livecd/i386/fedora-livecd-desktop-6-1.i386.rpm • createrepo /root/Desktop/newbase_packages NCHU System & Network Lab

  22. Live CD with GNOME • fedora-livecd-gnome bases on fedora-base and with GNOME. • fedora-livecd-desktop bases on fedora-gnome and provides many api and other utilities for GNOME. NCHU System & Network Lab

  23. Live CD with GNOME • livecd-creator --repo=c6,file:///var/www/html/repo/core --repo=lcd6,file:///root/Desktop/newbase_packages --package=fedora-livecd-gnome --repo=e6, http://download.fedora.redhat.com/pub/fedora/linux/extras/6/i386 --fslabel=My-Fedora-LiveCD-1 NCHU System & Network Lab

  24. Adding New Packages to An Existing Live CD ISO • livecd-creator --repo=c6,file:///var/www/html/repo/core --base-on=old-live-cd.iso --package=package --fslabel=My-LiveCD-New NCHU System & Network Lab

  25. Creating Custom Configuration Packages • fedora-livecd-gnome.conf • In fedora-livecd-gnome-6-1.i386.rpm • Extract Here • Modify etc/livecd/20-fedora-livecd-gnome.conf NCHU System & Network Lab

  26. Creating New RPMs • Spec: • http://people.redhat.com/davidz/livecd/spec/fedora-livecd.spec • cd /usr/src/redhat/SOURCE • Put all .config and file inside • rpmbuild -bb fedora-livecd.spec • ls /usr/src/redhat/RPMS/i386 NCHU System & Network Lab

  27. How to Use USB Disk to Boot • Modify the fedora live cd iso that we did. • Step1: • Format usb disk, and let it’s file system be FAT32 • Step2 • syslinux /dev/sda1 • mount /dev/sda1 /mountpoint //mount usb • Step3 • mount /dev/hdc /mnt/cdrom //mount iso • cp -Rpf /mnt/cdrom/* /mountpoint • Step4 • cp -Rpf /mnt/cdrom/* /mountpoint • Change the file names • isolinux.bin =>syslinux.bin • isolinux.cfg=>syslinux.cfg NCHU System & Network Lab

  28. Reference • Linux system management • Wikipedia • http://en.wikipedia.org/wiki/Live_cd • IBM • Build a Fedora Live CD: http://www.ibm.com/developerworks/linux/library/l-fedora-livecd • Fedora Taiwan user group • http://fedora.tw/modules/newbb/viewtopic.php?viewmode=flat&topic_id=1488&forum=2 • http://fedora.tw/modules/news/article.php?storyid=19 • PUD GNU/LINUX: • http://pud-linux.sourceforge.net/index.en.html NCHU System & Network Lab

More Related