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, 11:08
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 2 of 2 [27 Posts]   Goto page: Previous 1, 2
Author Message
npierce

Joined: 28 Dec 2009
Posts: 858

PostPosted: Thu 02 May 2013, 16:43    Post subject:  

You're welcome.

I am happy to read that you got it working. Smile
Back to top
View user's profile Send private message 
Ghost Dog


Joined: 27 Jan 2012
Posts: 108

PostPosted: Fri 13 Sep 2013, 08:40    Post subject:  

Here's something weird:

If I make the first partition 1350 mb:
Code:

#create 256M empty file...
   dd if=/dev/zero of=${WKGPATH}/image256m bs=1024 count=1382400

...it works great. But if I make it another 512mb bigger, it suffers from the same problem as before - the second partition is created with the remaining space, but is unmountable.

Code:
sh-4.1# mount /dev/sdf2 /mnt/sdf2
mount: you must specify the filesystem type

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

Joined: 28 Dec 2009
Posts: 858

PostPosted: Fri 13 Sep 2013, 17:44    Post subject:  

Does partition 1 seem OK? Does it boot?

What's the output from:
Code:
fdisk -l /dev/sdf
blkid /dev/sdf1
blkid /dev/sdf2
Back to top
View user's profile Send private message 
Ghost Dog


Joined: 27 Jan 2012
Posts: 108

PostPosted: Fri 13 Sep 2013, 22:38    Post subject:  

It boots, and the first partition seems to work normally.

Code:
sh-4.1# fdisk -l /dev/sdf

Disk /dev/sdf: 4089 MB, 4089446400 bytes
126 heads, 62 sectors/track, 1022 cylinders, total 7987200 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

   Device Boot      Start         End      Blocks   Id  System
/dev/sdf1   *          32     3786239     1893104    b  W95 FAT32
/dev/sdf2         3786240     7987199     2100480    b  W95 FAT32
sh-4.1# blkid /dev/sdf1
/dev/sdf1: UUID="5233-BBCE" TYPE="vfat"
sh-4.1# blkid /dev/sdf2
/dev/sdf1: UUID="5233-BBCE" TYPE="vfat"
/dev/sdf: UUID="5233-BBCE" TYPE="vfat"
[and a few entries for my partitions on sda... nothing about sdf2]

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

Joined: 28 Dec 2009
Posts: 858

PostPosted: Sat 14 Sep 2013, 17:08    Post subject:  

Ghost Dog wrote:
Code:
sh-4.1# blkid /dev/sdf2
/dev/sdf1: UUID="5233-BBCE" TYPE="vfat"
/dev/sdf: UUID="5233-BBCE" TYPE="vfat"
[and a few entries for my partitions on sda... nothing about sdf2]

I was going to say that the second partition must be quite corrupt for blkid to be finding information about the first partition on it, and severely corrupt if it is finding information about your hard drive on it. But I used losetup to associate a file full of zeros with a loop device and tried blkid with it. Sure enough, it reports information on all block devices. So apparently that is a quirk of blkid: when given an unformatted device, it throws up its hands and gives information about every other block device it can find. Smile

So it appears that for some reason the second partition just isn't getting formatted, or is being incorrectly formatted, which is no surprise. The question is why.

I notice that /dev/sdf1 has only 1893104 blocks, which is only 1848.734 MiB, which is significantly smaller than the 1350 + 512 = 1862 that you were aiming for. (I think makebootfat may use 32 blocks for the stuff before the first partition, but that only accounts for 0.031 MiB.) So I am guessing that bootflash didn't find enough temporary space to make partition 1 the size that you asked for. (It actually creates the image in a temporary file on an already mounted filesystem (in /tmp/, /root/, or /mnt/home/) before moving it to your flash drive.)

As you know, normally bootflash creates a 256 MiB empty file. It searches for space containing 300 MiB (to allow a little room to breathe). You will see three lines in the script like this:
Code:
 if [ $FREEM -lt 300 ];then

You should change the "300" in those lines to something a little bigger than the size of the file you are creating. (In this case "2000" should probably be sufficient.)

If you are not running a full install, my guess is that you have a PC with 2 GiB, and the layered filesytem in RAM had enough room to create a 1350 MiB file, but not an 1862 MiB file. But bootflash was only looking for 300 MiB of space, which it found in /tmp/ so it tried to create the file in /tmp/.

If that is what happened, then changing those three lines will allow bootflash to keep looking until it finds sufficient space at /mnt/home/, assuming that /mnt/home is a symlink to a mounted partition with sufficient space.

BUT . . .

But this may not be your only problem. While it is easy to see why the above situation could result in partition 1 being smaller than expected, I see no clear reason why it would prevent partition 2 from being formatted correctly. Perhaps mkdosfs needed some space to work and couldn't find any. Anyway, when RAM gets filled up, all bets are off as to what happens.

So changing those three lines may or may not fix partition 2, but let's eliminate that problem first, then we can revisit the lack of proper format for partition 2, if that problem still exists.
Back to top
View user's profile Send private message 
Ghost Dog


Joined: 27 Jan 2012
Posts: 108

PostPosted: Sat 14 Sep 2013, 23:14    Post subject:  

Still the same, by the looks of it:

Code:
sh-4.1# fdisk -l /dev/sdf

Disk /dev/sdf: 4089 MB, 4089446400 bytes
126 heads, 62 sectors/track, 1022 cylinders, total 7987200 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

   Device Boot      Start         End      Blocks   Id  System
/dev/sdf1   *          32     3884159     1942064    b  W95 FAT32
/dev/sdf2         3884160     7987199     2051520    b  W95 FAT32
sh-4.1# blkid /dev/sdf1
/dev/sdf1: UUID="5235-232F" TYPE="vfat"
sh-4.1# blkid /dev/sdf2
/dev/sdf1: UUID="5235-232F" TYPE="vfat"
/dev/sda3: UUID="c70dd211-2aa3-4aa5-b6bd-6204f6b662a1" TYPE="swap"
/dev/sda1: UUID="702f5e62-7e1e-4eee-952d-85c04929f1a9" TYPE="ext3"
/dev/sda2: UUID="bcd58708-8b3d-4552-b2d8-15da03b76e3b" TYPE="ext3"
/dev/sdf: UUID="5235-232F" TYPE="vfat"


I'm running a full install, so it shouldn't be a RAM problem.

Like I said, weird. Smile

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


Joined: 27 Jan 2012
Posts: 108

PostPosted: Sat 14 Sep 2013, 23:50    Post subject:  

Just as an experiment, I increased the size of partition 1 to a full 2 gb and the "if [ $FREEM -lt 300 ];then" lines to 2100 mb to see if partition 2 would format. But nope.
_________________
The Way of the Samurai
Back to top
View user's profile Send private message 
npierce

Joined: 28 Dec 2009
Posts: 858

PostPosted: Mon 16 Sep 2013, 08:12    Post subject:  

Well, it looks like the change allowed partition 1 to be bigger.

Before:
Code:
   Device Boot      Start         End      Blocks   Id  System
/dev/sdf1   *          32     3786239     1893104    b  W95 FAT32

After:
Code:
   Device Boot      Start         End      Blocks   Id  System
/dev/sdf1   *          32     3884159     1942064    b  W95 FAT32

But that didn't solve the partition 2 problem.

Ghost Dog wrote:
I'm running a full install, so it shouldn't be a RAM problem.

OK, that's good to know.

Try formating partition 2 manually with the following command. (If the flash drive you're testing isn't still at /dev/sdf, you will of course want to modify the command to prevent any nasty surprises.):
Code:
mkdosfs -F 32 -n storage /dev/sdf2

Does that give any error messages?

If not, is it now mountable? Does blkid recognise it?
Back to top
View user's profile Send private message 
Ghost Dog


Joined: 27 Jan 2012
Posts: 108

PostPosted: Mon 16 Sep 2013, 08:54    Post subject:  

Yep, that fixes it!

Code:
sh-4.1# blkid /dev/sdf2
/dev/sdf2: LABEL="storage" UUID="1FCB-C3D9" TYPE="vfat"

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

Joined: 28 Dec 2009
Posts: 858

PostPosted: Mon 16 Sep 2013, 11:43    Post subject:  

Good!

That's the same command that the bootflash script uses, so it is still a bit of a mystery that it doesn't get done by the script. But you got the partition fixed, which is what counts. Glad to hear it.
Back to top
View user's profile Send private message 
Ghost Dog


Joined: 27 Jan 2012
Posts: 108

PostPosted: Mon 16 Sep 2013, 16:11    Post subject:  

No, what counts is that YOU'RE AWESOME.

I really appreciate the time you took to help me with this.

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

Joined: 28 Dec 2009
Posts: 858

PostPosted: Tue 17 Sep 2013, 08:58    Post subject:  

Glad to help, and gladder when its appreciated. Thanks.
Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 2 of 2 [27 Posts]   Goto page: Previous 1, 2
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.0823s ][ Queries: 12 (0.0071s) ][ GZIP on ]