Linux: Make ISO from installed Linux system

From RHS Wiki
Revision as of 21:24, 8 April 2015 by Rafahsolis (talk | contribs) (Created page with "How to make a iso from my istalled operating system!!!!!! first you need to download a image (iso..etc Kali Linux,debian..or whatever you wnt!!!...if you have debian the...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

How to make a iso from my istalled operating system!!!!!!

   first you need to download a image (iso..etc Kali Linux,debian..or whatever you wnt!!!...if you have debian the iso must be debian two,this is not working if you mix ubuntu with debian..)
   Rename the iso to binary.iso and save it on the desktop ...


   #open a terminal
   # switch to root directory
   cd /
   # create a work folder
   mkdir work
   # change to the work folder
   cd work
   # move your previously downloaded/created live image (binary.iso) to the work folder
   mv /home/YOURUSERNAME/Desktop/binary.iso /work
   #extract binary.iso to use it for our custom image
   mkdir iso
   mkdir temp
   mount binary.iso temp/ -o loop
   rsync -a temp/ iso/
   umount temp/
   rm -rf temp/
   # remove the old squash from the unpacked iso since we will build a new one from our filesystem
   rm iso/live/filesystem.squashfs
   # make a directory to contain a copy of the filesystem
   mkdir myfs
   # copy our system to the myfs folder, exclude a few odds and ends
   # exclude other items as needed
   rsync -a / myfs/ --exclude=/{work,cdrom,mnt,media,sys,proc,tmp}/
   # create a few folders we excluded, just in case they are needed
   mkdir myfs/media myfs/sys myfs/mnt myfs/proc myfs/tmp
   #make the squashed filesystem
   mksquashfs myfs/ iso/live/filesystem.squashfs
   # make the new ISO
   mkisofs -r -J -l -D -V "customCD" -o mysystemcd.iso \-cache-inodes -b isolinux/isolinux.bin -c isolinux/boot.cat \-no-emul-boot -boot-load-size 4 -boot-info-table iso/


   or like this for more larger iso
   mkisofs -r -J -l -D -V "customCD" -o mysystemcd.iso \-cache-inodes -b isolinux/isolinux.bin -c isolinux/boot.cat \-no-emul-boot -allow-limited-size -boot-load-size 4 -boot-info-table iso/
   # or you can play even looser with the standards
   mkisofs -r -J -l -D -V "customCD" -iso-level 4 -o mysystemcd.iso \-cache-inodes -b isolinux/isolinux.bin -c isolinux/boot.cat \-no-emul-boot -boot-load-size 4 -boot-info-table iso/
   #or this if the size is larger
   # if you copy/paste the above commands be sure not to have a space after the \
   mkisofs -r -J -l -D -V "customCD" -iso-level 4 -o mysystemcd.iso \-cache-inodes -b isolinux/isolinux.bin -c isolinux/boot.cat \-no-emul-boot -allow-limited-size -boot-load-size 4 -boot-info-table iso/
   # change ownership of the ISO we created to our user
   chown your_user_name:your_user_name mysystemcd.iso
   # move the ISO to the desktop
   mv mysystemcd.iso /home/your_user_name/Desktop
   # move up a directory
   cd ..
   # delete the work folder
   rm -rf work/
   # look on the desktop
   # mysystemcd.iso is the image of your system
   if for some reason you dont have the command mkisofs you must download the programm..( mkisofs alternatives genisoimage)
   thk you and good luck!!!