Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Thu 27 Nov 2014, 19:29
All times are UTC - 4
 Forum index » House Training » HOWTO ( Solutions )
Refining puppies remaster function
Moderators: Flash, Ian, JohnMurga
Post new topic   Reply to topic View previous topic :: View next topic
Page 1 of 1 [11 Posts]  
Author Message
RSH


Joined: 05 Sep 2011
Posts: 2420
Location: Germany

PostPosted: Fri 19 Oct 2012, 05:08    Post subject:  Refining puppies remaster function
Subject description: Make a remaster without the need to mount a iso or have a cd in cd drive
 

Hi.

User greengeek did ask if the LazY Puppy Remaster Suite would run in other puppies. Unfortunately it doesn't. So i have made a quick hack to make you able to refine your remaster script (remasterpup2 in /usr/sbin) to make a remaster without the need to mount a iso file or to have a cd in the cd drive.

It will make the remaster from the running system, though it needs all the files, from the iso inside the boot directory (not partition --> works also but needs directory if booting from a separate directory).

I have tested this successful in lucid 528-4 and slacko 5.3.

1. Install the attached .pet. This contains the needed files to be able to tell the remaster script from where to take the files ---> no matter if booted from /mnt/home or /mnt/sda1 or /mnt/sdd3/YourPuppy or what ever your puppy can boot. Link to the .pet is at the end of this post.

2 Open your remaster script and put the following code at the very beginning.
Code:
# get LazY Puppy Bootdirectory
exec /usr/sbin/ceelab/tools/get_boot_dir
sleep .1
. /usr/sbin/ceelab/lp2_sys_data/LP2_BootDir


3. Search for some code like:
Code:
#VIRTUALCD=$(mount -t iso9660|grep '^/dev/loop' | sed -e 's/on[ ].*+//' -e 's/[ ]type[ ]iso9660[ ].*$//')
#MSG="$m_14"
#choice_cdd
#
#CDPATTERN="/dev/$BURNERDRV "
#CDMNTPT="`mount | grep "$CDPATTERN" | tr -s " " | cut -f 3 -d " "`"
#if [ "$CDMNTPT" != "" ];then
#   if [ ! -f $CDMNTPT/initrd.gz ];then
#      # 091212 weird bug, no processes but when run this, x restarts...
#      xFUSER="`fuser -m /dev/$BURNERDRV 2>/dev/null`" #do this first, seems to fix it.
#      [ "$xFUSER" != "" ] && fuser -k -m /dev/$BURNERDRV
#      sync
#      umount /dev/$BURNERDRV 2> /dev/null
#      if [ $? -ne 0 ];then
#         Xdialog --wrap --center  --title "$m_02" --msgbox "$m_15" 0 0
#         go_exit
#      fi
#      CDMNTPT=""
#   fi
#fi
#
#if [ "$CDMNTPT" = "" ];then
#   eval m_16=\"$m_16\"
#   while [ 1 ];do
#      Xdialog --wrap --center  --title "$m_01" --msgbox "$m_16" 0 0
#      [ $? -eq 0  ] || go_exit   # 22jun09
#      # now mount it...
#      CDMNTPT="/mnt/$BURNERDRV"
#      mkdir -p /mnt/$BURNERDRV
#      mount -t iso9660 /dev/$BURNERDRV /mnt/$BURNERDRV
#      [ $? -eq 0 ] && break
#   done
#fi

and comment it out ---> already done in the above code

In LazY Puppy Remaster Skript it is at line 347 ---> in your script it's surely another line number Smile

Search for some code like:
Code:
for F in vmlinuz initrd.gz ${ZDRVSFS} grldr menu.lst '*.xpm' isolinux.bin isolinux.cfg '*.msg' '*.16' '*.HTM*' '*.ICO' '*.INF'
do
   cp $CDMNTPT/$F $WKGMNTPT/$rebuilddir/ 2> /dev/null
   sync
done


Change code:
Code:
cp $CDMNTPT/$F $WKGMNTPT/$rebuilddir/ 2> /dev/null

to
Code:
cp $LP2BDL/$F $WKGMNTPT/$rebuilddir/ 2> /dev/null


If you do mount the boot directory, then the whole iso will be rebuild. If the boot directory is not mounted, it ends with a message about no bootloader was found. Then you'll get only the new created YourPuppy.sfs file.

The above shown code might be different to the code inside your script. I have made lots of specific modifications - can not remember each detail. Laughing

Link to the needed .pet

I have attached the already refined remaster scripts taken from the lucid 528-4 and slacko 5.3 test remasters. These files are fake .gz files. Just rename to remasterpup2 (might be necessary to make executable after download).

Even though I've attached these files, i do recommend to do manually as described above.

RSH
remasterpup2-slacko53.gz
Description 
gz

 Download 
Filename  remasterpup2-slacko53.gz 
Filesize  33.54 KB 
Downloaded  441 Time(s) 
remasterpup2-lucid5284.gz
Description 
gz

 Download 
Filename  remasterpup2-lucid5284.gz 
Filesize  32.57 KB 
Downloaded  447 Time(s) 

_________________
LazY Puppy
RSH's DNA
SARA B.
Back to top
View user's profile Send private message 
RSH


Joined: 05 Sep 2011
Posts: 2420
Location: Germany

PostPosted: Fri 19 Oct 2012, 15:43    Post subject:  

Hi.

I have noticed the three downloads of the attached scripts at first post.

But you did not download the attached .pet (link at end of first post).

This is needed! Otherwise it will not work!

RSH

_________________
LazY Puppy
RSH's DNA
SARA B.
Back to top
View user's profile Send private message 
cimarron

Joined: 30 May 2013
Posts: 120

PostPosted: Thu 13 Jun 2013, 20:21    Post subject:  

Thanks RSH. I was having trouble getting the remasterpup2 script to work with a mounted iso file, and your refinement allowed me to bypass that problem. The one glitch I found (using Lupu 5.1) is that the lines you say to add at the beginning of the script caused it to just stop. But when I added an "&" after your exec line, it worked fine. Like this:

Code:
# get LazY Puppy Bootdirectory
exec /usr/sbin/ceelab/tools/get_boot_dir &
sleep .1
. /usr/sbin/ceelab/lp2_sys_data/LP2_BootDir


It also seems that since you have that line running get_boot_dir at the beginning of the remaster script, there doesn't seem to be any need for running that at every startup. Your .pet puts a script in the Startup folder to run get_boot_dir at each startup. I took that out and your new remaster script still seems to work fine.

It might be worth providing the .pet in this thread (not just the other thread) to make it easier for people to get it.
Back to top
View user's profile Send private message 
Ted Dog


Joined: 13 Sep 2005
Posts: 2474
Location: Heart of Texas

PostPosted: Thu 13 Jun 2013, 23:41    Post subject:  

isolinux.bin copied from a iso image has already been modified by mkiso and will lead to problems booting the remaster. Get a fresh un-modified copy each time, do not reuse isolinux.bin - learn from my mistakes... Confused
Back to top
View user's profile Send private message 
cimarron

Joined: 30 May 2013
Posts: 120

PostPosted: Sat 15 Jun 2013, 09:41    Post subject:  

I've found RSH's modified remaster script useful primarily to rebuild a new Puppy sfs file (without needing a CD) for frugal installs. This remastered sfs can then easily replace the Puppy sfs file on the hard drive or USB stick.

Or building a remastered sfs to install on a new USB stick. And Puppy can also be pretty easily installed in a USB stick without a CD (as long as you have an iso file or Puppy installed on a previous USB stick, to get the files, isolinux.bin not needed). For anyone interested in that, I found good instructions here. Thanks to seperohacker.
Back to top
View user's profile Send private message 
greengeek

Joined: 20 Jul 2010
Posts: 2671
Location: New Zealand

PostPosted: Mon 07 Jul 2014, 05:07    Post subject:  

Ted Dog wrote:
isolinux.bin copied from a iso image has already been modified by mkiso and will lead to problems booting the remaster. Get a fresh un-modified copy each time, do not reuse isolinux.bin - learn from my mistakes... Confused
Hi Ted - where would you recommend getting the fresh isolinux.bin from please? cheers.
Back to top
View user's profile Send private message 
Ted Dog


Joined: 13 Sep 2005
Posts: 2474
Location: Heart of Texas

PostPosted: Mon 07 Jul 2014, 19:42    Post subject:  

pfind for it its inside the syslinux folder where its located on your spin. or extlinux forgot which. I copied my version to where I have a built directory with a static image also have some small scripts to do a md5sum prior to burn do not know why puppylinux does not do so by default. Priceless to use with BluRay data backups of my harddrives (etc one is bootible ) and rolling indexed so I can find stuff saved. Wink
Back to top
View user's profile Send private message 
greengeek

Joined: 20 Jul 2010
Posts: 2671
Location: New Zealand

PostPosted: Mon 07 Jul 2014, 22:35    Post subject:  

Thanks Ted - just to clarify - I think you are saying that some 'isolinux.bin' files are virgin but some other 'isolinux.bin' files are modified during the mkiso process. Do i understand you correctly?

And if that is the case - how will i tell which is a safely usable file? Are you saying that any isolinux.bin that is currently bound up inside an iso should not be reused elsewhere?
cheers
Back to top
View user's profile Send private message 
Ted Dog


Joined: 13 Sep 2005
Posts: 2474
Location: Heart of Texas

PostPosted: Tue 08 Jul 2014, 00:39    Post subject:  

correct it has a master boot record type of offset to actual bootcode it changes based on construction of ISO. The unmodified verson exists until iso made. The unchanged version is In package folder.
Back to top
View user's profile Send private message 
cimarron

Joined: 30 May 2013
Posts: 120

PostPosted: Tue 08 Jul 2014, 09:41    Post subject:  

Maybe it's worth experimenting for yourself, because I've simply copied isolinux.bin from a previous CD to make a remastered CD a number of times, and the new CD has always booted fine, on several different computers.

I've always used shinobar's dir2iso to make the iso. It seems to make it with this command:
Code:
mkisofs -J -D -R $VOLI -o "$z.iso" -b isolinux.bin -c boot.cat -no-emul-boot -boot-load-size 4 -boot-info-table "$t"

And t=`echo "$ISOFILEDIR" | sed "s/\/$//"`

I don't know enough to tell if this addresses Ted Dog's concerns. But it seems to work.
Back to top
View user's profile Send private message 
Ted Dog


Joined: 13 Sep 2005
Posts: 2474
Location: Heart of Texas

PostPosted: Tue 08 Jul 2014, 15:18    Post subject:  

That makeiso line is very very outdated. Will not be able to save session with newer spins due to miss match. Yes copy a used isolinux.bin does work most of the time but only after a fallback since offset is not pointing to correct files by default. Adds time every boot to search for correct file via reading files names in the directory. If there is an error prior to finding correct file it will refuse to boot.
Or worst boot an old copy of file on a unerased area of a rewrite optical drive.
Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 1 of 1 [11 Posts]  
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » House Training » HOWTO ( Solutions )
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0838s ][ Queries: 13 (0.0046s) ][ GZIP on ]