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 Fri 01 Aug 2014, 11:58
All times are UTC - 4
 Forum index » House Training » Bugs ( Submit bugs )
Universal Installer Problems
Moderators: Flash, Ian, JohnMurga
Post new topic   Reply to topic View previous topic :: View next topic
Page 1 of 1 [1 Post]  
Author Message
Wheres One


Joined: 21 Nov 2008
Posts: 215

PostPosted: Fri 30 Jul 2010, 16:32    Post subject:  Universal Installer Problems
Subject description: Universal installer fails to install to 1st primary partition when there are 6 logical partitions
 

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:
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:
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.
list.tar.gz
Description  Revision 2
gz

 Download 
Filename  list.tar.gz 
Filesize  1.53 KB 
Downloaded  130 Time(s) 
Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 1 of 1 [1 Post]  
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » House Training » Bugs ( Submit bugs )
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.0528s ][ Queries: 13 (0.0051s) ][ GZIP on ]