Hello all,

I have a 16GB SD card, but currently I can only make use of its 4GB:

root@beaglebone:/home/debian# df -h
Filesystem                                              Size  Used Avail Use
% Mounted on
udev                                                     10M     0   10M   0
% /dev
tmpfs                                                   100M  392K   99M   
1% /run
/dev/disk/by-uuid/b7ff9570-02a9-4982-b353-1131012481cb  3.5G  3.5G     0 100
% /
tmpfs                                                   248M     0  248M   
0% /dev/shm
tmpfs                                                   248M     0  248M   0
% /sys/fs/cgroup
tmpfs                                                   100M     0  100M   0
% /run/user
tmpfs                                                   5.0M     0  5.0M   0
% /run/lock


I would like to expand the root partition since I am getting no space left 
on device error. I tried grow_partition.sh but it did not work. So I tried 
to do it by fdisk many times, but it does not work as well, what could be 
the problem?


root@beaglebone:/home/debian# fdisk /dev/mmcblk0


Command (m for help): p


Disk /dev/mmcblk0: 15.6 GB, 15648948224 bytes
4 heads, 16 sectors/track, 477568 cylinders, total 30564352 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: 0xdcc515d1


        Device Boot      Start         End      Blocks   Id  System
/dev/mmcblk0p1   *        2048     3481599     1739776    6  FAT16
/dev/mmcblk0p2         3481600    30564351    13541376   83  Linux


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


Command (m for help): p


Disk /dev/mmcblk0: 15.6 GB, 15648948224 bytes
4 heads, 16 sectors/track, 477568 cylinders, total 30564352 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: 0xdcc515d1


        Device Boot      Start         End      Blocks   Id  System
/dev/mmcblk0p1   *        2048     3481599     1739776    6  FAT16


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


Command (m for help): w
The partition table has been altered!


Calling ioctl() to re-read partition table.
Syncing disks.


root@beaglebone:/home/debian# reboot




After reboot:




root@beaglebone:/home/debian# resize2fs /dev/mmcblk0p2
resize2fs 1.42.5 (29-Jul-2012)
resize2fs: Bad magic number in super-block while trying to open /dev/
mmcblk0p2
Couldn't find valid filesystem superblock.

-- 
For more options, visit http://beagleboard.org/discuss
--- 
You received this message because you are subscribed to the Google Groups 
"BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to beagleboard+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beagleboard/d7a4d1a4-b4ee-45b0-a4e3-8dc86f561412%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to