[DNG] fdisk SD card partitioning question
Hello, I have some directories I want to back up to an SD card while preserving the permissions. I have tried to repartition a 64GB card and write an ext4 filesystem. fdisk says the card has 124702720 sectors and has 59.5GB available. However it will not make a partition over 27.5GB. Why and what to do? Best regards, Fred ___ Dng mailing list Dng@lists.dyne.org https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng
Re: [DNG] fdisk SD card partitioning question
On Sunday 12 June 2022 at 17:11:45, Fred wrote: > Hello, > > I have some directories I want to back up to an SD card while preserving > the permissions. I have tried to repartition a 64GB card and write an > ext4 filesystem. What is the existing partition table? Out of interest, since this is ext4 and therefore Linux (not Windows), why partiton at all? Why not just "mkfs.ext4 /dev/sdX"? > fdisk says the card has 124702720 sectors and has 59.5GB available. > However it will not make a partition over 27.5GB. Why and what to do? What's the output of "fdisk -l /dev/sdX"? Have you tried wiping the partition table and creating a new one? dd if=/dev/zero of=/dev/sdX bs=10M count=10 Then use fdisk as usual - it will prompt you to create a new table. Antony. -- In Heaven, the beer is Belgian, the chefs are Italian, the supermarkets are British, the mechanics are German, the lovers are French, the entertainment is American, and everything is organised by the Swiss. In Hell, the beer is American, the chefs are British, the supermarkets are German, the mechanics are French, the lovers are Swiss, the entertainment is Belgian, and everything is organised by the Italians. Please reply to the list; please *don't* CC me. ___ Dng mailing list Dng@lists.dyne.org https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng
Re: [DNG] fdisk SD card partitioning question
On 6/12/22 09:18, Antony Stone wrote: On Sunday 12 June 2022 at 17:11:45, Fred wrote: Hello, I have some directories I want to back up to an SD card while preserving the permissions. I have tried to repartition a 64GB card and write an ext4 filesystem. What is the existing partition table? Out of interest, since this is ext4 and therefore Linux (not Windows), why partiton at all? Why not just "mkfs.ext4 /dev/sdX"? fdisk says the card has 124702720 sectors and has 59.5GB available. However it will not make a partition over 27.5GB. Why and what to do? What's the output of "fdisk -l /dev/sdX"? Have you tried wiping the partition table and creating a new one? dd if=/dev/zero of=/dev/sdX bs=10M count=10 Then use fdisk as usual - it will prompt you to create a new table. Antony. Hi, As supplied the SD cards are intended to work with Windows. Under Linux only root can write to them and the ownership can not be changed. I want preserve permissions of data written to the card. root@aragog:# /sbin/fdisk -l /dev/sdb Disk /dev/sdb: 27.48 GiB, 29504831488 bytes, 57626624 sectors Disk model: Card-Reader 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: 0x Device Boot Start End Sectors Size Id Type /dev/sdb1 32768 124735487 124702720 59.5G 7 HPFS/NTFS/exFAT I don't know why the size is reported differently in two places. It is a 64GB card. I tried your dd command line and things have gone downhill as the 64GB card is now only 27.4GB. root@aragog:# /sbin/fdisk -l /dev/sdb Disk /dev/sdb: 27.48 GiB, 29504831488 bytes, 57626624 sectors Disk model: Card-Reader Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes I tried fdisk again with the same result. root@aragog:# /sbin/fdisk /dev/sdb Command (m for help): n Partition type p primary (0 primary, 0 extended, 4 free) e extended (container for logical partitions) Select (default p): p Partition number (1-4, default 1): 1 First sector (2048-57626623, default 2048): Last sector, +/-sectors or +/-size{K,M,G,T,P} (2048-57626623, default 57626623): Created a new partition 1 of type 'Linux' and of size 27.5 GiB. Command (m for help): d Selected partition 1 Partition 1 has been deleted. Command (m for help): n Partition type p primary (0 primary, 0 extended, 4 free) e extended (container for logical partitions) Select (default p): e Partition number (1-4, default 1): 1 First sector (2048-57626623, default 2048): Last sector, +/-sectors or +/-size{K,M,G,T,P} (2048-57626623, default 57626623): Created a new partition 1 of type 'Extended' and of size 27.5 GiB. Any ideas? Best regards, Fred ___ Dng mailing list Dng@lists.dyne.org https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng
Re: [DNG] fdisk SD card partitioning question
On Sun, Jun 12, 2022 at 12:35:06PM -0700, Fred wrote: > On 6/12/22 09:18, Antony Stone wrote: > > On Sunday 12 June 2022 at 17:11:45, Fred wrote: > > > > > Hello, > > > > > > I have some directories I want to back up to an SD card while preserving > > > the permissions. I have tried to repartition a 64GB card and write an > > > ext4 filesystem. > > > > What is the existing partition table? > > > > Out of interest, since this is ext4 and therefore Linux (not Windows), why > > partiton at all? Why not just "mkfs.ext4 /dev/sdX"? > > > > > fdisk says the card has 124702720 sectors and has 59.5GB available. > > > However it will not make a partition over 27.5GB. Why and what to do? Are you sure that this is not just another example of "Flash Fraud"? You could try running https://github.com/AltraMayor/f3 . > Hi, > As supplied the SD cards are intended to work with Windows. Under Linux > only root can write to them and the ownership can not be changed. I want > preserve permissions of data written to the card. I don't follow above. SD cards usually come with a vfat file system and are indeed set up mainly for Windoze. But if you mount with -o uid=someone,gid=someone,.. then that someone user can write. I do this all the time with a whole variety of sdhc cards. I only leave them formated for vfat if I need to move them between other devices (cameras, sat navs, ereaders which only read and write vfat). Otherwise I use a better file system. > > root@aragog:# /sbin/fdisk -l /dev/sdb > Disk /dev/sdb: 27.48 GiB, 29504831488 bytes, 57626624 sectors > Disk model: Card-Reader > 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: 0x > > Device Boot Start End Sectors Size Id Type > /dev/sdb1 32768 124735487 124702720 59.5G 7 HPFS/NTFS/exFAT > > I don't know why the size is reported differently in two places. It is a > 64GB card. Are you sure?? Not a faked 32GB ? > > I tried your dd command line and things have gone downhill as the 64GB card > is now only 27.4GB. So almost certainly a fake. Did you but this from somewhere trustworthy? > root@aragog:# /sbin/fdisk -l /dev/sdb > Disk /dev/sdb: 27.48 GiB, 29504831488 bytes, 57626624 sectors > Disk model: Card-Reader > Units: sectors of 1 * 512 = 512 bytes > Sector size (logical/physical): 512 bytes / 512 bytes > I/O size (minimum/optimal): 512 bytes / 512 bytes > > > I tried fdisk again with the same result. > > root@aragog:# /sbin/fdisk /dev/sdb > Command (m for help): n > Partition type >p primary (0 primary, 0 extended, 4 free) >e extended (container for logical partitions) > Select (default p): p > Partition number (1-4, default 1): 1 > First sector (2048-57626623, default 2048): > Last sector, +/-sectors or +/-size{K,M,G,T,P} (2048-57626623, default > 57626623): > > Created a new partition 1 of type 'Linux' and of size 27.5 GiB. > > Command (m for help): d > Selected partition 1 > Partition 1 has been deleted. > > Command (m for help): n > Partition type >p primary (0 primary, 0 extended, 4 free) >e extended (container for logical partitions) > Select (default p): e > Partition number (1-4, default 1): 1 > First sector (2048-57626623, default 2048): > Last sector, +/-sectors or +/-size{K,M,G,T,P} (2048-57626623, default > 57626623): > > Created a new partition 1 of type 'Extended' and of size 27.5 GiB. > > > Any ideas? Yes. Almost certainly a fake ael ___ Dng mailing list Dng@lists.dyne.org https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng
Re: [DNG] fdisk SD card partitioning question
On 6/12/22 13:48, ael wrote: On Sun, Jun 12, 2022 at 12:35:06PM -0700, Fred wrote: On 6/12/22 09:18, Antony Stone wrote: On Sunday 12 June 2022 at 17:11:45, Fred wrote: Hello, I have some directories I want to back up to an SD card while preserving the permissions. I have tried to repartition a 64GB card and write an ext4 filesystem. What is the existing partition table? Out of interest, since this is ext4 and therefore Linux (not Windows), why partiton at all? Why not just "mkfs.ext4 /dev/sdX"? fdisk says the card has 124702720 sectors and has 59.5GB available. However it will not make a partition over 27.5GB. Why and what to do? Are you sure that this is not just another example of "Flash Fraud"? You could try running https://github.com/AltraMayor/f3 . Hi, As supplied the SD cards are intended to work with Windows. Under Linux only root can write to them and the ownership can not be changed. I want preserve permissions of data written to the card. I don't follow above. SD cards usually come with a vfat file system and are indeed set up mainly for Windoze. But if you mount with -o uid=someone,gid=someone,.. then that someone user can write. I do this all the time with a whole variety of sdhc cards. I only leave them formated for vfat if I need to move them between other devices (cameras, sat navs, ereaders which only read and write vfat). Otherwise I use a better file system. root@aragog:# /sbin/fdisk -l /dev/sdb Disk /dev/sdb: 27.48 GiB, 29504831488 bytes, 57626624 sectors Disk model: Card-Reader 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: 0x Device Boot Start End Sectors Size Id Type /dev/sdb1 32768 124735487 124702720 59.5G 7 HPFS/NTFS/exFAT I don't know why the size is reported differently in two places. It is a 64GB card. Are you sure?? Not a faked 32GB ? I tried your dd command line and things have gone downhill as the 64GB card is now only 27.4GB. So almost certainly a fake. Did you but this from somewhere trustworthy? root@aragog:# /sbin/fdisk -l /dev/sdb Disk /dev/sdb: 27.48 GiB, 29504831488 bytes, 57626624 sectors Disk model: Card-Reader Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes I tried fdisk again with the same result. root@aragog:# /sbin/fdisk /dev/sdb Command (m for help): n Partition type p primary (0 primary, 0 extended, 4 free) e extended (container for logical partitions) Select (default p): p Partition number (1-4, default 1): 1 First sector (2048-57626623, default 2048): Last sector, +/-sectors or +/-size{K,M,G,T,P} (2048-57626623, default 57626623): Created a new partition 1 of type 'Linux' and of size 27.5 GiB. Command (m for help): d Selected partition 1 Partition 1 has been deleted. Command (m for help): n Partition type p primary (0 primary, 0 extended, 4 free) e extended (container for logical partitions) Select (default p): e Partition number (1-4, default 1): 1 First sector (2048-57626623, default 2048): Last sector, +/-sectors or +/-size{K,M,G,T,P} (2048-57626623, default 57626623): Created a new partition 1 of type 'Extended' and of size 27.5 GiB. Any ideas? Yes. Almost certainly a fake ael Hi, I recall a lot of discussion about this on either this list or the Debian list. If the card was an offbrand I would assume it was fraud and would not have even asked here. However, the card is a SanDisk. The packaging becomes destroyed in removing the card so I can't take it back to Walfart for exchange. I would like to try the f3 program. How do I get the tarball from github? You said above that you use a better filesystem for the sdhc cards. Have you done that for a card over 32GB? And how? Best regards, Fred ___ Dng mailing list Dng@lists.dyne.org https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng
Re: [DNG] fdisk SD card partitioning question
On 6/12/22 14:09, Fred wrote: On 6/12/22 13:48, ael wrote: On Sun, Jun 12, 2022 at 12:35:06PM -0700, Fred wrote: On 6/12/22 09:18, Antony Stone wrote: On Sunday 12 June 2022 at 17:11:45, Fred wrote: Hello, I have some directories I want to back up to an SD card while preserving the permissions. I have tried to repartition a 64GB card and write an ext4 filesystem. What is the existing partition table? Out of interest, since this is ext4 and therefore Linux (not Windows), why partiton at all? Why not just "mkfs.ext4 /dev/sdX"? fdisk says the card has 124702720 sectors and has 59.5GB available. However it will not make a partition over 27.5GB. Why and what to do? Are you sure that this is not just another example of "Flash Fraud"? You could try running https://github.com/AltraMayor/f3 . Hi, As supplied the SD cards are intended to work with Windows. Under Linux only root can write to them and the ownership can not be changed. I want preserve permissions of data written to the card. I don't follow above. SD cards usually come with a vfat file system and are indeed set up mainly for Windoze. But if you mount with -o uid=someone,gid=someone,.. then that someone user can write. I do this all the time with a whole variety of sdhc cards. I only leave them formated for vfat if I need to move them between other devices (cameras, sat navs, ereaders which only read and write vfat). Otherwise I use a better file system. root@aragog:# /sbin/fdisk -l /dev/sdb Disk /dev/sdb: 27.48 GiB, 29504831488 bytes, 57626624 sectors Disk model: Card-Reader 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: 0x Device Boot Start End Sectors Size Id Type /dev/sdb1 32768 124735487 124702720 59.5G 7 HPFS/NTFS/exFAT I don't know why the size is reported differently in two places. It is a 64GB card. Are you sure?? Not a faked 32GB ? I tried your dd command line and things have gone downhill as the 64GB card is now only 27.4GB. So almost certainly a fake. Did you but this from somewhere trustworthy? root@aragog:# /sbin/fdisk -l /dev/sdb Disk /dev/sdb: 27.48 GiB, 29504831488 bytes, 57626624 sectors Disk model: Card-Reader Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes I tried fdisk again with the same result. root@aragog:# /sbin/fdisk /dev/sdb Command (m for help): n Partition type p primary (0 primary, 0 extended, 4 free) e extended (container for logical partitions) Select (default p): p Partition number (1-4, default 1): 1 First sector (2048-57626623, default 2048): Last sector, +/-sectors or +/-size{K,M,G,T,P} (2048-57626623, default 57626623): Created a new partition 1 of type 'Linux' and of size 27.5 GiB. Command (m for help): d Selected partition 1 Partition 1 has been deleted. Command (m for help): n Partition type p primary (0 primary, 0 extended, 4 free) e extended (container for logical partitions) Select (default p): e Partition number (1-4, default 1): 1 First sector (2048-57626623, default 2048): Last sector, +/-sectors or +/-size{K,M,G,T,P} (2048-57626623, default 57626623): Created a new partition 1 of type 'Extended' and of size 27.5 GiB. Any ideas? Yes. Almost certainly a fake ael Hi, I recall a lot of discussion about this on either this list or the Debian list. If the card was an offbrand I would assume it was fraud and would not have even asked here. However, the card is a SanDisk. The packaging becomes destroyed in removing the card so I can't take it back to Walfart for exchange. I would like to try the f3 program. How do I get the tarball from github? I found the tarball! You said above that you use a better filesystem for the sdhc cards. Have you done that for a card over 32GB? And how? Best regards, Fred ___ Dng mailing list Dng@lists.dyne.org https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng ___ Dng mailing list Dng@lists.dyne.org https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng
Re: [DNG] fdisk SD card partitioning question
Fred wrote: > Hi, > As supplied the SD cards are intended to work with Windows. Under > Linux only root can write to them and the ownership can not be > changed. I want preserve permissions of data written to the card. > > root@aragog:# /sbin/fdisk -l /dev/sdb > Disk /dev/sdb: 27.48 GiB, 29504831488 bytes, 57626624 sectors > Disk model: Card-Reader > 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: 0x > > Device Boot Start End Sectors Size Id Type > /dev/sdb1 32768 124735487 124702720 59.5G 7 HPFS/NTFS/exFAT > > I don't know why the size is reported differently in two places. It > is a 64GB card. > A couple things come to mind. Yes, it could be an acutal 32 GB card that was designed to appear as 64 GB (as was already mentioned). Another possibility: is it an issue with the "Card-Reader" device? Check the card in another computer or with a different card reader, does it still appear 32 GB? One other possibility (but less likely IMO), if the card is put back into Windows machine, does it appear as 64 GB? ___ Dng mailing list Dng@lists.dyne.org https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng
Re: [DNG] fdisk SD card partitioning question
On 6/12/22 14:33, tempforever wrote: Fred wrote: Hi, As supplied the SD cards are intended to work with Windows. Under Linux only root can write to them and the ownership can not be changed. I want preserve permissions of data written to the card. root@aragog:# /sbin/fdisk -l /dev/sdb Disk /dev/sdb: 27.48 GiB, 29504831488 bytes, 57626624 sectors Disk model: Card-Reader 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: 0x Device Boot Start End Sectors Size Id Type /dev/sdb1 32768 124735487 124702720 59.5G 7 HPFS/NTFS/exFAT I don't know why the size is reported differently in two places. It is a 64GB card. A couple things come to mind. Yes, it could be an acutal 32 GB card that was designed to appear as 64 GB (as was already mentioned). Another possibility: is it an issue with the "Card-Reader" device? Check the card in another computer or with a different card reader, does it still appear 32 GB? One other possibility (but less likely IMO), if the card is put back into Windows machine, does it appear as 64 GB? ___ Dng mailing list Dng@lists.dyne.org https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng Hi, I only have one usb-sd card reader. They don't cost much so I may order another. I don't use Bill Gates' cancerous, virus infested scourge of the Earth excuse for an OS and don't have access to it. Best regards, Fred ___ Dng mailing list Dng@lists.dyne.org https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng
Re: [DNG] fdisk SD card partitioning question
On 6/12/22 14:09, Fred wrote: On 6/12/22 13:48, ael wrote: On Sun, Jun 12, 2022 at 12:35:06PM -0700, Fred wrote: On 6/12/22 09:18, Antony Stone wrote: On Sunday 12 June 2022 at 17:11:45, Fred wrote: Hello, I have some directories I want to back up to an SD card while preserving the permissions. I have tried to repartition a 64GB card and write an ext4 filesystem. What is the existing partition table? Out of interest, since this is ext4 and therefore Linux (not Windows), why partiton at all? Why not just "mkfs.ext4 /dev/sdX"? fdisk says the card has 124702720 sectors and has 59.5GB available. However it will not make a partition over 27.5GB. Why and what to do? Are you sure that this is not just another example of "Flash Fraud"? You could try running https://github.com/AltraMayor/f3 . Hi, As supplied the SD cards are intended to work with Windows. Under Linux only root can write to them and the ownership can not be changed. I want preserve permissions of data written to the card. I don't follow above. SD cards usually come with a vfat file system and are indeed set up mainly for Windoze. But if you mount with -o uid=someone,gid=someone,.. then that someone user can write. I do this all the time with a whole variety of sdhc cards. I only leave them formated for vfat if I need to move them between other devices (cameras, sat navs, ereaders which only read and write vfat). Otherwise I use a better file system. root@aragog:# /sbin/fdisk -l /dev/sdb Disk /dev/sdb: 27.48 GiB, 29504831488 bytes, 57626624 sectors Disk model: Card-Reader 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: 0x Device Boot Start End Sectors Size Id Type /dev/sdb1 32768 124735487 124702720 59.5G 7 HPFS/NTFS/exFAT I don't know why the size is reported differently in two places. It is a 64GB card. Are you sure?? Not a faked 32GB ? I tried your dd command line and things have gone downhill as the 64GB card is now only 27.4GB. So almost certainly a fake. Did you but this from somewhere trustworthy? root@aragog:# /sbin/fdisk -l /dev/sdb Disk /dev/sdb: 27.48 GiB, 29504831488 bytes, 57626624 sectors Disk model: Card-Reader Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes I tried fdisk again with the same result. root@aragog:# /sbin/fdisk /dev/sdb Command (m for help): n Partition type p primary (0 primary, 0 extended, 4 free) e extended (container for logical partitions) Select (default p): p Partition number (1-4, default 1): 1 First sector (2048-57626623, default 2048): Last sector, +/-sectors or +/-size{K,M,G,T,P} (2048-57626623, default 57626623): Created a new partition 1 of type 'Linux' and of size 27.5 GiB. Command (m for help): d Selected partition 1 Partition 1 has been deleted. Command (m for help): n Partition type p primary (0 primary, 0 extended, 4 free) e extended (container for logical partitions) Select (default p): e Partition number (1-4, default 1): 1 First sector (2048-57626623, default 2048): Last sector, +/-sectors or +/-size{K,M,G,T,P} (2048-57626623, default 57626623): Created a new partition 1 of type 'Extended' and of size 27.5 GiB. Any ideas? Yes. Almost certainly a fake ael Hi, I recall a lot of discussion about this on either this list or the Debian list. If the card was an offbrand I would assume it was fraud and would not have even asked here. However, the card is a SanDisk. The packaging becomes destroyed in removing the card so I can't take it back to Walfart for exchange. I would like to try the f3 program. How do I get the tarball from github? You said above that you use a better filesystem for the sdhc cards. Have you done that for a card over 32GB? And how? Best regards, Fred ___ Dng mailing list Dng@lists.dyne.org https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng Hi, The f3probe utility says: Good news: The device /dev/sdb is the real thing And then it reports the same size as fdisk, 27.48GB usable even though the card is plainly marked 64GB. So, my question has been answered. Thanks for the help! Best regards, Fred ___ Dng mailing list Dng@lists.dyne.org https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng