Partitioning with DietPi

Hi folks,

I’m having a problem with DietPi and I’m hoping you experts can give me some helpful tips.

I want to use DietPi for a music PC. The music PC has a slot for one M.2 PCIe NVMe SSD, which I plan to install with a 2TB Samsung 990 Pro.

The DietPi operating system will run on this SSD, and the audio files (FLAC files) will also be stored there. To load the audio files onto the SSD, I intend to remove it from the music PC and copy the audio files onto it using a Windows or Apple PC. Then I’ll put it back into the music PC and start it up to listen to music.

I’ve already installed the DietPi live system onto the SSD using a DietPi installation USB stick. Since DietPi creates two partitions and uses the full 2TB SSD capacity, I booted GParted from another USB drive and created a new partition on the SSD, formatting it with the “exFAT” file system. I want to store the music files on this new partition. I chose the “exFAT” file system because it needs to be accessible from both Windows and Apple PCs.

Using the dietpi-drive_manager, it looks like this:

/ : dev/sdb2 | ext4 | Capacity : 384.5G | Used: 1G (0%)
/boot/efi : dev/sdb1 | vfat | Capacity : 63M. | Used: 11.6M (18%)
/mnt/Musik : dev/sdb3 | exfat | Capacity : 1.4T. | Used: 1.8 MB (0%).

Unfortunately, neither my Windows nor my Apple PC recognizes this SSD when I connect it.

What am I doing wrong?

How can I get my music PC to work with this single SSD and share a partition for music files between DietPi, Windows, and Apple?

Thanks in advance for your help.

Why not using SAMBA or NFS to share the file system across multiple device as a network share?

Usually when I connect a drive, where DietPi is installed on, the vfat partition is recognized in Windows. If you don’t see anything the drive is not mounted by Windows.
Did you connect the drive before installation anytime to the win machine? So we could confirm it worked beforehand.

In Windows you can also check: Right-click on the start button and choose “Disk management”.
If you don’t see the drive there I would say it’s a connection / cable problem, I don’t think a special driver is needed, M.2 PCIE is pretty standard.

How do you connect it? Directly on a M.2 slot on the motherboard or with an adapter? And what motherboard do you use on the win machine?

@Joulinar
I didn’t mention that I’m a complete Linux novice. With my approach, or rather idea, I was trying to find a simple solution. Samba or NFS seem complex to me and might overwhelm me. Or is Samba a software package that’s easy to install? Would I then only need the two standard partitions on the SSD and could I create just one directory on the larger partition, e.g., /media/music, and then access it from my Windows PC using Samba/NFS and copy the music files there? So that it would look something like this?

/media/music/album1/track1.flac
/media/music/album1/track2.flac

/media/music/album2/track1.flac
/media/music/album2/track2.flac

@Jappe
I first connected the newly purchased SSD to my Windows PC and initialized it there. Then I installed a DietPi live system using a DietPi installation USB drive, which resulted in two partitions on the SSD. I shrunk the second partition and created a third partition in the freed-up space.

As mentioned, the SSD is not recognized in Windows File Explorer when connected to the USB port on my Windows PC. When I start Disk Management on my Windows PC, it displays the following:

Disk 1 / Basic 1863.02 GB / Online
1st Partition: 64 MB / Healthy / EFI System
2nd Partition: 390.63 GB / Healthy (Primary Partition)
3rd Partition: (F:) 1472.33 GB RAW / Healthy (Basic Data Partition)

It’s strange that the third partition, where the audio files are supposed to be copied, is shown as RAW on the Windows PC, but as exFAT in the dietpi-drive_manager, which is how it should be.

I’ve installed the SSD (Samsung 990 Pro PCIe NVMe) in an ICY BOX SSD M.2 NVMe enclosure and connected it to the Windows PC via USB.

In the MusicPC, the SSD is plugged directly into the motherboard.

Above I wrote:

“It’s strange that the third partition, where the audio files are supposed to be copied, is displayed as RAW on the Windows PC, but as exFAT in the dietpi-drive_manager, which is how it should be.”

So I formatted this partition to exFAT in Windows Disk Management. It was successfully displayed. I then checked the drive using GParted, but it’s no longer displayed there at all. I selected “GParted > Refresh Drives” several times and then searched under “GParted > Drives.” The SSD isn’t found.

I then reconnected the SSD to the Windows PC via USB and started Windows Disk Management. The SSD now appears there as:

Disk 1 / Unknown / Not Initialized

I then right-clicked and selected “Initialize Disk.” This brings up a menu where I can choose between MBR (Master Boot Record) and GPT (GUID Partition Table).

I selected GPT and received the error message “Virtual Disk Manager / The request failed due to a fatal device hardware error”.

Now I’m completely stumped.

I would say the ICY BOX is not compatible with the SSD, it’s working when directly put into the motherboard but not when connected via adapter.
There are some negative reports in the Amazon reviews about Samsung NVME SSDs, one user says he destroyed his Samsung 980 with the ICY BOX:
https://www.amazon.de/product-reviews/B07JJXCSC4/ref=acr_dp_hist_1?ie=UTF8&filterByStar=one_star&reviewerType=all_reviews#reviews-filter-bar

Also the 990 seems to be pretty fragile in general:
https://www.reddit.com/r/buildapc/comments/1h2gx5t/is_the_issue_with_the_samsung_990_pro_nvme_ssd/

Here is my recommendation:
Reflash it with rufus, don’t create a third partition, and don’t use this ICY BOX adapter, it seems like they have some quality problems with it. (I just read the amazon reviews)

I also recommend to use samba. You could share the folder on windows and connect to it via dietpi-drive_manager, but this is always a hustle (because you have to config a lot in windows to do that), so I recommend to do it the other way around.
Install samba with dietpi-software, set a samba password and connect to it,
all of this is described in our documentation: https://dietpi.com/docs/software/file_servers/#samba-access-to-samba
On your windows machine you start explorer and type in the adress bar \\192.168.0.100\dietpi, replace the IP with the IP of your music machine. then you will be prompted for user and password.

You can also change the user, bc with the user samba you have only access to /mnt/samba or whatever the default folder is. But before I explain this let’s see how the SSD is doing after a reflash.

As already mentioned, the simplest solution is to use Samba. This means you don’t have to install/remove drives and you always have access to the network drive. DietPi actually installs everything you need for a quick start. For the specific use case (with an additional partition), there are 1-2 things that need to be adjusted afterwards, but nothing that can’t be done easily.

So when the 3rd partition is formatted with exFAT on Windows, Linux does not detect it, and when the same is done with Linux, Windows does not detect it? :smile:

Is it the same with other filesystem types like NTFS?

I use exFAT on my USB drive and every OS detected tit so far. Same for vFAT.
That’s why I’m thinking the adapter is faulty.

Maybe there is a difference when using in on a subsequent partition compared to first or only partition :thinking:. E.g. alignment might be different, e.g. as first partition it should always start at 1 MiB, while as subsequent partition it might be aligned by 512k sectors only, not sure.

First, I want to say thank you for all your amazing help! :folded_hands:

I managed to revive the SSD by using the command line editor diskpart and the command “clean” on my Windows PC. Afterward, I could see the SSD again in Windows Disk Management, initialize it, and then format it with exFAT.

To test it, I booted GParted from a USB stick and connected the SSD to a USB port. The SSD is now correctly displayed in GParted as well.

So, I installed a DietPi live system onto the SSD again from the DietPi installation USB stick. In addition to the software components required for my audio PC, I also installed the following software, as I want to use SAMBA/NFS:

1 Samba Client
110 NFS Client
96 Samba Server
09 NFS Server

I’ll read up a bit on SAMBA and NFS, as I want to use this method to copy music files to the SSD.

I’m leaving the partitions as the DietPi installation created them. The music files will also be placed in a directory on DietPi.

It probably wasn’t the ICY BOX SSD M.2 NVMe enclosure that was the problem, since I was able to revive the SSD using this enclosure and also reinstall DietPi with all its software components.

I’ll probably have more questions about this. That would probably be better suited to a new thread, as they’ll be SAMBA/NFS questions unrelated to partitioning.

What do you think? Here or in a new thread?

1 Like

New threat makes sense, so we leave this topic for possible partitioning issues/incompatibilities between Linux and Windows.