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 Thu 14 Dec 2017, 02:34
All times are UTC - 4
 Forum index » House Training » Users ( For the regulars )
How to resize FAT32 partition from command line?
Moderators: Flash, Ian, JohnMurga
Post new topic   Reply to topic View previous topic :: View next topic
Page 1 of 1 [8 Posts]  
Author Message
did18

Joined: 19 Nov 2014
Posts: 328

PostPosted: Fri 17 Nov 2017, 09:42    Post subject:  How to resize FAT32 partition from command line?  

Hello

I copied a fat 32 image of 2GB on a 32GB usb key.
Of course, there is a lot of empty space on the usb key ...
I would like to extend the partion (and file system) of the copied image to all media.

- I do not want to use GParted.
- I will only want to do it on the command line.

I saw that it existed "fatresize", but this command no longer seems maintained and despite the updates, I always get error messages when I try to use it (segmentation error or other messages which I do not understand very well the meaning (my English is very bad sorry-fortunately google translation exists Wink)

I tried (after updating) the parted command.
Here too it does not seem possible to extend a fat32 partition.

What's in the key is not important (I can easily erase and recreate it with the "dd" command) and it's a test key.

Can you help me solve this problem, if possible with sample orders or other orders to use ...?

Thank you.

Have a good day.
fatresize1.jpg
 Description   
 Filesize   30.65 KB
 Viewed   187 Time(s)

fatresize1.jpg

fatresize2.jpg
Description 
jpg

 Download 
Filename  fatresize2.jpg 
Filesize  15.88 KB 
Downloaded  9 Time(s) 
parted2.jpg
 Description   
 Filesize   50.13 KB
 Viewed   189 Time(s)

parted2.jpg

parted3.jpg
 Description   
 Filesize   38.07 KB
 Viewed   191 Time(s)

parted3.jpg

Back to top
View user's profile Send private message 
Sailor Enceladus

Joined: 22 Feb 2016
Posts: 1326

PostPosted: Fri 17 Nov 2017, 13:57    Post subject:  

Interesting. Which puppy are you using? I have not tried a command line tool to resize partitions (I have always had success with GParted and like the way it shows me what's happening visually) but might try later and show you what version of these command line tools my slacko puppies have. Maybe the partition has to be unmounted first, and maybe the rest of the drive unallocated. I remember when my fat32 partition was over 2GB, scandisk in Dos would always claim the parts beyond 2GB were corrupted, I think I eventually found a scandisk version that worked beyond 2GB - maybe it was a legacy problem from fat16.

edit: Yeah I don't think using command line is a good idea. Better to use GParted that shows you what it's doing.
Back to top
View user's profile Send private message 
did18

Joined: 19 Nov 2014
Posts: 328

PostPosted: Fri 17 Nov 2017, 20:23    Post subject:  

Hello

Sailor Enceladus : Thank you for this quick response...

Apparently, there is also and above all a problem of size ...

Wikipedia states that: "formatting in FAT32 is limited to 32 GiB".
Here as the usb key is 32GB should be appropriate, but with the advent of larger media, it will resolve to go through another type of format (ntfs or the excellent ext2, 3, 4) that manage better the rights, are less expensive in terms of resources and above all allow larger sizes ...

To return to GParted (which is not to present and whose reputation is fully justified), actually some of the orders appears.
But only part!
For example (in vfat32) if we do a "verification" it is the command:
dosfsck -a -w -v ''etiquette'' /dev/name of the partition that is displayed.
But during an enlargement or reduction of partition there is simply a comment:
"use of libparted" without further specification ...

- I use ToOpPy v2.2.
- When I work on the usb key (as a support example /dev/sdb), I always ask for its "dismounting", so the partitions /dev/sdb1, /dev/sdb2 etc ... are normally dismounted.
- In my example, I use only one partition (/dev/sdb1) and after using "dd" I confirm that the rest of the space of the key is free (and not formatted)

Have a good day.
Back to top
View user's profile Send private message 
Burn_IT


Joined: 12 Aug 2006
Posts: 2928
Location: Tamworth UK

PostPosted: Sat 18 Nov 2017, 09:31    Post subject:  

You missed ExFAT for larger media
_________________
"Just think of it as leaving early to avoid the rush" - T Pratchett
Back to top
View user's profile Send private message 
did18

Joined: 19 Nov 2014
Posts: 328

PostPosted: Wed 22 Nov 2017, 11:35    Post subject:  

Hello,

Yes Burn_IT, indeed there is also "exfat"...
But as shown in the screenshot of GParted, this type of partition is partially supported, in addition to other types of formats, GParted does not show the tools used (right column).

Have a nice day.
171122_162427_787x657_easyshot.jpg
 Description   
 Filesize   72.97 KB
 Viewed   91 Time(s)

171122_162427_787x657_easyshot.jpg

Back to top
View user's profile Send private message 
Peterm321

Joined: 29 Jan 2009
Posts: 386

PostPosted: Thu 23 Nov 2017, 19:51    Post subject:  

did18 17 November 2017, 13:42 wrote:

I saw that it existed "fatresize", but this command no longer seems maintained and despite the updates, I always get error messages when I try to use it (segmentation error or other messages which I do not understand very well the meaning (my English is very bad sorry-fortunately google translation exists Wink)


Segmentaion fault seems to translate into the French more or less as in English, erreur de segmentation. It is a generic term usually related to some kind of memory allocation failure or a dodgy pointer, "pointeur dangereux?"

https://fr.wikipedia.org/wiki/Erreur_de_segmentation

I have a copy of the this commandline program, and I tested it by creating a zero filled 50 Megabyte file, formatted it with mkfs.vfat then fatresized it to 40M.

My first suspect would be the libraries fatresize depends on, particularly libparted-fs-resize there may be incompatibilities. The ldd command displays on a terminal a program's dependencies. Note that it is also possible to download in error a 32 bit program and run it in a 64 bit system or vice versa. The "file" command e.g
Code:
file <path to program>
will say what bit size and system the program was compiled for.

If you can't resolve the problem, but still want to use the fatresize program I would be very surprised if it wasn't on one of these system rescue CD/DVDs that can be downloaded and burned to a DVD and run as a live CD.
FATRESIZE.JPG
 Description   Screen dump of the commandline program fatresize
 Filesize   57.04 KB
 Viewed   69 Time(s)

FATRESIZE.JPG

Back to top
View user's profile Send private message 
did18

Joined: 19 Nov 2014
Posts: 328

PostPosted: Sun 26 Nov 2017, 07:35    Post subject:  

Hello.

In fact, I think there are several problems...
Fatresize does not appear to be installed in the same location (screenshot 1).
If the version number is the same, the date is different (is it very important?).
Dependencies are not identical.

To find fatresize, I used "pfind"... (screenshot 2)
Since dependencies did not appear in the terminal, I used "crearch"... (screenshot 3)
I was able to see that fatresize needed 11 dependencies (on my system)

The list of the 11 dependencies... (screenshot 4)

Have a nice day.
171126_120233_550x463_easyshot.jpg
 Description   
 Filesize   34.83 KB
 Viewed   36 Time(s)

171126_120233_550x463_easyshot.jpg

171126_120426_1096x448_easyshot.jpg
Description 
jpg

 Download 
Filename  171126_120426_1096x448_easyshot.jpg 
Filesize  61.59 KB 
Downloaded  9 Time(s) 
171126_120534_645x608_easyshot.jpg
 Description   
 Filesize   59.24 KB
 Viewed   38 Time(s)

171126_120534_645x608_easyshot.jpg

171126_120910_645x608_easyshot.jpg
 Description   
 Filesize   50.23 KB
 Viewed   38 Time(s)

171126_120910_645x608_easyshot.jpg

Back to top
View user's profile Send private message 
Peterm321

Joined: 29 Jan 2009
Posts: 386

PostPosted: Mon 27 Nov 2017, 14:26    Post subject:  

did18 Yesterday, at 11:35 wrote:

In fact, I think there are several problems...
Fatresize does not appear to be installed in the same location (screenshot 1).
If the version number is the same, the date is different (is it very important?).
Dependencies are not identical.


Hello

Yes there are some difference between my system and yours. That is one reason I suggested trying one of these rescue CDs, eg System Rescue CD

https://en.wikipedia.org/wiki/SystemRescueCD

(Not sure if fatresize is on it - I would expect at least some of these rescue CDs would have it)

https://en.wikipedia.org/wiki/List_of_data_recovery_software

The date on my version of fatresize is by reason I compiled it myself. The compiler would have linked up with what dependencies were available. That rather long list of dependencies could be one reason for the segfaults. Compiling, though, does requre you to download and install the relevant devx squashed file system for your version of Puppy. Puppy linux typically does not provide the gcc compiler by default built-in.

By the way, on your system the fatresize is located in /usr/sbin so the ldd command could work by

Code:
 cd /usr/sbin  ; ldd ./fatresize


If you do want to investigate your system you could try the strace command which displays on the screen the APIs called by a program. It produces a lot of output which will stop at the segfault.

Another alternative to a live CD is to search the forums or pkgs.org or rmpfind.com and find an alternate version of fatresize that is either statically compiled or with different dependencies that won't segfault.
Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 1 of 1 [8 Posts]  
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.0492s ][ Queries: 15 (0.0069s) ][ GZIP on ]