XNUXER.OR.ID





XNUXER


Xnuxer Research Laboratory of Internet Security and Open Source

www.xnuxer.or.id - we are concern to research technology about internet security and open source
 HowTo Remaster a LiveCD or LiveDVD using SLAX  

The other day I had to come up with a way to transfer a Solaris Express nv97 DVD 3G image to remote locations while not using the network. The reason for this is, I needed to perform a LiveUpgrade on over 700 boxes and each being at a different locations. So I said to myself I guess I can put this image on a custom LiveDVD... But then I said to myself, which Linux LiveCD/DVD distro will I use???? It has to be small enough so that I can fit the Solaris Express nv97 image as well as the LiveCD Image .

I thought to first use Knoppix or Puppet Linux or even DSL Linux.. But after going through there documentation I was like ok, this is getting confusing!!! I decided to try first Knoppix and let me tell you during the compression phase it failed every time. Then I was on my way to try Puppy Linux, but right before I did that I ran into SLAX Linux. And I am so glad that I did! The instructions were straight to the pointand not to metnion easy to read.

So in this HowTo I will show you how to remaster your own LiveCD/DVD image using SLAX and some of the cool things that you can do with SLAX. All comments are appreciated and if you found this HowTo helpful then please digg and leave a comment. Thank You.

I would suggest that you have either VirtualBox or VMware installed so you can do all your testing on VirtualMachines.

Requirements for me for this project were....

  • Solaris Express nv97 DVD Image must fit on LiveDVD
  • sshd needs to be started with a valid root password
  • The Image needs to be shared via NFS

This HowTo makes some assumptions...

  • You have used Linux before and understand how to use a terminal
  • You have used either VirtualBox or VMware Workstation
  • Create a VirtualDisk of at least 10G for this example... Now normally this all really depends on how many extra packages you want and files you want to addto the live Image that you are creating.

The first thing that you need to do is to download SLAX from this linkSLAX. Now using either VirtualBox or Vmware, boot into SLAX using the ISO image you downloaded. Once you are logged into the system you will follow the steps below...

  1. fdisk -l { The reason for this command is that you want to see what available disk you have to use for this LiveDVD }
  2. fdisk /dev/sda { This command you will use to create the partition you want to use }
  3. mkfs.ext3 /dev/sda1 { This command will create the ext3 filesystem on /dev/sda1 }
  4. fdisk -l { This command will show you the available partition that you just created above }
  5. mkdir /mnt/NewSlax { here you will create the directorywhere you will mount the newly created filesystem }
  6. mount /dev/sda1 /mnt/NewSlax/ { Here you will mount the newly created filesystem on /mnt/NewSlax }
  7. df -h { Here you will see the newly mounted drive and where it is mounted }
  8. cp -rfpa /mnt/live/mnt/hdc/* /mnt/NewSlax/ { This is where you will copy the entire SLAX Live env to the newly mounted partition }
  9. Time to download the 3G Solaris Express nv97 image from here. Please make sure you save it into the IMAGES directory that you will create as so... mkdir /mnt/NewSlax/slax/IMAGES { This will take a while so spawn a new shell and contnue the following steps }
  10. cd /mnt/NewSlax/slax/modules/ { Here you will change into the Live environment and change into the modules directory }
  11. wget http://www.slax.org/modules/618/dl/sshd-activate.lzm { Here we will download the sshd activate lzm compressed module, all this module contains is a sshd startup script so that sshd will start up by default as sshd comes with SLAX }
  12. cd ~ { We now change back into our home directory which is /root/ }
  13. wget http://carroll.cac.psu.edu/pub/linux/distributions/slackware/slackware-12.1/slackware/n/nfs-utils-1.1.2-i486-1.tgz
    { SLAX does not come with NFS support so we have to add it by downloading the slackware package of nfs-utils }
  14. wget http://carroll.cac.psu.edu/pub/linux/distributions/slackware/slackware-12.1/slackware/n/portmap-6.0-i486-1.tgz
    { In order to install nfs-utils we will also need portmap for nfs to work }
  15. tgz2lzm nfs-utils-1.1.2-i486-1.tgz nfs-utils-1.1.2-i486-1.lzm { Time to convert the SLACKWARE tgz packaged nfs-utils using the custom built slax tool for converting slackware to lzm compressed modules for SLAX }
  16. tgz2lzm portmap-6.0-i486-1.tgz portmap-6.0-i486-1.lzm { repeating the same process above }
  17. mv *.lzm /mnt/NewSlax/slax/modules/ {Now we need to move the newly created LZM modules to the new live module directory in /mnt/NewSlax/slax/modules/ }
  18. Now it is time for us to create our own custom compressed module aka custom startup script. First thing to do is to create the directory structure of where you are going to place the files under the root aka '/' directory.
  19. mkdir -p MySampleRcScript/etc/rc.d/init.d
  20. mkdir -p MySampleRcScript/etc/rc.d/rc3.d
  21. cd MySampleRcScript/etc/rc.d/init.d/
  22. vi rc.mySampleRc { Here we need to create our startup script, in this startup script we will change the root password to test and the rest you can read off of the screenshot :) }
    alt
  23. cd ../rc3.d/
  24. ln -s ../init.d/rc.mySampleRc SmySampleRc { Here we will symlink the original script to the default run level rc3.d directory and make sure to append a capital S in front of the startup script so that when sysv runs it will catch that script and start up properly. }
  25. ln -s ../init.d/rc.mySampleRc KmySampleRc { Same as above except to stop the script during the shutdown process. }
  26. cd ~ { We now will change back into the root directory so that we can prepare for the final stage of the module creation }
  27. dir2lzm MySampleRcScript MySampleModule.lzm { Final stage of the module creation.... the dir2lzm will take that directory structure and convert it into the lzm compressed module }
  28. cp MySampleModule.lzm /mnt/NewSlax/slax/modules/ { Now we will copy the newly created module into the new live environment module directory }
  29. cd /mnt/NewSlax/slax/ { we ar almost done, we will now change into the new live environment root directory and prepare for the final step }
  30. ./make_iso.sh /mnt/NewSlax/NewSlax.iso { At last the final step and all you need to do is run a simple script called make_iso.sh}
  31. ls -ltrh ../ { The image should be a little above 3Gigs which is good considering you have a 3Gig iso image and a liveDVD environment under one dvd. }

altaltalt

altaltalt

altaltalt

altalt


Written by linuxdynasty


Please register, you are currently just a guest here.
 
Similar Articles:
  • How to compile a kernel for Ubuntu Karmic
  • Chrooting Apache2 howto
  • Backtrack 4 Beta - Shmoo Release
  • Creating MySQL Backups With AutoMySQLBackup
  • Preventing Accidental Denial of Service
  •  (Votes #: 3)
    Comments (4)  Print
     
     #1 Author: antoshka2541  


    Member
    Здарова всем! Нашел рабочий сервис для просмотра гостей Вконтакте - http://vk-guests.com

    Publications: 0 | Comments: 88
       
     
     #2 Author: artemeremenko87  


    Member

    Publications: 0 | Comments: 1
       
     
     #3 Author: semyonparkin86  


    Member

    Publications: 0 | Comments: 1
       
     
     #4 Author: istorickovvictor86  


    Member

    Publications: 0 | Comments: 1
       
     
     Information  

    Members of Guest cannot leave comments.

     

    Welcome

    Welcome to XNUXER.OR.ID, by visit our site we like to help you to get main information about internet security and opensource so dont forget to update your knowledge every time using our website.

    Archives

    To access file download or private information here you must register, please register here.

    The Best News - Top 10

    Calendar

    «    February 2012    »
     
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
     

    Site Statistics

    Top Contributors:
      1    webmaster 166


    Articles:
      This Hour: 0
      Today: 0
      This Month: 0
      All Time: 164


    Membership:
      Registered Today :18
      This Hour:1
      This Month:333
      Total:4540
      Banned:0

    Site Survey

    What do you think about our website?

    Excellent
    Good
    Fair
    Poor
    Bad

    Security Tracker

    Vuln: Pligg CMS 'status' Parameter SQL Injection Vulnerability
    Pligg CMS 'status' Parameter SQL Injection Vulnerability

    Vuln: Joomla! Multiple Information Disclosure Vulnerabilities
    Joomla! Multiple Information Disclosure Vulnerabilities

    Vuln: QEMU KVM CVE-2012-0029 Local Privilege Escalation Vulnerability
    QEMU KVM CVE-2012-0029 Local Privilege Escalation Vulnerability

    Vuln: Mozilla Firefox/SeaMonkey/Thunderbird XPConnect Security Check Cross Domain Scripting Vulnerability
    Mozilla Firefox/SeaMonkey/Thunderbird XPConnect Security Check Cross Domain Scripting Vulnerability

    Bugtraq: [ MDVSA-2012:013 ] mozilla
    [ MDVSA-2012:013 ] mozilla

    Visitor


    Translator

    Whois Info

    IP