misska
Posts: 5
Joined: Tue Dec 31, 2013 2:16 pm

partitions problem

Tue Dec 31, 2013 2:27 pm

Hello,
After getting latest noobs image and installing raspbian on a 16Gb SD card, I wish to resize the root partition for the full card.
Actually, I have ;

Code: Select all

pi@raspberrypi ~ $ df -h
Sys. fich.     Taille Util. Dispo Uti% Monté sur
rootfs           5,9G  2,8G  2,9G  50% /
/dev/root        5,9G  2,8G  2,9G  50% /
devtmpfs         180M     0  180M   0% /dev
tmpfs             38M  260K   38M   1% /run
tmpfs            5,0M     0  5,0M   0% /run/lock
tmpfs             75M     0   75M   0% /run/shm
/dev/mmcblk0p5    60M   19M   41M  32% /boot 
and 5 partitions ;

Code: Select all

pi@raspberrypi ~ $ sudo fdisk -c -u /dev/mmcblk0

Command (m for help): p

Disk /dev/mmcblk0: 15.9 GB, 15931539456 bytes
4 heads, 16 sectors/track, 486192 cylinders, total 31116288 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
Disk identifier: 0x000da6bb

        Device Boot      Start         End      Blocks   Id  System
/dev/mmcblk0p1            8192     2511718     1251763+   e  W95 FAT16 (LBA)
/dev/mmcblk0p2         2514944    15458303     6471680   85  Linux extended
/dev/mmcblk0p3        15458304    15523839       32768   83  Linux
/dev/mmcblk0p5         2523136     2646015       61440    c  W95 FAT32 (LBA)
/dev/mmcblk0p6         2654208    15458303     6402048   83  Linux
There are 2 FAT partitions ; SETTINGS and BOOT ; are they necessary ?

I guess a linux system shall boot directly on the raspbian... ? (I am not so fluent with partition tables... )
thank you for your help
Kind regards

User avatar
DougieLawson
Posts: 35602
Joined: Sun Jun 16, 2013 11:19 pm
Location: Basingstoke, UK
Contact: Website Twitter

Re: partitions problem

Tue Dec 31, 2013 3:56 pm

That's a feature of how NOOBS is built.

If you want to expand the Raspbian ext4 filesystem use the menu options in sudo raspi-config followed by a reboot.
Note: Having anything humorous in your signature is completely banned on this forum. Wear a tin-foil hat and you'll get a ban.

Any DMs sent on Twitter will be answered next month.

This is a doctor free zone.

misska
Posts: 5
Joined: Tue Dec 31, 2013 2:16 pm

Re: partitions problem

Wed Jan 01, 2014 2:11 pm

hello,

thank you or your reply.
This was the first thing I tried ; but the message is weird, only half of the memory card is used, like NOOBS wdere designed to work with max a 8Gb card.
Obvisouly something has to be changed on the partition table to re-organize the partitions.
pi@raspberrypi ~ $ df -h
Sys. fich. Taille Util. Dispo Uti% Monté sur
rootfs 5,9G 2,8G 2,9G 50% /
/dev/root 5,9G 2,8G 2,9G 50% /
devtmpfs 180M 0 180M 0% /dev
tmpfs 38M 260K 38M 1% /run
tmpfs 5,0M 0 5,0M 0% /run/lock
tmpfs 75M 0 75M 0% /run/shm
/dev/mmcblk0p5 60M 19M 41M 32% /boot
Kind regards
Attachments
Capture d’écran 2014-01-01 à 15.08.42.png
Capture d’écran 2014-01-01 à 15.08.42.png (13.57 KiB) Viewed 8227 times

abatey
Posts: 2
Joined: Fri Jan 18, 2013 10:37 am

Re: partitions problem

Wed Jan 01, 2014 4:14 pm

> but the message is weird, only half of the memory card is used, like NOOBS wdere designed to work with max a 8Gb card.

Strange, I installed a 16GB card with NOOBS_1.3.3 this morning and rootfs (/dev/root) on / is
Size Used Avail
13G 2.3G 9.8G

Standard install, copied file to SD card, booted off it and chose normal options

I haven't come across a problem with cards up to 32GB (I think, I am not using that card for RPi at the moment)

Andy

misska
Posts: 5
Joined: Tue Dec 31, 2013 2:16 pm

Re: partitions problem

Wed Jan 01, 2014 4:26 pm

i worked a lot on this rasbbian, therefore, i wish to keep it... is there any solution to expand it ?

User avatar
FTrevorGowen
Forum Moderator
Forum Moderator
Posts: 5004
Joined: Mon Mar 04, 2013 6:12 pm
Location: Bristol, U.K.
Contact: Website

Re: partitions problem

Wed Jan 01, 2014 5:15 pm

abatey wrote:> but the message is weird, only half of the memory card is used, like NOOBS wdere designed to work with max a 8Gb card.
Strange, I installed a 16GB card with NOOBS_1.3.3 this morning and rootfs (/dev/root) on / is
Size Used Avail
13G 2.3G 9.8G
Standard install, copied file to SD card, booted off it and chose normal options
I haven't come across a problem with cards up to 32GB (I think, I am not using that card for RPi at the moment)
Andy
That seems to be consistent with what I've just tried:
GPartedN133lPostInst.v01.png
GParted screenshot
GPartedN133lPostInst.v01.png (42.75 KiB) Viewed 8187 times
(Raspbian only installed via NOOBS 1.3.3 lite on a Samsung 16Gb micro-SDHC card + adapter. Partition structure displayed via GParted running on my netbook running Ubuntu)
misska wrote:i worked a lot on this rasbbian, therefore, i wish to keep it... is there any solution to expand it ?
I guess you could try using GParted (or similar), with care, on another machine running Linux (could even be a Pi using an external USB card reader).
Trev.
Still running Raspbian Jessie on some older Pi's (an A, B1, B2, B+, P2B, 3xP0, P0W) but Stretch on my 2xP3A+, P3B+, P3B, B+, A+ and a B2. See: https://www.cpmspectrepi.uk/raspberry_pi/raspiidx.htm

User avatar
Raspruss
Posts: 93
Joined: Thu Jan 23, 2014 3:50 pm
Location: Virginia, USA

Re: partitions problem - resolved yet?

Wed Jan 29, 2014 12:01 am

Has this been resolved yet?

I have essentially the same problem - all the instructions "on the 'Net" are either dated or applicable to some prior version of NOOBS or something.

I bought a Canakit Pi with an 8GB NOOBS SD card. Booted it successfully, selected "Raspbian" as the OS, it came up flawlessly and I now have a well-configured originally-NOOBS version of Raspbian running successfully on an 8GB SD card.

That "well-configured" part above is important - I've spent the last week tweaking this and that, configuring, adding software, etc. I do not want to lose that work.

Now I have a new 32GB SD card. I want to use the full 32GB. I used Win32DiskImager to save my well-configured 8GB SD card onto hard disk, then copied that image back out to the 32GB SD card. That 32GB card has been relabeled "RASP01" (from the original's "RECOVERY").

NONE of the instructions I've found on this site nor on the 'Net appear to be correct "anymore" and, as this thread shows, there are others with exactly the same type of problem; everything the OP said applies to me as well (nee the 5 partitions instead of 3) - the very clear and seemingly useful YouTube video is wrong, the manual steps that pretty much echo that video are wrong, the use of "sudo raspi-config" is broken.

So has this problem been resolved? To the original poster if you're reading this - did you get a resolution that saved your work and simply resized/configured partitions?

Any help always appreciated.

misska
Posts: 5
Joined: Tue Dec 31, 2013 2:16 pm

Re: partitions problem

Wed Jan 29, 2014 8:28 am

in fact, I used a Linux with gparted to extend the partitions without loosing data.
So, Linux gparted was the only tool that could recognized ext4 partition, and resize in non-destructive way.

hope this helps !

User avatar
Raspruss
Posts: 93
Joined: Thu Jan 23, 2014 3:50 pm
Location: Virginia, USA

Re: partitions problem

Wed Jan 29, 2014 12:21 pm

misska wrote:in fact, I used a Linux with gparted to extend the partitions without [losing] data.
Okay, I'll give that a try using the Pi itself since I can plug the ready-to-change 32GB SD card into another USB slot.

W.r.t. to the unusual partition layout where partitions are overlaying each other - did you simply extend the end of the two/three largest partitions or do something a little more so the overlayed partitions also had changes made? Here's your original partitioning again (my 8GB original SD card is similar to, but not exactly, this):

Code: Select all

        Device Boot      Start         End      Blocks   Id  System
/dev/mmcblk0p1            8192     2511718     1251763+   e  W95 FAT16 (LBA)
/dev/mmcblk0p2         2514944    15458303     6471680   85  Linux extended
/dev/mmcblk0p3        15458304    15523839       32768   83  Linux
/dev/mmcblk0p5         2523136     2646015       61440    c  W95 FAT32 (LBA)
/dev/mmcblk0p6         2654208    15458303     6402048   83  Linux
Thanks for the reply(s).

User avatar
Raspruss
Posts: 93
Joined: Thu Jan 23, 2014 3:50 pm
Location: Virginia, USA

Re: partitions problem

Wed Jan 29, 2014 5:58 pm

Raspruss wrote:
misska wrote:in fact, I used a Linux with gparted to extend the partitions without [losing] data.
Okay, I'll give that a try using the Pi itself since I can plug the ready-to-change 32GB SD card into another USB slot.

W.r.t. to the unusual partition layout where partitions are overlaying each other - did you simply extend the end of the two/three largest partitions
=====
[somewhat later]

Okay, to answer that myself - the overlayed partitions are logical ones on top of an extended partition. To resize partitions appropriately for my situation (8GB Raspbian installed from a NOOBS 8GB card that came with my Pi), I first made an image of the 8GB disk on a Windows machine using Win32DiskImager, then copied that image (also using Win32DiskImager) to an "empty" 32GB SD card, then plugged that card into a spare USB port on my Pi's external powered USB hub. That automatically mounted 4 or so /dev/sda? disks so I manually unmounted each one of them. Then I ran GParted (under X Windows) and selected the 32GB card as the one to repartition. As shown by misska's original post, there were a number of partitions shown in GParted (more than the =3= that the YouTube video and numerous How-Tos say there should be (since this is a NOOBS-install of Raspbian)).

To begin to perform the resizing I selected the far-right partition - a small one - and told GParted to move it. That move was performed by simply grabbing it in the dialog and pulling it all the way over to the right. This freed up the right edge of the large extended partition (within which were logical partitions).. The next step was to resize that extended partition to use all of the unallocated space on the 32GB card. To do this I told GParted to resize the extended partition, then grabbed its right edge in the dialog and pulled the right edge to the far right, resizing it.The final manual step was to resize the logical partition inside the extended partition to use all the unallocated space within the extended partition. This was done by selecting the "far right" logical partition within the extended partition and telling GParted to resize it, then grabbing the logical partition's right edge and pulling it all the away over to the right in the dialog., thus expanding its size to take all the unallocated space in the extended partition.

The final step was simply to hit "Apply" to actually make the changes.

I then powered down, swapped out the 8GB main disk, swapped in the new 32GB "main" disk, and powered back up. That disk is now my main Raspbian disk on my Pi (active while typing this post addendum).

Thanks, misska, your reply was the kick I needed to Just Do It with GParted.

misska
Posts: 5
Joined: Tue Dec 31, 2013 2:16 pm

Re: partitions problem

Wed Jan 29, 2014 7:01 pm

I am am glad this finaly worked ; ...hope I did not kicked too strongly ?

this story made me arrives to the sade conclusion that there were no tool on Win or Mac world that could resize an ext partition without destructing all datas...

User avatar
Raspruss
Posts: 93
Joined: Thu Jan 23, 2014 3:50 pm
Location: Virginia, USA

Re: partitions problem

Wed Jan 29, 2014 7:12 pm

misska wrote:this story made me arrives to the sade conclusion that there were no tool on Win or Mac world that could resize an ext partition without destructing all datas...
I'm somewhat surprised the Mac doesn't have such a tool since it's UNIX-based (more or less now).

With Windows the problem is one, probably, of what is "mounted" and what is not; someone who's intimately familiar with Windows could probably figure out a way.

I was fortunate to have another (ancient) Linux box had I needed it but just using the Pi itself turned out to be trivially easy - when I bought the Pi (Canakit) I also bought a 7-port powered USB hub so have lots of free USB ports to stick things like extra SD cards. that made it very easy to make the Pi aware of the 32GB card and use GParted on it without harming the active 8GB SD card being used as the main Pi drive.

Thanks again...appreciated.

ramgo
Posts: 1
Joined: Tue May 20, 2014 7:54 pm

Re: partitions problem

Tue May 20, 2014 8:47 pm

Raspruss wrote: =====
[somewhat later]

Okay, to answer that myself - the overlayed partitions are logical ones on top of an extended partition. To resize partitions appropriately for my situation (8GB Raspbian installed from a NOOBS 8GB card that came with my Pi), I first made an image of the 8GB disk on a Windows machine using Win32DiskImager, then copied that image (also using Win32DiskImager) to an "empty" 32GB SD card, then plugged that card into a spare USB port on my Pi's external powered USB hub. That automatically mounted 4 or so /dev/sda? disks so I manually unmounted each one of them. Then I ran GParted (under X Windows) and selected the 32GB card as the one to repartition. As shown by misska's original post, there were a number of partitions shown in GParted (more than the =3= that the YouTube video and numerous How-Tos say there should be (since this is a NOOBS-install of Raspbian)).

To begin to perform the resizing I selected the far-right partition - a small one - and told GParted to move it. That move was performed by simply grabbing it in the dialog and pulling it all the way over to the right. This freed up the right edge of the large extended partition (within which were logical partitions).. The next step was to resize that extended partition to use all of the unallocated space on the 32GB card. To do this I told GParted to resize the extended partition, then grabbed its right edge in the dialog and pulled the right edge to the far right, resizing it.The final manual step was to resize the logical partition inside the extended partition to use all the unallocated space within the extended partition. This was done by selecting the "far right" logical partition within the extended partition and telling GParted to resize it, then grabbing the logical partition's right edge and pulling it all the away over to the right in the dialog., thus expanding its size to take all the unallocated space in the extended partition.

The final step was simply to hit "Apply" to actually make the changes.
Awesome it works!!!!! :D :D :D
Its little bit tricky at first but ones you read it carefully and compare it with your GParted screen all fall in line.
b.t.w I used VMware virtual machine (for Windows based users), GParted Live CD/USB/HD/PXE and obviously a card reader to setup the resize environment.

Anyone facing same problem and unable to resolve please comment I will post more screen shot for you.

Thanks to Raspruss, misska and all others who commented.
Attachments
GParted_on_VMware.jpg
GParted screen running on VMware :- view after resize and conform working.
GParted_on_VMware.jpg (58.92 KiB) Viewed 7668 times

User avatar
mad-hatter
Posts: 419
Joined: Sun Feb 26, 2012 2:58 pm
Location: By the UK seaside

Re: partitions problem

Tue May 20, 2014 11:45 pm

Hello,

If you want to do this on a PC (Windows/linux/whatever),
there is a bootable image version of gparted available.
Down load and burn to a CD, then boot from the CD,
You might have to change your BIOS settings to boot from CD,
select CD as the first boot device, HDD as second boot device.

Regards

Return to “Raspbian”