Having Trouble Formatting External Hard Drive From openSuse Leap 15.3

Hi guys. I bought an external Hard Drive a few days ago so that I could put my files on it whilst I install an up-to-date version of openSuse, but I can’t write to the ext4 partition I created. I’m currently on 15.3 and I used YaST’s Partitioner tool in the hopes that it’d help me to avoid making silly mistakes, but it seems that my capacity for making silly mistakes dwarves the helpfulness of any software.

When I first got the drive, I deleted the single Windows partition that came on it, but I can’t remember if I used the partitioner to replace the partition table. I suspect that my problem is caused by me not doing, but I wanted to ask for help here first, before I go making even more silly mistakes.

I deleted the original partition (and probably failed to replace the partition table) and then I gave 32 GiB to a FAT partition so that I can put some files there without having to worry about which operating system is going to read/write to/from that partition, and then I chose to give the remaining space to a single ext4 partition. After I did this with YaST’s Partitionoer tool, I was able to create a ner folder in the FAT32 partition, but the ext4 partition would not let me create a new folder.

I did fdisk -l to look for any clues as to why, but the only thing that really stuck out to me was that the ext4 partition I expected to be listed as “Linux filesystem” under the Type heading was listed as just “Linux”. The full output of fdisk -l is shown below. `home:~ # fdisk -l
Disk /dev/sda: 931.51 GiB, 1000204886016 bytes, 1953525168 sectors
Disk model: TOSHIBA DT01ACA1
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: gpt
Disk identifier: B42A699F-07C7-4E19-80EB-01BCFAA04E0B

Device Start End Sectors Size Type
/dev/sda1 2048 1026047 1024000 500M EFI System
/dev/sda2 1026048 626995199 625969152 298.5G Linux filesystem
/dev/sda3 626995200 1920870399 1293875200 617G Linux filesystem
/dev/sda4 1920870400 1953525134 32654735 15.6G Linux swap

Disk /dev/sdb: 1.82 TiB, 2000398934016 bytes, 3907029168 sectors
Disk model: ST2000DM001-1ER1
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: gpt
Disk identifier: 78959F4C-F459-43EC-8814-2F7603CE3C9D

Device Start End Sectors Size Type
/dev/sdb1 2048 1023999 1021952 499M EFI System
/dev/sdb2 1024000 1286143 262144 128M Microsoft reserved
/dev/sdb3 1286144 3907028991 3905742848 1.8T Microsoft basic data

Disk /dev/sdg: 1.82 TiB, 2000398933504 bytes, 3907029167 sectors
Disk model: Basic
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: dos
Disk identifier: 0x0108be83

Device Boot Start End Sectors Size Id Type
/dev/sdg1 2048 67110911 67108864 32G c W95 FAT32 (LBA)
/dev/sdg2 67110912 3907029166 3839918255 1.8T 83 Linux`

I don’t see anything that’d indicate what type of partition table each disk is using. Can I get that information through fdisk? I expect that finding the partition table type is going to be important before I try to make any further changes. Can someone help me figure out where I’ve gone wrong, please?

For clarity, my goal is to have an external USB Hard Drive with a 32 GiB FAT partition, and the rest of the available space be an ext4 partition. Any help would be appreciated

P.S. Apologies for the lack of formatting in the previous post’s pasted output. I have no idea how we’re supposed to format output with this forum software. The button seemed to imply backticks, but they didn’t seem to do anything, so I tried to revert it back to and so there’d be at least some indication of where it’s supposed to start and end, but forum software said I wasn’t allowed to see something and declined the edits when I tried to change it back to and

And no this post id just hiding instances of “[“code”]” and “[”/code"]" The quotes are just to try to hide the words from the software…

Use preformatted text (button </> in editor).

Huh? What is it then?

have you tried creating a new partition? It won’t teach you what you did wrong with yast, but it might make your drive usable at least.
If you don’t know which drive it is, open a terminal window and type lsblk, which should print all your current drives and partitions with their respective /dev/sd* identifier. Then use sudo mkfs.ext4 /dev/<your-drive> to create a new partition. If you want to, you can use -L <name-of-partition> to make your drive easier to identify in your file explorer.

Per default, new partitions are owned by root (logic when you create them via root/sudo). So you simply need to change the ownership below the mountpoint to the intended user.

Might just be something Ubuntu does differently, but I’ve never had to manually adjust partitions to be rw for me after creating a filesystem them with sudo mkfs.

When formatting an external drive, I do it the easy way with gparted.

1 Like

Yeah, I tried clicking that button to get a hint as to what I was supposed to do to mark it as pre-formatted text and it just put some example text surrounded by backticks, so I just deleted the example the button added and replaced the “[“code”]” and “[”/code"]" tags with backticks, but for whatever reason it didn’t work.

This is exactly how you mark preformatted text in Markdown.

preformatted text

Source:

```
preformatted text
```

I’m registered blind. Obviously, It doesn’t mean I can’t see anything at all, but it does mean it’s very easy for me to fail to see information when it’s in tightly-packed blocks of text, even when I’m looking specifically for particular pieces of information.

Thanks for pointing out the information.

Yeah. Deleting the first ext4 partition and creating a new one in it’s place (in case I’d somehow managed to make a mistake on the first attempt) was the first thing I tried. Thanks for the tip about lsblk, though. I used lasblk to make certain the drive wasn’t automatically mounted by the operating system, because the YaST Partitioner tool warns you not to do anything with already-mounted drives. I remember it being very simple and straight-forward to format an external hard drive, but it’s been so long since I did it that I’ve totally forgotten what I did to do it, but that mkfs command seems strikingly familiar.

I think you and @hui are right about it being a permissions problem. I was also thinking it might be that the partition was created with the owner being root:root, and all I might need to do is chown root:users /dev/sdg chmod 740 /dev/sdg but I didn’t want to just do that without getting advice from people with more experience first. Like I don’t know if there’s something I should also be changing in fstab, because that’s where I (get the impression I incorrectly) assumed is where the ownership of the ext4 partition should be set).

Is that normally how setup for an external hard drive is handled in Linux? Just have the partitions on the drive be owned by root:users, and then set the permissions on the partitions to be 740?

I’ll wait for response before I actually do it, just in case the response turns out to be “No, that’s a bad idea.”