resize root partition to max available space SD card can provide
#1
After booting, I excute the following commands:

sudo -i
/usr/local/sbin/pine64_update_uboot.sh
/usr/local/sbin/pine64_update_kernel.sh
resize_rootfs.sh
reboot

My sd card(16 GB) does not resize. It only have 50MB to be used. How get I actually resize my sd card? I just burn the debian image to my sd card. 


Did I do something wrong? Thank you for any help!
  Reply
#2
No, those are the right commands. What does df -h and sudo fdisk -l report?
  Reply
#3
i'm thinking you would need to state directory path for the resize script also, or be in that directory.
  Reply
#4
hi, the resize_rootfs.sh should have a path specified also; however, the resize_rootfs.sh may not work.

The SD card may be resized with gparted from another gnu+linux machine.
marcushh777    Cool

please join us for a chat @  irc.pine64.xyz:6667   or ssl  irc.pine64.xyz:6697

( I regret that I am not able to respond to personal messages;  let's meet on irc! )
  Reply
#5
(11-16-2016, 01:13 AM)MarkHaysHarris777 Wrote: hi, the resize_rootfs.sh should have a path specified also;  however,  the resize_rootfs.sh may not work.

The SD card may be resized with gparted from another gnu+linux machine.

If you mean internally to the script - yes. If you mean as a parameter, then no. Otherwise both longlseeps and Lenney's instructions for the last six months are wrong, and the script isn't doing what it says it does! I don't think so! :-P You simply run resize_rootfs.sh without any special parameters or change directories needed - only sudo/root privileges else fdisk will fail. 

I think since you're saying you've only just written the debian image to a microSD, that either this could be an older image where resize_rootfs.sh was broken, or more likely either the microSD is faulty/fake or the partition table has been corrupted. You will get a better some idea of that if you run gparted or fdisk on another linux machine (you can live-boot linux if you don't have it installed on another box).
  Reply
#6
(11-15-2016, 05:16 PM)bilylilyli Wrote: Did I do something wrong?

Maybe just using outdated/buggy OS images. The good ones automatically resize the partition for you, the best ones don't use the whole capacity so doing backups and restoring them to a different card later will not fail (ran into this multiple times: 2 16 GB cards differ by a few sectors and restoring an SD card backup image then fails)
  Reply
#7
(11-16-2016, 03:42 AM)pfeerick Wrote: Otherwise both longlseeps and Lenney's instructions for the last six months are wrong, and the script isn't doing what it says it does! I don't think so!

Yes, actually, your assumption is not correct;  the script DOES NOT ALWAYS do what it says it does, and it often does not work.  True Story.   ( and a known and documented problem )   They thought it was fixed, but, nope.
marcushh777    Cool

please join us for a chat @  irc.pine64.xyz:6667   or ssl  irc.pine64.xyz:6697

( I regret that I am not able to respond to personal messages;  let's meet on irc! )
  Reply
#8
(11-16-2016, 01:13 AM)MarkHaysHarris777 Wrote: hi, the resize_rootfs.sh should have a path specified also;  however,  the resize_rootfs.sh may not work.

The SD card may be resized with gparted from another gnu+linux machine.

hi, how can I specify the path when I run the resize_rootfs.sh?

(11-15-2016, 08:35 PM)pfeerick Wrote: No, those are the right commands. What does df -h and sudo fdisk -l report?

hi, I run those two command, and I attach the resuld. The first picture is for df -h and the second one is for fdisk -l.


Attached Files
.pdf   Doc1.pdf (Size: 279.5 KB / Downloads: 444)
  Reply
#9
(11-15-2016, 05:16 PM)bilylilyli Wrote: It only have 50MB to be used. How get I actually resize my sd card?

From your first post it was obvious that everything happened already, you are only looking at the wrong partition most probably from the wrong perspective (your Windows PC that can't cope with ext4) Smile

(11-16-2016, 01:13 AM)MarkHaysHarris777 Wrote: hi, the resize_rootfs.sh should have a path specified also

Strange, almost all the time you answer user questions polite, friendly and wrong. Why do you do this especially as moderator users might trust blindly?
  Reply
#10
(11-16-2016, 12:37 PM)bilylilyli Wrote: hi, how can I specify the path when I run the resize_rootfs.sh?

hi, I run those two command, and I attach the resuld. The first picture is for df -h and the second one is for fdisk -l.

When you look at the code for resize_rootfs.sh that I linked to earlier, it's pretty obvious that resize_rootfs.sh doesn't accept any parameters - it is hard-coded at lines 11 & 12 to resize "/dev/mmcblk0p2" - which is the second partition on your microSD card.

If you look back that df -h (or the fdisk) listing, you can see that you have /dev/mmcblk0p1 (50MB in size) and /dev/mmcblk0p2 (7GB in size). /dev/mmcblk0p1 is a boot partition, and if you look at the microsd on a Windows machine, that is all you will be able to see (without installing extra drivers / software). /dev/mmcblk0p2 is the actual data partition for linux, and that is the one that should be resized when you run resize_rootfs.sh. The problem now is in knowing why the resize has failed, as you said this is on a 16GB microSD, and it hasn't been resized up to use the full 16GB. Do you get any errors or output from resize_rootfs.sh when you run it again (make sure you're running as root).

Can you give the link to where you got the image from or which version it was, - as I indicated earlier, there was a older image that had a bug in resize_rootfs but that was fixed about three-four months ago, so I just want to make sure that image is not still linked as a current image somewhere.
  Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  root running from usb connected ssd locks up system marcelser 0 2,707 11-17-2017, 04:50 PM
Last Post: marcelser
  OMV base on Debian jessie Root Problem ayamy 3 6,104 09-03-2017, 09:21 PM
Last Post: tllim
Wink clone copy of sd card by using partclone hatahata 6 9,862 11-04-2016, 12:53 AM
Last Post: pfeerick
  root password shaozhai 4 7,095 08-25-2016, 12:55 PM
Last Post: jl_678
  how to use USB hard disk as /(root) hatahata 15 19,526 07-01-2016, 07:09 PM
Last Post: hatahata
Sad How to resize the root partition in order to fully utilize the SD Card MicroDiery 5 8,178 05-24-2016, 05:48 AM
Last Post: Luke
  Debian root's password? rayivy 2 4,668 05-12-2016, 08:59 PM
Last Post: rayivy
Bug Firewall bug and free space , need to help ! ( debian xfce Released Apr 08 2016 ) joe 2 4,714 05-05-2016, 04:42 PM
Last Post: joe
  what is the root password for debian? piahoo 5 11,361 04-29-2016, 02:12 PM
Last Post: rhkean

Forum Jump:


Users browsing this thread: 1 Guest(s)