upgrade yun when Filesystem is on SD card

I have moved my Filesystem to the Sd card. I didn't use the sketch but the manual procedure that is somewhere on this forum:

mkdir -p /tmp/cproot
mount --bind / /tmp/cproot
tar -C /tmp/cproot -cvf - . | tar -C /mnt/sda1 -xf -
umount /tmp/cproot
edit the file /etc/config/fstab and add:
config mount
        option target        /
        option device        /dev/sda1
        option fstype        ext3
        option options       rw,sync
        option enabled       1
        option enabled_fsck  0

Now how should I upgrade to, eg the Yun 1.3 image?

On another thread it was said:

upgrade the image, but the SD card will be deactivated and you will have to
?tinker with config files and restore the conf
?re-run ExpandingYunDiskSpace

Are these 2 bullets an AND or an OR? What do you mean with "restore the conf"? Do you mean I need to move my Filesystem back to the flash before upgrading (if still fits)? I am sorry but the procedure isn't very clear to me.

Hi,
I do not know if it is the best solution, but I have done it this way.
I deleted from the fstab file these lines

config mount
	option target '/overlay'
	option device '/dev/sda2'
	option fstype 'ext4'
	option enabled '1'
	option enabled_fsck '0'
	option options 'rw,sync,noatime,nodiratime'

After reboot, after rebooting, I updated it.
I deleted all the files in /mnt/sda2
and

opkg update
opkg install block-mount
tar -C /overlay -cvf - . | tar -C /mnt/sda2 -xf -

And then Then I added

config mount
	option target '/overlay'
	option device '/dev/sda2'
	option fstype 'ext4'
	option enabled '1'
	option enabled_fsck '0'
	option options 'rw,sync,noatime,nodiratime'

and reboot it.

Thanks! Would be hard to come up with a better solution :slight_smile:

Guess people who used the sketch to move the filesystem are now forced to do linux stuff anyway if they want to upgrade?

option fstype        ext3

for application which do a lot of read use ext4, for a lot of write use ext2. no go for ext3.

Tnx for the advice. What exactly is wrong with ext3?

I actually formatted as ext4, seems be an error in my mount file, or in putting it online.

Let's discuss about that: the issue is with how we run sysupgrade.
When using the arduino webpanel, sysupgrade is run with "-n" flag that means "I don't care about the config files the user edited or anything else she did, I will make this thing look as it came out of the box for the first time"
The arrogance of this behaviour serves a good purpose: after an upgrade, the yun is always in a known and documented state. You don't need to remember the customizations you made in order to explain behaviours that we didn't document and that may therefore seem unexpected.

There is an alternative approach in the advanced configuration panel: you may upgrade the board and check the "keep configuration files" as shown here doc:howto:luci.sysupgrade.png [Old OpenWrt Wiki]

Any comments are more than welcome

onire:
I deleted from the fstab file these lines

config mount
option target '/overlay'
option device '/dev/sda2'
option fstype 'ext4'
option enabled '1'
option enabled_fsck '0'
option options 'rw,sync,noatime,nodiratime'

Hi onire, I assume the fstab you are discussing here, is the original one on the Yun flash. How did you access it?

Frederico, if I understand correctly, if I run the upgrade with the -n flag (e.g. via webpanel) I dont have to care that I moved the filesystem. The Yun will be configured "completely fresh", right? This works fine for me. I guess all I need to do is to move the filesystem again, which is not a big deal. I rather start from scratch than dragging along old stuff.

NewLine:
Frederico, if I understand correctly, if I run the upgrade with the -n flag (e.g. via webpanel) I dont have to care that I moved the filesystem. The Yun will be configured "completely fresh", right? This works fine for me. I guess all I need to do is to move the filesystem again, which is not a big deal. I rather start from scratch than dragging along old stuff.

yes correct. as a consequence, you'll also have to re-run the yun disk space expander or (if you know which file to modify, which I assume you know, given your posts) modify the right config file

In general, kernel upgrade a part (which has just occurred but that should NOT occur often), once you've expanded the yun using the sd card, you only need to run script "upgrade-all". That will upgrade everything upgradable and leave all the rest untouched