Set up OSMC and PiDrive

I tried what you said but I end up with the same result :sweat:

Disk /dev/sda: 349,3 GiB, 375049420800 bytes, 732518400 sectors
Geometry: 255 heads, 63 sectors/track, 45597 cylinders
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: sun

Device     Start       End   Sectors   Size Id Type         Flags
/dev/sda1      0 732515804 732515805 349,3G 83 Linux native      
osmc@osmc:~$ 
osmc@osmc:~$ sudo mkfs.ntfs -f -v -I -L Pi-Drive /dev/sda1
Failed to access '/dev/sda1': Aucun fichier ou dossier de ce type
The device doesn't exist; did you specify it correctly?
osmc@osmc:~$ 

Do you know what went wrong and what can I do to correct it please?

You are still trying to format it as NTFS and not ext4 as @dillthedog suggested.

If you want to use EXT4 use sudo mkfs.ext4 -L Pi-Drive /dev/sda1

If you still prefer to use NTFS you need to set the partition as Type 7 HPFS/NTFS/exFAT

1 Like

Thank you for your answer but I don’t know how to make it work yet, when I type sudo fdisk -l /dev/sda, I get this :

osmc@osmc:~$ sudo fdisk -l /dev/sda

Disk /dev/sda: 349,3 GiB, 375049420800 bytes, 732518400 sectors
Geometry: 255 heads, 63 sectors/track, 45597 cylinders
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: sun

Device     Start       End   Sectors   Size Id Type         Flags
/dev/sda1      0 732515804 732515805 349,3G 83 Linux native  

So if I’m correct that means that the partition is created but when I type sudo mkfs.ext4 -L Pi-Drive /dev/sda1 I get this :

osmc@osmc:~$ sudo 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.

Sorry it’s in French, it means :

“The file /dev/sda1 doesn’t exist et no storage has been specified”

:sleepy:

Did you use the default start position, since it’s not normaly 0?

Delete the partition again, then create another primary partition and take all the defaults. The start should be on 2048.

I did all of that :

osmc@osmc:~$ sudo fdisk -l /dev/sda
Disk /dev/sda: 349,3 GiB, 375049420800 bytes, 732518400 sectors
Geometry: 255 heads, 63 sectors/track, 45597 cylinders
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: sun

Device Start End Sectors Size Id Type Flags
/dev/sda1 0 732515804 732515805 349,3G 83 Linux native
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): d /dev/sda1
Selected partition 1
Partition 1 has been deleted.

Command (m for help): d /dev/sda
No partition is defined yet!
Could not delete partition 1453631585

Command (m for help): w

The partition table has been altered.
Calling ioctl() to re-read partition table.
Syncing disks.

osmc@osmc:~$ sudo fdisk -l /dev/sda
Disk /dev/sda: 349,3 GiB, 375049420800 bytes, 732518400 sectors
Geometry: 255 heads, 63 sectors/track, 45597 cylinders
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: sun
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): 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!

It should be Linux.

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

1 Like

Argh I tried to redelete my partition and reboot but my disk label type is always sun :blush:

Is there a way to format my disk label?

Something is definitely wrong here.
Post the output of grab-log -J -K

1 Like

That is what I get:

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):

Use grab-logs -J -K at the terminal prompt, not after starting fdisk.

1 Like

Sorry for that, here: https://paste.osmc.tv/uyoxokokit