Results 1 to 16 of 16

Thread: RPI2 Kali Sana how to resize filesystem?

  1. #1
    Join Date
    2015-Aug
    Posts
    6

    RPI2 Kali Sana how to resize filesystem?

    Hi everyone.

    How can i resize my filesystem?
    I try gparted but it gives an error when i try to resize filesystem partition with unallocated partition.
    I also try the script that i used to resize the kali 1.1.1 " https://linhost.info/2015/05/expand-...-raspberry-pi/ "
    but it gives an error and when i reboot nothing new happens.

    How to resize?

  2. #2
    Join Date
    2015-Aug
    Posts
    6
    I figured out how to resize, with this steps:

    wget http://archive.raspberrypi.org/debian/pool/main/r/raspi-config/raspi-config_20150706_all.deb
    wget http://http.us.debian.org/debian/pool/main/l/lua5.1/lua5.1_5.1.5-7.1_armhf.deb
    wget http://http.us.debian.org/debian/pool/main/t/triggerhappy/triggerhappy_0.3.4-2_armhf.deb
    dpkg -i triggerhappy_0.3.4-2_armhf.deb
    dpkg -i lua5.1_5.1.5-7.1_armhf.deb
    dpkg -i raspi-config_20150706_all.deb
    raspi-config
    when you do raspi-config you see an option to resize filesystem, reboot and done.
    Last edited by Naprosnia; 2015-08-24 at 10:01. Reason: remove the [url] from wget links.

  3. #3
    Join Date
    2014-Feb
    Posts
    309
    Or, just run the rpi-wiggle.sh script that we install. I'll add this to my notes for the updated documentation.

  4. #4
    Join Date
    2015-Aug
    Posts
    6
    I couldn't find that script anywhere on the raspberry pi 2 filesystem. I did download it from elsewhere and it failed when I tried to run it. (Sorry, I don't have the error handy)

  5. #5
    Join Date
    2015-Aug
    Posts
    2
    I also downloaded it (from https://raw.github.com/dweeber/rpiwi...ter/rpi-wiggle) and it appeared to run properly, but after reboot nothing had changed.

  6. #6
    Join Date
    2014-Mar
    Posts
    9
    Quote Originally Posted by eperea View Post
    I also downloaded it (from https://raw.github.com/dweeber/rpiwi...ter/rpi-wiggle) and it appeared to run properly, but after reboot nothing had changed.
    Same thing here (Kali 2.0.1). Seems to run fine, but no difference.

  7. #7
    Join Date
    2015-Aug
    Posts
    6
    Try running it again, but look closely at the messages it displays before rebooting. I seem to recall a message in there that wasn't highlighted but indicated a problem.

  8. #8
    Join Date
    2015-Aug
    Posts
    2
    I ran it again and saw this error message:

    Select (default p): Partition number (2-4, default 2): First sector (125001-62333951, default 126976): Value out of range.

    Session log available at http://hermes.walkereng.com/kali.log in case it might be helpful.

  9. #9
    Join Date
    2014-Feb
    Posts
    309
    Interesting - I'd try running with it echoing more output - since it says value out of range, it would be nice to know what value it is trying to pass in. That said, it's just a script that someone suggested we add, so it may be best to file a bug for dweeber's github repo - although it hasn't been touched since 2012, so I'm not even sure it's active anymore. Perhaps look at what he does and then look at what the raspi-config script does that is different?

    Or, follow the steps from Naprosnia - I just realized that this is for the rpi2, so installing the armhf won't hurt - although, rather than download the files from debian's repo, I'd suggest running apt-get install lua5.1 triggerhappy instead.

  10. #10
    Join Date
    2015-Aug
    Posts
    5
    Getting same error here:
    Select (default p): Partition number (2-4, default 2): First sector (125001-124735487, default 126976): Value out of range.

  11. #11
    Join Date
    2015-Aug
    Posts
    6
    Follow my steps, they worked for me.

  12. #12
    Join Date
    2015-Aug
    Posts
    5
    Naprosnia,
    I followed your steps. But didn't work here.

  13. #13
    Join Date
    2015-Aug
    Posts
    1

    I got same error message "Value out of range"

    Quote Originally Posted by Naprosnia View Post
    Follow my steps, they worked for me.
    I try rpi-wiggle.sh and raspi-expand-rootfs.sh(https://linhost.info/2015/05/expand-...-raspberry-pi/), both give me same error message.

    Out put like this:

    root@kali:~# cd /boot
    root@kali:/boot# ls
    raspi-expand-rootfs.sh
    root@kali:/boot# sh raspi-expand-rootfs.sh

    Welcome to fdisk (util-linux 2.25.2).
    Changes will remain in memory only, until you decide to write them.
    Be careful before using the write command.


    Command (m for help): Disk /dev/mmcblk0: 14.9 GiB, 16021192704 bytes, 31291392 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: 0x000ddd94

    Device Boot Start End Sectors Size Id Type
    /dev/mmcblk0p1 1 125000 125000 61M c W95 FAT32 (LBA)
    /dev/mmcblk0p2 125001 14335999 14210999 6.8G 83 Linux


    Command (m for help): Partition number (1,2, default 2):
    Partition 2 has been deleted.

    Command (m for help): Partition type
    p primary (1 primary, 0 extended, 3 free)
    e extended (container for logical partitions)
    Select (default p): Partition number (2-4, default 2): First sector (125001-31291391, default 126976): Value out of range.
    First sector (125001-31291391, default 126976): Last sector, +sectors or +size{K,M,G,T,P} (126976-31291391, default 31291391): Last sector, +sectors or +size{K,M,G,T,P} (126976-31291391, default 31291391): Last sector, +sectors or +size{K,M,G,T,P} (126976-31291391, default 31291391):
    Do you really want to quit? Root partition has been resized. The filesystem will be enlarged upon the next reboot


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

    any thing wrong? or I need re-config the script?

    Thanks

  14. #14
    Join Date
    2014-Feb
    Posts
    309
    I'm curious about the second script that you linked - it looks like it's running "parted /dev/mmcblk0 -ms unit s p | grep "^2" | cut -f 2 -d:" as a command and storing that to the variable PART_START for where to start the second partition at - what's the output of running that command manually on the rpi2?

  15. #15
    Join Date
    2015-Sep
    Posts
    8
    I tried various utilities with no success. So I did it manually. It's not hard to do manually.

    sudo fdisk /dev/mmcblk0

    Step 1: Delete the second partition
    Type 'd' Hit Enter
    Again just hit Enter to select default value which is '2'

    Step 2: Re-create second partition
    Follow the sequence of inputs
    Type 'n' Hit Enter
    Type 'p' Hit Enter
    Type '2' Hit Enter
    Type '125001' Hit Enter
    Again just hit enter to select default value

    Step 3: Write and exit
    Type 'w' Hit Enter

    Reboot the system:
    sudo reboot

    Then final step:
    sudo resize2fs /dev/mmcblk0p2

    To verify the resize
    df -h

  16. #16
    Join Date
    2014-Feb
    Posts
    309
    I actually looked into this script some - it would appear that the parted command that is being run is throwing a WARNING before it outputs the size, so possibly, all that would be needed would be to grep out the WARN line in the parted command (something like adding "| grep -v WARN" to line 46 (sudo parted /dev/mmc.... ))

Similar Threads

  1. Sana (2.0 Kali) - R/O file system with kali-rpi2.img
    By tazdevil in forum ARM Archive
    Replies: 16
    Last Post: 2015-08-24, 11:37
  2. Replies: 1
    Last Post: 2015-08-12, 11:08
  3. Resize Kali Linux Partition In VMWare
    By Prog Snob in forum General Archive
    Replies: 0
    Last Post: 2014-12-08, 22:00
  4. Gparted Can't Resize Kali Partition Running From USB
    By justin-goldberg in forum TroubleShooting Archive
    Replies: 3
    Last Post: 2014-05-23, 20:50

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •