Tutorial: How to recover gcc after firmware 2.00.15 upgrade
Forum » Forum / Backup & Recovery » Tutorial: How to recover gcc after firmware 2.00.15 upgrade
Started by: chelrobchelrob
On: 1206942321|%e %b %Y, %H:%M %Z|agohover
Number of posts: 50
rss icon RSS: New posts
Summary:
If you tried to restore gcc by copying /usr from a backup and failed this should get you up and running
Tutorial: How to recover gcc after firmware 2.00.15 upgrade
chelrobchelrob 1206942321|%e %b %Y, %H:%M %Z|agohover

Sorry for any problems this caused.

Last edited on 1252129925|%e %b %Y, %H:%M %Z|agohover By chelrob + Show more
Reply  |  Options
Re: Tutorial: How to recover gcc after firmware 2.00.15 upgrade
chelrobchelrob 1206942770|%e %b %Y, %H:%M %Z|agohover

Disregard…

Last edited on 1206985641|%e %b %Y, %H:%M %Z|agohover By chelrob + Show more
Reply  |  Options
Re: Tutorial: How to recover gcc after firmware 2.00.15 upgrade
chelrobchelrob 1206942907|%e %b %Y, %H:%M %Z|agohover

Disregard…

Last edited on 1206985668|%e %b %Y, %H:%M %Z|agohover By chelrob + Show more
Reply  |  Options
Re: Tutorial: How to recover gcc after firmware 2.00.15 upgrade
alephsmithalephsmith 1206964975|%e %b %Y, %H:%M %Z|agohover

You do know you can edit your posts don't you..?

Would you like to also add it as a subsection to the Firmware 2.00.15 wiki page.

Reply  |  Options
Re: Tutorial: How to recover gcc after firmware 2.00.15 upgrade
chelrobchelrob 1206981790|%e %b %Y, %H:%M %Z|agohover

I just figured out clicking options lets me edit my post.

Thanks.

Last edited on 1206990292|%e %b %Y, %H:%M %Z|agohover By chelrob + Show more
Re: Tutorial: How to recover gcc after firmware 2.00.15 upgrade
CyVaqueroCyVaquero 1207716480|%e %b %Y, %H:%M %Z|agohover

I'm hanging on step 15 - when extracting it errors.

Here's the tail:

./usr/include/c++/arm-linux-uclibc/bits/messages_members.h
./usr/include/c++/arm-linux-uclibc/bits/gthr-single.h
./usr/include/c++/arm-linux-uclibc/bits/os_defines.h
./usr/include/c++/arm-linux-uclibc/bits/stdc++.h.gch/
./usr/include/c++/arm-linux-uclibc/bits/stdc++.h.gch/O2g
./usr/include/c++/arm-linux-uclibc/bits/stdc++.h.gch/O2g: Wrote only 8192 of 10240 bytes
Skipping to next header
A lone zero block at 89678
Error exit delayed from previous errors

Any ideas?

Re: Tutorial: How to recover gcc after firmware 2.00.15 upgrade
chelrobchelrob 1207809265|%e %b %Y, %H:%M %Z|agohover

Maybe SDA1FILE.TAR.gz was corrupted somewhere along the way?

Were you root through the entire process up to that point?

Reply  |  Options
Re: Tutorial: How to recover gcc after firmware 2.00.15 upgrade
Vali HolbanVali Holban 1211052506|%e %b %Y, %H:%M %Z|agohover

Good job - worked like a charm…
Now sky is the limit ;))

Reply  |  Options
Re: Tutorial: How to recover gcc after firmware 2.00.15 upgrade
ishbellnasishbellnas 1212275650|%e %b %Y, %H:%M %Z|agohover

It is very hard to download the backup image from: http://rapidshare.com/files/60953398/WD_MYBOOK_WE_500GB_FILE.7z. any other source to download this?

Reply  |  Options
Re: Tutorial: How to recover gcc after firmware 2.00.15 upgrade
ishbellnasishbellnas 1212374299|%e %b %Y, %H:%M %Z|agohover

HI,
it is pain to download http://rapidshare.com/files/60953398/WD_MYBOOK_WE_500GB_FILE.7z
Could you share the SDA1FILE.TAR.gz?

best wishes
Yuan

Reply  |  Options
Re: Tutorial: How to recover gcc after firmware 2.00.15 upgrade
chelrobchelrob 1212872484|%e %b %Y, %H:%M %Z|agohover

Sorry, I have no way to share the file. I did not have any problems downloading it form the link in the tutorial.

Reply  |  Options
Re: Tutorial: How to recover gcc after firmware 2.00.15 upgrade
rcascarcasca 1215100485|%e %b %Y, %H:%M %Z|agohover

Great Solution. Thanks.

Reply  |  Options
Re: Tutorial: How to recover gcc after firmware 2.00.15 upgrade
aab44aab44 1227572044|%e %b %Y, %H:%M %Z|agohover

Hi,

Since I upgrade to version 2.0.0.18 and I want to install CSUP; I need GCC to be recovered. (As I understand)

So, I did all steps to recover gcc and when type gcc it gives gcc: no input files

[root@NAS ~]# gcc
gcc: no input files

Dose that mean GCC recovered successfully and working ok?

[root@NAS ~]# gcc
gcc: no input files

But when I tried to ./configure or make csup I got configure: error: C compiler cannot create executables

[root@NAS cups-1.3.8]# ./configure
checking for gawk… gawk
checking for gcc… gcc
checking for C compiler default output file name…
configure: error: C compiler cannot create executables

Any hint to go over this?

Regards,

Reply  |  Options
Re: Tutorial: How to recover gcc after firmware 2.00.15 upgrade
junkerARMjunkerARM 1238869438|%e %b %Y, %H:%M %Z|agohover

LORD I just tried this but did not notice the only delete in the /usr folder!!!!
I was able to fix it my mounting the drive elsewhere and just restoring the libgcc files but still what a pain.

I might suggest that you simply change the find function to find /usr instead of find /, this would save alot of headaches as it would seem a few people have made the same mistake.

Reply  |  Options
Re: Tutorial: How to recover gcc after firmware 2.00.15 upgrade
snakernetbsnakernetb 1208673464|%e %b %Y, %H:%M %Z|agohover

Here is what I did:

Upgraded my firmware to 2.00.18, I had everything working the way I wanted except GCC. So I downloaded the images and put them out in my PUBLIC share. I ran a cp -r -u -v /shares/internal/PUBLIC/MY_BOOK/SDA1/usr/ ./ from the /usr on MBWE II 1TB. It was copying everything fine until libcrypto! I am a AIX/Linux admin and at this point I said the oh crap… It closed my connection. I attempted to reboot and it just sat there. Now I have a brick, I am assuming. I had it configured as one large volume, so here is my plan. Let me know if this will work. I was going to get a sata enclosure and put hard drive A into it. Load my laptop into Fedora and mount it up. Could I just dump the SDA portion of the recovery onto the hard drive an get it to work? Has anyone tried this. The other thing I found puzzling in all of this is why it still didn't just boot up. All of the info should still be there. Any ideas?

Reply  |  Options
Re: Tutorial: How to recover gcc after firmware 2.00.15 upgrade
chelrobchelrob 1208839481|%e %b %Y, %H:%M %Z|agohover

Just for the record, you didn't follow this tutorial… correct?

Reply  |  Options
Re: Tutorial: How to recover gcc after firmware 2.00.15 upgrade
FingAZFingAZ 1210013378|%e %b %Y, %H:%M %Z|agohover

I don't see why this wouldn't work tbh.
Do you mean just extracting your backup files straight onto the partition?
An alternative would be to take a look at the backup section of this wiki, grab an actual image and reimage the partition (aka - deal with the data as raw rather than individual files to ensure a clean copy and retain permissions etc)?
At the end of the day, its an OS. Same with any OS, you take a straight backup from a machine with the same hardware and its gonna work on another machine.

Happy days!

FingAZ

Reply  |  Options
Re: Tutorial: How to recover gcc after firmware 2.00.15 upgrade
moronnlmoronnl 1211808168|%e %b %Y, %H:%M %Z|agohover

I have the same problem snakernetb had… I did exactly as stated above, and it stopped ad libcrypto. Then my connection terminated and and cannot reconnect to it again… I havent rebooted yet, so I dont know if that might work.
Anyway, i cannot log in to the book using SSH anymore, and the webinterface doesnt seem to work either anymore. Any clues are welcome!

MoronNL

Reply  |  Options
Re: Tutorial: How to recover gcc after firmware 2.00.15 upgrade
chelrobchelrob 1211914589|%e %b %Y, %H:%M %Z|agohover

You did exactly as stated above by me (chelrob) or as stated by snakernetb?

Reply  |  Options
Re: Tutorial: How to recover gcc after firmware 2.00.15 upgrade
moronnlmoronnl 1212152145|%e %b %Y, %H:%M %Z|agohover

Yes, i did exactly as you told… However I rebooted, keeping my fingers crossed…. Then I could log in using ssh again.
I then removed the /usr dir and restored the usr.tar.gz
Everything worked Ok after that..
THen, I could not stand that this did not work… since it is straight forward, and i cannot see why it should whooo …. So, did it again, and now it worked flawlessly… I dont know what caused the error in the first time…

I can make / build / do whatever… :)

THanks!

Last edited on 1212152209|%e %b %Y, %H:%M %Z|agohover By moronnl + Show more
Re: Tutorial: How to recover gcc after firmware 2.00.15 upgrade
chelrobchelrob 1212871937|%e %b %Y, %H:%M %Z|agohover

Excellent. Glad it worked for you. I didn't have any of those problems. I don't know what caused it?

Reply  |  Options
Re: Tutorial: How to recover gcc after firmware 2.00.15 upgrade
meanmachinemeanmachine 1212324694|%e %b %Y, %H:%M %Z|agohover

I really want to install gcc, but these postings about bricking the drive scare me.. I just have installed everything I need (clutch,ushare,sfm), including lots of backup data(photos etc).
My drive came with 2.00.15 installed when I bought it. It never had gcc installed. Its the 500gb version.

Anyone using this drive had any problems installing gcc the way described here?
Is there a safer way? optware would be nice, but I cant find it there…

Thanks

Reply  |  Options
Re: Tutorial: How to recover gcc after firmware 2.00.15 upgrade
chelrobchelrob 1212872337|%e %b %Y, %H:%M %Z|agohover

Some of the people complaining in this thread did not follow these instructions. They used their own methods and for some reason decided to post in this thread about their failures.

Last edited on 1213161996|%e %b %Y, %H:%M %Z|agohover By chelrob + Show more
Reply  |  Options
Re: Tutorial: How to recover gcc after firmware 2.00.15 upgrade
newpenguinnewpenguin 1212975345|%e %b %Y, %H:%M %Z|agohover

Do you know which files in the sda1/usr/ need to be moved across to /usr/?
I'm trying to keep things as clean as possible.

Do you know which release of GCC is included?

Alan

Reply  |  Options
Re: Tutorial: How to recover gcc after firmware 2.00.15 upgrade
chelrobchelrob 1213157053|%e %b %Y, %H:%M %Z|agohover

Step 16 only copies files that DO NOT exist in /usr, hence restoring GCC. I don't know specifically which files are copied, but only files you need will be copied.

Reply  |  Options
Re: Tutorial: How to recover gcc after firmware 2.00.15 upgrade
fraterfrater 1213394157|%e %b %Y, %H:%M %Z|agohover

Am I the first to notice all the filedates are overwritten?
Why didn't you use the '-p' option so filedates are preserved….

I hate this…

Reply  |  Options
Re: Tutorial: How to recover gcc after firmware 2.00.15 upgrade
fraterfrater 1213518636|%e %b %Y, %H:%M %Z|agohover

All symbolic links are overwritten because the original symbolic links had 1-1-1970 as a filedate because the system didn't have the time when they were created.
Probably nothing wrong here, because they are most likely to point to the same files, but "most likely" is not enough for me.

The "-u" in cp -r -u -T /tmp/sda1/usr /usr does NOT only copy files that are non-existing in the target. It updates existing files as well.

Although the symbolic links have a date of "1-1-1970", they are in fact "newer" because they belong to the 2.00.18 firmware. I want to leave those untouched.

The command should definately be replaced by: cp -r -p -u -T /tmp/sda1/usr /usr
But what's the best way to only copy non-existing files?
I'm sure this can be done using a one-liner…. like it should be possible to only update and not create files… (don't know how to do that either)

Reply  |  Options
Re: Tutorial: How to recover gcc after firmware 2.00.15 upgrade
kevkukevku 1213566100|%e %b %Y, %H:%M %Z|agohover

i used

yes n | cp * -R -L -i * /usr

in your case then

yes n | cp -R -L -i /tmp/sda1/usr /usr


30-day pro trial.
2x WD Caviar SE WD5000AAJS RAID0 MBWEII
don't click

Last edited on 1213566119|%e %b %Y, %H:%M %Z|agohover By kevku + Show more
Re: Tutorial: How to recover gcc after firmware 2.00.15 upgrade
fried_dkfried_dk 1213982934|%e %b %Y, %H:%M %Z|agohover

I have a MBWE 1TB, which came with F/W 2.00.15. After gaining SSH-access, making lighttp listen on port 8080 and installing PHP, I wanted to install MRTG - but failed because gcc was not present. Anyway, I followed this guide, crossed fingers and in step 16 followed frater's advice:

cp -r -p -u -T /tmp/sda1/usr /usr

Works fine. Now installing MRTG :o)

Thanks guys.

Re: Tutorial: How to recover gcc after firmware 2.00.15 upgrade
chelrobchelrob 1214089594|%e %b %Y, %H:%M %Z|agohover

Step 16 has been updated.

Re: Tutorial: How to recover gcc after firmware 2.00.15 upgrade
ringwraithringwraith 1220217148|%e %b %Y, %H:%M %Z|agohover

Hi guys, just joined the pack.

Concerning the above question from frater about how to restore only files which are not present at the time, without updating anything while keeping the dates: I let tar do the work for me. The long (and tested) version is to substitute step 16 with

tar -cvzf usr.recover.tgz usr
cd /
tar -xvzkf /tmp/sda1/usr.recover.tgz

So far i have compiled hdparm without trouble, so everything seems to work. Now come to think of it, substituting steps 15 and 16 with

tar -xvzk -C / -f SDA1FILE.tar.gz usr

from within /tmp/sda1 should do the same trick quicker (however, not tested).

One detail that occurred to me while comparing the original and the restored directories was that in the 02.00.15 firmware that came with my box, /lib/libfloat.so.1 is missing. So I copied it from the SDA1FILE.tgz, and ran ldconfig after backing up the old /etc/ld.so.cache . Also, some static libraries are installed where the version numbers conflict with already existing shared libs (e.g. libc, libm, libstdc++, libcrypto).

Another thing is: How do i know that the kernel sources i have now recovered are the ones which lead to the kernel that came with the MBWE? Kernel version for the 02.00.15 firmware is 2.6.17.14, can someone with an older firmware please check his kernel version?

Reply  |  Options
Re: Tutorial: How to recover gcc after firmware 2.00.15 upgrade
oceanx2koceanx2k 1219038211|%e %b %Y, %H:%M %Z|agohover

I am having trouble connecting to rapidshare to download the file via various attempts…

Can someone be kind enough to upload the file to
http://www.mediafire.com
or
http://www.badongo.com
??

Reply  |  Options
Re: Tutorial: How to recover gcc after firmware 2.00.15 upgrade
StendhalStendhal 1219239097|%e %b %Y, %H:%M %Z|agohover

Anything wrong with new install of gcc via optware?

Reply  |  Options
Re: Tutorial: How to recover gcc after firmware 2.00.15 upgrade
cot_alcot_al 1227203885|%e %b %Y, %H:%M %Z|agohover

I tryed that.
The install was successfull
but when I try to do make ou make install it doesn't work.
it looks like it doesn't find cc
I think I should put the path to cc in a conf file, but I don't know wich one and where !!!
Can you help me, do you have an idea?
Thanks

Reply  |  Options
Re: Tutorial: How to recover gcc after firmware 2.00.15 upgrade
cot_alcot_al 1227426195|%e %b %Y, %H:%M %Z|agohover

In fact it looks like we have to define a few environment variables:
$PATH add /opt/bin to the list

and specific ones for gcc such as GCC_EXEC_PREFIX
http://gcc.gnu.org/onlinedocs/gcc/Environment-Variables.html

Now my prblem is where can I put this variables????
when I put them in /etc/profile they are taken into account by the users, but nnot by root!!!!!!!!!!!

Reply  |  Options
Re: Tutorial: How to recover gcc after firmware 2.00.15 upgrade
goternemegoterneme 1219588328|%e %b %Y, %H:%M %Z|agohover

Worked great thank you

Reply  |  Options
Re: Tutorial: How to recover gcc after firmware 2.00.15 upgrade
TeinturManTeinturMan 1226745488|%e %b %Y, %H:%M %Z|agohover

Hi All,
I would like to provide a Feature Pack for recovering gcc.
but i do not have the 2.00.15 firmware, i have no way to test etc…

could some kind people provide a fully automated (sand safe) sh script for recovering gcc?

Thanks for the help…

Reply  |  Options
Re: Tutorial: How to recover gcc after firmware 2.00.15 upgrade
tops911tops911 1235657498|%e %b %Y, %H:%M %Z|agohover

Great Solution. Thanks

Raed ,,

Reply  |  Options
Re: Tutorial: How to recover gcc after firmware 2.00.15 upgrade
HerrDoktorDVDHerrDoktorDVD 1236436012|%e %b %Y, %H:%M %Z|agohover

Fantastic, works great.

Thank you very much.

Tony

Reply  |  Options
Re: Tutorial: How to recover gcc after firmware 2.00.15 upgrade
Erwin SnijdersErwin Snijders 1240558252|%e %b %Y, %H:%M %Z|agohover

Anyone tried this on the new (whitelight) mybook?

Reply  |  Options
Re: Tutorial: How to recover gcc after firmware 2.00.15 upgrade
KosherKosher 1240692627|%e %b %Y, %H:%M %Z|agohover

FIX YOUR DAMN INSTRUCTIONS!!!! SO MANY PEOPLE HAVE DELETED THEIR Libgcc_s.so.1 FILE!!!
TELL USERS TO CD INTO /usr folder first. Poorly written instructions. How many mybooks have you bricked?

Delete all files and directories found by those three commands that are in /usr and sub directories of /usr with: rm -r -f <path to file/dir name> and repeat steps 4-6 to verify they are all gone.
8. Backup your /usr dir with: tar -czvf usr.tar.gz /usr

Reply  |  Options
Re: Tutorial: How to recover gcc after firmware 2.00.15 upgrade
alephsmithalephsmith 1240696101|%e %b %Y, %H:%M %Z|agohover

How about you: a) write a polite PM to the author kindly asking him to change the instructions b) write a wiki page with the 'correct instructions' so that everyone else can edit them as they see fit.

I know you might be pissed off that you deleted a necessary file, but do you really think that ALLCAPS is necessary?

Reply  |  Options
Re: Tutorial: How to recover gcc after firmware 2.00.15 upgrade
raghavmeraghavme 1240732557|%e %b %Y, %H:%M %Z|agohover

I almost bricked mine, but, I recovered.

By the way, I moved the files instead of deleting them.

Here: http://www.vaibhavsingh.com/2009/04/missing-library-error-cant-load-library.html

Reply  |  Options
Re: Tutorial: Warning about applying SDA1File to your MyBook sda1
canopiccanopic 1247448250|%e %b %Y, %H:%M %Z|agohover

I would like to suggest to chelrob that he either insert a warning or modify as I have found it very dangerous.
I think this post might also provide some partial answers to snakenetb.

First, I bought a MyBook with FW 2.00.18 on it and no gcc compiler, so I followed the above chelrob procedure exactly and got gcc working on my MyBook. I also compiled/installed ncurses and nano and this worked perfectly.

My problem was that this install clobbered my password files, so after logging out, I could not log back in [through ssh].
I created another user and password, and noticed I could not get rid of the user I had previously created for which Samba now had no password. I eventually managed to log back in with this new user but could no longer obtain superuser access as this password had also been clobbered. I will now go back to the Martin Hiner script and set up ssh again and get it to blank this password.

I am still trying to make sense of what happened, but when I inspected the SDA1FILE.TAR archive, I found some libraries and other files contained file names but zero bytes. I suspect these may have overwritten existing libraries and files, effectively erasing them. By the way, what was the firmware version used to create the SDA1FILE and the other files - was it 2.00.14?

Anyway my MyBook is pretty much a brick until I can get some clean firmware installed back onto it. I need to go back to an older version of firmware which will completely re-write my sda1 partition, but I don't know how to force the MyBook to accept an earlier version "downgrade". Any advice anyone?

Reply  |  Options
Re: Tutorial: How to recover gcc after firmware 2.00.15 upgrade
chelrobchelrob 1251930823|%e %b %Y, %H:%M %Z|agohover

Can someone please delete this thread? I appologoze for any mistakes I may have made. I have long since moved on from this device to a real file server and could not begin to tell you how to correct my mistakes.

Thank you.

Reply  |  Options
Re: Tutorial: How to recover gcc after firmware 2.00.15 upgrade
afmacedoafmacedo 1262928568|%e %b %Y, %H:%M %Z|agohover

My (White Light) MyBook 1TB was magically turned into a brick. :)
But I still want GCC so bad… does one still looking after that? I don't care bricking that once again. :)
Any other ideas? Cross-compiled binaries to share? :)

Reply  |  Options
Re: Tutorial: How to recover gcc after firmware 2.00.15 upgrade
passatijipassatiji 1263743570|%e %b %Y, %H:%M %Z|agohover

Hi!
I follow all the instructions but Mybook lost WEB interface and I can't compile packages with an error "configure: error: C compiler cannot create executables"
Can smbd help me if you have resolved this problem.
___
WDMB White Lights 1Tb

Reply  |  Options
Re: Tutorial: How to recover gcc after firmware 2.00.15 upgrade
kevkukevku 1263745091|%e %b %Y, %H:%M %Z|agohover

2.00.15 is blue ring firmware it and this is meant for blue ring and it will not work on the new mybooks.


30-day pro trial.
2x WD Caviar SE WD5000AAJS RAID0 MBWEII
don't click

Reply  |  Options
Re: Tutorial: How to recover gcc after firmware 2.00.15 upgrade
passatijipassatiji 1264466009|%e %b %Y, %H:%M %Z|agohover

Do you have any ideas, maybe it is possible to compile GCC on another system and just copy it files?

Reply  |  Options
Re: Tutorial: How to recover gcc after firmware 2.00.15 upgrade
SoulseekSoulseek 1265102821|%e %b %Y, %H:%M %Z|agohover

I also bricked my (white) mybook. some days ago i found this site http://www.bengreen.eu/pmwiki/pmwiki.php?n=Linux.CrossCompileMyBookWorld but i have no time now to try, maybe next weekend, i´ll see and report. I also think this is a manual for the blue ring…

Last edited on 1265102851|%e %b %Y, %H:%M %Z|agohover By Soulseek + Show more
Reply  |  Options
New Post
Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License