What's new
  • 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!

How to make ssh settings permanent

Hi bbsc,

yep, the label was gone after formatting:

Code:
blkid
/dev/sda1: UUID="688c1470-1197-401f-ae9c-05d7b749c27f"

So, I relabeled it:

Code:
admin@RT-N66U:/tmp/home/root# tune2fs -L SDCARD /dev/sda1
tune2fs 1.42.8 (20-Jun-2013)
admin@RT-N66U:/tmp/home/root# blkid
/dev/sda1: LABEL="SDCARD" UUID="688c1470-1197-401f-ae9c-05d7b749c27f"

After reboot:

Code:
admin@RT-N66U:/tmp/home/root# mount
rootfs on / type rootfs (rw)
/dev/root on / type squashfs (ro)
proc on /proc type proc (rw)
tmpfs on /tmp type tmpfs (rw)
devfs on /dev type tmpfs (rw,noatime)
sysfs on /sys type sysfs (rw)
devpts on /dev/pts type devpts (rw)
/dev/mtdblock4 on /jffs type jffs2 (rw,noatime)
usbfs on /proc/bus/usb type usbfs (rw)
/dev/sda1 on /tmp/opt type ext2 (rw,noatime)

weird...

Zigster
 
Ok, now I see this problem too.
/jffs/scripts/services-start is executed while filesystems are not actually mounted via fstab.
To solve the problem add a small delay before mounting via services-start:
Code:
cat /jffs/scripts/services-start
#!/bin/sh
sleep 2
mount -obind /opt/home /tmp/home
 
Yes, I've had to add delays to most of my different scripts just because there are delays when mounting devices (both USB stick and cifs-mounts). Some delays are as long as 20 seconds.
 
...

Oh it's been a while since that problem arose ... just now, I stumbled upon that same problem again.

Could someone - for simplicity - please sum up a step-by-step procedure for saving ssh settings permanently on the internal SD-Card (and optionally also allowing to use ipkg at the same time ... that's what the problem is me right now) ?


Thanks,

Zigster
 
Last edited:
recap

Hi Forum,

here's the scripts I assembled with the help of bbsc:

fdisk -l
Code:
Device Boot      Start         End      Blocks  Id System
/dev/sda1               1         960     3870688+ 83 Linux

blkid
Code:
/dev/sda1: LABEL="SDCARD" UUID="XXXXXXXX-YYYY-ZZZZ-AAAA-BBBBBBBBBBB"

/jffs/configs/fstab (chmod a+x)
Code:
LABEL=SDCARD             /tmp/opt        ext2            rw,noatime      1 1

/jffs/scripts/init-start (chmod a+x)
Code:
#!/bin/sh

mkdir -p /tmp/opt

/jffs/scripts/services-start (chmod a+x)
Code:
#!/bin/sh
sleep 2
mount -obind /opt/home /tmp/home

mount output after reboot is as follows (relevant only: /dev/sda1)
Code:
/dev/sda1 on /tmp/home type ext2 (rw,noatime)

Main Problem:

As soon as the router reboots I can't install ipkg (via Web-Interface: http://[router_ip]/APP_Installation.asp -> Install Download Master) ... No USB-Device detected.

But I'd need it to install openssh via ipkg.

Thank you for any hints on this.

Zigster

[UPDATE]
I just deleted all partitions on the sdcard repartitioned and formatted and labeled the sdcard again...after adding the above jffs files I can say that at least the mounting is now working as mentioned by bbsc:

mount
Code:
/dev/sda1 on /tmp/opt type ext2 (rw,noatime)
/dev/sda1 on /tmp/home type ext2 (rw,noatime)

BUT:
Whenever I try to install the Download Manager via "USB-Application" -> "Download Master" -> "Install" I see the sdcard shortly
and then the message: "No USB disk detected." appears and the green USB Icon in the upper right goes off, and after a while it turns on again (with the same effect on retrying).

Is there something wrong with the sdcard ?

Any help is very much appreciated!

Thanks

Zigster
 
Last edited:
@Zigster
Download master needs a storage device mounted under /tmp/mnt/...
If you create your own fstab the system mounts your storage device under the mountpoint you've selected - /tmp/opt in the case.
That's why all these asus automatic installers do not work.

Solutions:
1. Either install entware or optware manually.
2. Or mount your usb stick under /tmp/mnt/whatever-you-want and install download master. Change the commands "mount -obind ..." in /jffs/scripts/services-start.

wbr
 

Similar threads

Latest threads

Support SNBForums w/ Amazon

If you'd like to support SNBForums, just use this link and buy anything on Amazon. Thanks!

Sign Up For SNBForums Daily Digest

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