I have a slightly peculiar situation, and am wondering how I can accomplish what I wish to.
I wish to use optware to install mdadm so that I can use the USB port of this router to backup various systems attached to the router using rsync and cron jobs to a Software Raid 1 using two 1tb disks.
I know it is not favorable to use JFFS since upon firmware upgrade the changes will get overwritten. would it be possible to use a USB Flash drive and a two port hub to the router's USB port and set things up that way (this would over complicate things more than they have already become) or would it be better to just make a startup script to check if the optware is enabled, and if not re-download the packages and install/configure them properly and remount the raid array? I could then backup this script and re-run it on a new install of the firmware? Or, would it be acceptable to just use JFFS2 since my only intention is enabling mdadm, rsync, and a few other small lightweight utilities?
Although the flash media may be useful since I could use it as a (slow) swap medium for the router to utilize since mdadm might become taxing (though I doubt it)
This router only gets updated once yearly (Around the holidays, since that's when I'm around to do maintenance)
Any guidance is greatly appreciated.
Posted: Sun Jan 01, 2012 11:30 Post subject: Re: seg fault
Juniorek wrote:
somthings not right;/
any one care to help:?
For me the things are working now, I mean the opkg, so I will leave the things as they are now.In future if there is some fix of this may be will try it...
Posted: Sun Jan 01, 2012 13:25 Post subject: mount second partition
Hello
I've r16785 flashed on WNDR 3700 v1.
Mini SD card has 2 partitions : NTFS and ext3,
I want to install optware to second partition
First one (NTFS) is automounted, I can't get the second one to be mounted :
Code:
root@DD-WRT:~# mount -t ext3 -o noatime /dev/sda2 /mnt2
mount: mounting /dev/sda2 on /mnt2 failed: No such file or directory
though sda2 appears in /dev.
What am I doing wrong ?
Thanks
Posted: Sun Jan 01, 2012 13:52 Post subject: Re: seg fault
Juniorek wrote:
man... i really don`y know what`s wrong...
i managed to install opkg
the weg-gui works fine
but when i try the ipkg or even to stop httpd i get seg fault...
somthings not right;/
any one care to help:?
I get segfault too.
I have Buffalo WZR-HP-AG300H (Atheros 7161 chip). And i change packages URLs and run without segfaults.
Try to find other packages for your chip on http://downloads.openwrt.org
==================================================
For my Buffalo WZR-HP-AG300H (Atheros 7161 chip):
1. Prepare the USB disk
Create an ext3 partition using GParted for instance
I use usb-flash with 3 partitions: ext3, swap, ext3. For packages i use first.
Under Services->USB:
* Enable Core USB Support
* Disable USB Printer Support (enable it if you need printing support)
* Enable USB Storage Support
* Enable Automatic Drive Mount
* Set Disk Mount Point to /mnt
* Click Apply Settings
3. Plug the USB drive into the router and reboot it
* SSH into your box using user root and make sure, using mount, that your USB stick was mounted correctly (you can also check this on the web interface under Services->USB).
4. Create and prepare necessary structure
* SSH into your box using user root if not already done at previous step:
*sda_part1 - is directory attached to first partition on my usb-disk.
*If you use only one partition, or on your router partitions get other names - change this.
cd /mnt/sda_part1
mkdir etc opt root
touch optware.enable
chmod 755 etc opt root
mkdir opt/lib
chmod 755 opt/lib
cp -a /etc/* /mnt/sda_part1/etc/
mount -o bind /mnt/sda_part1/etc /etc
mount -o bind /mnt/sda_part1/opt /jffs
umount /jffs
mount -o bind /mnt/sda_part1/root /tmp/root
mount -o bind /mnt/sda_part1/opt /opt
export LD_LIBRARY_PATH='/opt/lib:/opt/usr/lib:/lib:/usr/lib'
opkg update
6. Set the startup script to make the changes take effect each time upon reboot
Under DD-WRT’s web interface, Administration->Commands, input the following commands in the window then click "Save Startup":
*swapon /dev/sda2 - only if you have swap partition on usb (second partition)
#!/bin/sh
sleep 5
if [ -f /mnt/sda_part1/optware.enable ]; then
swapon /dev/sda2
mount -o bind /mnt/sda_part1/etc /etc
mount -o bind /mnt/sda_part1/root /tmp/root
mount -o bind /mnt/sda_part1/opt /opt
else
exit
fi
if [ -d /opt/usr ]; then
export LD_LIBRARY_PATH='/opt/lib:/opt/usr/lib:/lib:/usr/lib'
export PATH='/opt/bin:/opt/usr/bin:/opt/sbin:/opt/usr/sbin:/bin:/sbin:/usr/sbin:/usr/bin'
else
exit
fi
Note that some users have reported issues that they were able to fix by making the script sleep 10 seconds instead of 5.
7. Modification of the profile file
SSH into your box then copy/paste the commands below to PuTTY window to create a script running each time when user root logins:
Posted: Sun Jan 01, 2012 16:27 Post subject: Re: mount second partition
kodo wrote:
furic wrote:
Hello
I've r16785 flashed on WNDR 3700 v1.
Mini SD card has 2 partitions : NTFS and ext3,
I want to install optware to second partition
First one (NTFS) is automounted, I can't get the second one to be mounted :
Code:
root@DD-WRT:~# mount -t ext3 -o noatime /dev/sda2 /mnt2
mount: mounting /dev/sda2 on /mnt2 failed: No such file or directory
though sda2 appears in /dev.
What am I doing wrong ?
I am pretty sure, there is no /mnt2
As I understand I should create mount point first, where do I create it ? Can you please provide sample for mounting 2 partitions ?
Thanks
root@DD-WRT:/# ls /dev/sd*
/dev/sda /dev/sda1 /dev/sda2
root@DD-WRT:~# mount -t ext3 /dev/sda2 /opt
mount: mounting /dev/sda2 on /opt failed: No such device
Sorry, I'm newby
segmentation fault is because you download a new version of libc.so.0 from openwrt repository and it is not compatible with dd-wrt. After replacing it you make it so that /opt/lib/libc.so.0 takes priority over /lib/libc.so.0 and it seems to crash native dd-wrt applications.
if what i say is true then mount the sda_part2 to something else like /opt depended where the first one is mounted
...ad note
i just saw that you mount it in /mnt
so there should be 2 dirs like i said before
i use a startup script that mounts my partition where i want
you can also do somthin like that
Thanks for the replay,Juniorek, but /mnt is mounted to /dev/sda1 partition and not to /dev/sda, the /mnt is empty :
Code:
root@DD-WRT:~# 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)
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/sda1 on /mnt type ext3 (rw,relatime,errors=continue,user_xattr,data=writeba ck)
root@DD-WRT:~# ls /dev/sd*
/dev/sda /dev/sda1 /dev/sda2
root@DD-WRT:~# ls /mnt
root@DD-WRT:~#
I've re-formated the MMC (using GParted) to have ext3 as first partition and NTFS as second, I used "msdos" partition tree and ext3 and ntfs are primary partitions .
Still getting the same error :
Code:
root@DD-WRT:~# mount -t ntfs /dev/sda2 /opt
mount: mounting /dev/sda2 on /opt failed: No such device