TIP: Click on subject to list as thread! ANSI
echo: rberrypi
to: ALL
from: DENNIS LEE BIEBER
date: 2020-10-04 10:38:00
subject: Re: Expanding root partit

On Sun, 4 Oct 2020 13:56:24 +0100, "NY"  declaimed the
following:

>
>Using Windows, I've copied the image from the 16 GB card to a .IMG file, and
>then from that .IMG file to the 32 GB card, using Win32 Disk Imager (should
>I be using a different tool to do this?).
>
 On the Beagleboard forums, Win32 Disk Imager has been deprecated as a
writing tool -- the preference seems to be for Balena Etcher. However,
Win32 Disk Imager would still be needed to read a card and make an image.


>I run sudo raspi-config and select Advanced | Expand Filesystem - but I get
>an error "Your partition layout is not currently supported by this tool. You
>are probably using NOOBS in which case your root filesystem is already
>expanded anyway".
>
 The R-Pi foundation seems to create lots of odd partitions when using
NOOBS, while Expand Filesystem likely expect to see nothing past the root
file system. NOOBS does the expansion (and likely partitioning) from the
FAT-only system before putting an OS into the EXTn partition.

pi@rpi3bplus-1:~$ ls -l /dev/mmc*
brw-rw---- 1 root disk 179, 0 Oct  1 01:33 /dev/mmcblk0
brw-rw---- 1 root disk 179, 1 Oct  1 01:33 /dev/mmcblk0p1
brw-rw---- 1 root disk 179, 2 Oct  1 01:33 /dev/mmcblk0p2
brw-rw---- 1 root disk 179, 5 Oct  1 01:33 /dev/mmcblk0p5
brw-rw---- 1 root disk 179, 6 Oct  1 01:33 /dev/mmcblk0p6
brw-rw---- 1 root disk 179, 7 Oct  1 01:33 /dev/mmcblk0p7
pi@rpi3bplus-1:~$

pi@rpi3bplus-1:~$ df
Filesystem     1K-blocks    Used Available Use% Mounted on
/dev/root       12028584 8651864   2742660  76% /
devtmpfs          440756       0    440756   0% /dev
tmpfs             474036       0    474036   0% /dev/shm
tmpfs             474036    6368    467668   2% /run
tmpfs               5120       4      5116   1% /run/lock
tmpfs             474036       0    474036   0% /sys/fs/cgroup
/dev/mmcblk0p6    258094   54604    203490  22% /boot
tmpfs              94804       0     94804   0% /run/user/1000

 So partition 6 is /boot, but what are the others? And why did it skip
partitions 3 and 4?

>How do I proceed from here? Will I have to start from scratch, putting NOOBS
>on the 32 GB card and then installing everything again. Or would a different
>disk imaging tool create the 32 GB card in such a way that raspi-config can
>expand the filesystem?

 No tool that I know of -- since they copy the partition table as-is.

 I've gotten to the point of creating a shell script that installs are
my standard packages, and after creating a new card using NOOBS I run that
script.

pi@rpi3bplus-1:~$ cat RPi-config.sh
#! /bin/sh
#all RPi
sudo apt-get install -y vim-gtk3 gnat gnat-gps gfortran python3-flask
python3-flask-*
sudo apt-get install -y ncurses ncurses-devel ncurses-base
sudo apt-get install -y nginx-full gunicorn3 python3-gunicorn
python3-pastedeploy python3-setproctitle fcgiwrap
sudo apt-get -y install scratch3
sudo apt-get -y remove scratch mu-editor
sudo pip3 install RPI.GPIO
sudo pip3 install adafruit-blinka

#RPi 4 only
#sudo apt-get install -y mariadb-server mariadb-client mycli dbconfig-mysql
python3-mysqldb
#sudo apt-cache search libncursesada*

sudo apt -y autoremove
pi@rpi3bplus-1:~$


 In this aspect, the Beaglebone is simpler --

debian@beaglebone:~$ df
Filesystem     1K-blocks    Used Available Use% Mounted on
udev              218936       0    218936   0% /dev
tmpfs              49500    1576     47924   4% /run
/dev/mmcblk0p1   7572696 2118140   5095796  30% /
tmpfs             247480       0    247480   0% /dev/shm
tmpfs               5120       4      5116   1% /run/lock
tmpfs             247480       0    247480   0% /sys/fs/cgroup
tmpfs              49496       0     49496   0% /run/user/1000
debian@beaglebone:~$ ls -l /dev/mmc*
brw-rw---- 1 root disk 179,  0 Oct  4 10:01 /dev/mmcblk0
brw-rw---- 1 root disk 179,  1 Oct  4 10:01 /dev/mmcblk0p1
brw-rw---- 1 root disk 179,  8 Oct  4 10:23 /dev/mmcblk1
brw-rw---- 1 root disk 179, 16 Oct  4 10:23 /dev/mmcblk1boot0
brw-rw---- 1 root disk 179, 24 Oct  4 10:23 /dev/mmcblk1boot1
brw-rw---- 1 root disk 179,  9 Oct  4 10:23 /dev/mmcblk1p1
crw------- 1 root root 245,  0 Oct  4 10:23 /dev/mmcblk1rpmb
debian@beaglebone:~$

 Only one partition on the SD card; the mmcblk1 device is the on-board
eMMC. Their install comes with a standard script to "grow" the partition
and it handles single or dual partition (older OS images used a small FAT
partition -- newer ones emulate that so Windows can see the "getting
started" help pages).


--
 Wulfraed                 Dennis Lee Bieber         AF6VN
 wlfraed@ix.netcom.com    http://wlfraed.microdiversity.freeddns.org/

--- SoupGate-Win32 v1.05
* Origin: Agency HUB, Dunedin - New Zealand | FidoUsenet Gateway (3:770/3)

SOURCE: echomail via QWK@docsplace.org

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.