Universal Installer Problems

Please post any bugs you have found
Post Reply
Message
Author
User avatar
Wheres One
Posts: 215
Joined: Fri 21 Nov 2008, 23:30

Universal Installer Problems

#1 Post by Wheres One »

Original Post
Wheres One wrote:Having chopped up my hard-drive into multiple partitions to accommodate a good number of distributions, I have encountered an interesting problem with the universal installer. When the number of partitions on the hard-drive is or exceeds ten, the universal installer will fail if you try to install to the first partition. Any number less than ten and everything works perfectly. Running the universal installer from the command-line provides no answers; it simply fails without any error message. Also, the problem does not appear to be tied to a single version of Puppy, as I have experienced it under 4.3.1 and 5.0.1, or any partition type, as you can see from the attached list of scenarios. Neither is the problem one of hardware as I have no other problems with my setup.
Wheres One wrote:Both of the problems we experienced seem to be centered around there being six or more logical partitions (leading to a two digit partition number) which leads me to believe that some part of the universal installer's code doesn't expect a two digit number. I've found that it's easy to repeat: the installer fails to install to sdb1 if there are six logical partitions; take away the sixth, however, and the installer works again. It's something about two digit partition numbers.
npierce wrote:Wheres One, you are absolutely right about two-digit numbers being unexpected.

There are three lines in the script that use grep to search for the device name of the partition. If it searches for the string sda1 it will find both sda1 and sda10 (and sda11, sda12, sda13, sda14, sda15, sda16 . . . if you have them). Naturally, this confuses the script.

Since the device names are followed by colons in the list it is searching, I believe the fix is to include a colon in the search string.

Here is the block of code in puppyinstaller that has the problem:

Code: Select all

else
 DESTPART="`echo "$RETTXT" | grep 'EXIT:' | cut -f 2 -d ':'`"
 DESTFS="`echo "$DRVMSG" | grep "$DESTPART" | cut -f 1 -d ',' | tr -s " " | cut -f 2 -d " "`"
 DESTSIZE="`echo "$DRVMSG" | grep "$DESTPART" | tr -s " " | cut -f 4-5 -d " "`"
 DESTSIZM="`echo -n "$DESTSIZE" | cut -f 1 -d " "`"
 if [ ! "`echo "$DESTSIZE" | grep "GiB"`" = "" ];then
  DESTSIZM="`dc $DESTSIZM 1000 \* p`"
 fi
 IDESTSIZM="`echo -n "$DESTSIZM" | cut -f 1 -d '.'`" #truncate to integer.
 DESTVER="`echo "$DRVMSG" | grep "$DESTPART" | tr -s " " | grep "installed" | cut -f 8 -d " "`"
fi
In the version I have on Puppy 4.3.1, the problem lines are 619, 620, and 626.

Here is the corrected block with a colon added to change grep "$DESTPART" to grep "$DESTPART:" on those three lines:

Code: Select all

else
 DESTPART="`echo "$RETTXT" | grep 'EXIT:' | cut -f 2 -d ':'`"
 DESTFS="`echo "$DRVMSG" | grep "$DESTPART:" | cut -f 1 -d ',' | tr -s " " | cut -f 2 -d " "`"
 DESTSIZE="`echo "$DRVMSG" | grep "$DESTPART:" | tr -s " " | cut -f 4-5 -d " "`"
 DESTSIZM="`echo -n "$DESTSIZE" | cut -f 1 -d " "`"
 if [ ! "`echo "$DESTSIZE" | grep "GiB"`" = "" ];then
  DESTSIZM="`dc $DESTSIZM 1000 \* p`"
 fi
 IDESTSIZM="`echo -n "$DESTSIZM" | cut -f 1 -d '.'`" #truncate to integer.
 DESTVER="`echo "$DRVMSG" | grep "$DESTPART:" | tr -s " " | grep "installed" | cut -f 8 -d " "`"
fi
After making these three changes and running the script it continues to the next dialog instead of exiting. I have not run it all the way to the end since I have no desire to install Puppy on /dev/sda1. If you want to backup your original file, add the three colons, and try it out, that would be great. (If you are uncomfortable with risking your drive to this experiment, and would rather not try this, that's okay too.)

Thanks for taking the time to carefully document your testing of this problem. You should certainly, as you indicated in your original post, report this.
I tried npierce's solution under all the configurations and machines on the attached list and it worked with each.
Attachments
list.tar.gz
Revision 2
(1.53 KiB) Downloaded 214 times

Post Reply