please choosego to mobile | Continue to access the PC version
View: 69037|Reply: 8

Resize file system on SD card

[Copy link]

1

threads

5

posts

27

credits

Novice

Rank: 1

credits
27
Published in 2015-12-16 03:10:23 | Show all floors |Read mode
How to resize root file system. After write Raspbian image on 8Gb sd card I have only about 600M free space on card.
root@orangepi:~# df -h
Filesystem      Size  Used Avail Use% Mounted on
rootfs          3.4G  2.6G  629M  81% /
/dev/root       3.4G  2.6G  629M  81% /
devtmpfs        374M     0  374M   0% /dev
tmpfs           101M  188K  101M   1% /run
tmpfs           5.0M     0  5.0M   0% /run/lock
tmpfs           201M     0  201M   0% /run/shm
/dev/mmcblk0p1   41M  4.9M   37M  12% /boot




Expand file system from raspi-config not working.
fs_resize not working too.




0

threads

1

posts

16

credits

Novice

Rank: 1

credits
16
Published in 2016-1-10 13:06:12 | Show all floors
First

$ fdisk -l

and you should know the partition name...

and in my case..

$ fdisk -c /dev/mmcblk0

input 'p'

and show information of partition...

may be.....taget partition is 2.....

input "d"       -> deldet partition....

input "2"      -> target delete partition...

ipput "np"     -> set new partition information...

input "p"      ->set primary

input "2"     -> target partition...

and input first sector number.......
(above...you type "fdisk -l" and find that number ( /dev/mmcblk0p2 's start number )

and request last sector....and push enter key....

and input "w"    ->write partiotion information....

System show error ....ignore....

$ reboot

$ resize2fs /dev/mmcblk0p2

$ df- h

done

1

threads

8

posts

34

credits

Novice

Rank: 1

credits
34
Published in 2016-3-28 10:57:16 | Show all floors
Hi,

The real reason is fdisk partitons are no cylinder boundary that fdisk calculates. You'll delete the 2nd partition and read it such as:

root@orangepi:~# fdisk /dev/mmcblk0

Command (m for help): p

Disk /dev/mmcblk0: 15.8 GB, 15804137472 bytes
4 heads, 16 sectors/track, 482304 cylinders, total 30867456 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: 0x34605ba5

        Device Boot      Start         End      Blocks   Id  System
/dev/mmcblk0p1           40960      124927       41984   83  Linux
/dev/mmcblk0p2          124928     7170047     3522560   83  Linux

Command (m for help): d
Partition number (1-4): 2

Command (m for help): n
Partition type:
   p   primary (1 primary, 0 extended, 3 free)
   e   extended
Select (default p): p
Partition number (1-4, default 2): 2
First sector (2048-30867455, default 2048): 124928
Last sector, +sectors or +size{K,M,G} (124928-30867455, default 30867455):
Using default value 30867455

Command (m for help): w

Theen quit (command q), reboot. You will then be able to use resize:

resizefs /dev/root

would do. I agree that OrangePi Raspbian is far from being stable. It is sure that it was arranged from bananapi even taking a look at the .bash_history file shows that what were they doing to adapt the banana raspbian and even creating the orangepi account This being said if you have time there are lots of information online how to overcome these difficulties.  

2

threads

5

posts

36

credits

Novice

Rank: 1

credits
36
Published in 2015-12-18 09:48:00 | Show all floors
Stay away from Raspbian image. It has only name Raspbian, you wont get Raspberry Pi functionality. Even more, it looks like this image was made from Banana Pi.
Read http://www.orangepi.org/orangepi ... &extra=page%3D1[/url] fore more details.

1

threads

5

posts

27

credits

Novice

Rank: 1

credits
27
 Author| Published in 2015-12-19 18:50:54 | Show all floors
Probably you're right. Orange Pi PC is a big mistake. Very problematic platform. No good linux, no good android. Problems with wifi, lan, usb ports, hdmi, audio etc. - problems with everything. It was the worst purchase I've ever made.
I lost a lot of hours and always there was a problem with my module. Never again Orange Pi.

1

threads

6

posts

33

credits

Novice

Rank: 1

credits
33
Published in 2016-6-21 23:49:40 | Show all floors
you can actually use raspbian config tool.

starting from 5:19

0

threads

1

posts

16

credits

Novice

Rank: 1

credits
16
Published in 2016-11-15 07:34:59 | Show all floors
Raspbian config tool does not work well when re-sizing partitions in Orange Pi Pc Raspbian image.
Some answers are suggesting delete and recreate mmcblk0p2 but I think the question was about more about how to resize while keeping your data.
About quality of Orange Pi. I agree it has a lot of issues and there is a lot of work to do to get it working well. The good thing about orange pi is the low price.

4

threads

21

posts

114

credits

Registered member

Rank: 2

credits
114
Published in 2017-1-30 18:57:24 | Show all floors
Edited by guyc at 2017-1-30 23:31

I have a 16 gB SD-card and receive the feedback memory full.
I tried the procedure discribe above, but I receive error messages like :
fdisk : cannot open /dev/mmcbkl0 : Permission denied.

with free -h :
                         total      used     free      shared  buff/cach     available
Mem :                979M    338M    278M   19M       362M             587M
Swap                   0B        0B       0B

with df -h
                             size      used    avail    Use%   mounted on
/dev/mmcbkl0p2   3,4G    3,3G     1,9G    100%    /
devtmpfs               482M     0M       482M    0%     /dev
...

/dev/mmcblk0p1    50M      13M      38M     26%   /boot

This means that the system is missing or don't use 12 gB on the SD-card (16gB)

How do I bring in the commands ( p, n,....)



0

threads

5

posts

14

credits

Novice

Rank: 1

credits
14
Published in 2020-1-7 16:02:38 | Show all floors
想要让胸部变大的一个重要的物理方法就是进行乳房按摩丰胸产品,经常用双手揉摸自己胸前的乳房,妈妈们可以发现这样可以显著地改善乳房的血液循环来增大乳房丰胸效果,并且把多余的脂肪排出。其次,女性成功瘦身而且丰胸的原理则在于木瓜酶的作用,一般来说,多吃木瓜丰胸方法,也有利于乳房的变大,因为木瓜酶能够促进乳腺发育,刺激女性的荷尔蒙,从而达到丰胸的目的产后丰胸
You need to log in before you can reply login | Register

Points Rule

Quick reply Top Return list