Показать сообщение отдельно
Старый 19.10.2014, 01:21      #8 (ссылка на пост)
MouseJunky
Ламер
 
Аватар для MouseJunky
 
Регистрация: 26.09.2014
Адрес: Сергиев Посад, Москва
Сообщений: 5
MouseJunky на пути к лучшему
Информация

По умолчанию

Проделала все шаги заново, теперь опишу их (проблема в самом конце):
Удаляю разделы, содаю новый праймари
SPOILER #1
Код:
root@Cisco:/tmp/home/root# fdisk -l

Disk /dev/sda: 8027 MB, 8027897856 bytes
247 heads, 62 sectors/track, 1023 cylinders
Units = cylinders of 15314 * 512 = 7840768 bytes

   Device Boot      Start         End      Blocks  Id System
root@Cisco:/tmp/home/root# fdisk /dev/sda

Command (m for help): d
No partition is defined yet!

Command (m for help): n
Command action
   e   extended
   p   primary partition (1-4)
p
Partition number (1-4): 1
First cylinder (1-1023, default 1): Using default value 1
Last cylinder or +size or +sizeM or +sizeK (1-1023, default 1023): Using default value 1023

Command (m for help): w
The partition table has been altered.
Calling ioctl() to re-read partition table

Форматирую в fat2
SPOILER #2
Код:
root@Cisco:/tmp/home/root# mkfs.ext2 -b 4096 -L flashka /dev/sda1
mke2fs 1.38 (30-Jun-2005)
Filesystem label=flashka
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
979200 inodes, 1958270 blocks
97913 blocks (5.00%) reserved for the super user
First data block=0
60 block groups
32768 blocks per group, 32768 fragments per group
16320 inodes per group
Superblock backups stored on blocks: 
	32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632

Writing inode tables: done                        
Writing superblocks and filesystem accounting information: done
This filesystem will be automatically checked every 25 mounts or
180 days, whichever comes first.  Use tune2fs -c or -i to override.

Монтирую нашу ФС. Затем создаю и подключаю файл подкачки.
SPOILER #3
Код:
root@Cisco:/# dd bs=1M count=256 if=/dev/zero of=/tmp/mnt/flashka/swap.swp
256+0 records in
256+0 records out
root@Cisco:/# mkswap /tmp/mnt/flashka/swap.swp
Setting up swapspace version 1, size = 268431360 bytes
UUID=9da1d861-1bd9-4ee6-b406-1c615ef6340c

Добавляю записи в "Run after mounting" и "Run before unmounting" соответственно
SPOILER #4
Код:
# Plug SWAP-file
if [ -f /tmp/mnt/flashka/swap.swp ]
then swapon /tmp/mnt/flashka/swap.swp
fi
Код:
# UnPlug SWAP-file
swapoff /tmp/mnt/flashka/swap.swp

Размонтирую, монтирую ФС, появился Swap. Через "Execute System Commands" создаю директорию
SPOILER #5
Код:
mkdir /mnt/flashka/Optware
Код:
Oct 18 21:14:25 Cisco user.info kernel: Adding 262136k swap on /tmp/mnt/flashka/swap.swp. Priority:-2 extents:67 across:266524k

Затем добавляю записи в "Run after mounting" и "Run before unmounting"
SPOILER #6
Код:
# Plug SWAP-file
if [ -f /tmp/mnt/flashka/swap.swp ]
then swapon /tmp/mnt/flashka/swap.swp
fi
# Mount Opt to Flash Drive of Choice
if [ -d /tmp/mnt/flashka ]
then mount -o noatime -t ext2 -obind /tmp/mnt/flashka/Optware /opt
fi
Код:
# UnPlug SWAP-file
swapoff /tmp/mnt/flashka/swap.swp
# UnMount Opt
umount /opt

Проверяю через "Execute System Commands"
SPOILER #7
Код:
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) 
usbfs on /proc/bus/usb type usbfs (rw) 
/dev/sda1 on /tmp/mnt/flashka type ext2 (rw,nodev,noatime) 
/dev/sda1 on /opt type ext2 (rw,nodev,noatime)

Через "Execute System Commands" загружаю и устанавливаю optware
SPOILER #8
Код:
wget http://tomatousb.org/local--files/tu...are-install.sh -O - | tr -d '\r' > /tmp/optware-install.sh
chmod +x /tmp/optware-install.sh
sh /tmp/optware-install.sh
Код:
Connecting to tomatousb.org (107.20.139.170:80) 
Connecting to tomatousb.wdfiles.com (54.165.50.24:80) 

-                    100% |*******************************|  2826   0:00:00 ETA 

Checking system config ... 
Using 213.141.159.254 as the default gateway. 
Using the following nameserver(s): 
nameserver 127.0.0.1 
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   5% |*                              | 46336   0:00:17 ETA
uclibc-opt_0.9.28-13  19% |******                         |   162k  0:00:08 ETA
uclibc-opt_0.9.28-13  30% |*********                      |   255k  0:00:06 ETA
uclibc-opt_0.9.28-13  44% |*************                  |   370k  0:00:04 ETA
uclibc-opt_0.9.28-13  55% |*****************              |   463k  0:00:03 ETA
uclibc-opt_0.9.28-13  70% |*********************          |   582k  0:00:02 ETA
uclibc-opt_0.9.28-13  80% |************************       |   666k  0:00:01 ETA
uclibc-opt_0.9.28-13  91% |****************************   |   759k  0:00:00 ETA
uclibc-opt_0.9.28-13 100% |*******************************|   832k  0:00:00 ETA 
Updating /opt/etc/ld.so.cache 
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. 
Connecting to ipkg.nslu2-linux.org (140.211.169.161:80) 

ipkg-opt_0.99.163-10  62% |*******************            | 47784   0:00:00 ETA
ipkg-opt_0.99.163-10 100% |*******************************| 75850   0:00:00 ETA 
Downloading http://ipkg.nslu2-linux.org/feeds/op...le/Packages.gz 
Connecting to ipkg.nslu2-linux.org (140.211.169.161:80) 

Packages.gz           15% |****                           | 18824   0:00:05 ETA
Packages.gz           80% |************************       | 98464   0:00:00 ETA
Packages.gz          100% |*******************************|   119k  0:00:00 ETA 
Inflating http://ipkg.nslu2-linux.org/feeds/op...le/Packages.gz 
Updated list of available packages in /opt/lib/ipkg/lists/optware 
Successfully terminated. 
Installing uclibc-opt (0.9.28-13) to /opt/... 
Downloading http://ipkg.nslu2-linux.org/feeds/op...-13_mipsel.ipk 
Connecting to ipkg.nslu2-linux.org (140.211.169.161:80) 

uclibc-opt_0.9.28-13   0% |                               |  4344   0:03:15 ETA
uclibc-opt_0.9.28-13   8% |**                             | 72400   0:00:21 ETA
uclibc-opt_0.9.28-13  19% |*****                          |   158k  0:00:12 ETA
uclibc-opt_0.9.28-13  33% |**********                     |   282k  0:00:07 ETA
uclibc-opt_0.9.28-13  45% |**************                 |   376k  0:00:06 ETA
uclibc-opt_0.9.28-13  56% |*****************              |   469k  0:00:04 ETA
uclibc-opt_0.9.28-13  71% |**********************         |   593k  0:00:02 ETA
uclibc-opt_0.9.28-13  82% |*************************      |   687k  0:00:01 ETA
uclibc-opt_0.9.28-13  97% |****************************** |   811k  0:00:00 ETA
uclibc-opt_0.9.28-13 100% |*******************************|   832k  0:00:00 ETA 
package uclibc-opt suggests installing ipkg-opt 
package uclibc-opt suggests installing ipkg-opt 
package uclibc-opt suggests installing ipkg-opt 
Configuring uclibc-opt 
Updating /opt/etc/ld.so.cache 
Successfully terminated. 
Installing ipkg-opt (0.99.163-10) to /opt/... 
Downloading http://ipkg.nslu2-linux.org/feeds/op...-10_mipsel.ipk 
Connecting to ipkg.nslu2-linux.org (140.211.169.161:80) 

ipkg-opt_0.99.163-10   5% |*                              |  4344   0:00:16 ETA
ipkg-opt_0.99.163-10  97% |****************************** | 73848   0:00:00 ETA
ipkg-opt_0.99.163-10 100% |*******************************| 75850   0:00:00 ETA 
Configuring ipkg-opt 
Successfully terminated.

Обновляю пакеты
SPOILER #9
Код:
ipkg-opt update&&ipkg-opt upgrade
Код:
Downloading http://ipkg.nslu2-linux.org/feeds/op...le/Packages.gz 
Inflating http://ipkg.nslu2-linux.org/feeds/op...le/Packages.gz 
Updated list of available packages in /opt/lib/ipkg/lists/optware 
Successfully terminated. 
Nothing to be done 
Successfully terminated.

Пока все работает. Ставлю MC
SPOILER #10
Код:
root@Cisco:/# ipkg-opt install mc
Installing mc (4.7.5.5-1) to /opt/...
Downloading http://ipkg.nslu2-linux.org/feeds/op...5-1_mipsel.ipk
package slang suggests installing pcre
package slang suggests installing libpng
Installing glib (2.20.4-1) to /opt/...
Downloading http://ipkg.nslu2-linux.org/feeds/op...4-1_mipsel.ipk
Installing slang (2.1.4-1) to /opt/...
Downloading http://ipkg.nslu2-linux.org/feeds/op...4-1_mipsel.ipk
Installing e2fslibs (1.41.12-1) to /opt/...
Downloading http://ipkg.nslu2-linux.org/feeds/op...2-1_mipsel.ipk
Configuring e2fslibs
Configuring glib
Configuring mc
Configuring slang
Successfully terminated.

Ставлю ncursesw
SPOILER #11
Код:
root@Cisco:/# ipkg-opt install ncursesw
Installing ncursesw (5.7-2) to /opt/...
Downloading http://ipkg.nslu2-linux.org/feeds/op...7-2_mipsel.ipk
Installing ncurses (5.7-3) to /opt/...
Downloading http://ipkg.nslu2-linux.org/feeds/op...7-3_mipsel.ipk
Configuring ncurses
update-alternatives: Linking //opt/bin/clear to /opt/bin/ncurses-clear
Configuring ncursesw
Successfully terminated.

Ставлю bash
SPOILER #12
Код:
Installing bash (3.2.54-1) to /opt/...
Downloading http://ipkg.nslu2-linux.org/feeds/op...4-1_mipsel.ipk
Installing readline (6.1-2) to /opt/...
Downloading http://ipkg.nslu2-linux.org/feeds/op...1-2_mipsel.ipk
Configuring bash
Configuring readline
Successfully terminated.

Появился файл "/opt/etc/profile"
SPOILER #13
Код:
root@Cisco:/# ll /opt/etc/
-rw-r--r--    1 root     root           251 Feb 18  2012 ipkg.conf
-rw-r--r--    1 root     root          1551 Oct 18 21:42 ld.so.cache
-rw-r--r--    1 root     root             0 Oct 18 21:42 ld.so.conf
drwxr-xr-x    2 root     root          4096 Oct 18 22:10 mc/
-rw-r--r--    1 root     root           184 Sep 30 23:29 profile
-rw-r--r--    1 root     root          1437 Feb 23  2012 slsh.rc

root@Cisco:/# cat /opt/etc/profile
#
# Bash initialization script
#

PS1="[\u@\h \W]$ "
PATH=/opt/sbin:/opt/bin:/sbin:/bin:/usr/sbin:/usr/bin
LD_LIBRARY_PATH=/opt/lib:${LD_LIBRARY_PATH}

export PS1 PATH LD_LIBRARY_PATH

Выполнять "cd /&&touch /opt/etc/profile" не стала, т.к. файл уже существует. Изменяю его
SPOILER #14
Код:
root@Cisco:/# mcedit /opt/etc/profile

root@Cisco:/# cat /opt/etc/profile
#
# Bash initialization script
#

PS1="[\u@\h \W]$ "
PATH=/opt/sbin:/opt/bin:/sbin:/bin:/usr/sbin:/usr/bin
LD_LIBRARY_PATH=/opt/lib:${LD_LIBRARY_PATH}

export PS1 PATH LD_LIBRARY_PATH

# MC Fix Russian Code Page
export TERMINFO=/opt/share/terminfo
export LC_ALL="ru_RU.UTF-8"

# Shell over Bash
export TERM=xterm
export SHELL=/opt/bin/bash

Перезагружаю роутер. Пробуем ввести "ls"
SPOILER #15
Код:
[root@Cisco root]$ cd /&& ll
?---rw--w-    0 16877    17       51539607721 Jan  1  1970 .
[root@Cisco /]$ ls
.

Пробую обновить пакеты через "Execute System Commands"
SPOILER #16
Код:
ipkg-opt update&&ipkg-opt upgrade
Код:
Downloading http://ipkg.nslu2-linux.org/feeds/op...le/Packages.gz 
sh: wget: Permission denied 
An error ocurred, return value: 1. 
Collected errors: 
ipkg_download: ERROR: Command failed with return value 127: `wget -q -P /opt/ipkg-foziVG http://ipkg.nslu2-linux.org/feeds/op...le/Packages.gz'


Вот такая подлянка
MouseJunky вне форума   Ответить с цитированием
 
Время генерации страницы 0.09057 секунды с 13 запросами