Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fatresize does nothing except print version #35

Open
ghost opened this issue Jun 17, 2023 · 4 comments
Open

Fatresize does nothing except print version #35

ghost opened this issue Jun 17, 2023 · 4 comments

Comments

@ghost
Copy link

ghost commented Jun 17, 2023

When trying to shrink a fat16 partition, fatresize just spits out its version and does nothing.

[james@voidD620 ~]$ lsblk
NAME                MAJ:MIN RM  SIZE RO TYPE  MOUNTPOINTS
sda                   8:0    0  1.8T  0 disk  
└─sda1                8:1    0  1.8T  0 part  
  └─voidD620        254:0    0  1.8T  0 crypt 
    └─voidD620-root 254:1    0  1.8T  0 lvm   /
sdb                   8:16   1 59.1G  0 disk  
├─sdb1                8:17   1   59G  0 part  
└─sdb2                8:18   1   32M  0 part  
sr0                  11:0    1 1024M  0 rom   
[james@voidD620 ~]$ sudo fatresize -s 28M /dev/sdb2
Password: 
fatresize 1.0.3 (20200810)
[james@voidD620 ~]$ lsblk
NAME                MAJ:MIN RM  SIZE RO TYPE  MOUNTPOINTS
sda                   8:0    0  1.8T  0 disk  
└─sda1                8:1    0  1.8T  0 part  
  └─voidD620        254:0    0  1.8T  0 crypt 
    └─voidD620-root 254:1    0  1.8T  0 lvm   /
sdb                   8:16   1 59.1G  0 disk  
├─sdb1                8:17   1   59G  0 part  
└─sdb2                8:18   1   32M  0 part  
sr0                  11:0    1 1024M  0 rom   
[james@voidD620 ~]$
Disk /dev/sdb: 59.06 GiB, 63417876480 bytes, 123863040 sectors
Disk model: USB 3.0 FD      
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x1c9d51dc

Device     Boot     Start       End   Sectors Size Id Type
/dev/sdb1  *         2048 123797503 123795456  59G  7 HPFS/NTFS/exFAT
/dev/sdb2       123797504 123863039     65536  32M ef EFI (FAT-12/16/32)
@TomGoBravo
Copy link

I'm seeing the same behavior. I have fatresize 1.1.0 (20221231) installed on Linux tb270 5.18.0-0.bpo.1-amd64 #1 SMP PREEMPT_DYNAMIC Debian 5.18.2-1~bpo11+1 (2022-06-14) x86_64 GNU/Linux.

@TomGoBravo
Copy link

Have you tried running with -v -v -v? I get:

sudo fatresize -p -v -v -v -v -s 100M -p -n 1 /dev/loop9p1
fatresize 1.1.0 (20221231)
0%      (time left 00:00)ped_device_get(/dev/loop9)         
ped_device_open()
ped_disk_new()
ped_disk_get_partition(9)

The pnum 9 looks suspicious. I was expecting to see pnum as 1, either parsed from the dev path or from the -n arg.

@TomGoBravo
Copy link

I took a look at fatresize.c and tried #33 and decided to use the parted command line tool instead of putting time into tracing opt->pnum. fatresize.c appears to be mostly a frontend for ped. 🤷

@rothn
Copy link

rothn commented Mar 14, 2024

I am also having this issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants