home *** CD-ROM | disk | FTP | other *** search
Wrap
#!/bin/sh #simple script to remaster the puppy2 live-cd. #(c) Copyright 2006 Barry Kauler, www.puppyos.com PUPPYVERSION="`cat /etc/puppyversion`" if [ "`mount | grep '/initrd/pup_ro2'`" = "" ];then #no pup_xxx.sfs file mounted on pup_ro2, probably h.d. install... Xdialog --left --title "Puppy simple remaster CD: ERROR" --msgbox "This program requires a pup_$PUPPYVERSION.sfs file mounted on /initrd/pup_ro2. Which is not the case here, probably because this is a full hard drive installation? Whatever, boot Puppy from live-CD and then you will be able to use this script. Note, I have not tried it, but if you setup the situation of pup_$PUPPYVERSION.sfs mounted on directory /initrd/pup_ro2, that will be acceptable for this program. You will also need a current live-CD, as the program gets files off it. Anyone want to try it? Click 'Ok' button to quit..." 0 0 exit fi #these are created at bootup by /initrd/usr/sbin/init... PUPMODE=`cat /etc/rc.d/PUPMODE` #a number, see /initrd/usr/sbin/init. PDEV1="`cat /etc/rc.d/PDEV1`" #the partition have booted off. DEV1FS="`cat /etc/rc.d/DEV1FS`" #f.s. of PDEV1. PUPSFS="`cat /etc/rc.d/PUPSFS`" #=pup_001.sfs versioned name, stored on PDEV1 PUPSAVE="`cat /etc/rc.d/PUPSAVE`" #=vfat,sda1,/pup_save.3fs location & name of persistent storage file. PMEDIA="`cat /etc/rc.d/PMEDIA`" SAVEPART="$PDEV1" CDR="/dev/$SAVEPART" #choose where to create isolinux-builds/ directory... Xdialog --left --title "Puppy2 simple CD remaster" --msgbox "Welcome! This little program takes a snapshot of your current system and burns it to CD. A Puppy2 live-CD has 4 main files: vmlinuz, isolinux.cfg, initrd.gz, and pup_$PUPPYVERSION.sfs, where $PUPPYVERSION is the current version number (without dots). It is the last file that mainly interests us here: it has the entire Puppy filesystem, everything from '/' down. What this script does is rebuild this file pup_$PUPPYVERSION.sfs, with everything currently under '/' -- that is, all installed packages (DotPups and PupGets), all mounted .sfs extension files, everything, gets combined into one file, pup_$PUPPYVERSION.sfs and burnt to CD. Note, if you have an 'underdog Linux' mounted, that too will get combined into the pup_$PUPPYVERSION.sfs file, so beware, it could get big! Click OK button to continue..." 0 0 [ ! $? -eq 0 ] && exit #calc size needed... Xdialog --title "Puppy2 simple CD remaster" --msgbox "Calculating needed working space.\nPlease wait, this may take awhile..." 0 0 & XPID=$! SIZEOPT=0 SIZEBIN=`du -sk /bin | cut -f 1` SIZESBIN=`du -sk /sbin | cut -f 1` SIZELIB=`du -sk /lib | cut -f 1` SIZEUSR=`du -sk /usr | cut -f 1` [ -d /opt ] && SIZEOPT=`du -sk /opt | cut -f 1` sync kill $XPID SIZETOTALK=`expr $SIZEBIN + $SIZESBIN + $SIZELIB + $SIZEUSR + $SIZEOPT` SIZETOTALM=`expr $SIZETOTALK \/ 1024` echo "SIZETOTALM=$SIZETOTALM" #estimate a compressed size... SIZENEEDEDM=`expr $SIZETOTALM \/ 3` SIZESLACKM=`expr $SIZENEEDEDM \/ 4` #guess SIZENEEDEDM=`expr $SIZENEEDEDM + $SIZESLACKM` SIZENEEDEDM=`expr $SIZENEEDEDM + 5` #space for vmlinuz, initrd.gz, etc #now choose working partition... PARTSLIST="`probepart -m 2> /dev/null | grep '^/dev/' | grep --extended-regexp 'ext2|ext3|reiserfs|msdos|vfat' | cut -f 1-3 -d '|'`" echo -n "" > /tmp/schoices.txt echo "$PARTSLIST" | while read APART do ATAG="`echo -n "$APART" | cut -f 1 -d '|' | cut -f 3 -d '/'`" ASIZE="`echo -n "$APART" | cut -f 3 -d '|'`" AFS="`echo -n "$APART" | cut -f 2 -d '|'`" AFREE="`df -m | grep "/dev/$ATAG" | tr -s " " | cut -f 4 -d " "`" if [ ! "$AFREE" ];then mount -t $AFS /dev/$ATAG /mnt/data > /dev/null 2>&1 if [ $? -eq 0 ];then if [ "$ATAG" = "fd0" ];then FFREE=`df -k | grep "/dev/$ATAG" | tr -s " " | cut -f 4 -d " "` AFREE="`dc $FFREE 1000 \/ p`" else AFREE="`df -m | grep "/dev/$ATAG" | tr -s " " | cut -f 4 -d " "`" fi umount /dev/$ATAG fi fi #AVALUE="off" #[ "$ATAG" = "$PDEV1" ] && AVALUE="on" #echo "${ATAG} \"Filesystem: $AFS Size: ${ASIZE}M Free: ${AFREE}M\" ${AVALUE} \\" >> /tmp/schoices.txt echo "${ATAG} \"Filesystem: $AFS Size: ${ASIZE}M Free: ${AFREE}M\" \\" >> /tmp/schoices.txt done SCHOICES="`cat /tmp/schoices.txt`" #add tmpfs ramdisk choice... SIZETMPFSM="`df -m | grep '^tmpfs' | grep '/initrd/pup_rw' | tr -s " " | cut -f 4 -d " "`" if [ ! "$SIZETMPFSM" = "" ];then SCHOICES="$SCHOICES ramdisk \"Filesystem: tmpfs Size: nnn Free: ${SIZETMPFSM}M\" \\" fi echo '#!/bin/sh' > /tmp/savedlg echo -n "Xdialog --stdout --left --title \"Puppy2 simple CD remaster\" --menubox \"A working area is required in which to create the new live-CD iso file. Here are the available partitions. You must choose one that has at least ${SIZENEEDEDM}M free space on it. If the partition that you would like to use has less than ${SIZENEEDEDM}M free space on it, you will need to quit this script and delete some files. Note 1: you can use the tmpfs ramdisk, which is in RAM, if it has enough space. Note 2: you can use a usb drive, but it needs to have been plugged in before running this script, so that it will get detected. Highlight desired choice then click OK button...\" 0 0 5 " >> /tmp/savedlg echo "$SCHOICES" >> /tmp/savedlg echo ' > /tmp/tag.txt' >> /tmp/savedlg chmod 755 /tmp/savedlg /tmp/savedlg WKGPART="`cat /tmp/tag.txt`" echo "WKGPART=$WKGPART" [ "$WKGPART" = "" ] && exit #copy files off live-cd.... DRIVESFND="`probedisk 2>&1`" IDEDRVSFND="`test-eide 2>&1 | grep "cdrom"`" SELECTIONS="`echo "$DRIVESFND" | grep '^/dev/' | grep -i "cd" | grep -i "rom" | cut -f 1,3 -d "|" | tr " " "_" | tr "|" " " | tr '$' "_"`" BURNERDRV="`Xdialog --left --title "Puppy2 simple CD remaster" --stdout --menubox "This remaster program needs to read some files off the current live-CD. So, you need to choose a CD/DVD drive, and it must also be a burner drive so that the files created by this program can be burnt to a new CD/DVD. Choose the CD/DVD drive..." 0 48 4 $SELECTIONS 2> /dev/null `" [ ! $? -eq 0 ] && exit [ "$BURNERDRV" = "" ] && exit BURNERDRV="`echo -n "$BURNERDRV" | cut -f 3 -d '/'`" echo "BURNERDRV=$BURNERDRV" CDMNTPT="`mount | grep "/dev/$BURNERDRV" | tr -s " " | cut -f 3 -d " "`" if [ ! "$CDMNTPT" = "" ];then if [ ! -f $CDMNTPT/initrd.gz ];then fuser -k -m /dev/$BURNERDRV sync umount /dev/$BURNERDRV 2> /dev/null if [ ! $? -eq 0 ];then Xdialog --title "ERROR" --msgbox "Mounted CD, get rid of it before running this program!" 0 0 exit fi CDMNTPT="" fi fi if [ "$CDMNTPT" = "" ];then while [ 1 ];do Xdialog --title "Puppy2 simple CD remaster" --msgbox "Please insert the current Puppy live-CD into drive $BURNERDRV. Then click OK..." 0 0 #now mount it... CDMNTPT="/mnt/$BURNERDRV" mkdir /mnt/$BURNERDRV 2> /dev/null mount -t iso9660 /dev/$BURNERDRV /mnt/$BURNERDRV [ $? -eq 0 ] && break done fi #now get the files off it... #firstly need working place to write to... WKGMNTPT="`mount | grep "/dev/$WKGPART" | tr -s " " | cut -f 3 -d " "`" [ "$WKGMNTPT" = "/initrd/pup_rw" ] && WKGMNTPT="/" if [ "$WKGMNTPT" = "" ];then WKGFS="`echo "$SCHOICES" | grep "^$WKGPART" | cut -f 2 -d ':' | cut -f 2 -d " "`" [ "$WKGFS" = "msdos" ] && WKGFS="vfat" mkdir /mnt/$WKGPART 2> /dev/null mount -t $WKGFS /dev/$WKGPART /mnt/$WKGPART fi Xdialog --title "Puppy2 simple CD remaster" --msgbox "Copying files from CD to /mnt/$WKGPART/puppylivecdbuild/, please wait..." 0 0 & XPID=$! rm -rf /mnt/$WKGPART/puppylivecdbuild #precaution mkdir /mnt/$WKGPART/puppylivecdbuild #now copy the files... sync cp $CDMNTPT/isolinux.bin /mnt/$WKGPART/puppylivecdbuild/ sync cp $CDMNTPT/isolinux.cfg /mnt/$WKGPART/puppylivecdbuild/ sync cp $CDMNTPT/boot.msg /mnt/$WKGPART/puppylivecdbuild/ 2> /dev/null sync cp $CDMNTPT/goofy.16 /mnt/$WKGPART/puppylivecdbuild/ 2> /dev/null sync cp $CDMNTPT/vmlinuz /mnt/$WKGPART/puppylivecdbuild/ sync cp $CDMNTPT/initrd.gz /mnt/$WKGPART/puppylivecdbuild/ sync umount /dev/$BURNERDRV 2> /dev/null kill $XPID Xdialog --left --title "Puppy2 simple CD remaster" --msgbox "Creating the pup_$PUPPYVERSION.sfs file in /mnt/$WKGPART/puppylivecdbuild/. This can take quite a long time, so please wait.... and wait... Note, no need to click the OK button, as this window will disappear when pup_$PUPPYVERSION.sfs is finally created. Please wait..." 0 0 & XPID=$! #create new pup_xxx.sfs file... #problem, as want everything under /, but not /initrd, nor anything mounted in /mnt mkdir /puppylivecdbuild 2> /dev/null #dummy, only used if wkg partition is the tmpfs. DIRHOME="" [ -d /home ] && DIRHOME="/home" [ -d /sys ] && DIRSYS="/sys" rm -f /mnt/$WKGPART/puppylivecdbuild/pup_$PUPPYVERSION.sfs 2> /dev/null sync #note, /pup_$PUPPYVERSION.sfs is not normally there, i relocated it to a separate tmpfs, #however have not yet done that for multisession-cd/dvd (PUPMODE=77)... #note, /home could be in underdog linux... mksquashfs / /mnt/$WKGPART/puppylivecdbuild/pup_$PUPPYVERSION.sfs -e /etc /proc /initrd /var /tmp /archive /mnt /root /puppylivecdbuild $DIRHOME $DIRSYS /pup_$PUPPYVERSION.sfs sync #add pristine folders (out of current pup_xxx.sfs)... mksquashfs /initrd/pup_ro2/proc /mnt/$WKGPART/puppylivecdbuild/pup_$PUPPYVERSION.sfs -keep-as-directory sync mksquashfs /initrd/pup_ro2/tmp /mnt/$WKGPART/puppylivecdbuild/pup_$PUPPYVERSION.sfs -keep-as-directory sync mksquashfs /initrd/pup_ro2/mnt /mnt/$WKGPART/puppylivecdbuild/pup_$PUPPYVERSION.sfs -keep-as-directory sync kill $XPID #######START WORKING ON /root####### rm -rf /tmp/root 2> /dev/null #do some work on /root before add it to the squashfs... cp -a /initrd/pup_ro2/root /tmp/root #pristine /root #copy all of my-applications/ cp -af /root/my-applications/* /tmp/root/my-applications/ #some dotpups get installed here... cp -af /root/my-roxapps /tmp/root/ #window manager config files... cp -af /root/.jwmrc /tmp/root/ cp -af /root/.fvwm95rc /tmp/root/ cp -af /root/.icewm/menu /tmp/root/.icewm/ #rox desktop settings... cp -af /root/Choices/ROX-Filer/PuppyPin /tmp/root/Choices/ROX-Filer/ cp -af /root/Choices/ROX-Filer/globicons /tmp/root/Choices/ROX-Filer/ #this may have been modified for a different w.m... cp -af /root/.xinitrc /tmp/root/ #also this... [ -f /root/.xset.sh ] cp -af /root/.xset.sh /tmp/root/ #TODO think need to do this for /var also... #.packages/ .files, copy any files installed to /root... echo -n "" > /tmp/allpkgs.files for ONEPKG in `ls -1 /root/.packages/*.files 2>/dev/null | tr "\n" " "` do for ONEFILE in `cat $ONEPKG | grep '^/root/' | tr "\n" " "` do DIRNAME="`dirname $ONEFILE`" mkdir -p $DIRNAME cp -f $ONEFILE /tmp$DIRNAME/ done done #modify /root/.packages/ files, as all installed packages are now part of the new cd... #integrity check of /root/.packages/alienpackages.txt... if [ -s /root/.packages/alienpackages.txt ];then ERRLINE="`cat /root/.packages/alienpackages.txt | grep -v '^".\+" ".\+" .\+ ".\+" \\'`" if [ ! "$ERRLINE" = "" ];then xmessage -bg '#ff8080' -title "ERROR ERROR" "The following line(s) in /root/.packages/alienpackages.txt has incorrect syntax and has been removed: $ERRLINE Please advise the package author that he/she has stuffed up! Note, this remaster-CD program can still continue, click button..." fi cat /root/.packages/alienpackages.txt | grep '^".\+" ".\+" .\+ ".\+" \\' > /tmp/alienpackagesxxx sync cp -f /tmp/alienpackagesxxx /root/.packages/alienpackages.txt fi #any entries in livepackages.txt now "on", transferred to packages.txt... rm -rf /tmp/root/.packages/* echo -n "" > /tmp/root/.packages/packages.txt cp /root/.packages/buildvariables /tmp/root/.packages/ #tricky, packages.txt lines have "\" on ends, which stuffs up the read... cat /root/.packages/packages.txt | tr "\\" "|" | while read ONELINE do [ "$ONELINE" = "" ] && continue #precaution, blank line. ONEPKG="^\"`echo -n "$ONELINE" | cut -f 2 -d '"'`\"" #if alien package with same name, let it override... if [ -s /root/.packages/alienpackages.txt ];then [ ! "`cat /root/.packages/alienpackages.txt | grep "$ONEPKG"`" = "" ] && continue fi NEWLINE="`cat /root/.packages/livepackages.txt 2> /dev/null | grep "$ONEPKG" | grep '" on "'`" if [ "$NEWLINE" = "" ];then echo "$ONELINE" | tr "|" "\\" >> /tmp/root/.packages/packages.txt else echo "$NEWLINE" >> /tmp/root/.packages/packages.txt fi done #also handle any alien packages (dotpups will be)... if [ -s /root/.packages/alienpackages.txt ];then cat /root/.packages/alienpackages.txt >> /tmp/root/.packages/packages.txt sort -u /tmp/root/.packages/packages.txt > /tmp/packagesxxx cp -f /tmp/packagesxxx /tmp/root/.packages/packages.txt fi Xdialog --left --title "Puppy simple remaster CD" --msgbox "This program has created folder /tmp/root, which has everything that is now going to be added as /root in the pup_$PUPPYVERSION.sfs file. This is mostly 'pristine', as obviously you do not want all your cache files, temp files, email files, and other working/temporary files to be burnt onto the CD. However, if you are familiar with the workings of Puppy, you might like to take a look at /tmp/root right now, and possibly add anything that you want from /root (or remove something!) (if you think that this program has missed out something important that should be burnt into /root on the CD, please let me know -- Barry Kauler) After examining /tmp/root, click 'Ok' to add /root in pup_$PUPPYVERSION.sfs file..." 0 0 sync mksquashfs /tmp/root /mnt/$WKGPART/puppylivecdbuild/pup_$PUPPYVERSION.sfs -keep-as-directory sync rm -rf /tmp/root #######END WORKING ON /root####### #######START WORKING ON /etc####### rm -rf /tmp/etc 2> /dev/null #do some work on /etc before add it to the .sfs... cp -a /initrd/pup_ro2/etc /tmp/etc #pristine /etc. #maybe this has been modified... cp -af /etc/ld.so.conf /tmp/etc/ #.packages/ .files, copy any files installed to /etc... echo -n "" > /tmp/allpkgs.files for ONEPKG in `ls -1 /root/.packages/*.files 2>/dev/null | tr "\n" " "` do for ONEFILE in `cat $ONEPKG | grep '^/etc/' | tr "\n" " "` do DIRNAME="`dirname $ONEFILE`" mkdir -p $DIRNAME cp -f $ONEFILE /tmp$DIRNAME/ done done sync #what about settings for a particular pc?... MSG1="Hardware customisation was not chosen." Xdialog --left --title "Puppy simple remaster CD" --yesno "Have created the /etc directory for the new pup_$PUPPYVERSION.sfs file. It is in a 'pristine' state, but you can choose to customise it. Do you want to add customisations for your hardware? Examples are mouse, keyboard, video. But, if you answer 'Yes' here, the live-CD will be preconfigured for your PC only. Therefore, it is best to answer 'No' if you want to boot the new live-CD on different PCs. Click 'Yes' button to customise /etc... Click 'No' button not to customise (recommended)..." 0 0 if [ $? -eq 0 ];then cp -af /etc/codepage /tmp/etc/ cp -af /etc/fontmap /tmp/etc/ cp -af /etc/keyboardtype /tmp/etc/ cp -af /etc/keymap /tmp/etc/ cp -af /etc/mousebuttons /tmp/etc/ cp -af /etc/mousedevice /tmp/etc/ cp -af /etc/videomode /tmp/etc/ cp -af /etc/eth0mode /tmp/etc/ cp -af /etc/eth1mode /tmp/etc/ cp -af /etc/resolv.conf /tmp/etc/ rm -f /tmp/etc/localtime #a symlink cp -af /etc/localtime /tmp/etc/ cp -af /etc/TZ /tmp/etc/ cp -af /etc/cdburnerdevice /tmp/etc/ cp -af /etc/dvddevice /tmp/etc/ cp -af /etc/modemdevice /tmp/etc/ cp -af /etc/securetelnetrc /tmp/etc/ cp -af /etc/modules.conf /tmp/etc/ cp -af /etc/modprobe.conf /tmp/etc/ cp -af /etc/rdesktoprc /tmp/etc/ cp -af /etc/windowmanager /tmp/etc/ cp -af /etc/xextraoptions /tmp/etc/ cp -af /etc/X11/xorg.conf /tmp/etc/X11 MSG1="These files were customised in /etc: codepage fontmap keyboardtype keymap mousebuttons mousedevice videomode eth0mode eth1mode resolv.conf localtime TZ cdburnerdevice dvddevice modemdevice securetelnetrc modprobe.conf rdesktoprc windowmanager xextraoptions X11/xorg.conf" fi #some files to always copy... cp -af /etc/Puppybackgroundcolor /tmp/etc/ cp -af /etc/Puppybackgroundpicture /tmp/etc/ #TODO: other gtk and jwm customisations. Xdialog --left --title "Puppy simple remaster CD" --msgbox "$MSG1 If you know what you are doing, you can now modify any files in /tmp/etc folder. This is just about to be added to /etc in the .sfs file. Do anything you want before clicking 'Ok'. (If this program has missed something important, let me know -- Barry Kauler) Click 'Ok' to add /etc in pup_$PUPPYVERSION.sfs file..." 0 0 sync mksquashfs /tmp/etc /mnt/$WKGPART/puppylivecdbuild/pup_$PUPPYVERSION.sfs -keep-as-directory sync rm -rf /tmp/etc #######END WORKING ON /etc####### #######START WORKING ON /var####### rm -rf /tmp/var 2> /dev/null cp -a /initrd/pup_ro2/var /tmp/var #pristine var #.packages/ .files, copy any files installed to /var... echo -n "" > /tmp/allpkgs.files for ONEPKG in `ls -1 /root/.packages/*.files 2>/dev/null | tr "\n" " "` do for ONEFILE in `cat $ONEPKG | grep '^/var/' | tr "\n" " "` do DIRNAME="`dirname $ONEFILE`" mkdir -p $DIRNAME cp -f $ONEFILE /tmp$DIRNAME/ done done sync sync mksquashfs /tmp/var /mnt/$WKGPART/puppylivecdbuild/pup_$PUPPYVERSION.sfs -keep-as-directory sync rm -rf /tmp/var #######END WORKING ON /var####### #edit isolinux.cfg... ISOLINUXCFG="`cat /mnt/$WKGPART/puppylivecdbuild/isolinux.cfg`" #small tweaks, like acpi=on, ide=nodma... Xdialog --left --title "Puppy simple remaster CD" --yesno "Almost ready to burn the CD! All the files that will be burnt to CD are in /mnt/$WKGPART/puppylivecdbuild/. The final thing that you may want to do is edit isolinux.cfg. It has this: $ISOLINUXCFG PMEDIA parameter is a hint to Puppy what media you are booting the live-CD from. 'idecd' is the normal internal CD/DVD drive. Other options are: usbflash usbhd usbcd ideflash idehd idecd idezip satahd scsihd scsicd but, since this program is remastering the CD, restrict choices to one of the 'cd' options. PKEYS is the default keyboard layout. Example: 'PKEYS=us' Choices are: be br cf de dk es fi fr gr hu it jp no pl ru se uk us If you need more choices, the Keyboard Wizard has more, after bootup. You may also add any kernel parameters. Some PCs require 'acpi=off' to boot properly (also gives fan, temperature monitoring). (If answer 'Yes', an editor will appear, must exit editor before this program will continue) Click 'Yes' button to edit isolinux.cfg..." 0 0 if [ $? -eq 0 ];then #leafpad /mnt/$WKGPART/puppylivecdbuild/isolinux.cfg gtk-shell -t "/mnt/$WKGPART/puppylivecdbuild/isolinux.cfg" -ef "/mnt/$WKGPART/puppylivecdbuild/isolinux.cfg" sync fi #build new iso file, or direct burn to cd... #to save space, burn direct from /mnt/$WKGPART/puppylivecdbuild/ to cd... Xdialog --left --title "Puppy simple remaster CD" --msgbox "All the files that will be burnt to CD/DVD are in /mnt/$WKGPART/puppylivecdbuild/. As the working partition may have limited space (for example, you are using a USB pen drive), these files are burnt direct to CD/DVD, rather than create an intermediary iso file. If you do need an iso file, you can copy it from the CD afterward (dd if=/dev/$BURNERDRV of=puppy.iso seek=0 bs=32k). Click close-box on window to quit program at this point (leaving /mnt/$WKGPART/puppylivecdbuild/ files in existence, and /dev/$WKGPART mounted on /mnt/$WKGPART) Click 'Ok' button to burn to CD/DVD..." 0 0 [ ! $? -eq 0 ] && exit #now for the actual burn... CDCHOICE="`Xdialog --left --stdout --title "Puppy simple remaster CD" --menubox "Please choose the media to burn to. The burner drive is /dev/$BURNERDRV, and obviously it must be able to burn a DVD if you want to burn a DVD! Note: a shortcoming of current version of this program is may fail to burn to a real (not emulated) SCSI CD burner drive. Note, if you want to create an iso file that can be used for multisession CD or DVD, I recommend that you burn to DVD now, then later use the 'dd' program to create an iso file: # dd if=/dev/$BURNERDRV of=puppy.iso seek=0 bs=32k PLEASE INSERT THE NEW CD OR DVD RIGHT NOW, THEN CHOOSE FROM MENU..." 0 0 4 CD-R "New blank recordable CD" DVD-R "New blank DVD-R (not +R, -RW, +RW)"`" echo '#!/bin/sh' > /tmp/new2cd.sh if [ "`echo "$CDCHOICE" | grep 'DVD'`" = "" ];then #burn to CD... echo "mkisofs -D -R -quiet -b isolinux.bin -c boot.cat -no-emul-boot -boot-load-size 4 -boot-info-table /mnt/$WKGPART/puppylivecdbuild/ | cdrecord -multi -tao -pad -data -v speed=4 gracetime=2 dev=ATAPI:/dev/$BURNERDRV -" >> /tmp/new2cd.sh else echo "growisofs -speed=4 -Z $CDR -R -D -quiet -b isolinux.bin -c boot.cat -no-emul-boot -boot-load-size 4 -boot-info-table /mnt/$WKGPART/puppylivecdbuild/" >> /tmp/new2cd.sh fi echo 'echo -n "Finished. Press ENTER key to continue: "' >> /tmp/new2cd.sh echo 'read nippi' >> /tmp/new2cd.sh chmod 755 /tmp/new2cd.sh rxvt -bg orange -title "Puppy simple remaster CD" -e /tmp/new2cd.sh sync rm -rf /puppylivecdbuild rm -rf /mnt/$WKGPART/puppylivecdbuild sync umount /dev/$WKGPART eject /dev/$BURNERDRV Xdialog --left --title "Puppy simple remaster CD" --msgbox "You should now have a new custom Puppy live-CD! WARNING: There is a tricky situation here, as all the installed packages (DotPups and PupGets, plus anything else that you may have installed, have all been burnt to CD/DVD (plus .sfs extension files). But, they are still installed in the current pup_save.3fs, the Puppy persistent storage file (where all your stuff gets saved, so it is there next time Puppy is booted). All those files are duplicated, but will that do any harm if you boot the new CD? ...should be okay, but I recommend that you uninstall as much as possible right now, before booting the new CD. Note, do not uninstall them after booting the new CD as that will also 'delete' the packages burnt onto the CD. But, you do not even know if your new CD works, perhaps it is best if you boot it to confirm it works. Then, boot the old CD again, and delete all the packages, get rid of .sfs extension files also. Or, easiest and cleanest option, boot another operating system, or an older Puppy multisession CD, and rename the pup_save.3fs file (you should not do this while it is in use, hence the advice to boot some other OS that does not use it) -- then boot your new live-CD. I do not want this warning to get to confusing, but if you had used a multi- session CD when running this program, or run Puppy totally in RAM, then a pup_save.3fs file is not used. If it exists on the hard drive, you could rename it. Then when boot the new live-CD, no existing pup_save.3fs to mess things up. " 0 0 ####THE END######