Linux - Embedded & Single-board computerThis forum is for the discussion of Linux on both embedded devices and single-board computers (such as the Raspberry Pi, BeagleBoard and PandaBoard). Discussions involving Arduino, plug computers and other micro-controller like devices are also welcome.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I'd run out of free space with the SD card I'd been using in my Pi. That card was 4Gb, so I decided to replace it with an 8Gb one. I dd'd the old card's contents over onto the new one and inserted it, expecting to have everything up and running with an extra 4Gb of free space, but the OS reports the new card as still only being 4Gb in total size. I'm no techie, so the best reason I can come up with to explain this is that Linux doesn't check the actual size of SD cards, it just relies on reading the partition table and since I used dd I'm guessing I've copied over the old partition table which tells the OS the card is 4Gb when it's actually 8Gb. Would that be right? If so, can I correct the error by editing the PT on the new card?
Thanks.
I'd run out of free space with the SD card I'd been using in my Pi. That card was 4Gb, so I decided to replace it with an 8Gb one. I dd'd the old card's contents over onto the new one and inserted it, expecting to have everything up and running with an extra 4Gb of free space, but the OS reports the new card as still only being 4Gb in total size. I'm no techie, so the best reason I can come up with to explain this is that Linux doesn't check the actual size of SD cards, it just relies on reading the partition table and since I used dd I'm guessing I've copied over the old partition table which tells the OS the card is 4Gb when it's actually 8Gb. Would that be right? If so, can I correct the error by editing the PT on the new card?
Thanks.
If you have LVM, you can extend the disk, and resize the filesystem.
What is output of: lsblk or fdisk -l
What exactly did you dd? The whole card, the partition, or the individual files? It sounds like you've ended up with a 4GB partition on an 8GB drive. The partition gets mounted and the empty space ignored. In that case, you can either keep it as it is and partition the empty space separately, or repartition the entire drive and copy across the files from the old card. Or better still, follow dc.901's advice and resize the partition.
Last edited by Pastychomper; 10-14-2020 at 07:53 AM.
A Raspberry pi does not use LVM. If you are running raspbian there is a configuration script to expand the root filesystem to fill the card. Must be really old since the minimum size for 8GB has been around for awhile now...
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.