Archive for the ‘SYA710A’ Category

Making a Fedora Custom & Live – CD

December 5, 2008

Before I see this Lab, for me make a custom version of Fedora would involve C programming, lots of shell scripts and much more complicated stuff. But in class we were presented to “pungi” and how easy is to use pungi. I created a custom spim of Fedora 9, the only hard thing I need to do was to create a kickstart file, I didn’t have problems in the others steps. The new Fedora repository in Seneca College “Belmont” is very nice, I was downloading some files at 10 mb/s !!!

The only command used was
# pungi -c f9-ks.cfg –nosource –force –ver=F9

After create the iso file, its possible to initiate the new Fedora using qemu-kvm
#qemu-kvm -m 512 -cdrom /path_to/Fedora-Custom.iso

In the first time tryed I didn’t specified the option -m 512, then I got the message that I don’t have enought ram, and I went to text mode.

spim-working

Fedora Live CD

To make a Fedora custom we used the livecd-tools with the command:
# livecd-creator -c /usr/share/livecd-tools/livecd-fedora-minimal.ks

I noticed that some packages came for Fedora 11, 10, and 9 !!! But I was building a Fedora 8. All packages were downloaded from Belmond, then I used qemu-kvm to initialize the live distro, but it didn’t work :-(. Even with the iso file generated properly, maybe because of the hard drive controllers of the computers in the lab.


Making a Fedora Custom CD

November 29, 2008

Make a custom spin of Fedora 9 was cool, I tryed on Fedora 10 and it didn’t work fine.

I installed virtual box on my laptop and installed fedora 9 32 bits on it.

Inside the virtual machine with fedora 9 I ran the commands:

1.0) Install pungi

#yum install pungi

1.1) I copyed the kickstart file provided

repo –name=release –mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=fedora-9&arch=$basearch
repo –name=updates –mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=updates-released-f9&arch=$basearch

%packages –nobase
bash
kernel
passwd
policycoreutils
chkconfig
authconfig
rootfiles
anaconda-runtime

%end

1.2) Generating the iso file
#pungi -c f9-ks.cfg –nosource –force –ver=FC9

The generation of the iso file took almost one hour, now I just need to burn the iso file on a dvd and install it in a computer in the lab.

Automatic Installations Using Kickstart – USB Flash Drive

November 6, 2008

A tool that can save you some time and help you to make a consistent environment is kickstart.

Kickstart allows you to automaticly set up the partitions, packages, languages and more configurations that are mandatory to fill in the installation process.

In other words you will install the all operational system without having to answer the questions or mark the options.

It’s very useful when setting up some similar machines, because instead of spent a lot of time marking the options, you can have this work just once, take the anakonda-ks.cfg and use it in all the other machines.

To begin your installation using kickstart, just boot you system, select the mode you are going to use (text mode, graphical mode). Press tab to give some options, plug your usb device and type the following line:

linux install ks=hd:sdb1:/anaconda-ks.cfg

Make sure to specify the write device, because depending on the system, the drives can vary.

Virtual Machine – How To – Fedora 9 in Fedora 9

November 5, 2008

1) yum -y update

2) yum -y install libvirt virt-manage

3) run the service libvirtd
# service libvirtd start

4) Open the virtual machine manager and connect to the localhost

virt01

5) Create a virtual machine

virt02

You will be asked for some informations:

  • System Name
  • Select fully virtualized
  • Select the path of your instalation
  • Select the mount of space you want to leave for the system

virt03

  • Select virtual network
  • Now select the amount of memory and number of cores that are going to be used in the new virtual machine

virt04

6) Now just verify the information provided before and create the virtual machine

    virt051

    7) If everything has gone right you must have a screen like this:

    virt06

    Have fun !!!

    Func RPM Verification Module – Release 0.1

    November 3, 2008

    Official Project Page:
    https://fedorahosted.org/func/

    Proposal of project:

    Create a Func module that allows the system administrator to audit the integrity of all the rpms installed in all systems.

    Verifying the Integrity of the Current System

    The integrity of the rpms of the local system can be verified by the command:
    # rpm –verify -a

    –verify – verify the package
    -a – option for all packages

    A presentation of the purposed project is available:

    Presentation.pdf

    Presentation.odt

    Email to Func Mail List:

    I sent a email to the Func Project mail list to telling about my intention of making the verification module

    Hi my name is Milton Paiva, I am student of the Post-Graduate (Graduate
    Certificate) Course - Linux and Unix System Administration from the
    Seneca College and I just beginning to work in module for Func.
    
    I intend to make a module able to execute the command "rpm --verify -a"
     to verify the integrity of all the packages on a given system.
    
    I saw the module rpm inventory and I am thinking in make this module to
    work in the same way as inventory, but instead of get all the rpms
    installed in the system, I will verify the integrity of all the rpms
    already installed in the system.
    
    _______________________________________________
    Func-list mailing list
    Func-list@redhat.com
    https://www.redhat.com/mailman/listinfo/func-list

    Links:

    (1) http://fedoraproject.org/wiki/SummerCoding/2008/Ideas

    (2) https://fedorahosted.org/func/

    (3) http://zenit.senecac.on.ca/wiki/index.php/Potential_Projects

    Compiling the Linux Kernel

    October 11, 2008

    Compiling your Linux kernel allows you to customize your system and save a lot of resources (memory, cpu, etc..). Nowadays the Linux Operational System has support for everything, but I believe none of us have all of the supported hardware like for example “amateur radio”.

    Then a good choice is to remove all the unnecessary modules. Removing unneeded stuff will allow you to have a smooth operational experience once your system will be so much faster just processing what is really need to be processed.

    To build the kernel is necessary to have the package kernel-devel (yum install kernel-devel-`uname -r`).

    #make oldconfig
    Save your old configuration file in the file .config

    #make mrproper

    #make menuconfig
    or
    #make xconfig
    Guide you to make the configuration file to be used in the compilation process

    #make dep
    Make dependencies

    #make clean
    Clean objects and other stuff leaved by the old kernel

    After setting up all of your personal configurations, execute make compile the kernel.
    #make

    #make modules_install

    create initial ram disk image
    #mkinitrd -k vmlinuz-2.6.26 -i initrd-2.6.26

    Update GRUB
    #vi /boot/grub/menu.lst

    #reboot

    Links:
    [1]http://zenit.senecac.on.ca/wiki/index.php/SYA710_Building_a_New_Kernel

    SYA710A – LAB 0

    September 4, 2008

    1. What is your full name?

    Milton Paiva Neto

    2. What is the output in steps 3 and 8?

    Output of Ubuntu

    joker@ubuntu:~$ sudo fdisk -l
    [sudo] password for joker:

    Disk /dev/sda: 10.2 GB, 10200547328 bytes
    255 heads, 63 sectors/track, 1240 cylinders
    Units = cylinders of 16065 * 512 = 8225280 bytes
    Disk identifier: 0x0008edf2

    Device Boot      Start         End      Blocks   Id  System
    /dev/sda1   *           1        1181     9486351   83  Linux
    /dev/sda2            1182        1240      473917+  82  Linux swap / Solaris

    Disk /dev/sdb: 62.0 GB, 62014404096 bytes
    255 heads, 63 sectors/track, 7539 cylinders
    Units = cylinders of 16065 * 512 = 8225280 bytes
    Disk identifier: 0x6ab1bd22

    Device Boot      Start         End      Blocks   Id  System
    /dev/sdb1               1         609     4891761   83  Linux
    /dev/sdb2             610        1826     9775552+  83  Linux
    /dev/sdb3            1827        3651    14659312+  83  Linux
    /dev/sdb4            3652        7299    29302560   83  Linux

    Output of Fedora 8

    [root@localhost ~]# fdisk -l

    Disk /dev/sda: 10.2 GB, 10200547328 bytes
    255 heads, 63 sectors/track, 1240 cylinders
    Units = cylinders of 16065 * 512 = 8225280 bytes
    Disk identifier: 0×00058f46

    Device Boot      Start         End      Blocks   Id  System
    /dev/sda1   *           1          51      409626   83  Linux
    /dev/sda2              52         688     5116702+  83  Linux
    /dev/sda3             689         752      514080   82  Linux swap / Solaris

    Disk /dev/sdb: 62.0 GB, 62014404096 bytes
    255 heads, 63 sectors/track, 7539 cylinders
    Units = cylinders of 16065 * 512 = 8225280 bytes
    Disk identifier: 0×6ab1bd22

    Device Boot      Start         End      Blocks   Id  System
    /dev/sdb1               1         609     4891761   83  Linux
    /dev/sdb2             610        1826     9775552+  83  Linux
    /dev/sdb3            1827        3651    14659312+  83  Linux
    /dev/sdb4            3652        7299    29302560   83  Linux

    Disk /dev/dm-0: 16.1 GB, 16106127360 bytes
    255 heads, 63 sectors/track, 1958 cylinders
    Units = cylinders of 16065 * 512 = 8225280 bytes
    Disk identifier: 0×00000000

    Disk /dev/dm-0 doesn’t contain a valid partition table

    3. What is the purpose of the sudo command ?

    “sudo” = Super User Do, it allows you to run a command as a super user when logged as a single user.

    4. What is the purpose of the minus sign (-) when using the su command ?

    It allows you to take the enviroment variables to the selected user.

    5. Explain how you deleted the partition table with fdisk.

    # fdisk /dev/sda

    type option “d”

    Select the partition number: “1”

    Type “w” to write table to disk and exit, then reboot your system.

    6. What is the purpose of the partprobe command ?

    It informs the OS about the modifications on the partition table.

    7. Write the complete mail command you would use to email a copy of lab00 to your LEARN account from MATRIX.

    # mail -s “lab00” mpaivaneto@matrix.senecac.on.ca < lab00.txt

    8. What is the function of the -s option to the mail command ?

    Add a subject to the message.

    Comments about the technology used in this lab.

    This technology is very nice, because the students became free to do such things in the systems without care about possible damages in the machine. Once the system is rebooted everything is setted up to it’s default configuration.

    What you learned ?

    To use command line tools get informations about the partitions in different operational systems (Ubuntu and Fedora).