Joined: 23 Jun 2008 Posts: 71 Location: Brooklyn, NY
Posted: Mon Apr 21, 2014 9:13 Post subject: Optware screwed up after update. Please help
21676 to 23838
Hi guys I had my DDWRT with optware setup on my 3700v1 for years now, I just had to update and like always here it is ... problems. Can you please check it out I am sure it's nothing. It looks like now guys instead of /mnt/sda_part1/ mounting points new DDWRT use something like /tmp/mnt/sda1/ and obviously nothing works now. I'll paste my USB mounting code and my start up code. Can you please look at at and if possible tell me what I need to fix there. I really hope I don't have to go in to actual "system" to fix my problem.
Here are readings from Services --> USB
Code:
--- /dev/sda
Block device, size 931.5 GiB (1000204886016 bytes)
DOS/MBR partition map
Partition 1: 512 MiB (536870912 bytes, 1048576 sectors from 2048)
Type 0x83 (Linux)
Ext2 file system
Volume name "Optware"
UUID 6E79590F-CE06-4B29-A92C-180540F61019 (DCE, v4)
Volume size 512 MiB (536870912 bytes, 131072 blocks of 4 KiB)
Partition 2: 64 MiB (67108864 bytes, 131072 sectors from 1050624)
Type 0x82 (Linux swap / Solaris)
Linux swap, version 2, subversion 1, 4 KiB pages, little-endian
Swap size 63.99 MiB (67100672 bytes, 16382 pages of 4 KiB)
Partition 3: 128 MiB (134217728 bytes, 262144 sectors from 1181696)
Type 0x83 (Linux)
Ext2 file system
Volume name "Shared"
UUID 02CFCEEF-225C-43A1-A332-11DB0F29AC13 (DCE, v4)
Volume size 128 MiB (134217728 bytes, 131072 blocks of 1 KiB)
Partition 4: 930.8 GiB (999465639936 bytes, 1952081328 sectors from 1443840)
Type 0x83 (Linux)
Ext2 file system
Volume name "Data"
UUID 6B3DC694-E8F9-43E1-8464-2C05CE98C827 (DCE, v4)
Volume size 930.8 GiB (999465639936 bytes, 244010166 blocks of 4 KiB)
/dev/sda mounted to /opt
--- /dev/sda1
Block device, size 512 MiB (536870912 bytes)
Ext2 file system
Volume name "Optware"
UUID 6E79590F-CE06-4B29-A92C-180540F61019 (DCE, v4)
Volume size 512 MiB (536870912 bytes, 131072 blocks of 4 KiB)
/dev/sda1 mounted to /opt
--- /dev/sda2
Block device, size 64 MiB (67108864 bytes)
Linux swap, version 2, subversion 1, 4 KiB pages, little-endian
Swap size 63.99 MiB (67100672 bytes, 16382 pages of 4 KiB)
/dev/sda2 mounted to swap
--- /dev/sda3
Block device, size 128 MiB (134217728 bytes)
Ext2 file system
Volume name "Shared"
UUID 02CFCEEF-225C-43A1-A332-11DB0F29AC13 (DCE, v4)
Volume size 128 MiB (134217728 bytes, 131072 blocks of 1 KiB)
/dev/sda3 mounted to /tmp/mnt/sda3
--- /dev/sda4
Block device, size 930.8 GiB (999465639936 bytes)
Ext2 file system
Volume name "Data"
UUID 6B3DC694-E8F9-43E1-8464-2C05CE98C827 (DCE, v4)
Volume size 930.8 GiB (999465639936 bytes, 244010166 blocks of 4 KiB)
/dev/sda4 mounted to /tmp/mnt/sda4
And here is my current startup code
Code:
#!/bin/sh
sleep 10
if [ -f /mnt/sda_part1/optware.enable ]; then
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
I see mounting points are now different but also I just looked on my old optware installation and I see some things in /etc/opkg.conf that may be need editing but I am sure I'll manage, but again if possible can you provide correct startup code so at list my optware installation is not proken and I See nice color letters in SSH root@WNDR3700
Thank you VERY much guys. Also if it's impossible to fix and I do need to reinstall optware and wipe router I even ready to do this but I need updated tutorial on how to install Optware on new DDWRT with updated mount structure.
Thank you once again. _________________ =================================
|We Have What it Takes ...I think.|
=================================
Joined: 23 Jun 2008 Posts: 71 Location: Brooklyn, NY
Posted: Tue Apr 22, 2014 6:32 Post subject:
Thank you ery much for your help yet I knew it's couldn't be that easy. After changing 3 lines and reboot GUI intact even without copy /etc directory and opkg command still not valid and root@WNDR3700 not colored means optware not working correctly
Any other ideas ? I mean I am willing to reinstall optware if new tutorial is available cause all I See are for like 2 year old builds that no longer work.
Code:
root@WNDR3700:~# opkg update
-sh: opkg: not found
root@WNDR3700:~#
_________________ =================================
|We Have What it Takes ...I think.|
=================================
sleep 10
if [ -f /tmp/mnt/sda1/optware.enable ]; then
mount -o bind /tmp/mnt/sda1/etc /etc
mount -o bind /tmp/mnt/sda1/root /tmp/root
mount -o bind /tmp/mnt/sda1/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
So now with sda1 in there I did "RUN COMMAND" with start up code ......annnnd nothing.
Code:
root@WNDR3700:~# opkg update
-sh: opkg: not found
root@WNDR3700:~#
Only one thing may be I can't run start up command like this or something I don't know all I know I simply can't understand what is the problem, I don't hove enough knowlege on this and trust me I looked. I love this stuff and I want to learn but I simply don't have resources. I don't see a single tutorial on how to do this that is CURRENT i see hundreds of topics but all of them are old and they wont work because DDWRT mounting system has changed and I think it's more than just /mnt/sda1_part1/ to /mnt/sda1/ otherwise it would of worked. I am really stressed out can't I con't figure this out.
Also now I am looking at how DDWRT mounting my Hard drive and it's VERY interesting.
I have 1 TB drive with 4 partitions. I used this guide to make it:
Partition 1 is 512MB and I called it OPTWARE
Partition 2 is 64MN and I called it SWAP
Partition 3 is 128MB and I called is SHARED
Partition 4 is 930GB and I called it DATA
And DDWRT I see have 2 mounting points for /opt one from /dev/sda and another from /dev/sda1 both with /opt mounts
Again may be it's nothing but that's all I See. And I don't understand why there are no /mnt/sda1/ mounting points .... I am very confused. I clearly need help.
Put it this way I guess I can go back to 21676 but come on what is this ? I mean this is over 2 years old build. I think I'll be forced to do this if I am not up and running soon. _________________ =================================
|We Have What it Takes ...I think.|
=================================
Joined: 23 Jun 2008 Posts: 71 Location: Brooklyn, NY
Posted: Tue Apr 22, 2014 21:56 Post subject:
YOU GOTTA BE KIDDING ME !
It worked. I see colored letters and ....
Code:
root@WNDR3700 ~ $ opkg update
Downloading http://downloads.openwrt.org/snapshots/trunk/ar71xx/packages/Packages.gz.
Updated list of available packages in /opt/tmp/var/opkg-lists/snapshots.
root@WNDR3700 ~ $
Thank you very much I KNEW this was something so simple and totally stupid, I mean come on it wasn't working because of partition Label. I mean come on what is this. Anyhow I am glad it works. I do see what you mean my GUI all screwed up, what I have to do to fix it again ?
And Once again thanks a lot for helping. _________________ =================================
|We Have What it Takes ...I think.|
=================================
Joined: 23 Jun 2008 Posts: 71 Location: Brooklyn, NY
Posted: Tue Apr 22, 2014 23:11 Post subject:
I tried to copy using WinSCP /etc folder in / "root" to desktop on PC and from PC same /etc folder to /mnt/sda1/ and .... I think files are identical and I Still have corruption in Web GUI. I bet it's another simple fix but may be I am doing something wrong right now.
UPDATE:
I did exactly same this but without HDD plugged in. (First part copying /etc to PC)
Then I restarted router with HDD plugged in and I do see files are different. I moved new /etc files to /mnt/sda1/ restarted router and, it got better I do see options and buttons but GUI is not right I mean it looks like 1995 Netscape surfing I think I am closer but not quite. Rest optware and stuff still works no problem.
I'll wait for you, don't want to mess something up. And actually now I am thinking about full 30 30 30 wipe and using old method to install optware but using new startup code .... anyhow I'll wait for you.
UPDATE 2: I Used files from /etc folder that I took while GUI was okay without Hard drive plugged in and I moved them to /etc that in ROOT and not in mnt/sda1 with HDD PLUGGED IN because etc from root being mounted as sda1 so basically it's same files. and it works now. So all I had to do is unplug HDD , same /etc folder to PC , plug in Hard drive back reboot router and copy /etc from my pc back to router root. Oh boi. Anyhow this was nothing compare to Label mismatch of partition .... BTW I got it labelled as you told me DDD .....etc I'll keep it that way. _________________ =================================
|We Have What it Takes ...I think.|
=================================
sleep 10
if [ -f /tmp/mnt/sda1/optware.enable ]; then
mount -o bind /tmp/mnt/sda1/etc /etc
mount -o bind /tmp/mnt/sda1/root /tmp/root
mount -o bind /tmp/mnt/sda1/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
Joined: 23 Jun 2008 Posts: 71 Location: Brooklyn, NY
Posted: Thu Jun 19, 2014 2:01 Post subject:
Oh boy ......again, updated to 24160 and AGAIN I See mounting changes .... I mean come on. Developers have ACTUAL reason behind that or what cause why would you change how system mount USB drives and partitions ? Nothing changed on my side yet optware no longer works because DDWRT no longer mount my partitions correctly, in matter effect it see only 1 partition out of 4, at list it mount only 1.
Here what I See now.
Code:
Disk Info
--- /dev/sda3
Block device, size 128 MiB (134217728 bytes)
Ext2 file system
Volume name "Shared"
UUID 02CFCEEF-225C-43A1-A332-11DB0F29AC13 (DCE, v4)
Volume size 128 MiB (134217728 bytes, 131072 blocks of 1 KiB)
/dev/sda3 mounted to /tmp/mnt/sda3
that's it ..... no opt,swap or data partitions .... only this shared ....
Like like time it's totally possible that they change the way system mount partitions based on partition name ....so ....last time I had problem and all I had to do is rename my opt partition from opt to some other words without opt in it ..and it worked ... what's going on now ? I really hope guy who helped me before still here.
Update:
Really strange things are happening.
I restarted router looked on mounting points and I See totally diffirent stuff. It looks like opt is propertly mounted as sda1 BUT to same /opt I see now my data partition is mounted .....yeah something is def wrong here.
Two things if possible. DDWRT CLEARLY look at partition names for mount suggestions so with that is there a "proper" way of naming partitions ? I want /opt in sda1 swap in sda2 shared in sda3 and main storage partition is sda4.
And another thing I see we all doing auto mount here, may be it's better just to manually mount all partitions ? I mean is it possible to include in startup code to mount partition in the way I need like I described before and then start usual optware code ?
Thank you guys !
here is what I have now just after restart:
Code:
Disk Info
--- /dev/sda
Block device, size 931.5 GiB (1000204886016 bytes)
DOS/MBR partition map
Partition 1: 512 MiB (536870912 bytes, 1048576 sectors from 2048)
Type 0x83 (Linux)
Ext2 file system
Volume name "Optware"
UUID 6E79590F-CE06-4B29-A92C-180540F61019 (DCE, v4)
Volume size 512 MiB (536870912 bytes, 131072 blocks of 4 KiB)
Partition 2: 64 MiB (67108864 bytes, 131072 sectors from 1050624)
Type 0x82 (Linux swap / Solaris)
Linux swap, version 2, subversion 1, 4 KiB pages, little-endian
Swap size 63.99 MiB (67100672 bytes, 16382 pages of 4 KiB)
Partition 3: 128 MiB (134217728 bytes, 262144 sectors from 1181696)
Type 0x83 (Linux)
Ext2 file system
Volume name "Shared"
UUID 02CFCEEF-225C-43A1-A332-11DB0F29AC13 (DCE, v4)
Volume size 128 MiB (134217728 bytes, 131072 blocks of 1 KiB)
Partition 4: 930.8 GiB (999465639936 bytes, 1952081328 sectors from 1443840)
Type 0x83 (Linux)
Ext2 file system
Volume name "Data"
UUID 6B3DC694-E8F9-43E1-8464-2C05CE98C827 (DCE, v4)
Volume size 930.8 GiB (999465639936 bytes, 244010166 blocks of 4 KiB)
/dev/sda mounted to /opt
--- /dev/sda1
Block device, size 512 MiB (536870912 bytes)
Ext2 file system
Volume name "Optware"
UUID 6E79590F-CE06-4B29-A92C-180540F61019 (DCE, v4)
Volume size 512 MiB (536870912 bytes, 131072 blocks of 4 KiB)
/dev/sda1 mounted to /opt
--- /dev/sda2
Block device, size 64 MiB (67108864 bytes)
Linux swap, version 2, subversion 1, 4 KiB pages, little-endian
Swap size 63.99 MiB (67100672 bytes, 16382 pages of 4 KiB)
/dev/sda2 mounted to swap
_________________ =================================
|We Have What it Takes ...I think.|
=================================
Your sda1 partition is still labeled "Optware" so dd-wrt is auto mounting it as /opt. Do not use "Optware", "optware", "opt" ... as label for partition in order to be mounted as /tmp/mnt/sda1.
Joined: 23 Jun 2008 Posts: 71 Location: Brooklyn, NY
Posted: Wed Jun 25, 2014 4:12 Post subject:
Thank you for reply, yeah this is after I tried everything including rename and stuff. Basically everytime I reboot router it mount partition diffirent way, after about 10 restarts I managed to get sda1 working so optware is just fine ...no sda4 (my main data partition) but I did manual mount so for now It's working but again. Does anyone know what is going on with this mounting diffirently on each reboot thing ? Or it's just me ?
Here is what I have now:
Code:
Disk Info
--- /dev/sda1
Block device, size 512 MiB (536870912 bytes)
Ext2 file system
Volume name "sda1"
UUID 6E79590F-CE06-4B29-A92C-180540F61019 (DCE, v4)
Volume size 512 MiB (536870912 bytes, 131072 blocks of 4 KiB)
/dev/sda1 mounted to /tmp/mnt/sda1
--- /dev/sda2
Block device, size 64 MiB (67108864 bytes)
Linux swap, version 2, subversion 1, 4 KiB pages, little-endian
Swap size 63.99 MiB (67100672 bytes, 16382 pages of 4 KiB)
/dev/sda2 mounted to swap
--- /dev/sda3
Block device, size 128 MiB (134217728 bytes)
Ext2 file system
Volume name "sda3_shared"
UUID 02CFCEEF-225C-43A1-A332-11DB0F29AC13 (DCE, v4)
Volume size 128 MiB (134217728 bytes, 131072 blocks of 1 KiB)
/dev/sda3 mounted to /tmp/mnt/sda3
No sda4 but it's okay and I labeled partition 1 as sda1 .. I tried different names .. it didn't help btw Optware or OPT or ...whatever. So SDA! works for me.
Also, I have another thing I tried after this post that for some reason DID NOT work. I tried to disable auto mount and tied to create new folder and mount manually sda1 in to it. I couldn't. Not sure why but I managed to create folder in /tmp/mnt/sda1 and mount /dev/sda1 but nothing worked. Anyone know what is going on ?