SD Card Not Resized

Found something amiss in NEMS? Confirm first that you are running the latest version, and then post your bug report here.
Post Reply
kevinds
Junior Member
Posts: 23
Joined: Thu Jul 13, 2017 5:11 pm

SD Card Not Resized

Post by kevinds »

Howdy,

Came back to NEMS with the 1.3 release..

The nems-init as per https://docs.nemslinux.com/usage/connect_to_nems_ssh did not (successfully?) resize the storage.  Still showing as

RPi-Monitor:

Image  SD card
/boot Used: 21.71MB (36.22%) Free: 38.23MB Total: 59.95MB
36.22%
/ Used: 3.92GB (77.00%) Free: 1.17GB Total: 5.09GB
77.00%

This is a 16GB card.

Is it 'safe' to re-run nems-init from my new user account?

Code: Select all

Getting CA Private Key
Done.


Now we will resize your root partition to give you access to all the space
Done.

NOTICE: When you reboot, you must login as kevinds

Press any key to reboot (required)
login as: kevinds
Was it 100% necessary to have a keyboard connected to the Pi3 when running the init?  lol  It is possible to do, but not easy..  As per my previous posts, running it headless, and is very unlikely to ever have a local keyboard attached..  Could this have caused the resize not to happen?

Code: Select all

Let's configure your keyboard.
Please MAKE SURE a keyboard is connected to your NEMS Server.

Press any key to continue
So I did press a key without a keyboard attached..


Another RPi-Monitor bug?

Image  Version
Processor: BCM2835
Hardware Release: undefined
Distribution: Raspbian GNU/Linux 9 (stretch)
NEMS Version: undefined
NEMS Hardware ID: undefined
Kernel version: Linux 4.9.59-v7+ armv7l
Firmware: #1047
Package(s): 0 upgradable(s)



undefined...  But I am still reading the manual, so I may not have gotten to the part about fixing this.  NEMS System Settings Tool shows the Hardware ID, and both the Version and Hardware ID show in the CLI.
Last edited by kevinds on Wed Nov 08, 2017 6:28 am, edited 1 time in total.
User avatar
Robbie Ferguson
Posting Freak
Posts: 835
Joined: Wed Mar 07, 2012 3:23 pm
Location: Ontario, Canada
Contact:

RE: SD Card Not Resized

Post by Robbie Ferguson »

Hi kevinds,
Thanks for this. A lot to cover here.

> The nems-init did not (successfully?) resize the storage.

Run this:

Code: Select all

sudo /usr/bin/raspi-config --expand-rootfs && sudo reboot

Did that fix it? Or any errors shown? I'll check into this as there indeed appears to be an issue. Luckily, it's easily patched and I can fix systems affected by the bug.

> Was it 100% necessary to have a keyboard connected to the Pi3 when running the init?

I'm still checking into this one. The locale detection does require a keyboard apparently, but I will be spending more time improving that particular section. It shouldn't really matter that much.

> Another RPi-Monitor bug? Undefined.

Excellent discovery! Fixed.

If you don't want to wait for the patch to automatically run, do this:

Code: Select all

sudo nems-update && sudo nems-update
Then retry RPi-Monitor. Thanks for pointing that out.
Robbie Ferguson // The Bald Nerd

Did I help you out? Appreciate what I do? Please consider saying thanks:
kevinds
Junior Member
Posts: 23
Joined: Thu Jul 13, 2017 5:11 pm

RE: SD Card Not Resized

Post by kevinds »

[quote="Robbie Ferguson" pid='787' dateline='1510152167']

Run this:

Code: Select all

sudo /usr/bin/raspi-config --expand-rootfs && sudo reboot

Did that fix it? Or any errors shown? I'll check into this as there indeed appears to be an issue. Luckily, it's easily patched and I can fix systems affected by the bug.
[/quote]

Yes it fixed it, there were also errors

Code: Select all

kevinds@NEMS:~ $ sudo /usr/bin/raspi-config --expand-rootfs && sudo reboot
[sudo] password for kevinds:

Welcome to fdisk (util-linux 2.29.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: 15 GiB, 16088301568 bytes, 31422464 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: 0x15de4ab3

Device         Boot  Start      End  Sectors  Size Id Type
/dev/mmcblk0p1        8192   131071   122880   60M  c W95 FAT32 (LBA)
/dev/mmcblk0p2      131072 31422463 31291392 14.9G 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 (2048-31422463, default 2048): Last sector, +sectors or +size{K,M,G,T,P} (131072-31422463, default 31422463):
Created a new partition 2 of type 'Linux' and of size 14.9 GiB.
Partition #2 contains a ext4 signature.

Command (m for help):
Disk /dev/mmcblk0: 15 GiB, 16088301568 bytes, 31422464 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: 0x15de4ab3

Device         Boot  Start      End  Sectors  Size Id Type
/dev/mmcblk0p1        8192   131071   122880   60M  c W95 FAT32 (LBA)
/dev/mmcblk0p2      131072 31422463 31291392 14.9G 83 Linux

Command (m for help): The partition table has been altered.
Calling ioctl() to re-read partition table.
Re-reading the partition table failed.: 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).

Please reboot

[quote="Robbie Ferguson" pid='787' dateline='1510152167']
Then retry RPi-Monitor. Thanks for pointing that out.
[/quote]
nems-update followed by nems-update?

Is the second one supposed to be nems-upgrade?

I ran

Code: Select all

sudo nems-update && sudo nems-update
Page no longer loads, Firefox (on a different computer too):

Code: Select all

Unable to connect

Firefox can't establish a connection to the server at 192.168.0.2:8888
I ran nems-upgrade and at the end

Code: Select all

Running NEMS 1.3
There are no rolling upgrades available for NEMS 1.3
After a reboot.. Everything came back.. RPi-Monitor showing all the data now. :)
User avatar
Robbie Ferguson
Posting Freak
Posts: 835
Joined: Wed Mar 07, 2012 3:23 pm
Location: Ontario, Canada
Contact:

RE: SD Card Not Resized

Post by Robbie Ferguson »

> Yes it fixed it, there were also errors
Not an error; that is expected response, hence the && reboot I'd included in the command.

> nems-update followed by nems-update?
Correct. The first one updates nems-update. The && means "if successful" and then it tells it to run nems-update. You're not "running it twice" per se. You're updating it, and then running it if successful.

> Is the second one supposed to be nems-upgrade?
No.

> I ran nems-upgrade and at the end
Why? :)  First point release is probably 2 months away. I just released NEMS 1.3 yesterday so.

> After a reboot.. Everything came back.. RPi-Monitor showing all the data now. :)
Awesome! I knew it'd work   :)   I fixed the fact that RPi-Monitor didn't turn itself back on after the patch. No reboot necessary here forward  :)

Enjoy!
Robbie Ferguson // The Bald Nerd

Did I help you out? Appreciate what I do? Please consider saying thanks:
kevinds
Junior Member
Posts: 23
Joined: Thu Jul 13, 2017 5:11 pm

RE: SD Card Not Resized

Post by kevinds »

Robbie Ferguson wrote: > I ran nems-upgrade and at the end
Why? :)  First point release is probably 2 months away. I just released NEMS 1.3 yesterday so.

> After a reboot.. Everything came back.. RPi-Monitor showing all the data now. :)
Awesome! I knew it'd work   :)   I fixed the fact that RPi-Monitor didn't turn itself back on after the patch. No reboot necessary here forward  :)

Enjoy!
Because RPi-Monitor wasn't listening/running..  So I thought it might have been a typo..  I am very familiar doing

Code: Select all

apt-get update && apt-get upgrade
So I was thinking it may not have actually updated the software.  As with apt-get, update and then upgrade.  Plus both commands were available  :)
Last edited by kevinds on Sat Nov 18, 2017 12:28 am, edited 1 time in total.
User avatar
Robbie Ferguson
Posting Freak
Posts: 835
Joined: Wed Mar 07, 2012 3:23 pm
Location: Ontario, Canada
Contact:

RE: SD Card Not Resized

Post by Robbie Ferguson »

:)  Makes sense.

So looking at "apt-get update && apt-get upgrade" - that actually means "apt-get update, and if that succeeds, also apt-get upgrade, but not until the update works".

So in the case of my command, we're saying "Update the nems-update script. If the update of said script works, run it."

And now you know  :)
Robbie Ferguson // The Bald Nerd

Did I help you out? Appreciate what I do? Please consider saying thanks:
Post Reply