Поиск по этому блогу

15 нояб. 2014 г.

WR-2543 Установка DD-WRT И Optware (Проблема).



1. Сначала установил прошивку на Роутер вот отсюда: http://www.dd-wrt.com/site/index
2. Далее разбил и подключил Жесткий Диск:
Параметры запуска:



mount -o noatime /dev/sda1 /opt 
mount -o noatime /dev/sda2 /jffs

sleep 1

mkdir /tmp/mnt
ln -s /mnt /tmp

sleep 1

mount /dev/sda3 /mnt

sleep 1

mkswap /dev/sda4
swapon /dev/sda4

sleep 1

cp -a /etc/ /opt/# Move etc in opt
cp -a /bin/ /opt/# Move bin in opt
cp -a /lib/ /opt/# Move lib in opt
cp -a /usr/ /opt/# Move usr in opt
cp -a /tmp/ /opt/# Move tmp in opt
cp -a /jffs/ /opt/# Move jffs in opt

sleep 1

mount /opt/etc /etc
mount /opt/bin /bin
mount /opt/lib/ /lib
mount /opt/usr/ /usr
mount /opt/tmp/ /tmp
mount /opt/jffs/ /jffs

sleep 1
 
Информация о диске:

--- /dev/sda
Block device, size 18.65 GiB (20020396032 bytes)
DOS/MBR partition map
Partition 1: 511 MiB (535822336 bytes, 1046528 sectors from 2048)
Type 0x83 (Linux)
Ext3 file system
Volume name "OPT"
UUID BADD33DB-D200-D001-001D-30DBD200D001 (NCS)
Volume size 511 MiB (535822336 bytes, 523264 blocks of 1 KiB)


Partition 2: 512 MiB (536870912 bytes, 1048576 sectors from 1048576)
Type 0x83 (Linux)
Ext3 file system
Volume name "JFFS"
UUID 7FFFDFDD-D200-D001-5078-DCDDD200D001 (NCS)
Volume size 512 MiB (536870912 bytes, 524288 blocks of 1 KiB)

Partition 3: 17.15 GiB (18410897408 bytes, 35958784 sectors from 2097152)
Type 0x83 (Linux)
Ext3 file system
Volume name "MHT"
UUID E0F98FE0-D200-D001-6019-8DE0D200D001 (NCS)
Volume size 17.15 GiB (18410897408 bytes, 8989696 blocks of 2 KiB)

Partition 4: 510 MiB (534773760 bytes, 1044480 sectors from 38055936)
Type 0x83 (Linux)
Ext3 file system
Volume name "SWAP"
UUID F8F24CF9-D200-D001-E0E2-48F9D200D001 (Reserved)
Volume size 510 MiB (534773760 bytes, 522240 blocks of 1 KiB)
Status: Mounted on /opt

3. Проверил как смонтировалось:

root@BHS:~# df -h    (Команда в терминале)
Filesystem                Size      Used Available Use% Mounted on
rootfs                    6.5M      6.5M         0 100% /
/dev/root                 6.5M      6.5M         0 100% /
ramfs                   494.8M     42.1M    427.2M   9% /tmp
none                    512.0K         0    512.0K   0% /dev
/dev/mtdblock/3         494.8M     42.1M    427.2M   9% /jffs
/dev/sda1               494.8M     42.1M    427.2M   9% /opt   (Раздел ОРТ)
/dev/sda2               494.8M     42.1M    427.2M   9% /jffs    (Раздел JFFS)
/dev/sda3               494.8M     42.1M    427.2M   9% /tmp/mnt    (Раздел MHT)
/dev/sda1               494.8M     42.1M    427.2M   9% /tmp/proftpd/users/root/Router_OPT  (Расшарено Samba)
/dev/sda3               494.8M     42.1M    427.2M   9% /tmp/proftpd/users/root/Router_MHT  (Расшарено Samba)
/dev/sda2               494.8M     42.1M    427.2M   9% /tmp/proftpd/users/root/Router_JFFS (Расшарено Samba)
/dev/sda1               494.8M     42.1M    427.2M   9% /etc   (Папка в ОРТ)
/dev/sda1               494.8M     42.1M    427.2M   9% /bin   (Папка в ОРТ)
/dev/sda1               494.8M     42.1M    427.2M   9% /lib    (Папка в ОРТ)
/dev/sda1               494.8M     42.1M    427.2M   9% /usr   (Папка в ОРТ)
/dev/sda1               494.8M     42.1M    427.2M   9% /tmp  (Папка в ОРТ)
/dev/sda1               494.8M     42.1M    427.2M   9% /jffs    (Папка в ОРТ)
root@BHS:~#

Смотрим дальше:

root@BHS:~# mount    (Команда в терминале)
rootfs on / type rootfs (rw)
/dev/root on / type squashfs (ro,relatime)
proc on /proc type proc (rw,relatime)
sysfs on /sys type sysfs (rw,relatime)
debugfs on /sys/kernel/debug type debugfs (rw,relatime)
ramfs on /tmp type ramfs (rw,relatime)
none on /dev type tmpfs (rw,relatime,size=512k)
devpts on /dev/pts type devpts (rw,relatime,mode=600)
devpts on /proc/bus/usb type usbfs (rw,relatime)
/dev/mtdblock/3 on /jffs type jffs2 (rw,relatime)
/dev/sda1 on /opt type ext2 (rw,relatime,errors=continue)
/dev/sda2 on /jffs type ext2 (rw,noatime,errors=continue)
/dev/sda3 on /tmp/mnt type ext2 (rw,relatime,errors=continue)
/dev/sda1 on /tmp/proftpd/users/root/Router_OPT type ext2 (rw,relatime,errors=continue)
/dev/sda3 on /tmp/proftpd/users/root/Router_MHT type ext2 (rw,relatime,errors=continue)
/dev/sda2 on /tmp/proftpd/users/root/Router_JFFS type ext2 (rw,noatime,errors=continue)
/dev/sda1 on /etc type ext2 (rw,relatime,errors=continue)
/dev/sda1 on /bin type ext2 (rw,relatime,errors=continue)
/dev/sda1 on /lib type ext2 (rw,relatime,errors=continue)
/dev/sda1 on /usr type ext2 (rw,relatime,errors=continue)
/dev/sda1 on /tmp type ext2 (rw,relatime,errors=continue)
/dev/sda1 on /jffs type ext2 (rw,relatime,errors=continue)
root@BHS:~#

4. Проверил возможность записи в каталог /орт:

root@BHS:/tmp# cd /opt    (Команда в терминале)
root@BHS:/opt# echo "OK" >opt.ok    (Команда в терминале)
root@BHS:/opt# cat opt.ok    (Команда в терминале)
OK    (Ответ)
root@BHS:/opt#

5. Скачал скрипт для установки optware командой:

wget http://www.3iii.dk/linux/optware/optware-install-ddwrt.sh -O - | tr -d "\r" > /tmp/optware-install.sh
root@BHS:~# wget http://www.3iii.dk/linux/optware/optware-install-ddwrt.sh -O - | tr -d "\r" > /tmp/optware-install.sh    (Команда в терминале)
Connecting to www.3iii.dk (46.30.212.129:80)
-                    100% |************************************************************************************************|  2895   0:00:00 ETA
root@BHS:~#

и запустил его на выполнение командой:

sh /tmp/optware-install.sh
root@BHS:/tmp# sh /tmp/optware-install.sh    (Команда в терминале)
root@BHS:/tmp#

На этом этапе затык.....


6. Скачал другой скрипт для установки optware командой:

wget http://www.3iii.dk/linux/optware/optware-install-ddwrt.sh -O - | tr -d "\r" > /tmp/optware-install.sh
root@BHS:/opt# wget dl.dropbox.com/u/40777908/optware-install-ddwrt.sh -O — | tr -d “\r” > /tmp/optware-install-ddwrt.sh    (Команда в терминале)
Connecting to dl.dropbox.com (50.16.186.225:80)
Connecting to dl.dropboxusercontent.com (184.72.240.186:80)
root@BHS:/opt# sh /tmp/optware-install-ddwrt.sh
root@BHS:/opt# wget http://www.3iii.dk/linux/optware/optware-install-ddwrt.sh -O - | tr -d "\r" > /tmp/optware-install.sh
Connecting to www.3iii.dk (46.30.212.129:80)
-                    100% |************************************************************************************************|  2895   0:00:00  ЕТА

и запустил его на выполнение командой:

sh /tmp/optware-install.sh
root@BHS:/opt# sh /tmp/optware-install.sh    (Команда в терминале)
Checking system config ...
Using 176.114.192.1 as default gateway.
Using the following nameserver(s):
nameserver 192.168.1.1
Warning: /opt partition not empty!
Installing package uclibc-opt_0.9.28-13_mipsel.ipk ...
   Some newer versions of DD-WRT does not show download progress bar,
   so just be patient - or check STATUS -> BANDWIDTH tab for download
   activity in your routers Web-GUI, and then still wait a minute or two.
Connecting to ipkg.nslu2-linux.org (140.211.169.161:80)
uclibc-opt_0.9.28-13 100% |************************************************************************************************|   832k  0:00:00 ETA
/tmp/optware-install.sh: line 92: sh: Permission denied
/tmp/optware-install.sh: line 92: rm: Permission denied
/tmp/optware-install.sh: line 92: rm: Permission denied
/tmp/optware-install.sh: line 92: rm: Permission denied
/tmp/optware-install.sh: line 92: rm: Permission denied
/tmp/optware-install.sh: line 92: rm: Permission denied
Installing package ipkg-opt_0.99.163-10_mipsel.ipk ...
   Some newer versions of DD-WRT does not show download progress bar,
   so just be patient - or check STATUS -> BANDWIDTH tab for download
   activity in your routers Web-GUI, and then still wait a minute or two.
/tmp/optware-install.sh: line 93: wget: Permission denied
/tmp/optware-install.sh: line 93: tar: Permission denied
/tmp/optware-install.sh: line 93: tar: Permission denied
/tmp/optware-install.sh: line 93: tar: Permission denied
/tmp/optware-install.sh: line 93: sh: Permission denied
/tmp/optware-install.sh: line 93: rm: Permission denied
/tmp/optware-install.sh: line 93: rm: Permission denied
/tmp/optware-install.sh: line 93: rm: Permission denied
/tmp/optware-install.sh: line 93: rm: Permission denied
/tmp/optware-install.sh: line 93: rm: Permission denied
/tmp/optware-install.sh: line 94: /opt/sbin/ldconfig: Permission denied
/tmp/optware-install.sh: line 95: /opt/bin/ipkg: Permission denied
/tmp/optware-install.sh: line 96: /opt/bin/ipkg: Permission denied
/tmp/optware-install.sh: line 97: /opt/bin/ipkg: Permission denied

После этого, на любые команды ругается:

root@BHS:/opt#
root@BHS:/opt# df -h
-sh: df: Permission denied
root@BHS:/opt#
root@BHS:/opt# mount
-sh: mount: Permission denied
root@BHS:/opt#
root@BHS:/opt# reboot
-sh: nvram: Permission denied
-sh: chmod: Permission denied
-sh: /tmp/.rc_shutdown: Permission denied
-sh: /sbin/reboot: Permission denied
root@BHS:/opt#

Помогает только перезагрузка.....
Буду пробовать другие варианты....

P.S. Если кто нибудь иожет помочь в данном вопросе буду очень признателен!