LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices


Reply
  Search this Thread
Old 01-10-2024, 04:30 PM   #1
maybeJosiah
Member
 
Registered: Jan 2024
Location: USA
Distribution: Ubuntu, Android, Ubuntu Touch, Jolla Sailfish maybe
Posts: 195
Blog Entries: 2

Rep: Reputation: 5
Exclamation ext4 USB will not write so what?


See picture for probable cause. I can format a USB to ext4, take ownership, but always read only seemingly even to root. I previously used this USB as NTFS and it worked. What can I do? I can repair it then take ownership again. Never can check file system of it. Is there anything I can do? I am on an Ubuntu desktop 22.04.3 LTS with Ubuntu Pro on a Lenovo Thinkpad T460. I have also tried "sudo chmod 777 (USB path)" and "sudo chown norvel (USB path)". norvel is like my user and like only user on this PC. I do not have any data on that USB to lose. It is a 2.1TB USB. X E.
Attached Thumbnails
Click image for larger version

Name:	Screenshot from 2024-01-10 17-17-27.png
Views:	15
Size:	49.4 KB
ID:	42372  
 
Old 01-10-2024, 04:41 PM   #2
IsaacKuo
Senior Member
 
Registered: Apr 2004
Location: Baton Rouge, Louisiana, USA
Distribution: Debian Stable
Posts: 2,546
Blog Entries: 8

Rep: Reputation: 465Reputation: 465Reputation: 465Reputation: 465Reputation: 465
Most likely it has bad sectors, and unfortunately at least one of those bad sectors is located where ext4 puts its journal superblock. I don't know where this would be, but likely the innermost blocks (lowest numbers) for performance reasons (only applicable to spinning hard drives, but those are still heavily used).

NTFS likes to start placing its stuff in the middle, and work its way outward in both directions. So it's possible it simply doesn't hit the bad blocks.

To test this theory, try creating an ext4 partition that does NOT use up all the space. Instead, just try and create a small ext4 partition near the middle, leaving unused spaces to the left and right.

If the theory is correct, then this will have no problem doing a file check and read/write just fine.

What can you do about it? You can try to create an ext4 partition that leaves some small amount of empty space to the left, and see how that goes. I would be wary about trusting the drive, though.
 
1 members found this post helpful.
Old 01-10-2024, 05:00 PM   #3
maybeJosiah
Member
 
Registered: Jan 2024
Location: USA
Distribution: Ubuntu, Android, Ubuntu Touch, Jolla Sailfish maybe
Posts: 195

Original Poster
Blog Entries: 2

Rep: Reputation: 5
An additional thing I found, before I own it I can check file system and it always says needs repair even after I just repaired it. If it is like be wary of use then maybe why bother but still may as well test. So just to be clear, how do I make it "in middle", could I just half it and try a half? I do not know how to place a partition at a spot like that. X E.
 
Old 01-10-2024, 05:09 PM   #4
maybeJosiah
Member
 
Registered: Jan 2024
Location: USA
Distribution: Ubuntu, Android, Ubuntu Touch, Jolla Sailfish maybe
Posts: 195

Original Poster
Blog Entries: 2

Rep: Reputation: 5
Should I try long way or erase all on that USB? Maybe just try what you said first. This USB has written before. Also, is it safe for like my computer to do this test? If not then maybe I just get a new USB. X E.
 
Old 01-10-2024, 05:10 PM   #5
IsaacKuo
Senior Member
 
Registered: Apr 2004
Location: Baton Rouge, Louisiana, USA
Distribution: Debian Stable
Posts: 2,546
Blog Entries: 8

Rep: Reputation: 465Reputation: 465Reputation: 465Reputation: 465Reputation: 465
Quote:
Originally Posted by maybeJosiah View Post
An additional thing I found, before I own it I can check file system and it always says needs repair even after I just repaired it. If it is like be wary of use then maybe why bother but still may as well test. So just to be clear, how do I make it "in middle", could I just half it and try a half? I do not know how to place a partition at a spot like that. X E.
How are you creating the partitions?

An easy GUI option is GParted. The basic steps you'll want to do are:

1) Right click on the existing partitions; delete it.

2) Commit changes. (OBVIOUSLY make sure you're doing this on the correct drive.)

3) Right click on the empty space; new partition. Drag the left and right borders of the new partition rectangle to place lots of empty space to the left and right.

4) Commit changes.

At the end, there should be just your small new partition in the middle with lots of empty space to the left and right of it.
 
1 members found this post helpful.
Old 01-10-2024, 05:12 PM   #6
maybeJosiah
Member
 
Registered: Jan 2024
Location: USA
Distribution: Ubuntu, Android, Ubuntu Touch, Jolla Sailfish maybe
Posts: 195

Original Poster
Blog Entries: 2

Rep: Reputation: 5
I am not creating partitions yet, and can I do this with Disks because I would rather not install more?
 
Old 01-10-2024, 05:14 PM   #7
maybeJosiah
Member
 
Registered: Jan 2024
Location: USA
Distribution: Ubuntu, Android, Ubuntu Touch, Jolla Sailfish maybe
Posts: 195

Original Poster
Blog Entries: 2

Rep: Reputation: 5
I guess gparted may be safe but how do I get it?
 
Old 01-10-2024, 05:16 PM   #8
IsaacKuo
Senior Member
 
Registered: Apr 2004
Location: Baton Rouge, Louisiana, USA
Distribution: Debian Stable
Posts: 2,546
Blog Entries: 8

Rep: Reputation: 465Reputation: 465Reputation: 465Reputation: 465Reputation: 465
FWIW, I have used both USB flash drives and spinning hard drives with large swathes of bad sectors. Sometimes there's enough good space left to do some things with. My typical usage is to only use a very small part of what's remaining to create a boot stub to boot up something else (typically net boot).

Or, if there's enough space, I do a minimal install so I can use it as an emergency recovery OS.

But like ... this is all "scraping the bottom of the barrel" cheapskate things to do.

I've been that desperate to scrape the bottom of the barrel, though, so ... just letting you know that it is indeed possible to get long term use out of a flash drive or hard drive with bad sectors. It's not always a sign that it's going to get worse and worse until ultimate failure in the short term.

(In contrast, if a spinning hard drive starts screeching like crazy, it's toast. It might work for a little bit longer, but it's pretty hopeless.)
 
Old 01-10-2024, 05:19 PM   #9
IsaacKuo
Senior Member
 
Registered: Apr 2004
Location: Baton Rouge, Louisiana, USA
Distribution: Debian Stable
Posts: 2,546
Blog Entries: 8

Rep: Reputation: 465Reputation: 465Reputation: 465Reputation: 465Reputation: 465
Quote:
Originally Posted by maybeJosiah View Post
I guess gparted may be safe but how do I get it?
AFAIK, it's the partitioning tool that Ubuntu and Ubuntu based distributions use by default. It's likely already installed, if you have any tools for modifying partitions at all.
 
Old 01-10-2024, 05:21 PM   #10
maybeJosiah
Member
 
Registered: Jan 2024
Location: USA
Distribution: Ubuntu, Android, Ubuntu Touch, Jolla Sailfish maybe
Posts: 195

Original Poster
Blog Entries: 2

Rep: Reputation: 5
Speaking of cheapskate, I got it for like $12 at Walmart online and it has like a 11MB/sec write rate but still, I would like to be able to use near to all of it if I can. It is what I have that can hold like my Ubuntu system now. X E.
 
Old 01-10-2024, 05:22 PM   #11
maybeJosiah
Member
 
Registered: Jan 2024
Location: USA
Distribution: Ubuntu, Android, Ubuntu Touch, Jolla Sailfish maybe
Posts: 195

Original Poster
Blog Entries: 2

Rep: Reputation: 5
I do not have gparted GUI installed if I have it at all. I do have Disks though. X E.
 
Old 01-10-2024, 05:24 PM   #12
maybeJosiah
Member
 
Registered: Jan 2024
Location: USA
Distribution: Ubuntu, Android, Ubuntu Touch, Jolla Sailfish maybe
Posts: 195

Original Poster
Blog Entries: 2

Rep: Reputation: 5
Like my bootable USB has gparted though. Should I use that? I have already tried erase entire USB with Disks and remake a partition before on this USB. X E.
 
Old 01-10-2024, 05:28 PM   #13
maybeJosiah
Member
 
Registered: Jan 2024
Location: USA
Distribution: Ubuntu, Android, Ubuntu Touch, Jolla Sailfish maybe
Posts: 195

Original Poster
Blog Entries: 2

Rep: Reputation: 5
I just do not want to do like erase, try, erase... until it is basically useless anyway. X E.
 
Old 01-10-2024, 05:41 PM   #14
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,728

Rep: Reputation: 5919Reputation: 5919Reputation: 5919Reputation: 5919Reputation: 5919Reputation: 5919Reputation: 5919Reputation: 5919Reputation: 5919Reputation: 5919Reputation: 5919
Is this a flash stick or a regular drive?
 
Old 01-10-2024, 05:58 PM   #15
maybeJosiah
Member
 
Registered: Jan 2024
Location: USA
Distribution: Ubuntu, Android, Ubuntu Touch, Jolla Sailfish maybe
Posts: 195

Original Poster
Blog Entries: 2

Rep: Reputation: 5
USB flash drive. I tried deleting whole partition and starting with a 151MB empty space, then main ext4 storage, same result. It needs to be repaired after just repairing it. I guess abandon this and maybe use it as NTFS for like my Windows computers. X E.
 
  


Reply

Tags
data integrity, ext4, ubuntu, usb



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
NAS ext4 drives initialized with Win10 Computer manager :( guid parttable and ext4 filesystem loss uyjjhak Linux - Server 4 04-20-2021 06:32 PM
How to enable a Hard Disk to read/write to a USB device but disable the USB device to read/write to the hard disk without user permission? ce309 Linux - General 33 05-22-2019 04:30 PM
How to change file system from ext4 journeying to ext4 writeback ? 5883 Linux - Newbie 6 03-10-2014 08:04 AM
modprobe: Module ext4 not found. no dependencies for kernel module 'ext4' found Aquarius_Girl Linux - Newbie 6 01-25-2012 05:07 AM
Is it safe to format USB flash to ext4 or ext4? joham34 Linux - Newbie 2 01-08-2011 11:58 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware

All times are GMT -5. The time now is 09:26 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration