What's new

Is it possible to always mount 3 disk partitions in the same order?

  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

spanjap

Regular Contributor
I have a 256Mb SSD connected to my RT-AX88U router with 3 partitions (Ext4 with journaling):
- backups
- entware
- swap
When I reboot the router it's always randomly disk-checked (Is enabled in AMTM) and mounted.
I tried to get it in always the same order with creating a fstab.postconf file in /jffs/scripts/ but that doesn't matter.
Code:
#!/bin/sh

CONFIG=$1
source /usr/sbin/helper.sh
# entware partition:
pc_append "UUID=9d6dde4d-ec65-4207-ae70-5f47a7c97b58 /tmp/mnt/entware ext4 defaults 0 2" $CONFIG
# swap partition:
pc_append "UUID=feed737e-4108-4698-9298-3115ab1ad581 /tmp/mnt/swap ext4 defaults 0 1" $CONFIG
# backups partition:
pc_append "UUID=9cced663-0c6f-4d69-863c-532a8ffb1583 /tmp/mnt/backups ext4 defaults 0 0" $CONFIG

Is it possible to always disk-check first entware then swap and at last the backup partition?
 
I have a 256Mb SSD connected to my RT-AX88U router with 3 partitions (Ext4 with journaling):
- backups
- entware
- swap
When I reboot the router it's always randomly disk-checked (Is enabled in AMTM) and mounted.
I tried to get it in always the same order with creating a fstab.postconf file in /jffs/scripts/ but that doesn't matter.
Code:
#!/bin/sh

CONFIG=$1
source /usr/sbin/helper.sh
# entware partition:
pc_append "UUID=9d6dde4d-ec65-4207-ae70-5f47a7c97b58 /tmp/mnt/entware ext4 defaults 0 2" $CONFIG
# swap partition:
pc_append "UUID=feed737e-4108-4698-9298-3115ab1ad581 /tmp/mnt/swap ext4 defaults 0 1" $CONFIG
# backups partition:
pc_append "UUID=9cced663-0c6f-4d69-863c-532a8ffb1583 /tmp/mnt/backups ext4 defaults 0 0" $CONFIG

Is it possible to always disk-check first entware then swap and at last the backup partition?
You may find it easier t do a full override of fstab: https://github.com/RMerl/asuswrt-merlin/wiki/Custom-config-files

With disk-check, it's likely called on pre-mount - you may be able to customise it to your needs

final edit: why does the order of mounting matter?
 
Is it possible to always disk-check first entware then swap and at last the backup partition?
No, the order is determined by the firmware. It's first seen first processed.
 

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!
Top