[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4688: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4690: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4691: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4692: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
Parallella Community • View topic - How to expand the Linaro image to fill your SD card

How to expand the Linaro image to fill your SD card

A forum for documenting the Parallella and Epiphany . (Not Q&A!)

How to expand the Linaro image to fill your SD card

Postby DrBlackAdder » Thu Jun 19, 2014 5:35 am

First off you'll need to create the device points for SD card access:

sudo mknod -m 660 /dev/mmcblk0 b 179 0

sudo mknod -m 660 /dev/mmcblk0p1 b 179 1

sudo mknod -m 660 /dev/mmcblk0p2 b 179 2

Once done you can use fdisk to resize the disk:
sudo fdisk /dev/mmcblk0

Command (m for help): p

Disk /dev/mmcblk0: 15.9 GB, 15931539456 bytes
4 heads, 16 sectors/track, 486192 cylinders, total 31116288 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: 0x00056828

Device Boot Start End Blocks Id System
/dev/mmcblk0p1 2048 264191 131072 b W95 FAT32
/dev/mmcblk0p2 264192 31116287 15426048 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 (264192-31116287, default 264192):
Using default value 264192
Last sector, +sectors or +size{K,M,G} (264192-31116287, default 31116287):
Using default value 31116287

Command (m for help): p

Disk /dev/mmcblk0: 15.9 GB, 15931539456 bytes
4 heads, 16 sectors/track, 486192 cylinders, total 31116288 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: 0x00056828

Device Boot Start End Blocks Id System
/dev/mmcblk0p1 2048 264191 131072 b W95 FAT32
/dev/mmcblk0p2 264192 31116287 15426048 83 Linux

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

Calling ioctl() to re-read partition table.

WARNING: Re-reading the partition table failed with error 16: 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)
Syncing disks.
linaro-nano:~>

Now reboot your device:
sudo reboot

Lastly run the resize tool on the root partition:
sudo resize2fs /dev/mmcblkp2

Enjoy all the extra space!
DrBlackAdder
 
Posts: 1
Joined: Mon Dec 17, 2012 3:20 am

Re: How to expand the Linaro image to fill your SD card

Postby over9000 » Thu Jun 19, 2014 2:25 pm

over9000
 
Posts: 98
Joined: Tue Aug 06, 2013 1:49 am

Re: How to expand the Linaro image to fill your SD card

Postby Gravis » Tue Jun 24, 2014 5:51 pm

another way is to use a gui based partitioning program like GParted on your computer. for those in windows, use a .
User avatar
Gravis
 
Posts: 445
Joined: Mon Dec 17, 2012 3:27 am
Location: East coast USA.

Re: How to expand the Linaro image to fill your SD card

Postby Feik » Fri Aug 01, 2014 4:10 am

User avatar
Feik
 
Posts: 4
Joined: Mon Dec 17, 2012 3:20 am

Re: How to expand the Linaro image to fill your SD card

Postby aihaike » Wed Aug 13, 2014 2:05 am

I successfully used gParted.
User avatar
aihaike
 
Posts: 31
Joined: Wed Aug 06, 2014 5:41 am
Location: Shanghai, China

Re: How to expand the Linaro image to fill your SD card

Postby 9600 » Wed Aug 13, 2014 10:55 am

I tend to use gparted also.

Regards,

Andrew
Andrew Back
User avatar
9600
 
Posts: 997
Joined: Mon Dec 17, 2012 3:25 am

Re: How to expand the Linaro image to fill your SD card

Postby fuzz » Sun Nov 09, 2014 8:50 pm

fuzz
 
Posts: 11
Joined: Fri Jul 04, 2014 2:19 am

Re: How to expand the Linaro image to fill your SD card

Postby Claggy » Wed Feb 18, 2015 9:50 pm

Claggy
 
Posts: 40
Joined: Mon Dec 17, 2012 3:25 am
Location: U.K

Re: How to expand the Linaro image to fill your SD card

Postby zynqfan » Sun Jun 19, 2016 6:43 pm

Just to reiterate I did this with the most recent Ubuntu headless image, and you can use partprobe also:

Assuming you are already root (sudo su - root) run the following as indicated by fuzz. (I use partprobe instead)

1) fdisk /dev/mmcblk0p2
a) type p to print out what is currently configured and to save so you can recreate the partition if you screw up

Device Boot Start End Sectors Size Id Type
/dev/mmcblk0p1 * 2048 206847 204800 100M b W95 FAT32
/dev/mmcblk0p2 206848

b) d (press enter)
c) 2 (press enter) [you have now deleted partition 2 from the partition table - but don't worry the OS is still working...]
d) n (press enter) [create a new partition 2]
e) p (press enter)
f) 2 (press enter)
g) choose starting sector as the same (in this case 206848, which it probably defaults to but matches the p statement above)
h) leave default as the very large number, which should now fill all 32gb (or however big) of the SDHC vs the normal 3-4gb

2) fdisk will moan about having to run partprobe or kpartx, so run "partprobe" and hit enter - if you don't have partprobe installed run "apt-get install parted" and then run partprobe
3) resize2fs /dev/mmcblk0p2
4) you should be good without rebooting -- but why not run synq and reboot to make sure there weren't any surprises!
zynqfan
 
Posts: 1
Joined: Sun Jun 19, 2016 6:32 pm


Return to Quick Start Guides , Documentation, Examples (Start Here!)

Who is online

Users browsing this forum: No registered users and 6 guests

cron