microsd not showing full capacity / dd failure with Raspbian

Here you can discuss every aspect of Debian. Note: not for support requests!

microsd not showing full capacity / dd failure with Raspbian

Postby ovitus » 2020-02-02 05:01

Why is my microSD card showing a smaller size with fdisk then lsblk?

NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
loop0 7:0 0 2.2G 0 loop /mnt2
sda 8:0 0 477G 0 disk
├─sda1 8:1 0 460.3G 0 part /
└─sda2 8:2 0 16.6G 0 part [SWAP]
mmcblk0 179:256 0 59.5G 0 disk
└─mmcblk0p1 179:257 0 59.5G 0 part


root@t460:~# fdisk -l /dev/mmcblk0
Disk /dev/mmcblk0: 7.5 GiB, 8076152832 bytes, 15773736 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes

I'm trying to copy Raspbian img over, but it's failing:
root@t460:/home/awright/Downloads# dd if=2019-09-26-raspbian-buster-lite.img of=/dev/mmcblk0p1
dd: writing to '/dev/mmcblk0p1': Input/output error
3418113+0 records in
3418112+0 records out
1750073344 bytes (1.8 GB, 1.6 GiB) copied, 582.939 s, 3.0 MB/s
ovitus
 
Posts: 4
Joined: 2020-01-07 15:39

Re: microsd not showing full capacity / dd failure with Rasp

Postby Head_on_a_Stick » 2020-02-02 09:35

ovitus wrote:
Code: Select all
dd: writing to '/dev/mmcblk0p1': Input/output error

Looks like it might be broken, does it work with other devices?

Try https://packages.debian.org/buster/f3
User avatar
Head_on_a_Stick
 
Posts: 11972
Joined: 2014-06-01 17:46
Location: /dev/chair


Re: microsd not showing full capacity / dd failure with Rasp

Postby Head_on_a_Stick » 2020-02-02 10:14

arochester wrote:Raspberry Pi Forums

That was my first thought as well but the OP appears to be trying to burn a Raspbian image to the SD card from Debian so the thread is appropriate here IMO.
User avatar
Head_on_a_Stick
 
Posts: 11972
Joined: 2014-06-01 17:46
Location: /dev/chair

Re: microsd not showing full capacity / dd failure with Rasp

Postby ovitus » 2020-02-02 14:05

I posted on the Raspberry Pi forums also. I can't mount the drive to test with F3:

root@t460:/home/awright/Downloads# mount /dev/mmcblk0p1 /mnt
mount: /mnt: wrong fs type, bad option, bad superblock on /dev/mmcblk0p1, missing codepage or helper program, or other error.
ovitus
 
Posts: 4
Joined: 2020-01-07 15:39

Re: microsd not showing full capacity / dd failure with Rasp

Postby Head_on_a_Stick » 2020-02-02 17:43

Yeah that looks dead to me.

We could check the filesystem:
Code: Select all
/sbin/wipefs /dev/mmcblk0p1

Then make sure the appropriate filesystem tools are installed (for example, e2fsprogs for ext{2,3,4}) so you can try again if they aren't but I wouldn't hold out much hope.
User avatar
Head_on_a_Stick
 
Posts: 11972
Joined: 2014-06-01 17:46
Location: /dev/chair

Re: microsd not showing full capacity / dd failure with Rasp

Postby p.H » 2020-02-02 18:25

Head_on_a_Stick wrote:Yeah that looks dead to me.

Without even checking the kernel logs with dmesg ?

Head_on_a_Stick wrote:Then make sure the appropriate filesystem tools are installed (for example, e2fsprogs for ext{2,3,4})

No "filesystem tools" are required to mount most local filesystem types which have kernel drivers (such as ext* - not NFS which is a network filesystem type). Appropriate tools are required for filesystem types which have FUSE drivers, such as NTFS and exFAT.
p.H
 
Posts: 1329
Joined: 2017-09-17 07:12

Re: microsd not showing full capacity / dd failure with Rasp

Postby Head_on_a_Stick » 2020-02-02 20:01

p.H wrote:
Head_on_a_Stick wrote:Yeah that looks dead to me.

Without even checking the kernel logs with dmesg ?

Yes indeed, good point :D

@OP: make it so.

p.H wrote:No "filesystem tools" are required to mount most local filesystem types which have kernel drivers (such as ext* - not NFS which is a network filesystem type). Appropriate tools are required for filesystem types which have FUSE drivers, such as NTFS and exFAT.

I did not know that, thanks for the correction. And e2fsprogs is an essential package anyway, how embarassing...
User avatar
Head_on_a_Stick
 
Posts: 11972
Joined: 2014-06-01 17:46
Location: /dev/chair

Re: microsd not showing full capacity / dd failure with Rasp

Postby ovitus » 2020-02-04 17:25

I've gotten it working, did some reformatting with an Android phone, deleted extra partitions... anyway copying the Raspian img formats the size to something ~2GB, after which it inflates it to its maximum size during install, hence my initial confusion.
ovitus
 
Posts: 4
Joined: 2020-01-07 15:39

Re: microsd not showing full capacity / dd failure with Rasp

Postby p.H » 2020-02-05 12:34

That does not explain why lsblk and fdisk show different sizes. They don't care about the image size.
p.H
 
Posts: 1329
Joined: 2017-09-17 07:12


Return to General Discussion

Who is online

Users browsing this forum: No registered users and 4 guests

fashionable