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 Mon 01 Sep 2014, 10:36
All times are UTC - 4
 Forum index » House Training » Users ( For the regulars )
How to make ComboFormat partition larger than a gig?
Moderators: Flash, Ian, JohnMurga
Post new topic   Reply to topic View previous topic :: View next topic
Page 1 of 2 [27 Posts]   Goto page: 1, 2 Next
Author Message
Ghost Dog


Joined: 27 Jan 2012
Posts: 108

PostPosted: Sun 21 Apr 2013, 04:57    Post subject:  How to make ComboFormat partition larger than a gig?
Subject description: (Solved)
 

Hi,

I'm trying to adjust the value of "count" in line 323 so that the sdb4 partition (comboformat) is larger than a gig, like so:

Code:
dd if=/dev/zero of=$(WKGPATH)/image256m bs=1024 count 1132544


I want to do this so that I can have space for a savefile in the "system" partition.

But I find that if I set any value larger than one gigabyte that it actually formats sdb1 as that size, and fails to create the sdb4 partition at all.

Does anybody know a way I can get around this problem?

Thanks.

_________________
The Way of the Samurai

Last edited by Ghost Dog on Mon 29 Apr 2013, 07:21; edited 1 time in total
Back to top
View user's profile Send private message 
Ghost Dog


Joined: 27 Jan 2012
Posts: 108

PostPosted: Tue 23 Apr 2013, 00:19    Post subject:  

It's very important, you see, because putting a save file on a different partition confuses apps looking for /home. For instance, sfs_load's queue gets all messed up.
_________________
The Way of the Samurai
Back to top
View user's profile Send private message 
Ghost Dog


Joined: 27 Jan 2012
Posts: 108

PostPosted: Wed 24 Apr 2013, 19:55    Post subject:  

I noticed some code later on in the script that says something about one gig, not sure what it means. All I know is that if I make partition 4 bigger than a gig, it doesn't even create partition 4, and just makes partition 1 that size.

Help!!!!!

_________________
The Way of the Samurai
Back to top
View user's profile Send private message 
Flash
Official Dog Handler


Joined: 04 May 2005
Posts: 11031
Location: Arizona USA

PostPosted: Wed 24 Apr 2013, 21:17    Post subject:  

I haven't the slightest idea what you're talking about, so I feel fully qualified to ask if this would be any help. Laughing
Back to top
View user's profile Send private message 
Ghost Dog


Joined: 27 Jan 2012
Posts: 108

PostPosted: Wed 24 Apr 2013, 23:39    Post subject:  

No Flash, I'm talking about the BootFlash script which prepares a usb stick for booting Puppy. I can't seem to make it create the "partition 4" (which contains all of your system files) bigger than a gig. I was hoping someone understood the code better than me, and could help me fix it.
_________________
The Way of the Samurai
Back to top
View user's profile Send private message 
Ted Dog


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

PostPosted: Thu 25 Apr 2013, 00:41    Post subject:  

I am drawing a blank on this term ComboFormat, sadly I've haven't gone thru every nook and cranny in puppylinux since version 2.17

Could you give us the full path string to the script you are asking about also let us know if this is one of the many special versions of official puppylinux like wary,quirky,racy, etc, 'blessed' spin-offs (slacko, Fatdog64, etc), or something someone tweaked and gave that a new name (oh, so, so many Rolling Eyes )...
Back to top
View user's profile Send private message 
Ghost Dog


Joined: 27 Jan 2012
Posts: 108

PostPosted: Thu 25 Apr 2013, 09:23    Post subject:  

I've attached the Bootflash script. It's one of Barry's official scripts. I'm trying to tweak it so as to have more than one gig for the "system partition" (Partition 4) in ComboFormat.

I see something about 1 gb on line 277, but I'm not sure that's related.
bootflash.gz
Description  Bootflash script
gz

 Download 
Filename  bootflash.gz 
Filesize  7.84 KB 
Downloaded  116 Time(s) 

_________________
The Way of the Samurai
Back to top
View user's profile Send private message 
Flash
Official Dog Handler


Joined: 04 May 2005
Posts: 11031
Location: Arizona USA

PostPosted: Thu 25 Apr 2013, 10:32    Post subject:  

But it might also help if you told us where you found it; what is the path to its location in which version of Puppy?
Back to top
View user's profile Send private message 
Ghost Dog


Joined: 27 Jan 2012
Posts: 108

PostPosted: Thu 25 Apr 2013, 11:12    Post subject:  

/usr/sbin

All versions.

_________________
The Way of the Samurai
Back to top
View user's profile Send private message 
npierce

Joined: 28 Dec 2009
Posts: 858

PostPosted: Fri 26 Apr 2013, 15:01    Post subject:  

As you likely know, when choosing the ComboFormat option for bootflash, you are creating a flash drive capable of being booted on any PC that will boot via USB from a hard disk, ZIP disk, or floppy. It is the requirement of making the flash drive appear as a ZIP disk that is giving you trouble here.

In order to make the flash drive appear as a ZIP disk, bootflash must set the drive geometry to indicate that it has 32 sectors per track and 64 heads. Since the old Cylinder/Head/Sector (CHS) addressing scheme used by the BIOS had a limit of 1024 cylinders, the size of the drive is limited to 1024 * 64 * 32 = 2,097,152 sectors. Since sectors hold 512 bytes, this results in a limit of 512 * 2,097,152 = 1,073,741,824 bytes, or exactly one gibibyte (GiB).

And since the first track is used for stuff like the the master boot record and boot loader code, the size available for your partition is reduced by 32 sectors, so 512 * 2,097,120 = 1,073,725,440 bytes.

I am not aware of any way to make a larger partition and still make it fool some BIOS into thinking that it is a ZIP disk.
Back to top
View user's profile Send private message 
Ghost Dog


Joined: 27 Jan 2012
Posts: 108

PostPosted: Fri 26 Apr 2013, 16:06    Post subject:  

Thank you, npierce!

That's very interesting. For me, it's not as important to have it also be disguised as a zip disk, as to have room for a nice save file. Zip disks are pretty much obsolete now.

Is it possible to remove that functionality (or break it) and keep the rest of the ComboFormat mode?

_________________
The Way of the Samurai
Back to top
View user's profile Send private message 
npierce

Joined: 28 Dec 2009
Posts: 858

PostPosted: Fri 26 Apr 2013, 21:23    Post subject:  

Ghost Dog wrote:
Is it possible to remove that functionality (or break it) and keep the rest of the ComboFormat mode?

Maybe. You could experiment by removing the --zip option from line 328 (of the version of bootflash that you attached).

That would remove the geometry limitation of 64 heads, which would allow for a much bigger partition size.

A side-effect is that it would also remove the ZIP disk requirement that the boot partition be partition 4. So it would revert to partition 1. This means you would have to change line 331 from:
Code:
PUPBOOTPART="${USBDRV}4"

to:
Code:
PUPBOOTPART="${USBDRV}1"

And later, in the section below "#now create partition to fill remaining space on usb drive...", to make that partition 2, not partition 1, you would need to make a change -- perhaps change line 350 from:
Code:
if [ "$RADIO_ISO" = "true" ];then

to:
Code:
if [ "$RADIO_ISO" = "true" ] || [ "$RADIO_ALL" = "true" ];then

Or, while testing, you could just disable that whole section and either ignore any remaining space on the drive, or add a partition manually.

That's just a couple of things I noticed. There could certainly be other changes necessary. I have no extra USB drives kicking around, so have tested none of this. These suggestions come with no guarantee. Smile

As you have already noted, on line 277 Barry has a warning about the FDD flavor: "only choose this for drives no greater than 1GB." Perhaps that warning would also apply to the ComboFormat flavor, since it also allows the flash drive to look like a floppy drive. I don't know, since I don't know the reason for the warning. Would some BIOS faint at the sight of a floppy drive greater than 1GB in size? Maybe yes; maybe no. If you feel like experimenting, try it and see.
Back to top
View user's profile Send private message 
Ghost Dog


Joined: 27 Jan 2012
Posts: 108

PostPosted: Sat 27 Apr 2013, 22:38    Post subject:  

Well, that nearly worked. Smile

After making the changes you suggested, there are now two partitions, sdx1 and sdx2 instead of 1 and 4, with 1 being the large one, and 2 using the remaining space but being unmountable. No ldlinux.sys file, either.

Thanks though. Very Happy

_________________
The Way of the Samurai
Back to top
View user's profile Send private message 
npierce

Joined: 28 Dec 2009
Posts: 858

PostPosted: Sun 28 Apr 2013, 09:03    Post subject:  

You're welcome.

I was a little surprised that it didn't copy the ldlinux.sys file, so I took another look at the script, and think I see the problem.

When it creates a partition to fill the remaining space on the drive, it now correctly creates partition 2, not partition 1, but when it goes to format the partition it still formats partition 1, which wipes out ldlinux.sys and leaves partition 2 unformatted and unmountable.

This is because it uses the ${PUPSAVEPART} variable when formatting. Previously, in the original script, the partition used for the pupsave file was this new partition, so it worked OK. But now, in your modified script, the pupsave file will be on the partition already created by makebootfat, so the code needs to be adjusted.

Change line 364 from:
Code:
mkdosfs -F 32 -n storage /dev/${PUPSAVEPART} #FAT32.

to:
Code:
mkdosfs -F 32 -n storage /dev/${USBDRV}${PARTNUM} #FAT32.

and line 368 from:
Code:
mkdosfs -n storage /dev/${PUPSAVEPART} #FAT16.

to:
Code:
mkdosfs -n storage /dev/${USBDRV}${PARTNUM} #FAT16.

This ensures that the partition that is formatted by mkdosfs is the same as the partition just created.

Good luck.
Back to top
View user's profile Send private message 
Ghost Dog


Joined: 27 Jan 2012
Posts: 108

PostPosted: Mon 29 Apr 2013, 07:20    Post subject:  

I've only tested it on the one computer, but it looks like it works.

Partition 1 has the ldlinux.sys file, Partition 2 takes up the rest of the drive and is mountable, and with Puppy on it, it boots just like it's supposed to.

Thank you so much!
bootflash.gz
Description  Zip disk feature in ComboFormat removed.
gz

 Download 
Filename  bootflash.gz 
Filesize  7.84 KB 
Downloaded  107 Time(s) 

_________________
The Way of the Samurai
Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 1 of 2 [27 Posts]   Goto page: 1, 2 Next
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » House Training » Users ( For the regulars )
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.0828s ][ Queries: 13 (0.0041s) ][ GZIP on ]