SLS

 
Title: HowTo: Converting Dual-Layer DVD install into a Single-Layer DVD
Description: Reduce the size of the DVD
Version: Final
Linux Version: Should work in any bash



  • Note from Vir@s: This script removes 64-bit installation packages, so it should only be used when 64-bit packages aren't needed!

Here is a small script which solves this problem, as only recently newer hardware features DVD-DL reading, and some may face problem when installing on older systems.

Just make sure you have enough free space on disk - about 15 GB.

Copy text below and paste into empty text file, named, for example, ¨rebuild_suse.sh¨,
then run:

~> chmod ugo+x rebuild_suse.sh


in order to make it executable, and place all stuff in corresponding directories, and finally, execute script and wait for around 15 - 30 min (according to PC specs).

Do not forget to adjust script´s working directories according to your system setup!
See comments in the script below.

#!/bin/bash
# *************************************************************
# ***   Script which converts dual-layer DVD image of SuSE Linux
# ***   to more commonly used single-layer 4.3 GB DVD by means
# ***   of removing 64-bit stuff, games and all language 
# ***   translations except English. Was tested with SuSE 9.2/9.3
# ***
# ***   You should run this script as root.
# ***
# ***   It assumes that original SuSE ISO image made from
# ***   dual-layer DVD is named ¨suse_dvd_orig.iso¨ and is located
# ***   in ¨/home/andrei/SLP_ISOs¨, but you can simply change this
# ***   path according to your system setup, just make ¨Find¨ and
# ***   ¨Replace All¨ in any text editor. New smaller SuSE DVD
# ***   image will be named ¨suse_no64.iso¨ and will be located in
# ***   the same directory where original ISO is.
# ***
# ***   I did not wrote this script myself, I just took it somewhere
# ***   and slightly modified because original one worked fine with
# ***   with SuSE Pro 9.2 but not with SuSE 9.3 (some extra items
# ***   like games need to removed to achieve requested size of ISO
# ***   image, while RPM named "yast-trans-stats" should be
# ***   kept), so say your thanks to unknown Open Source hero.
# ***
# *************************************************************
echo "Starting and Preparing..."
cd /home/andrei/SLP_ISOs
chmod -v ugo+r *.iso
rm suse_no64.iso
mkdir /media/iso_mounted
chmod -v ugo+rw /media/iso_mounted
mkdir suse_no64
chmod -v ugo+rwx suse_no64
echo "Mounting ISO Image..."
mount -v -o loop -t iso9660 suse_dvd_orig.iso /media/iso_mounted
#--------------
echo "Copying Content of Original ISO Image..."
cp -R -p -u /media/iso_mounted/* \
	/home/andrei/SLP_ISOs/suse_no64/
echo "Unmounting ISO Image..."
umount /media/iso_mounted
#--------------
echo "Deleting 64-bit Stuff..."
rm -R /home/andrei/SLP_ISOs/suse_no64/suse/x86_64
#--------------
echo "Removing Unnecessary Things..."
rm -R /home/andrei/SLP_ISOs/suse_no64/dosutils
cd /home/andrei/SLP_ISOs/suse_no64/suse/i586
rm bzflag*
rm bos*
rm FlightGear*
rm fillets-ng-data*
rm FOTAQ*
rm freeciv*
rm madbomber*
rm MainActor*
rm neverball*
rm OpenOffice_org-de*
rm pingus*
rm pysol*
rm torcs*
rm trackballs*
rm trophy*
rm tuxracer*
rm wesnoth*
ls --color=never OpenOffice_org-[a-z]*|egrep -v "(gnome)|(kde)|(Quick)|(-ru-)|(-en-)"|xargs rm
cd /home/andrei/SLP_ISOs/suse_no64/suse/noarch
ls --color=never yast2-trans-*|egrep -v "(-en)|(-ru)|(-trans-stats)"|xargs rm
ls --color=never susetour-[a-z]*|grep -v ru|grep -v en|xargs rm
ls --color=never susehelp_[a-z]*|grep -v ru|grep -v en|xargs rm
ls --color=never suselinux-adminguide*|egrep -v "(_ru)|(_en)"|xargs rm
ls --color=never suselinux-userguide*|egrep -v "(_ru)|(_en)"|xargs rm
ls --color=never k*-i18n*|egrep -v -- "-(ru)|(en)"|xargs rm
#--------------
echo "Generating New ISO Image"
cd /home/andrei/SLP_ISOs/suse_no64/
mkisofs -o /home/andrei/SLP_ISOs/suse_no64.iso \
   -b boot/loader/isolinux.bin \
   -c boot/loader/boot.cat \
   -no-emul-boot -boot-load-size 4 -boot-info-table -l \
   -R -r /home/andrei/SLP_ISOs/suse_no64
chmod -v ugo+rw /home/andrei/SLP_ISOs/suse_no64.iso
echo "Deleting temp dir..."
rm -R /home/andrei/SLP_ISOs/suse_no64
echo "!!! Done !!!"


Also, change added languages, the one you want, in my case added is Russian.
With the above script I got my final size 4,432MB, good enough to fit on one SD-DVD

Hope it works for you!

Comments & Suggestions:
http://forums.suselinuxsupport.de/index.php?showtopic=16671

There are no comments on this page. [Add comment]


Warning: include(http://forums.suselinuxsupport.de/ssi.php?a=active) [function.include]: failed to open stream: HTTP request failed! HTTP/1.1 404 Not Found in /home/customers/webs/slwiki/actions/footer.php on line 51

Warning: include() [function.include]: Failed opening 'http://forums.suselinuxsupport.de/ssi.php?a=active' for inclusion (include_path='.:/home/customers/webs') in /home/customers/webs/slwiki/actions/footer.php on line 51

Valid XHTML 1.0 Transitional :: Valid CSS :: Powered by Wikka Wakka Wiki 1.1.6.0
Page was generated in 0.0174 seconds