Welcome to fdisk (util-linux 2.29.2).
Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.
Command (m for help): n
Partition number (1-8, default 1): 1
First sector (0-732515805, default 0): 0
Last sector or +sectors or +size{K,M,G,T,P} (0-732515805, default 732515805): 732515805
Created a new partition 1 of type ‘Linux native’ and of size 349,3 GiB.
Command (m for help): w
The partition table has been altered.
Calling ioctl() to re-read partition table.
Syncing disks.
osmc@osmc:~$ mkfs.ext4 -L Pi-Drive /dev/sda1
mke2fs 1.43.4 (31-Jan-2017)
Le fichier /dev/sda1 n’existe pas et aucune taille n’a été spécifiée.
Still no success I don’t understand but I thank you all for your help!
I’ve run an fdisk on a 32GB USB “pendrive”. Here’s what I saw:
osmc@osmc:~$ sudo fdisk /dev/sda
Welcome to fdisk (util-linux 2.29.2).
Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.
Command (m for help): p
Disk /dev/sda: 28.9 GiB, 31037849600 bytes, 60620800 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
Disklabel type: dos
Disk identifier: 0x00000000
Device Boot Start End Sectors Size Id Type
/dev/sda1 2048 60620799 60618752 28.9G 83 Linux
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):
Partition number (1-4, default 1):
First sector (2048-60620799, default 2048):
Last sector, +sectors or +size{K,M,G,T,P} (2048-60620799, default 60620799):
Created a new partition 1 of type 'Linux' and of size 28.9 GiB.
Partition #1 contains a ext4 signature.
Do you want to remove the signature? [Y]es/[N]o: n
Command (m for help): q
You can see I didn’t write at the end, but I deleted the old partition and created a new primary partition. I just pressed enter each time I was offered a default value.
I have come across similar problems where the operating system “remembers” the old partition configuration. So after you have made the changes and written then do disk, reboot OSMC. Perhaps that will help
osmc@osmc:~$ sudo fdisk /dev/sda
Welcome to fdisk (util-linux 2.29.2).
Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.
Command (m for help): grab-log -J -K
Created a new GPT disklabel (GUID: 424F0822-6003-4C92-8A9D-CA279F44A3A6).
Command (m for help):