pontypool
Posts: 128
Joined: Thu Apr 10, 2014 1:18 pm

resizing partitions

Tue Mar 22, 2016 8:21 pm

I am following instructions how to resize or delete partitions in my raspberry pi (64 gig card) as I am using it for torrenting and the home/video directory only has 20 gig of space.

these are my instructions
http://raspberrypi.stackexchange.com/qu ... -partition

But as you can see below, I have quite more than 1 linux or fat 32 partition. In fact there are 3 of each.
On my raspbians file manager utility, I can see that there is a "20gig volume" but the properties of which says 17.2
used of 18.2, there doesn't seem to be any data inside other than a "lost and found" which contains no date (0)
I suppose this one I can delete? although again going by the partition list, none of them seem to be either 18.2 or 20 gig.
root-rbp2 also seems to have 18.8 of space with 17.3 free, although this one does seem to contain a directory tree.
the "home" folder contains 20.8 and is where my torrent videos go.
Any help how to delete/resize/ preferably to auto resize based on use would be great. I want all free space to go to the home directory, or if possible create a new partition which contains any free/unused space. that way if I install an application and the system area needs more space, it can just take that free space from the free space??
do i make any sense?



[email protected]:~ $ sudo fdisk /dev/mmcblk0

Welcome to fdisk (util-linux 2.25.2).
Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.


Command (m for help): p
Disk /dev/mmcblk0: 59.5 GiB, 63864569856 bytes, 124735488 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
Disklabel type: dos
Disk identifier: 0x00095f5f

Device Boot Start End Sectors Size Id Type
/dev/mmcblk0p1 32768 255859 223092 109M e W95 FAT16 (LBA)
/dev/mmcblk0p2 255860 124735487 124479628 59.4G 85 Linux extended
/dev/mmcblk0p5 262144 327677 65534 32M 83 Linux
/dev/mmcblk0p6 327680 456703 129024 63M c W95 FAT32 (LBA)
/dev/mmcblk0p7 458752 44949501 44490750 21.2G 83 Linux
/dev/mmcblk0p8 44949504 45113341 163838 80M c W95 FAT32 (LBA)
/dev/mmcblk0p9 45113344 85401597 40288254 19.2G 83 Linux
/dev/mmcblk0p10 85401600 85729277 327678 160M c W95 FAT32 (LBA)
/dev/mmcblk0p11 85729280 124735487 39006208 18.6G 83 Linux


Command (m for help):

stderr
Posts: 2178
Joined: Sat Dec 01, 2012 11:29 pm

Re: resizing partitions

Tue Mar 22, 2016 8:36 pm

pontypool wrote:I am following instructions how to resize or delete partitions
these are my instructions
http://raspberrypi.stackexchange.com/qu ... -partition
You seem to have a lot of unusual partitions but then someone can just go crazy and set up all sorts of crazy things if they like. If you have X available, I'd suggest you use gparted, because fdisk is pretty hard to learn on. And resizing is a lot clearer with gparted than fdisk.

DirkS
Posts: 10010
Joined: Tue Jun 19, 2012 9:46 pm
Location: Essex, UK

Re: resizing partitions

Tue Mar 22, 2016 11:00 pm

Seems to be a Noobs setup with more than one OS...

Code: Select all

/dev/mmcblk0p1 Noobs boot partition)
/dev/mmcblk0p2 Extended partition that contains the partitions below
/dev/mmcblk0p5 Noobs recovery (or whatever it is called
/dev/mmcblk0p6 + /dev/mmcblk0p7 OS number 1
/dev/mmcblk0p8 + /dev/mmcblk0p9 OS number 2
/dev/mmcblk0p10 + /dev/mmcblk0p11 OS number 3
The numbers indicate that there is no free space on the card...

So did you actually install 3 operating systems?

pontypool
Posts: 128
Joined: Thu Apr 10, 2014 1:18 pm

Re: resizing partitions

Thu Mar 31, 2016 6:43 pm

no.. i have no I am not sure why there are 3 operating systems.
I couldn't boot at one point, so I went into noobs recovery mode and reinstalled raspbian, which did the trick, but if anything that should only explain 1 extra os~??? and yep I know one of the partitions are full, that's why I want to resize and/or delete the other partitions as I only want the place where I keep my videos taking up all the available space, with the possible exception of the applications folder, as and when needed to grow bigger.
It's the creators of noobs who need to be asked why I have so many partitions.

stderr
Posts: 2178
Joined: Sat Dec 01, 2012 11:29 pm

Re: resizing partitions

Thu Mar 31, 2016 6:57 pm

pontypool wrote:It's the creators of noobs who need to be asked why I have so many partitions.
Sometimes those sitting high upon icy windblown slopes of Mt Olympus cannot see all the way down to us puny mortals clawing up the trails on the forest floor below. Sometimes it's better that way. I'd just grab Raspbian Lite Jessie and start over by imaging to the sdcard directly.

I'm assuming there isn't anything on the card you care about. If there is, then you'll need to find a machine you can mount all those partitions in and save whatever you care about. My understanding is that Windows won't let you do that.

pontypool
Posts: 128
Joined: Thu Apr 10, 2014 1:18 pm

Re: resizing partitions

Thu Mar 31, 2016 8:38 pm

stderr wrote:
pontypool wrote:It's the creators of noobs who need to be asked why I have so many partitions.
Sometimes those sitting high upon icy windblown slopes of Mt Olympus cannot see all the way down to us puny mortals clawing up the trails on the forest floor below. Sometimes it's better that way. I'd just grab Raspbian Lite Jessie and start over by imaging to the sdcard directly.

I'm assuming there isn't anything on the card you care about. If there is, then you'll need to find a machine you can mount all those partitions in and save whatever you care about. My understanding is that Windows won't let you do that.
would you happen to know if it's possible to backup my raspbian and just restore it without noobs, onto jessie like you said??
btw why jessie lite and not just jessie?

edit:on second thoughts, I like noobs because I like being able to switch over to the other O's like openelec. You can't do that without noobs, you need to have seperate sd cards for each os. screw that, switching sd cards.

stderr
Posts: 2178
Joined: Sat Dec 01, 2012 11:29 pm

Re: resizing partitions

Thu Mar 31, 2016 8:52 pm

pontypool wrote:would you happen to know if it's possible to backup my raspbian and just restore it without noobs, onto jessie like you said??
If there is something you care about on all those partitions, obviously erasing everything will kill all that important stuff.
btw why jessie lite and not just jessie?
It is just command line but it gives you a good smaller base to start with. It's often easier to add to than remove from. But obviously regular Jessie is going to have X available out of the gate and you might want that instead.
edit:on second thoughts, I like noobs because I like being able to switch over to the other O's like openelec. You can't do that without noobs, you need to have seperate sd cards for each os. screw that, switching sd cards.
I haven't used anything that lets me run more than one OS from initial boot on up, I have used Tiny Core and chroot into command line Raspbian. That works to run, say, omxplayer.

I would at least get some way to access your sdcard without booting from it so you can really figure out what is going on. That would likely mean either a separate Linux box or another sdcard running an OS that doesn't care if you remove the card after boot, something like Tiny Core. If you can't boot and there's important stuff on that card, you pretty much have to find another card to get things going again.

pontypool
Posts: 128
Joined: Thu Apr 10, 2014 1:18 pm

Re: resizing partitions

Thu Mar 31, 2016 10:20 pm

omx player is so buggy and terrible for playing movies.
sometimes keyboard controls don't work, for no reason. Space bar just will not pause, escape will not kill omx etc..
Also the full screen button is very badly designed. I presume that [] is the full screen button, however it only works if you first change the screen size to "full" and the resolution also to "full". Then if you press the [] the video will fill the screen with no gui, but upon going into full screen mode the video starts from the beginning. Then once in full screen, it's impossible to pause/forward/rewind etc.. (see above)

I am truly stunned that OMX player exists and has not been fixed. I first used it with my raspberry pi 1
and the same lack of functional controls still exist now with my raspberry pi2 and after many reformats. So I know that my particular OS isn't the problem, as it's noobs, so If I have these problems, everyone should.
Just really really hate omx player.

Anyway enough of my rant, just explaining why I like openelec. the videoplayer is just a million times better than omx. BTW what is tinycore.

User avatar
ab1jx
Posts: 868
Joined: Thu Sep 26, 2013 1:54 pm
Location: Heath, MA USA
Contact: Website

Re: resizing partitions

Tue Oct 09, 2018 1:56 am

You might want to use Piclone to back up the SD in question before you use this advice. With some tools like fdisk programs and gparted you can resize a partition to fill the whole device by just deleting it then creating a new one. DON'T format it if there's data in there. It works because the starting point of the deleted partition becomes the starting point of the new one. The default size for the new partition is the biggest contiguous space available which coincidentally is what you want. This approach can fail if, for example, there was already some empty space just before the partition you deleted, the beginning of that will get used instead.

Resizing is mostly automatic now on first boot so you don't need to do this anymore.

Return to “Beginners”