[Addon] Expand Partition to Full SD Card

General discussion about RuneAudio. Do not post any support or feature requests here.

Re: [Tips] Expand Partition to Full SD Card

Postby zomtec » 27 Jun 2017, 14:17

It do not work on a zero.

Code: Select all
[root@runeaudio ~]# wget --help | grep 'show-progress'
[root@runeaudio ~]# wget https://github.com/rern/RuneAudio/raw/master/expand_partition/expand.sh; chmod +x expand.sh; ./expand.sh
--2017-06-27 15:16:11--  https://github.com/rern/RuneAudio/raw/master/expand_partition/expand.sh
Resolving github.com (github.com)... 192.30.253.112, 192.30.253.113
Connecting to github.com (github.com)|192.30.253.112|:443... connected.
HTTP request sent, awaiting response... 302 Found
Location: https://raw.githubusercontent.com/rern/RuneAudio/master/expand_partition/expand.sh [following]
--2017-06-27 15:16:12--  https://raw.githubusercontent.com/rern/RuneAudio/master/expand_partition/expand.sh
Resolving raw.githubusercontent.com (raw.githubusercontent.com)... 151.101.112.133
Connecting to raw.githubusercontent.com (raw.githubusercontent.com)|151.101.112.133|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 2893 (2.8K) [text/plain]
Saving to: 'expand.sh'

100%[==========================================================================================================>] 2,893       --.-K/s   in 0.001s

2017-06-27 15:16:13 (2.75 MB/s) - 'expand.sh' saved [2893/2893]

./expand.sh: line 34: python2: command not found
sfdisk: invalid option -- 'F'

Usage:
 sfdisk [options] <device>...

Options:
 -s, --show-size           list size of a partition
 -c, --id                  change or print partition Id
     --change-id           change Id
     --print-id            print Id
 -l, --list                list partitions of each device
 -d, --dump                idem, but in a format suitable for later input
 -i, --increment           number cylinders etc. from 1 instead of from 0
 -u, --unit <letter>       units to be used; <letter> can be one of
                             S (sectors), C (cylinders), B (blocks), or M (MB)
 -1, --one-only            reserved option that does nothing currently
 -T, --list-types          list the known partition types
 -D, --DOS                 for DOS-compatibility: waste a little space
 -E, --DOS-extended        DOS extended partition compatibility
 -R, --re-read             make the kernel reread the partition table
 -N <number>               change only the partition with this <number>
 -n                        do not actually write to disk
 -O <file>                 save the sectors that will be overwritten to <file>
 -I <file>                 restore sectors from <file>
 -V, --verify              check that the listed partitions are reasonable
 -v, --version             display version information and exit
 -h, --help                display this help text and exit

Dangerous options:
 -f, --force               disable all consistency checking
     --no-reread           do not check whether the partition is in use
 -q, --quiet               suppress warning messages
 -L, --Linux               do not complain about things irrelevant for Linux
 -g, --show-geometry       print the kernel's idea of the geometry
 -G, --show-pt-geometry    print geometry guessed from the partition table
 -A, --activate[=<device>] activate the bootable flag
 -U, --unhide[=<device>]   set partition as unhidden
 -x, --show-extended       also list extended partitions in the output,
                             or expect descriptors for them in the input
     --leave-last          do not allocate the last cylinder
     --IBM                 same as --leave-last
     --in-order            partitions are in order
     --not-in-order        partitions are not in order
     --inside-outer        all logicals inside outermost extended
     --not-inside-outer    not all logicals inside outermost extended
     --nested              every partition is disjoint from all others
     --chained             like nested, but extended partitions may lie outside
     --onesector           partitions are mutually disjoint

Override the detected geometry using:
 -C, --cylinders <number>  set the number of cylinders to use
 -H, --heads <number>      set the number of heads to use
 -S, --sectors <number>    set the number of sectors to use

For more details see sfdisk(8).
./expand.sh: line 40: python2: command not found
./expand.sh: line 41: +  : syntax error: operand expected (error token is "+  ")
./expand.sh: line 43: ((: < 10: syntax error: operand expected (error token is "< 10")

=========================================================

    Expand partition

=========================================================

Current partiton: /dev/mmcblk0p5
Available free space  MB
Available unused disk space:  MB

Expand partiton to full unused space:
  0 Cancel
  1 Expand

0 / 1 ?
1
---------------------------------------------------------
Get package file ...
---------------------------------------------------------

wget: unrecognized option '--show-progress'
Usage: wget [OPTION]... [URL]...

Try `wget --help' for more options.
loading packages...
error: 'parted-3.2-5-armv7h.pkg.tar.xz': could not find or read package
rm: cannot remove 'parted-3.2-5-armv7h.pkg.tar.xz': No such file or directory

---------------------------------------------------------
Expand partiton ...
---------------------------------------------------------

./expand.sh: line 81: partprobe: command not found
resize2fs 1.42.12 (29-Aug-2014)
The filesystem is already 434944 (4k) blocks long.  Nothing to do!

./expand.sh: line 89: python2: command not found


 i  Partiton /dev/mmcblk0p5 now has  MB free space.

---------------------------------------------------------

[root@runeaudio ~]#
zomtec
 
Posts: 15
Joined: 17 Jun 2017, 19:39

Re: [Tips] Expand Partition to Full SD Card

Postby zomtec » 28 Jun 2017, 20:28

I try this http://www.runeaudio.com/documentation/ ... tition-sd/
at the next boot i get the error.
What is wrong? (see code)

Image

Code: Select all
login as: root
root@192.16[/img]8.100.38's password:
===============  RuneOS distribution  ===============
  ____                      _             _ _
 |  _ \ _   _ _ __   ___   / \  _   _  __| (_) ___
 | |_) | | | | '_ \ / _ \ / _ \| | | |/ _` | |/ _ \
 |  _ <| |_| | | | |  __// ___ \ |_| | (_| | | (_) |
 |_| \_\\__,_|_| |_|\___/_/   \_\__,_|\__,_|_|\___/

================  www.runeaudio.com  ================
RuneOs: 0.3-beta (build 20141029)
RuneUI: 1.3
Hw-env: RaspberryPi

[root@runeaudio ~]# fdisk /dev/mmcblk0

Welcome to fdisk (util-linux 2.25.1).
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: 14.5 GiB, 15523119104 bytes, 30318592 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: 0x417ee54b

Device         Boot  Start     End Sectors  Size Id Type
/dev/mmcblk0p1        2048  186367  184320   90M  c W95 FAT32 (LBA)
/dev/mmcblk0p2      186368 3667967 3481600  1.7G  5 Extended
/dev/mmcblk0p5      188416 3667967 3479552  1.7G 83 Linux


Command (m for help): d
Partition number (1,2,5, default 5): 2

Partition 2 has been deleted.

Command (m for help): n
Partition type
   p   primary (1 primary, 0 extended, 3 free)
   e   extended (container for logical partitions)
Select (default p): p
Partition number (2-4, default 2): 2
First sector (186368-30318591, default 186368): 186368
Last sector, +sectors or +size{K,M,G,T,P} (186368-30318591, default 30318591): 30318591

Created a new partition 2 of type 'Linux' and of size 14.4 GiB.

Command (m for help): w
The partition table has been altered.
Calling ioctl() to re-read partition table.
Re-reading the partition table failed.: Device or resource busy

The kernel still uses the old table. The new table will be used at the next reboot or after you run partprobe(8) or kpartx(8).

[root@runeaudio ~]# reboot
zomtec
 
Posts: 15
Joined: 17 Jun 2017, 19:39

Re: [Tips] Expand Partition to Full SD Card

Postby hondagx35 » 28 Jun 2017, 21:08

Hi zomtec,

on the older images like the one for the RP1 it is slightly different.
Please check this:
https://raspberry-hosting.com/en/faq/how-expand-arch-linux-root-partition

Frank
User avatar
hondagx35
 
Posts: 3042
Joined: 11 Sep 2014, 22:06
Location: Germany

support RuneAudio Donate with PayPal

Previous

Return to General discussion

Who is online

Users browsing this forum: No registered users and 4 guests