LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 12-28-2023, 10:59 AM   #16
mrmazda
LQ Guru
 
Registered: Aug 2016
Location: SE USA
Distribution: openSUSE 24/7; Debian, Knoppix, Mageia, Fedora, others
Posts: 5,869
Blog Entries: 1

Rep: Reputation: 2076Reputation: 2076Reputation: 2076Reputation: 2076Reputation: 2076Reputation: 2076Reputation: 2076Reputation: 2076Reputation: 2076Reputation: 2076Reputation: 2076

Quote:
Originally Posted by Sumguy View Post
OK, I'm missing something here: How can I do these things if the TD and SD are inaccessible/not being detected?
Did you ever try fdisk, lsblk or blkid for accessing, or michaelk's last suggestion? Inaccessible and not detected are not the same thing. When the kernel prints messages about them, it's a result of detection.
Code:
[49379.687129] sd 6:0:0:0: [sdb] tag#0 access beyond end of device
[49379.687141] blk_update_request: I/O error, dev sdb, sector 3994496 op 0x0:(READ) flags 0x80700 phys_seg 1 prio class 0
[49379.687171] sd 6:0:0:0: [sdb] tag#0 access beyond end of device
[49379.687176] blk_update_request: I/O error, dev sdb, sector 3994496 op 0x0:(READ) flags 0x0 phys_seg 1 prio class 0
[49379.687181] Buffer I/O error on dev sdb, logical block 499312, async page read
[49447.032468] sd 6:0:0:0: [sdb] 31116288 512-byte logical blocks: (15.9 GB/14.8 GiB)
These messages indicate detection, just not with any filesystem suitable for mounting or files access.
 
Old 12-28-2023, 12:50 PM   #17
Sumguy
Member
 
Registered: Jul 2010
Location: Rural Kentucky, USA.
Distribution: BunsenLabs Linux
Posts: 465

Original Poster
Blog Entries: 2

Rep: Reputation: 119Reputation: 119
EDIT: SEE NEW INFO IN FOLLOWING POST BEFORE REPLYING (Leaving this in place to help others who may be searching for same issue]

Quote:
Originally Posted by mrmazda View Post
These messages indicate detection, just not with any filesystem suitable for mounting or files access.
That's what I initially thought- but if I run dmesg without the card inserted, I get the same output which you quoted.

lsblk is definitely showing it though...


No card inserted:
Code:
bob@64-130-165-45:~$ lsblk
NAME   MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
sda      8:0    0 931.5G  0 disk 
├─sda1   8:1    0  27.9G  0 part /
├─sda2   8:2    0     1K  0 part 
├─sda5   8:5    0   976M  0 part [SWAP]
└─sda6   8:6    0 902.6G  0 part /home
sr0     11:0    1  1024M  0 rom
Card inserted:
Code:
bob@64-130-165-45:~$ lsblk
NAME   MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
sda      8:0    0 931.5G  0 disk 
├─sda1   8:1    0  27.9G  0 part /
├─sda2   8:2    0     1K  0 part 
├─sda5   8:5    0   976M  0 part [SWAP]
└─sda6   8:6    0 902.6G  0 part /home
sdb      8:16   1  14.8G  0 disk 
sr0     11:0    1  1024M  0 rom
[/code]

fdisk gives me this message:
Code:
Device does not contain a recognized partition table.
Created a new DOS disklabel with disk identifier 0x4e7fadb4.
So you are correct, it is seeing the card. I pressed "w" to save the new DOS disk label (I have no clue as to what I'm doing, but it seemed logical). Now when I run fdisk it says "No partition is defined yet!".
So I see that progress is being made....and I assume that the next logical step would be to create a partition table- which I'm not sure how to do. I could experiment, but I don't want to break anything, so, if I may burden you for a little more guidance, I think this may get fixed.

Last edited by Sumguy; 12-28-2023 at 01:11 PM. Reason: Redundency
 
Old 12-28-2023, 01:18 PM   #18
wpeckham
LQ Guru
 
Registered: Apr 2010
Location: Continental USA
Distribution: Debian, Ubuntu, RedHat, DSL, Puppy, CentOS, Knoppix, Mint-DE, Sparky, VSIDO, tinycore, Q4OS, Manjaro
Posts: 5,730

Rep: Reputation: 2743Reputation: 2743Reputation: 2743Reputation: 2743Reputation: 2743Reputation: 2743Reputation: 2743Reputation: 2743Reputation: 2743Reputation: 2743Reputation: 2743
You were SO CLOSE! You can create and write out a new partition table from within fdisk.
The man page is free, and might be faster.
 
1 members found this post helpful.
Old 12-28-2023, 01:21 PM   #19
Sumguy
Member
 
Registered: Jul 2010
Location: Rural Kentucky, USA.
Distribution: BunsenLabs Linux
Posts: 465

Original Poster
Blog Entries: 2

Rep: Reputation: 119Reputation: 119
We're just about there!

I ran gparted and created a primary partition of 15xxx MiB. and an ext4 filesystem.

Now the computer detects the SD card and opens the filemanager when the card is inserted, and it shows up!

Now the (hopefully) last remaining problem is that it is showing a folder with an "X" icon on it; "properties" shows that this folder is occupy 5% of available space, and when I try transferring a file to the card, it rejects it.

I could try inserting the card in my camera and seeing if that formats it correctly...but I'm afraid of breaking the camera- plus, I'd like to know how to do this properly both for future use, and so I can do the same to my thumb drive.
 
Old 12-28-2023, 01:24 PM   #20
Sumguy
Member
 
Registered: Jul 2010
Location: Rural Kentucky, USA.
Distribution: BunsenLabs Linux
Posts: 465

Original Poster
Blog Entries: 2

Rep: Reputation: 119Reputation: 119
Quote:
Originally Posted by wpeckham View Post
You were SO CLOSE! You can create and write out a new partition table from within fdisk.
The man page is free, and might be faster.
We cross-posted.
I didn't see the option to create a partition in the man page ("command "m" "?) only to create a new label. But I did run gparted, and got 'er done! Not sure if I did that right though, as there is still one minor issue, as mentioned in my previous post.
 
Old 12-28-2023, 04:49 PM   #21
mrmazda
LQ Guru
 
Registered: Aug 2016
Location: SE USA
Distribution: openSUSE 24/7; Debian, Knoppix, Mageia, Fedora, others
Posts: 5,869
Blog Entries: 1

Rep: Reputation: 2076Reputation: 2076Reputation: 2076Reputation: 2076Reputation: 2076Reputation: 2076Reputation: 2076Reputation: 2076Reputation: 2076Reputation: 2076Reputation: 2076
Quote:
Originally Posted by Sumguy View Post
I could try inserting the card in my camera and seeing if that formats it correctly...but I'm afraid of breaking the camera- plus, I'd like to know how to do this properly both for future use, and so I can do the same to my thumb drive.
I'm not aware that any camera is capable of using the EXT4 filesystem. They seem always to use non-Linux native filesystems. I would not put it in the camera without reading its manual first. The camera should be able to create a new partition table and new FAT filesystem that it can use. If you were to change the existing EXT4 to exFAT by changing the table ID, and reformatting, then it might be ready for camera use.
 
Old 12-28-2023, 05:26 PM   #22
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,776

Rep: Reputation: 5933Reputation: 5933Reputation: 5933Reputation: 5933Reputation: 5933Reputation: 5933Reputation: 5933Reputation: 5933Reputation: 5933Reputation: 5933Reputation: 5933
When you put the card back in the camera I suggest having it format the card. I would guess most modern cameras use exFAT
 
1 members found this post helpful.
Old 12-28-2023, 05:30 PM   #23
Sumguy
Member
 
Registered: Jul 2010
Location: Rural Kentucky, USA.
Distribution: BunsenLabs Linux
Posts: 465

Original Poster
Blog Entries: 2

Rep: Reputation: 119Reputation: 119
Quote:
Originally Posted by mrmazda View Post
I'm not aware that any camera is capable of using the EXT4 filesystem. They seem always to use non-Linux native filesystems. I would not put it in the camera without reading its manual first. The camera should be able to create a new partition table and new FAT filesystem that it can use. If you were to change the existing EXT4 to exFAT by changing the table ID, and reformatting, then it might be ready for camera use.
Thanks. Exactly! Seconds before your post appeared, I used gparted to format the SD to FAT32 (Great minds think alike, but I managed to do it anyway ).

And the card is WORKING in the computer (and from what you say, should be safe for the camera, I assume?).

I'll just about ready to mark this thread as solved.....

just onm question: Why wasn't the SD card working in the computer when it was formatted sas ext4?

Make that two questions....

...and why is the card showing a capacity of 14.86GB as opposed to 15.xx since it's a 16GB card?

Code:
bob@64-130-165-45:~$ lsblk /dev/sdb
NAME   MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT
sdb      8:16   1 14.8G  0 disk 
└─sdb1   8:17   1 14.8G  0 part
I chose "primary" partition in Gparted...should I have chosen "logical"? (Hey, I'll take the 14.86...but I'd like to know what I did wrong so that I can understand this better...and maybe even make this 'repair' perfect.)
 
Old 12-28-2023, 05:33 PM   #24
Sumguy
Member
 
Registered: Jul 2010
Location: Rural Kentucky, USA.
Distribution: BunsenLabs Linux
Posts: 465

Original Poster
Blog Entries: 2

Rep: Reputation: 119Reputation: 119
Quote:
Originally Posted by michaelk View Post
When you put the card back in the camera I suggest having it format the card. I would guess most modern cameras use exFAT
Ah..so exFAT is different than FAT32? (I'm pretty sure the camera will reformat it to whatever it uses (Searched the web last night, but could not determine what filesystem my Nikon B500 uses...).
 
Old 12-28-2023, 06:25 PM   #25
Sumguy
Member
 
Registered: Jul 2010
Location: Rural Kentucky, USA.
Distribution: BunsenLabs Linux
Posts: 465

Original Poster
Blog Entries: 2

Rep: Reputation: 119Reputation: 119
{Vinnie Barbarino voice]: "O-kay, O-kay..." (Yeah, I'm old!)

I think I've got it!
Somehow I had created 2 partitions on the SD card initially- the smaller one was of an "unknown filesystem". Used Gparted (Thank goodness for GUI tools) to expand the 16.86GB exFAT partition (It's doing it now..hopefully it'll be successful) and it's showing that it will resize it to 15.92GB...which is right what it should be/used to be....so I think this is solved!

Thank you all for your help and patience! I very much appreciate it!

(Yes, MichaelK, you were correct- camera uses exFAT- determined by removing the working card I had in the camera, and putting it in the computer and running fdisk. I'm sure there was probably a more efficient command...but I don't know it off-hand).

Last edited by Sumguy; 12-28-2023 at 06:30 PM.
 
Old 12-28-2023, 06:36 PM   #26
mrmazda
LQ Guru
 
Registered: Aug 2016
Location: SE USA
Distribution: openSUSE 24/7; Debian, Knoppix, Mageia, Fedora, others
Posts: 5,869
Blog Entries: 1

Rep: Reputation: 2076Reputation: 2076Reputation: 2076Reputation: 2076Reputation: 2076Reputation: 2076Reputation: 2076Reputation: 2076Reputation: 2076Reputation: 2076Reputation: 2076
Quote:
Originally Posted by Sumguy View Post
why is the card showing a capacity of 14.86GB as opposed to 15.xx since it's a 16GB card?
Because some tools lie. A card advertised as 16GB is 16GB, which is approximately 14.86GiB. GB refers to a number that is a power of 10. GiB refers to a number that is a power of 2. The difference in the vicinity of 1,000 is 1,000 vs 1024. The spread grows as the numbers grow. 1GB=1,000,000 is 10^6. 1GiB=1,048,576 is 2^20. Where you see 14.86GB it probably should show 14.90GiB. https://physics.nist.gov/cuu/Units/binary.html
 
Old 12-28-2023, 07:16 PM   #27
Sumguy
Member
 
Registered: Jul 2010
Location: Rural Kentucky, USA.
Distribution: BunsenLabs Linux
Posts: 465

Original Poster
Blog Entries: 2

Rep: Reputation: 119Reputation: 119
Quote:
Originally Posted by mrmazda View Post
Because some tools lie. A card advertised as 16GB is 16GB, which is approximately 14.86GiB. GB refers to a number that is a power of 10. GiB refers to a number that is a power of 2. The difference in the vicinity of 1,000 is 1,000 vs 1024. The spread grows as the numbers grow. 1GB=1,000,000 is 10^6. 1GiB=1,048,576 is 2^20. Where you see 14.86GB it probably should show 14.90GiB. https://physics.nist.gov/cuu/Units/binary.html
That makes sense. I'm fairly certain that the card used to show (before it broke) as 15.92GB....but sure enough, now that Gparted has finished with it, it reads 14.92... I may've been mistaken about the 15.92...who knows- I'm just glad it was able to be fixed, and that if there truly is a discrepancy I now know why, thanks to you.

Now to fix my thumb drive! Now thaty I know how to do it...it should take all of two minutes!
 
Old 12-28-2023, 07:47 PM   #28
Sumguy
Member
 
Registered: Jul 2010
Location: Rural Kentucky, USA.
Distribution: BunsenLabs Linux
Posts: 465

Original Poster
Blog Entries: 2

Rep: Reputation: 119Reputation: 119
Thumb drive is fixed! Mission accomplished!
 
Old 12-29-2023, 08:42 AM   #29
Jan K.
Member
 
Registered: Apr 2019
Location: Esbjerg
Distribution: Windows 7...
Posts: 773

Rep: Reputation: 489Reputation: 489Reputation: 489Reputation: 489Reputation: 489
It has always been recommended that a card to be used in camera only should be formatted in camera...

Happy New Year!
 
  


Reply



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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Copying ISO to thumb drive using 'dd' causes thumb drive to be read-only? ahc_fan Linux - General 8 01-15-2019 08:10 AM
[SOLVED] cannot boot from grub USB thumb drive: /dev/sdb not detected... X-LFS-2010 Linux - Newbie 21 05-30-2018 07:20 PM
[SOLVED] if [[ -n "$1" ]]; then FAIL FAIL FAIL rbees Programming 7 03-25-2015 02:39 PM
dd to copy a thumb drive which I am live booted on to another thumb drive DrinkinHomeBrew Linux - Newbie 3 01-26-2015 04:52 PM
USB thumb drive detected by usb but not by scsi ashlock Linux - Hardware 6 06-02-2005 02:58 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 12:41 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