A couple of observations from me:

1. When formatting a disk with parted, all it does is format, it doesn't set 
permissions on anything. On filesystems that have permissions like ext4, you'll 
still have to set the appropriate permissions. After you mount the disk for the 
first time, you can set your user as the owner by running `sudo chmod 
<username> <mountpoint>`. `chmod 777` is generally bad practice as it opens up 
that directory to all users, which is probably not what you want (i.e. service 
and whatnot on your machine could also access it). Based on what I see in your 
gparted output, the appropriate command would be:

sudo chmod michael /media/michael/5d19820a-dfe9-4a0f-8593-9339e9b4ecd2

... then you should be able to write to it without sudo.

2. GPT is only "needed" for > 2TB drives as that's where MBR maxes out, though 
given that everything has supported GPT for a long time there's really no 
reason to not use it. I just wanted to correct the information. The 32GB limit 
that Eric is thinking of is Windows refusing to format disks as FAT32 above 
that. The only reason today to prefer MBR over GPT is if you're formatting a 
boot drive for a non-EFI machine, and even then you can use a hybrid MBR/GPT 
table where only the boot partition is in the MBR and the rest of the 
partitions are "hidden" and only available when reading the GPT.

3. Instead of using dd to clear a disk, you can just use `wipefs`, assuming 
you're not trying to overwrite/clean any data that used to be on the disk. 
wipefs looks for any know file system, partition table, or other known 
headers/identifiers and will zero them out so you can start "fresh". Since it 
only clears the headers/identifiers, it is much faster than overwriting the 
entire disk. Man page: https://man.archlinux.org/man/wipefs.8.en

4. Lastly, remember that ext4 by default reserves 5% of the disk for root, so 
that root can still write to disk after the disk is "full". You likely don't 
need this in an external drive, so you can remove this reservation by running 
this command:

sudo tune2fs -m 0 /dev/<device>

I hope this helps

On Thu, Jan 19, 2023, at 6:29 AM, Michael via PLUG-discuss wrote:
> But it seems that when I formatted my devices to ext4 it made them read only. 
> How did you format them? I think that because after I set partition type to 
> msdos and format to ntfs the device acted as normal.
> 
> On Thu, Jan 19, 2023 at 7:21 AM Eric Oyen via PLUG-discuss 
> <[email protected]> wrote:
>> GPT is definitely preferred for anything over 32GB as that will allow for 
>> greater filesystem size. I routinely set that flag on any device I have that 
>> requires access above the 32GB 32 bit limitation. Since that covered 
>> virtually all devices in my inventory now, it’s just prudent to set it this 
>> way. I also format EXFaT so that I can use said devices across the broadest 
>> possible OS platforms.
>> 
>> -Eric
>> From the Central Offices of the Technomage Guild, HDD refurbishment Dept.
>> 
>> 
>>> On Jan 17, 2023, at 6:31 AM, Michael via PLUG-discuss 
>>> <[email protected]> wrote:
>>> 
>>> I was kinda oopy last night (I didn't google a solution to how to fix it ) 
>>> but I just did and found out how to set the partition table. But which 
>>> should I choose? I've heard gpt mentioned but am unsure. Could I hear some 
>>> opinions from the learnED here?
>>> 
>>> On Mon, Jan 16, 2023 at 9:29 PM Michael <[email protected]> wrote:
>>>> in my other thread I looked at a gparted report. Well it had something 
>>>> related to this thread. In the report it is mentioned that file system 
>>>> type is ext4 but that the partition table  is msdos. Does that matter.How 
>>>> should it be fixed if it does?
>>>> ========================================
>>>> 
>>>> Device:
>>>> /dev/sdb
>>>> Model:
>>>> SanDisk Ultra
>>>> Serial:
>>>> 
>>>> Sector size:
>>>> 512
>>>> Total sectors:
>>>> 240353280
>>>>  
>>>> Heads:
>>>> 255
>>>> Sectors/track:
>>>> 2
>>>> Cylinders:
>>>> 471280
>>>>  
>>>> Partition table:
>>>> msdos
>>>>  
>>>> Partition
>>>> Type
>>>> Start
>>>> End
>>>> Flags
>>>> Partition Name
>>>> File System
>>>> Label
>>>> Mount Point
>>>> /dev/sdb1
>>>> Primary
>>>> 2048
>>>> 240353279
>>>> 
>>>> 
>>>> ext4
>>>> 
>>>> /media/michael/5d19820a-dfe9-4a0f-8593-9339e9b4ecd2
>>>> ========================================
>>>> 
>>>> 
>>>> 
>>>> 
>>>> On Mon, Jan 16, 2023 at 8:41 PM Michael <[email protected]> wrote:
>>>>> Okay,  I spent the last thirty minutes copying all the files from the fat 
>>>>> fomatted drive to a folder on the desktop. Then I formatted the drive to 
>>>>> ext4. Now I can't drag the files back on to the USB drive. I suppose I 
>>>>> could chmod -r 777 the drive but what is the right way to do it?
>>>>> --
>>>>> :-)~MIKE~(-:
>>>> 
>>>> 
>>>> -- 
>>>> :-)~MIKE~(-:
>>> 
>>> 
>>> -- 
>>> :-)~MIKE~(-:
>>> ---------------------------------------------------
>>> PLUG-discuss mailing list: [email protected]
>>> To subscribe, unsubscribe, or to change your mail settings:
>>> https://lists.phxlinux.org/mailman/listinfo/plug-discuss
>> 
>> ---------------------------------------------------
>> PLUG-discuss mailing list: [email protected]
>> To subscribe, unsubscribe, or to change your mail settings:
>> https://lists.phxlinux.org/mailman/listinfo/plug-discuss
> 
> 
> -- 
> :-)~MIKE~(-:
> ---------------------------------------------------
> PLUG-discuss mailing list: [email protected]
> To subscribe, unsubscribe, or to change your mail settings:
> https://lists.phxlinux.org/mailman/listinfo/plug-discuss
> 
---------------------------------------------------
PLUG-discuss mailing list: [email protected]
To subscribe, unsubscribe, or to change your mail settings:
https://lists.phxlinux.org/mailman/listinfo/plug-discuss

Reply via email to