typxxi
Posts: 44
Joined: Sat Mar 05, 2016 6:11 pm
Location: GERMANY

NOOBS 1.8 - removing and expanding a neighbour partiton

Wed Mar 16, 2016 9:14 am

Hey,

I've installed NOOBS 1.8 with the options RASPBIAN and OPENELEC and 512 MB Partition

The system run fine until I ran out of space, but I had luck to have made a backup before the java installation.
I was able to restore my image and that works fine, but only 37 MB space left.

Then I started to delete unwanted stuff like the 512 MB partition (meanwhile I was able to mount a 64 GB USB stick).
That worked fine.

As you can see behind partition 7 (/dev/mmcblk0p7) there are 512 MB of space (sector 11083774 - 12132351) and the same for partition 8 (/dev/mmcblk0p8)

Code: Select all

Device         Boot    Start      End  Sectors  Size Id Type
/dev/mmcblk0p1          8192  2289062  2280871  1,1G  e W95 FAT16 (LBA)
/dev/mmcblk0p2       2289063 15548415 13259353  6,3G  5 Extended
/dev/mmcblk0p5       2293760  2359293    65534   32M 83 Linux
/dev/mmcblk0p6       2359296  2488319   129024   63M  c W95 FAT32 (LBA)
/dev/mmcblk0p7       2490368 11083773  8593406  4,1G 83 Linux
/dev/mmcblk0p8      12132352 14499837  2367486  1,1G 83 Linux
How can I expand the partitions 7 and 8 ?

My first try with a windows 10 Add On Partition Tool did not work and I was not able to find a solution on github.

Thx a lot
WOLF

fruitoftheloom
Posts: 21093
Joined: Tue Mar 25, 2014 12:40 pm
Location: Delightful Dorset

Re: NOOBS 1.8 - removing and expanding a neighbour partiton

Wed Mar 16, 2016 10:36 am

parted in Linux: http://linux.die.net/man/8/parted

Though be careful of NOOBS partitioning scheme: https://github.com/raspberrypi/noobs/wi ... -explained
Retired disgracefully.....
This at present is my daily "computer" https://www.asus.com/us/Chrome-Devices/Chromebit-CS10/

ShiftPlusOne
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 6086
Joined: Fri Jul 29, 2011 5:36 pm
Location: The unfashionable end of the western spiral arm of the Galaxy

Re: NOOBS 1.8 - removing and expanding a neighbour partiton

Wed Mar 16, 2016 10:54 am

fruitoftheloom wrote:parted in Linux: http://linux.die.net/man/8/parted

Though be careful of NOOBS partitioning scheme: https://github.com/raspberrypi/noobs/wi ... -explained
I believe the settings partition has moved a bit, so that page is not entirely accurate. The settings partition is now one of the logical partitions.

fruitoftheloom
Posts: 21093
Joined: Tue Mar 25, 2014 12:40 pm
Location: Delightful Dorset

Re: NOOBS 1.8 - removing and expanding a neighbour partiton

Wed Mar 16, 2016 10:58 am

ShiftPlusOne wrote:
fruitoftheloom wrote:parted in Linux: http://linux.die.net/man/8/parted

Though be careful of NOOBS partitioning scheme: https://github.com/raspberrypi/noobs/wi ... -explained
I believe the settings partition has moved a bit, so that page is not entirely accurate. The settings partition is now one of the logical partitions.
Well it is about time NOOBS was updated then so the information matches the release. :roll:
Retired disgracefully.....
This at present is my daily "computer" https://www.asus.com/us/Chrome-Devices/Chromebit-CS10/

typxxi
Posts: 44
Joined: Sat Mar 05, 2016 6:11 pm
Location: GERMANY

Re: NOOBS 1.8 - removing and expanding a neighbour partiton

Wed Mar 16, 2016 12:50 pm

Hey,
that noobs sd, where I had deleted the formerly 512 MB data partition for each OS (raspbian and openelec), did still boot and work in both OS. My problem is the linux / debian / raspbian command I have to use to expand my raspbian and my openelec partition to get first additional 512 MB.

You can see the gap in the sectors between partition 7 and 8:

Code: Select all

Device         Boot    Start      End  Sectors  Size Id Type
/dev/mmcblk0p1          8192  2289062  2280871  1,1G  e W95 FAT16 (LBA)
/dev/mmcblk0p2       2289063 15548415 13259353  6,3G  5 Extended
/dev/mmcblk0p5       2293760  2359293    65534   32M 83 Linux
/dev/mmcblk0p6       2359296  2488319   129024   63M  c W95 FAT32 (LBA)
/dev/mmcblk0p7       2490368 11083773  8593406  4,1G 83 Linux
/dev/mmcblk0p8      12132352 14499837  2367486  1,1G 83 Linux
Partition 7 can be extended from 11083773 to 12132351 - additional 512 MB
Partition 8 can be extended from 14499837 to 15548415 - additional 512 MB

When I installed NOOBS I did not realize that my 8 GB could become soon to small.
When I installed it with NOOBS I did not know that
#1 the image itself would be there as a recovery (there was a warning, when I installed, that everything will be lost)
#2 that raspbian need about 3 GB or 4 GB and openelec on top 1 GB
#3 that data partition means 512 MB for each partition.

So I lost at least 1 + 1 GB and 2 x 512 MB because I did not need the recovery and 2x data partitions. I rather would have separated the installation on 2 SD card, especially since my 2 raspberry pi 3 modells arrived this morning.

Now I have looked in the LINUX description of parted , but I am not sure,
* what device means in this case and
* if move ist the right command and
* if the end sector is always the startsector of the following paritition minus 1 (as from end partition 1 to start partition 2)?

Move seems to be a bit strange because I want to expand that partition and do not want to move that.

parted [options] [device [command [options...]...]]

for partition 7

sudo parted move /dev/mmcblk0p7 2490368 12132351

for partition 8
sudo parted move /dev/mmcblk0p8 12132352 15548415

Thx

P.S.: This try for partition 7 did not work - any suggestions?

sudo parted move /dev/mmcblk0p7 2490368 12132351
Error: Could not stat device move - file or directory not found
Retry/Cancel?
WOLF

fruitoftheloom
Posts: 21093
Joined: Tue Mar 25, 2014 12:40 pm
Location: Delightful Dorset

Re: NOOBS 1.8 - removing and expanding a neighbour partiton

Wed Mar 16, 2016 1:16 pm

Linux parted has a GUI version called gparted ;)
Retired disgracefully.....
This at present is my daily "computer" https://www.asus.com/us/Chrome-Devices/Chromebit-CS10/

typxxi
Posts: 44
Joined: Sat Mar 05, 2016 6:11 pm
Location: GERMANY

Re: NOOBS 1.8 - removing and expanding a neighbour partiton

Wed Mar 16, 2016 4:45 pm

yeah, but that is not available in raspbian and I still have the same problem:#

How can I take use of the free space from the partition I have delete like "expand"?

Or is there a better way to merge or append a "second partitions" to the first?
WOLF

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

Re: NOOBS 1.8 - removing and expanding a neighbour partiton

Wed Mar 16, 2016 4:55 pm

typxxi wrote:yeah, but that is not available in raspbian and I still have the same problem:#
:?:

Code: Select all

pi@raspi01:~$ apt-cache policy gparted
gparted:
  Installed: (none)
  Candidate: 0.19.0-2
  Version table:
     0.19.0-2 0
        500 http://mirrordirector.raspbian.org/raspbian/ jessie/main armhf Packages
pi@raspi01:~$ cat /etc/os-release
PRETTY_NAME="Raspbian GNU/Linux 8 (jessie)"
NAME="Raspbian GNU/Linux"
VERSION_ID="8"
VERSION="8 (jessie)"

fruitoftheloom
Posts: 21093
Joined: Tue Mar 25, 2014 12:40 pm
Location: Delightful Dorset

Re: NOOBS 1.8 - removing and expanding a neighbour partiton

Wed Mar 16, 2016 5:04 pm

typxxi wrote:yeah, but that is not available in raspbian and I still have the same problem:#

How can I take use of the free space from the partition I have delete like "expand"?

Or is there a better way to merge or append a "second partitions" to the first?
gparted no available from Repository ???? Obviously you have issues beyond patitioning !!!!
Retired disgracefully.....
This at present is my daily "computer" https://www.asus.com/us/Chrome-Devices/Chromebit-CS10/

typxxi
Posts: 44
Joined: Sat Mar 05, 2016 6:11 pm
Location: GERMANY

Re: NOOBS 1.8 - removing and expanding a neighbour partiton

Thu Mar 17, 2016 1:53 am

Hey,

I thought that i had to type in gparted at the command line. But that did not work and I thought that gparted was missing in raspbian and is just only part of linux. So I tried this:

Code: Select all

apt-cache policy gparted
gparted:
  Installiert:           (keine)
  Installationskandidat: 0.19.0-2
  Versionstabelle:
     0.19.0-2 0
        500 http://mirrordirector.raspbian.org/raspbian/ jessie/main armhf Packages
That is the same as above. So how do I start gparted?

Meanwhile I was looking in fdisk commands and there is an expert option where I can change the sectors.
If I add up the sectors of the partition and the previous 512MB partitoin do I get an expanded partition ?

thx

P.S.: Now i installed gparted with sudo apt-get install gparted and found gparted in the gui - settings section. But I am unable to expand the partition even after reboot. I saved this report:

Code: Select all

GParted 0.19.0 --enable-libparted-dmraid --enable-online-resize
libparted 3.2
/dev/mmcblk0p7 von 4.10 GiB auf 4.60 GiB vergrößern  00:00:00    ( FEHLER )
/dev/mmcblk0p7 kalibrieren  00:00:00    ( ERFOLG )
Pfad: /dev/mmcblk0p7
Anfang: 2490368
Ende: 11083773
Größe: 8593406 (4.10 GiB)
Dateisystem auf /dev/mmcblk0p7 auf Fehler überprüfen und (falls möglich) diese beheben  00:00:00    ( FEHLER )
    	
e2fsck -f -y -v -C 0 /dev/mmcblk0p7
/dev/mmcblk0p7 ist eingehängt.
e2fsck 1.42.12 (29-Aug-2014)
e2fsck: Fortsetzung nicht möglich, wird abgebrochen.
WOLF

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

Re: NOOBS 1.8 - removing and expanding a neighbour partiton

Thu Mar 17, 2016 9:02 am

The messages don't give a lot of information, but it looks as if it doesn't want to run the filesystem check (ext2fsck) because the partition is mounted.

ATM I can only suggest to geet another SD card with e.g. Jessie, put the card in an SD card reader and run gparted that way.
Alternatively use a Linux live CD in another computer...

typxxi
Posts: 44
Joined: Sat Mar 05, 2016 6:11 pm
Location: GERMANY

Re: NOOBS 1.8 - removing and expanding a neighbour partiton

Thu Mar 17, 2016 11:09 am

Thanks, I will try that later when my new raspberry pi 3 has arrived. I hope that this will work.
My previous attempts under Windows 10 failed (MiniTool Paritition Wizard). But I hope that the raspi 3 should do that.

When I tried to delete the 512MB partition there was a warning that I first have to hang out the logical drives above partition 7 what I did. Then I was able to delete these 2 partitions.
Thx
WOLF

typxxi
Posts: 44
Joined: Sat Mar 05, 2016 6:11 pm
Location: GERMANY

Re: NOOBS 1.8 - removing and expanding a neighbour partiton

Sun Mar 20, 2016 11:20 am

Thx, worked fine.
WOLF

Return to “Troubleshooting”