Setting up Entware -> Swap File

23 posts / 0 new
Last post
Smitty16367
Smitty16367's picture
Setting up Entware -> Swap File

Hello Comunity, Hello Voxel,

On may way to a working VPN-Client step by step I tried to setup Entware lately, and it seems to be there now. ls –l /opt/* shows the sybolic links to the entware stick. Afterwards I tried to setup the swap file and ls shows it is at the stick, but I got some errors from the command lines:

root@R7800:/$
root@R7800:/$ cd /mnt/sda1
root@R7800:/tmp/mnt/sda1$

root@R7800:/tmp/mnt/sda1$ dd if=/dev/zero of=swap bs=1024 count=1048576
1048576+0 records in
1048576+0 records out
root@R7800:/tmp/mnt/sda1$

root@R7800:/tmp/mnt/sda1$ mkswap swap
mkswap: can't open 'swap': Permission denied
root@R7800:/tmp/mnt/sda1$

root@R7800:/tmp/mnt/sda1$ chmod 0600 swap
root@R7800:/tmp/mnt/sda1$

root@R7800:/tmp/mnt/sda1$ swapon swap
swapon: swap: Operation not permitted
root@R7800:/tmp/mnt/sda1$

Can you help me with those errors?

Thank you very much

Smitty

Voxel
Voxel's picture
Run the following commands:

Run the following commands:
 

/bin/mount

ls -l /mnt/sda1/

ls -l /opt/bin/

and copy/paste their output.

Voxel.

Smitty16367
Smitty16367's picture
Hi Voxel,

Hi Voxel,

tank you very much for helping, adnd sorry if I made stupid mistakes. Here coms the output: 

root@R7800:/$ /bin/mount
rootfs on / type rootfs (rw)
/dev/root on /rom type squashfs (ro,relatime)
proc on /proc type proc (rw,relatime)
sysfs on /sys type sysfs (rw,relatime)
tmpfs on /tmp type tmpfs (rw,nosuid,nodev,relatime,size=0k)
tmpfs on /dev type tmpfs (rw,relatime,size=512k,mode=755)
devpts on /dev/pts type devpts (rw,relatime,gid=5,mode=620)
none on /proc/bus/usb type usbfs (rw,relatime)
ubi0:overlay_volume on /overlay type ubifs (rw,relatime)
overlayfs:/overlay on / type overlayfs (rw,relatime,lowerdir=/,upperdir=/overlay)
debugfs on /sys/kernel/debug type debugfs (rw,relatime)
/dev/sda1 on /tmp/mnt/optware type ext2 (rw,nodev,noatime,errors=continue,user_xattr)
/dev/sda1 on /tmp/mnt/sda1 type ext2 (rw,nodev,noatime,errors=continue,user_xattr)
tmpfs on /hipplay/TMP type tmpfs (rw,nosuid,nodev,relatime,size=0k)
tmpfs on /hipplay/dev type tmpfs (rw,relatime,size=512k,mode=755)
proc on /hipplay/proc type proc (rw,relatime)
tmpfs on /hipplay/etc type tmpfs (rw,nosuid,nodev,relatime,size=0k)
tmpfs on /hipplay/home/0db type tmpfs (rw,nosuid,nodev,relatime,size=0k)
tmpfs on /hipplay/var/lib/sqlite type tmpfs (rw,nosuid,nodev,relatime,size=0k)
tmpfs on /hipplay/tmpHost type tmpfs (rw,nosuid,nodev,relatime,size=0k)
tmpfs on /hipplay/tmp type tmpfs (rw,nosuid,nodev,relatime,size=0k)
tmpfs on /hipplay/home/0external type tmpfs (rw,nosuid,nodev,relatime,size=0k)
devpts on /hipplay/dev/pts type devpts (rw,relatime,gid=5,mode=620)
tmpfs on /hipplay/dev/shm type tmpfs (rw,relatime,mode=777)
root@R7800:/$
root@R7800:/$
root@R7800:/$ ls -l /mnt/sda1/
drwxr-xr-x 3 999 999 4096 Aug 2 2017 autorun
drwxr-xr-x 12 999 999 4096 Sep 28 12:41 entware
drwx------ 2 root root 16384 Feb 12 11:17 lost+found
-rw------- 1 root root 1073741824 Feb 13 09:46 swap
root@R7800:/$
root@R7800:/$
root@R7800:/$ ls -l /opt/bin/
lrwxrwxrwx 1 999 999 16 Feb 12 12:39 [ -> /opt/bin/busybox
lrwxrwxrwx 1 999 999 16 Feb 12 12:39 [[ -> /opt/bin/busybox
lrwxrwxrwx 1 999 999 16 Feb 12 12:39 ar -> /opt/bin/busybox
lrwxrwxrwx 1 999 999 16 Feb 12 12:39 ash -> /opt/bin/busybox
lrwxrwxrwx 1 999 999 16 Feb 12 12:39 awk -> /opt/bin/busybox
lrwxrwxrwx 1 999 999 16 Feb 12 12:39 base64 -> /opt/bin/busybox
lrwxrwxrwx 1 999 999 16 Feb 12 12:39 basename -> /opt/bin/busybox
lrwxrwxrwx 1 999 999 16 Feb 12 12:39 bunzip2 -> /opt/bin/busybox
-rwsr-xr-x 1 999 999 617292 Sep 25 05:57 busybox
lrwxrwxrwx 1 999 999 16 Feb 12 12:39 bzcat -> /opt/bin/busybox
lrwxrwxrwx 1 999 999 16 Feb 12 12:39 cat -> /opt/bin/busybox
lrwxrwxrwx 1 999 999 16 Feb 12 12:39 chgrp -> /opt/bin/busybox
lrwxrwxrwx 1 999 999 16 Feb 12 12:39 chmod -> /opt/bin/busybox
lrwxrwxrwx 1 999 999 16 Feb 12 12:39 chown -> /opt/bin/busybox
lrwxrwxrwx 1 999 999 16 Feb 12 12:39 clear -> /opt/bin/busybox
lrwxrwxrwx 1 999 999 16 Feb 12 12:39 cmp -> /opt/bin/busybox
lrwxrwxrwx 1 999 999 16 Feb 12 12:39 cp -> /opt/bin/busybox
lrwxrwxrwx 1 999 999 16 Feb 12 12:39 crontab -> /opt/bin/busybox
lrwxrwxrwx 1 999 999 16 Feb 12 12:39 cryptpw -> /opt/bin/busybox
lrwxrwxrwx 1 999 999 16 Feb 12 12:39 cut -> /opt/bin/busybox
lrwxrwxrwx 1 999 999 16 Feb 12 12:39 date -> /opt/bin/busybox
lrwxrwxrwx 1 999 999 16 Feb 12 12:39 dd -> /opt/bin/busybox
lrwxrwxrwx 1 999 999 16 Feb 12 12:39 df -> /opt/bin/busybox
lrwxrwxrwx 1 999 999 16 Feb 12 12:39 diff -> /opt/bin/busybox
lrwxrwxrwx 1 999 999 16 Feb 12 12:39 dirname -> /opt/bin/busybox
lrwxrwxrwx 1 999 999 16 Feb 12 12:39 dmesg -> /opt/bin/busybox
lrwxrwxrwx 1 999 999 16 Feb 12 12:39 dos2unix -> /opt/bin/busybox
lrwxrwxrwx 1 999 999 16 Feb 12 12:39 du -> /opt/bin/busybox
lrwxrwxrwx 1 999 999 16 Feb 12 12:39 echo -> /opt/bin/busybox
lrwxrwxrwx 1 999 999 16 Feb 12 12:39 egrep -> /opt/bin/busybox
lrwxrwxrwx 1 999 999 16 Feb 12 12:39 env -> /opt/bin/busybox
lrwxrwxrwx 1 999 999 16 Feb 12 12:39 expr -> /opt/bin/busybox
lrwxrwxrwx 1 999 999 16 Feb 12 12:39 false -> /opt/bin/busybox
lrwxrwxrwx 1 999 999 16 Feb 12 12:39 fgrep -> /opt/bin/busybox
-rwxr-xr-x 1 999 999 289556 Sep 25 05:57 find
lrwxrwxrwx 1 999 999 16 Feb 12 12:39 free -> /opt/bin/busybox
lrwxrwxrwx 1 999 999 16 Feb 12 12:39 fsync -> /opt/bin/busybox
lrwxrwxrwx 1 999 999 16 Feb 12 12:39 grep -> /opt/bin/busybox
lrwxrwxrwx 1 999 999 16 Feb 12 12:39 gunzip -> /opt/bin/busybox
lrwxrwxrwx 1 999 999 16 Feb 12 12:39 gzip -> /opt/bin/busybox
lrwxrwxrwx 1 999 999 16 Feb 12 12:39 head -> /opt/bin/busybox
lrwxrwxrwx 1 999 999 16 Feb 12 12:39 hexdump -> /opt/bin/busybox
lrwxrwxrwx 1 999 999 16 Feb 12 12:39 hostid -> /opt/bin/busybox
lrwxrwxrwx 1 999 999 16 Feb 12 12:39 hostname -> /opt/bin/busybox
lrwxrwxrwx 1 999 999 16 Feb 12 12:39 id -> /opt/bin/busybox
lrwxrwxrwx 1 999 999 16 Feb 12 12:39 iostat -> /opt/bin/busybox
lrwxrwxrwx 1 999 999 16 Feb 12 12:39 ipcalc -> /opt/bin/busybox
lrwxrwxrwx 1 999 999 16 Feb 12 12:39 kill -> /opt/bin/busybox
lrwxrwxrwx 1 999 999 16 Feb 12 12:39 killall -> /opt/bin/busybox
lrwxrwxrwx 1 999 999 16 Feb 12 12:39 less -> /opt/bin/busybox
lrwxrwxrwx 1 999 999 16 Feb 12 12:39 ln -> /opt/bin/busybox
-rwxr-xr-x 1 999 999 31808 Sep 25 05:57 locale.new
-rwxr-xr-x 1 999 999 305564 Sep 25 05:57 localedef.new
lrwxrwxrwx 1 999 999 16 Feb 12 12:39 lock -> /opt/bin/busybox
lrwxrwxrwx 1 999 999 16 Feb 12 12:39 logger -> /opt/bin/busybox
lrwxrwxrwx 1 999 999 16 Feb 12 12:39 login -> /opt/bin/busybox
lrwxrwxrwx 1 999 999 16 Feb 12 12:39 ls -> /opt/bin/busybox
lrwxrwxrwx 1 999 999 16 Feb 12 12:39 lsusb -> /opt/bin/busybox
lrwxrwxrwx 1 999 999 16 Feb 12 12:39 md5sum -> /opt/bin/busybox
lrwxrwxrwx 1 999 999 16 Feb 12 12:39 mkdir -> /opt/bin/busybox
lrwxrwxrwx 1 999 999 16 Feb 12 12:39 mkfifo -> /opt/bin/busybox
lrwxrwxrwx 1 999 999 16 Feb 12 12:39 mknod -> /opt/bin/busybox
lrwxrwxrwx 1 999 999 16 Feb 12 12:39 mktemp -> /opt/bin/busybox
lrwxrwxrwx 1 999 999 16 Feb 12 12:39 more -> /opt/bin/busybox
lrwxrwxrwx 1 999 999 16 Feb 12 12:39 mount -> /opt/bin/busybox
lrwxrwxrwx 1 999 999 16 Feb 12 12:39 mv -> /opt/bin/busybox
lrwxrwxrwx 1 999 999 16 Feb 12 12:39 nc -> /opt/bin/busybox
lrwxrwxrwx 1 999 999 16 Feb 12 12:39 netmsg -> /opt/bin/busybox
lrwxrwxrwx 1 999 999 16 Feb 12 12:39 netstat -> /opt/bin/busybox
lrwxrwxrwx 1 999 999 16 Feb 12 12:39 nice -> /opt/bin/busybox
lrwxrwxrwx 1 999 999 16 Feb 12 12:39 nslookup -> /opt/bin/busybox
lrwxrwxrwx 1 999 999 16 Feb 12 12:39 od -> /opt/bin/busybox
-rwxr-xr-x 1 999 999 159400 Sep 25 05:57 opkg
lrwxrwxrwx 1 999 999 16 Feb 12 12:39 passwd -> /opt/bin/busybox
lrwxrwxrwx 1 999 999 16 Feb 12 12:39 patch -> /opt/bin/busybox
lrwxrwxrwx 1 999 999 16 Feb 12 12:39 pgrep -> /opt/bin/busybox
lrwxrwxrwx 1 999 999 16 Feb 12 12:39 pidof -> /opt/bin/busybox
lrwxrwxrwx 1 999 999 16 Feb 12 12:39 ping -> /opt/bin/busybox
lrwxrwxrwx 1 999 999 16 Feb 12 12:39 ping6 -> /opt/bin/busybox
lrwxrwxrwx 1 999 999 16 Feb 12 12:39 printf -> /opt/bin/busybox
lrwxrwxrwx 1 999 999 16 Feb 12 12:39 ps -> /opt/bin/busybox
lrwxrwxrwx 1 999 999 16 Feb 12 12:39 pwd -> /opt/bin/busybox
lrwxrwxrwx 1 999 999 16 Feb 12 12:39 readlink -> /opt/bin/busybox
lrwxrwxrwx 1 999 999 16 Feb 12 12:39 renice -> /opt/bin/busybox
lrwxrwxrwx 1 999 999 16 Feb 12 12:39 reset -> /opt/bin/busybox
lrwxrwxrwx 1 999 999 16 Feb 12 12:39 rm -> /opt/bin/busybox
lrwxrwxrwx 1 999 999 16 Feb 12 12:39 rmdir -> /opt/bin/busybox
lrwxrwxrwx 1 999 999 16 Feb 12 12:39 run-parts -> /opt/bin/busybox
lrwxrwxrwx 1 999 999 16 Feb 12 12:39 sed -> /opt/bin/busybox
lrwxrwxrwx 1 999 999 16 Feb 12 12:39 seq -> /opt/bin/busybox
lrwxrwxrwx 1 999 999 16 Feb 12 12:39 setserial -> /opt/bin/busybox
lrwxrwxrwx 1 999 999 16 Feb 12 12:39 sh -> /opt/bin/busybox
lrwxrwxrwx 1 999 999 16 Feb 12 12:39 sha1sum -> /opt/bin/busybox
lrwxrwxrwx 1 999 999 16 Feb 12 12:39 sha256sum -> /opt/bin/busybox
lrwxrwxrwx 1 999 999 16 Feb 12 12:39 sha512sum -> /opt/bin/busybox
lrwxrwxrwx 1 999 999 16 Feb 12 12:39 sleep -> /opt/bin/busybox
lrwxrwxrwx 1 999 999 16 Feb 12 12:39 sort -> /opt/bin/busybox
lrwxrwxrwx 1 999 999 16 Feb 12 12:39 stat -> /opt/bin/busybox
lrwxrwxrwx 1 999 999 16 Feb 12 12:39 strings -> /opt/bin/busybox
lrwxrwxrwx 1 999 999 16 Feb 12 12:39 stty -> /opt/bin/busybox
lrwxrwxrwx 1 999 999 16 Feb 12 12:39 su -> /opt/bin/busybox
lrwxrwxrwx 1 999 999 16 Feb 12 12:39 sync -> /opt/bin/busybox
lrwxrwxrwx 1 999 999 16 Feb 12 12:39 tail -> /opt/bin/busybox
lrwxrwxrwx 1 999 999 16 Feb 12 12:39 tar -> /opt/bin/busybox
lrwxrwxrwx 1 999 999 16 Feb 12 12:39 tee -> /opt/bin/busybox
lrwxrwxrwx 1 999 999 16 Feb 12 12:39 telnet -> /opt/bin/busybox
lrwxrwxrwx 1 999 999 16 Feb 12 12:39 test -> /opt/bin/busybox
lrwxrwxrwx 1 999 999 16 Feb 12 12:39 time -> /opt/bin/busybox
lrwxrwxrwx 1 999 999 16 Feb 12 12:39 top -> /opt/bin/busybox
lrwxrwxrwx 1 999 999 16 Feb 12 12:39 touch -> /opt/bin/busybox
lrwxrwxrwx 1 999 999 16 Feb 12 12:39 tr -> /opt/bin/busybox
lrwxrwxrwx 1 999 999 16 Feb 12 12:39 traceroute -> /opt/bin/busybox
lrwxrwxrwx 1 999 999 16 Feb 12 12:39 true -> /opt/bin/busybox
lrwxrwxrwx 1 999 999 16 Feb 12 12:39 tty -> /opt/bin/busybox
lrwxrwxrwx 1 999 999 16 Feb 12 12:39 umount -> /opt/bin/busybox
lrwxrwxrwx 1 999 999 16 Feb 12 12:39 uname -> /opt/bin/busybox
lrwxrwxrwx 1 999 999 16 Feb 12 12:39 uniq -> /opt/bin/busybox
lrwxrwxrwx 1 999 999 16 Feb 12 12:39 unix2dos -> /opt/bin/busybox
lrwxrwxrwx 1 999 999 16 Feb 12 12:39 unlink -> /opt/bin/busybox
lrwxrwxrwx 1 999 999 16 Feb 12 12:39 unlzma -> /opt/bin/busybox
lrwxrwxrwx 1 999 999 16 Feb 12 12:39 unxz -> /opt/bin/busybox
lrwxrwxrwx 1 999 999 16 Feb 12 12:39 unzip -> /opt/bin/busybox
lrwxrwxrwx 1 999 999 16 Feb 12 12:39 uptime -> /opt/bin/busybox
lrwxrwxrwx 1 999 999 16 Feb 12 12:39 usleep -> /opt/bin/busybox
lrwxrwxrwx 1 999 999 16 Feb 12 12:39 vi -> /opt/bin/busybox
lrwxrwxrwx 1 999 999 16 Feb 12 12:39 wc -> /opt/bin/busybox
lrwxrwxrwx 1 999 999 16 Feb 12 12:39 wget -> /opt/bin/busybox
lrwxrwxrwx 1 999 999 16 Feb 12 12:39 which -> /opt/bin/busybox
-rwxr-xr-x 1 999 999 75536 Sep 25 05:57 xargs
lrwxrwxrwx 1 999 999 16 Feb 12 12:39 xz -> /opt/bin/busybox
lrwxrwxrwx 1 999 999 16 Feb 12 12:39 yes -> /opt/bin/busybox
lrwxrwxrwx 1 999 999 16 Feb 12 12:39 zcat -> /opt/bin/busybox
root@R7800:/$
root@R7800:/$

Voxel
Voxel's picture
IMO eveything is OK. Try to

IMO eveything is OK. Try to reboot and check if swap works. Running e.g. the command

free

it should display something like
 

             total       used       free     shared    buffers     cached
Mem:        483532     194656     288876          0      15092      49164
-/+ buffers/cache:     130400     353132
Swap:      1048572          0    1048572
Voxel
Smitty16367
Smitty16367's picture
swap file does'nt seem to

swap file does'nt seem to work properly :-(

root@R7800:~$ free
                            total             used               free   shared        buffers         cached
Mem:              483532         169440         314092            0           9664           37220
-/+ buffers/cache:                122556         360976
Swap:                       0                   0                   0
root@R7800:~$

thx

Smitty

Voxel
Voxel's picture
Then plese try again mkswap

Then plese try again mkswap and swapon. After reboot. If again problems, try to install swap-utils from Entware (full versions of swapon/mkswap). Also try them again after reboot.

BTW, I'd suggest to use ext4, not ext2. Even if the life of your USB flash will be decreased.

Voxel.

Smitty16367
Smitty16367's picture
Hi Voxel,

Hi Voxel,

in another posting anyone said, that this could be because of having the drive mounted multiple times. Please have a look at this:

root@R7800:~$ mount | grep /dev/sda1
/dev/sda1 on /tmp/mnt/optware type ext2 (rw,nodev,noatime,errors=continue,user_xattr)
/dev/sda1 on /tmp/mnt/sda1 type ext2 (rw,nodev,noatime,errors=continue,user_xattr)
root@R7800:~$

It is mounted as 'sda1' and 'opware', isn't it? Could this be the problem? Can you tell me what to do then? Thx

Smitty

Voxel
Voxel's picture
in another posting anyone

in another posting anyone said, that this could be because of having the drive mounted multiple times. Please have a look at this:

root@R7800:~$ mount | grep /dev/sda1
/dev/sda1 on /tmp/mnt/optware type ext2 (rw,nodev,noatime,errors=continue,user_xattr)
/dev/sda1 on /tmp/mnt/sda1 type ext2 (rw,nodev,noatime,errors=continue,user_xattr)
root@R7800:~$

It is mounted as 'sda1' and 'opware', isn't it? Could this be the problem? Can you tell me what to do then? Thx

 

Well, maybe... I did not realize this reading your post...
Anyway I'd suggest you to use ext4. Making your installation from the scratch again.

Voxel.

Smitty16367
Smitty16367's picture
@Voxel

@Voxel

Thx a lot. Il try this, and tell you further on.

Smitty

Smitty16367
Smitty16367's picture
@Voxel

@Voxel

sorry, but I can’t get it. There must be something that I’m basically doing wrong. The commands you provide in your Readme: From which device shuld they be entered? Where should I connect the stick to prepare it? I took a live usb stick to boot a machine to ubuntu. Formated the stick with ext4 R7800 seems not even to be able to cope with. ls on the stick does not show any directory and the autoexec script is not executed, wether when the stick is plugged in nor at reboot R7800. Stick seems to be empty at all although the 2 directories are there. Ubuntu shows them. One time I tried with ext3. Autooexec was executed but when entering dd if=/dev/zero of=swap bs=1024 count=1048576 execution stopped very quickly, saying that there is not enogh space on the stick. mkswap swap and chmod 0600 swap were executed correctly but not swapon swap and swapfile was not created correctly. Pleas tell me what I can try. What am I doing wrong? Please help!!! Thank you very much

Smiity

Voxel
Voxel's picture
The commands you provide in

The commands you provide in your Readme: From which device shuld they be entered? Where should I connect the stick to prepare it? I took a live usb stick to boot a machine to ubuntu.
 

I had in mind in my README to use router's console. I.e. you connect your USB to router (maybe disabling any ReadySHARE or media players) and use telnet or ssh to enter to router console. I do not force users to use third party tools for this...

Try to do all this entering by telnet (you can enable it from http://routerlogin.net/debug.htm page) to your router. All these commands are available in my build.

Voxel.

Smitty16367
Smitty16367's picture
@Voxel

@Voxel

Yes, this was my first try as well, but I faild with the very first command:

root@R7800:~$ mkfs.ext2 –L optware /dev/sda1
mke2fs 1.43.8 (1-Jan-2018)
mkfs.ext2: invalid blocks 'optware' on device '–L'
root@R7800:~$

and mkfs did not seem to be there

root@R7800:~$ mkfs
-ash: mkfs: not found

but I just now I see that mkfs is pointed to mke2fs

root@R7800:~$ mke2fs --help
mke2fs: invalid option -- -
Usage: mke2fs [-c|-l filename] [-b block-size] [-C cluster-size]
[-i bytes-per-inode] [-I inode-size] [-J journal-options]
[-G flex-group-size] [-N number-of-inodes] [-d root-directory]
[-m reserved-blocks-percentage] [-o creator-os]
[-g blocks-per-group] [-L volume-label] [-M last-mounted-directory]
[-O feature[,...]] [-r fs-revision] [-E extended-option[,...]]
[-t fs-type] [-T usage-type ] [-U UUID] [-e errors_behavior][-z undo_file]
[-jnqvDFSV] device [blocks-count]
root@R7800:~$

But I don't know what to do with that. Could this be becase of a newer busybox? Can you please help? Thank you very much.

Smitty

Voxel
Voxel's picture
Try with ext4. And do not use

Try with ext4. And do not use mke2fs directly. Reboot  your router with no USB attached, then attach it. Then, unmount your USB if mounted

then:

mkfs.ext4 –L optware /dev/sda1

then:

mkdir /mnt/optware

mount –t ext4 /dev/sda1 /mnt/optware

cd /mnt/optware

dd if=/dev/zero of=swap bs=1024 count=1048576

mkswap swap

chmod 0600 swap

swapon swap

Voxel.

 

Smitty16367
Smitty16367's picture
@Voxel

@Voxel

Now I got a bit futher, but now another error occurs:

root@R7800:~$ mkfs.ext4 /dev/sda1 -L optware
mke2fs 1.43.8 (1-Jan-2018)
/dev/sda1 contains a vfat file system labelled 'opt'
Proceed anyway? (y,N) y
Creating filesystem with 1003008 4k blocks and 250976 inodes
Filesystem UUID: 5bbf5dba-4820-4667-81f6-b3bb7befa3fa
Superblock backups stored on blocks:
32768, 98304, 163840, 229376, 294912, 819200, 884736

Allocating group tables: done
Writing inode tables: done
Creating journal (16384 blocks): done
Writing superblocks and filesystem accounting information: done

root@R7800:~$ mkdir /mnt/optware
root@R7800:~$ mount –t ext4 /dev/sda1 /mnt/optware
BusyBox v1.4.2 (2018-02-02 11:19:05 UTC) multi-call binary

Usage: mount [flags] DEVICE NODE [-o options,more-options]

Mount a filesystem. Filesystem autodetection requires /proc be mounted.

Options:
-a Mount all filesystems in fstab
-o option One of many filesystem options, listed below
-r Mount the filesystem read-only
-t fs-type Specify the filesystem type
-w Mount for reading and writing (default)

Options for use with the "-o" flag:
loop Ignored (loop devices are autodetected)
[a]sync Writes are asynchronous / synchronous
[no]atime Disable / enable updates to inode access times
[no]diratime Disable / enable atime updates to directories
[no]dev Allow use of special device files / disallow them
[no]exec Allow use of executable files / disallow them
[no]suid Allow set-user-id-root programs / disallow them
[r]shared Convert [recursively] to a shared subtree
[r]slave Convert [recursively] to a slave subtree
[r]private Convert [recursively] to a private subtree
[un]bindable Make mount point [un]able to be bind mounted
bind Bind a directory to an additional location
move Relocate an existing mount point
remount Remount a mounted filesystem, changing its flags
ro/rw Mount for read-only / read-write

There are EVEN MORE flags that are specific to each filesystem
You'll have to see the written documentation for those filesystems

root@R7800:~$

Can you please give me further advice? and let me tell you, that the etware files are not on that stick yet.

Thank you very much

Smitty

Smitty16367
Smitty16367's picture
@Voxel

@Voxel

... and watch this:

root@R7800:~$ mkfs.ext4 /dev/sda1 -L optware

The way you wrote that command was not accepted, only the way above.

thx

Smitty16367
Smitty16367's picture
@Voxel

@Voxel

... and watch this:

root@R7800:~$ mkfs.ext4 /dev/sda1 -L optware

The way you wrote that command was not accepted, only the way above.

thx

Voxel
Voxel's picture
My output using the same

My output using the same commands

 

root@R7800:~$ df
Filesystem           1k-blocks      Used Available Use% Mounted on
tmpfs                      512         0       512   0% /dev
ubi0:overlay_volume      51032       508     47884   1% /overlay
overlayfs:/overlay       51032       508     47884   1% /
root@R7800:~$ mkfs.ext4 -L optware /dev/sda1
mke2fs 1.43.9 (8-Feb-2018)
/dev/sda1 contains a iso9660 file system labelled 'Debian jessie 20160609-11:57'
Proceed anyway? (y,N) y
Creating filesystem with 339296 4k blocks and 84832 inodes
Filesystem UUID: 681e66c3-d3cb-4900-a647-c65e9c951a92
Superblock backups stored on blocks:
        32768, 98304, 163840, 229376, 294912
 
Allocating group tables: done
Writing inode tables: done
Creating journal (8192 blocks): done
Writing superblocks and filesystem accounting information: done
 
root@R7800:~$ cd /mnt
root@R7800:/tmp/mnt$ mkdir optware
root@R7800:/tmp/mnt$ mount -t ext4 /dev/sda1 /mnt/optware/
root@R7800:/tmp/mnt$ df
Filesystem           1k-blocks      Used Available Use% Mounted on
tmpfs                      512         0       512   0% /dev
ubi0:overlay_volume      51032       508     47884   1% /overlay
overlayfs:/overlay       51032       508     47884   1% /
/dev/sda1              1335840     36752   1231232   3% /tmp/mnt/optware
root@R7800:/tmp/mnt$
 

 

Something is wrong with your environment. Maybe you are using second flash with somehow installed Entware? Or maybe you somehow installed Entware to internal flash...

IMO you shoudl preform reset to factory settings and to try again.

Voxel.

Smitty16367
Smitty16367's picture
@Voxel

@Voxel

as the error ocoured by mounting the drive I simply tried to reboot the router and it seemed to work. The stick was mounted then and I could go on. Now everything seems to be OK :-). Thank you very much for helping Voxel an please don't mind me for nerving you.

root@R7800:~$ mount | grep /dev/sda1
/dev/sda1 on /tmp/mnt/optware type ext4 (rw,nodev,relatime,data=writeback)
/dev/sda1 on /hipplay/home/0external/5bbf5dba-4820-4667-81f6-b3bb7befa3fa type ext4 (rw,nodev,relatime,data=writeback)

root@R7800:~$ cd /mnt/optware
root@R7800:/tmp/mnt/optware$ dd if=/dev/zero of=swap bs=1024 count=1048576
1048576+0 records in
1048576+0 records out

root@R7800:/tmp/mnt/optware$ mkswap swap
Setting up swapspace version 1, size = 1073737729 bytes

root@R7800:/tmp/mnt/optware$ chmod 0600 swap
root@R7800:/tmp/mnt/optware$ swapon swap

root@R7800:/tmp/mnt/optware$ free
                           total                   used                      free      shared           buffers
Mem:             483532               452616                  30916               0              3488
Swap:          1048572                         0              1048572
Total:           1532104               452616              1079488
root@R7800:/tmp/mnt/optware$

Voxel
Voxel's picture
Do not worry, I have iron

Do not worry, I have iron nerves ;-)

Good that it's working for you now.

Voxel.

Smitty16367
Smitty16367's picture
@Voxel

@Voxel

Sorry for asking again so quickly, but I don't understand the last step in your readme. You write:

... Or if you use my version of repository (hard float, Cortex-A15 optimization), then download archive with repository, prepared by me, place them to your webserver and correct /opt/etc/opkg.conf file pointing your webserver with packages. Or you cn install packages just from local files, unpacking archive in your HDD/stick.

Could you please explain? I used your entware-cortex-a15-3x-initial, but I don't really know what to do with that last part of etware sertup. Thank you very much again.

Smitty

Voxel
Voxel's picture
Well, my README requires some

Well, my README requires some updating.. You may just ignore this. It was the phrase when Entware packages were not available for installation from my site.

Now it could be installed from www.voxel-firmware.com. Just use it. Permanent lack of time to update README...
Voxel.

Smitty16367
Smitty16367's picture
@Voxel

@Voxel

OK, Thx. But I'm in fear, this was not the last question from my side. Hope I may ask you again, when the next difficulties apear on my way to VPN and they will.

Smitty

Smitty16367
Smitty16367's picture
@Voxel

@Voxel

sorry, but I've to ask you again, because I think we misunderstood each other a little bit. You told me to ignore that last part of entware setup I asked you lately. You ment the webserver thing, because it's not neccessary anymore, didn't you? But in my question I not only ment the webserver thing but also the entware-cortex-a15-3x thing. Till now I still have entware-cortex-a15-3x-initial package on my stick but I did not do anything yet with the entware-cortex-a15-3x-ad-block package. Do I have to replace the the files in the entware folder (initial) with those from the -ad-block package? And if so, why not use the -ad-block package from the beginning? Please tell me why there are two different packages of your entware version. Is it only because of the different size (older/smaller/legacy USB sticks)? The small initial to the small stick and afterwards the large -ad-block package to a web server with enough space?

Thank you very much for your informations.

Smitty