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.
You need to delete to get below 95% and would say at least 100Mb.
sdb2..
Alternatively, how about I obtain an 8Gb SD card (they cost next-to-nothing nowadays) and just 'dd' the original over to that? Otherwise I might risk deleting something that's critical to the functionality (the only user data on it is a few lines of shell script).
bro@bro-laptop ~/Desktop $ df -hT
Filesystem Type Size Used Avail Use% Mounted on
(...)/dev/sdb2 ext4 1.7G 1.6G 0 100% /media/bro/b7b5ddff-ddb4-48dd-84d2-dd47bf00564a
/dev/sdb1 vfat 56M 19M 38M 34% /media/bro/3312-932F
If that card is really 4GB, then something must have gone wrong formatting it (it is totally possible to create partitions that don't fill the whole card).
I suggest you fire up a graphical tool like gparted and see if the card shows some "unused space".
I can't even recall now which distro I created it from; probably Raspian I guess, but it was probably the wrong choice. I should have used something leaner and meaner like Puppy perhaps, then this space issue wouldn't have arisen in the first place. I could have got everything on a 1Gb SD card with room to spare.
The *only* things I have added to the core OS are one bash script file, some GPIO program and its associated libraries. A truly tiny amount of stuff compared to the OS, which hogs the lion's share of the Pi's resources.
Does anyone know if a Pi will run okay on a slimmer disto?
Without knowing how the drive is partitioned of if the rest of the drive is unused space we can't say if it can be expanded using raspi-config. Raspian does create a swap partition.
Hindsight is 20/20 but Raspberrypi.org site recommends min 8GB.
Have you looked at /var/log to see if there are old logs that could be deleted? You should be able to go through the obvious directories to see where there might be excess "stuff" or run du to find where?
du -a /sdcard/mount_point/ | sort -n -r | head -n 20
If you are using raspbian without a desktop (i.e the lite version), with GPIO libraries and your bash script file you should be able to rebuild the system on a 8 GB card in a matter of 30 minutes to an hour assuming you have a suitable display or you can add a configuration text file to automatically configure and setup system in headless mode. Since the system is a few years old I assume it isn't a Pi 4 which does things a bit different.
Will list all files on the filesystem, with their sizes. You can then open ~/diskuse with something like LibreOffice Calc as a tab delimited file, and sort by size to see where all the diskspace is being used up starting with the largest files.
e.g. /var/log on my desktop is using almost 1Gb just by itself.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.