mrdebug
Posts: 72
Joined: Sun Apr 07, 2013 6:08 pm

Expand root partitition on a rasbian minimal image

Thu Jun 26, 2014 8:43 pm

With raspi-config I obtain this error:
Disk /dev/mmcblk0: 1948 MB, 1948254208 bytes
4 heads, 16 sectors/track, 59456 cylinders, total 3805184 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: 0x00027aa3

Device Boot Start End Blocks Id System
/dev/mmcblk0p1 2048 104447 51200 b W95 FAT32
/dev/mmcblk0p2 104448 1742847 819200 83 Linux
/dev/mmcblk0p3 1742848 1945599 101376 82 Linux swap / Solaris

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

Calling ioctl() to re-read partition table.

WARNING: Re-reading the partition table failed with error 16: Dispositivo o risorsa occupata.
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.
update-rc.d: using dependency based boot sequencing
update-rc.d: warning: default start runlevel arguments (2 3 4 5) do not match resize2fs_once Default-Start values (2 3 4 5 S)
update-rc.d: warning: default stop runlevel arguments (0 1 6) do not match resize2fs_once Default-Stop values (none)
root@raspberrypi:~#

How can I do to expant the partitition?
www. ???
www. ???
GMT+1
Skype: mrdebug

User avatar
DougieLawson
Posts: 39121
Joined: Sun Jun 16, 2013 11:19 pm
Location: A small cave in deepest darkest Basingstoke, UK
Contact: Website Twitter

Re: Expand root partitition on a rasbian minimal image

Thu Jun 26, 2014 9:20 pm

That p3 swap partition isn't used. Modern versions of raspbian use dphys-swapfile

sudo -i
fdisk /dev/mmcblk0
d
2
d
3
n
p
2
104448
[ENTER]
w
q
resize2fs /dev/mmcblk0p2
reboot
Note: Any requirement to use a crystal ball or mind reading will result in me ignoring your question.

Criticising any questions is banned on this forum.

Any DMs sent on Twitter will be answered next month.
All non-medical doctors are on my foes list.

mrdebug
Posts: 72
Joined: Sun Apr 07, 2013 6:08 pm

Re: Expand root partitition on a rasbian minimal image

Fri Jun 27, 2014 3:07 pm

root@raspberrypi:~# fdisk /dev/mmcblk0

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

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

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 (104448-3805183, default 104448): 104448
Last sector, +sectors or +size{K,M,G} (104448-3805183, default 3805183):
Using default value 3805183

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: Dispositivo o risorsa occupata.
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.
root@raspberrypi:~#


I haven't the original rasbian image because I have a 2gb sdcard. I'm using a mini image.
Can you suggest to me a mini official debian image?
www. ???
www. ???
GMT+1
Skype: mrdebug

User avatar
AndrewS
Posts: 3625
Joined: Sun Apr 22, 2012 4:50 pm
Location: Cambridge, UK
Contact: Website

Re: Expand root partitition on a rasbian minimal image

Fri Jun 27, 2014 4:25 pm

What about another alternative: have you seen how cheap SD cards are these days? ;)

Return to “General discussion”