I cloned a 8gb USB image of Raspian Stretch Lite to a 32gb USB and booted my Pi with it.
By the way I did all this from sudo su so I don't have to keep typing sudo (your choice)
First enter: fdisk -l
Code: Select all
Disk /dev/sda: 29.8 GiB, 32026656768 bytes, 62552064 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: 0x8ff0b05a
Device Boot Start End Sectors Size Id Type
/dev/sda1 8192 96663 88472 43.2M c W95 FAT32 (LBA)
/dev/sda2 98304 15634431 15536128 7.4G 83 Linux
Then enter: df -h
Code: Select all
Filesystem Size Used Avail Use% Mounted on
/dev/root 7.3G 1.2G 5.9G 17% /
devtmpfs 460M 0 460M 0% /dev
tmpfs 464M 0 464M 0% /dev/shm
tmpfs 464M 6.3M 458M 2% /run
tmpfs 5.0M 4.0K 5.0M 1% /run/lock
tmpfs 464M 0 464M 0% /sys/fs/cgroup
/dev/sda1 43M 22M 21M 51% /boot
tmpfs 93M 0 93M 0% /run/user/0
Now enter: resize2fs /dev/sda2
If the system doesn't reboot after a few minutes enter: reboot
Log in and sudo su again.
Then enter: fdisk -l
Code: Select all
Disk /dev/sda: 29.8 GiB, 32026656768 bytes, 62552064 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: 0x8ff0b05a
Device Boot Start End Sectors Size Id Type
/dev/sda1 8192 96663 88472 43.2M c W95 FAT32 (LBA)
/dev/sda2 98304 62552063 62453760 29.8G 83 Linux
However, df -h still only shows 8gb
Code: Select all
Filesystem Size Used Avail Use% Mounted on
/dev/root 7.3G 1.2G 5.9G 17% /
devtmpfs 460M 0 460M 0% /dev
tmpfs 464M 0 464M 0% /dev/shm
tmpfs 464M 12M 452M 3% /run
tmpfs 5.0M 4.0K 5.0M 1% /run/lock
tmpfs 464M 0 464M 0% /sys/fs/cgroup
/dev/sda1 43M 22M 21M 51% /boot
tmpfs 93M 0 93M 0% /run/user/0
If the system doesn't reboot after a few minutes enter: reboot
When you log in again run df -h and it should look something like this:
Code: Select all
Filesystem Size Used Avail Use% Mounted on
/dev/root 30G 1.2G 27G 4% /
devtmpfs 460M 0 460M 0% /dev
tmpfs 464M 0 464M 0% /dev/shm
tmpfs 464M 12M 452M 3% /run
tmpfs 5.0M 4.0K 5.0M 1% /run/lock
tmpfs 464M 0 464M 0% /sys/fs/cgroup
/dev/sda1 43M 22M 21M 51% /boot
tmpfs 93M 0 93M 0% /run/user/0