2.17 puppy not booting when pup_217.sfs not in /

Please post any bugs you have found
Post Reply
Message
Author
mochuk
Posts: 1
Joined: Fri 14 Sep 2007, 00:02

2.17 puppy not booting when pup_217.sfs not in /

#1 Post by mochuk »

Puppy 2.17, usbflash, frugal, all files located in /boot/puppy

Also with using the psubdir Variable (psubdir=boot/puppy), puppy is not booting, because it can't find the file pup_217.sfs.
The Problem is the function loadpupsfsfunc() in /initrd/sbin/init. It tries to get /pup_217.sfs instead of /boot/puppy/pup_217.sfs:

Code: Select all

SIZEPUPSFSK=`du ${1}/$NAMEPUPSFS | cut -f 1`
...
cp -f ${sfsmntpt}/$NAMEPUPSFS /mnt/tmpfs/
...
losetup /dev/loop0 ${sfsmntpt}/$NAMEPUPSFS
Because pup_217.sys ($NAMEPUPSFS) is not in / this attempts will fail.
A working solution is to extract the subdir from the variable "$PUPSFS", so that pup_217.sfs is found:

Code: Select all

sfssubdir="`echo -n "$PUPSFS" | cut -f 3 -d ','`" 
   sfssubdir=${sfssubdir%/*}  #extract dirname
   sfssubdir=${sfssubdir#/}   #strip trailing slash
...
SIZEPUPSFSK=`du ${sfsmntpt}/${sfssubdir}/$NAMEPUPSFS | cut -f 1`
...
cp -f ${sfsmntpt}/${sfssubdir}/$NAMEPUPSFS /mnt/tmpfs/
...
losetup /dev/loop0 ${sfsmntpt}/${sfssubdir}/$NAMEPUPSFS

ICPUG
Posts: 1308
Joined: Mon 25 Jul 2005, 00:09
Location: UK

#2 Post by ICPUG »

Interesting work Mochuk. I too looked at the init script when Puppy 2.17 did not boot as I would like. It is recognised that there are a number of bugs in the script as it has grown over time.

The next release of Puppy, 3.00, will start afresh with a new init script. Barry has also said it will boot when the Puppy files are in a subdirectory, (at the first level only). The alpha release (2.20) can be made to work this way.

I've stopped looking at the 2.17 script now and awaiting the new release, when I can peruse the new script.

ICPUG

Post Reply