Migrating from bluering to whitelight
Forum » Forum / My Book World Edition (white light) » Migrating from bluering to whitelight
Started by: fraterfrater
On: 1244655367|%e %b %Y, %H:%M %Z|agohover
Number of posts: 27
rss icon RSS: New posts
Migrating from bluering to whitelight
fraterfrater 1244655367|%e %b %Y, %H:%M %Z|agohover

Because I wanted more space I bought myself a whitelight which arrived the day before yesterday.
Enabling SSH was easy as was disabling Mionet.

Someone (anpe008) already complained my watchdog wasn't working on his system.
As it turned out, it was because of the system not having a full bash.
The system is running busybox and where the bluering has a symbolic link /bin/sh pointing to bash, this whitelight points to busybox.

This also means some commands are hashed on startup and changing $PATH to have /opt/bin:/opt/sbin first doesn't guarantee you'll be running the more enhanced optware versions….

I therefore wrote a script which will install optware on a virgin whitelight and install the necessary packages so you'll end up with a l"Linux box for grown-ups". For this I had the help of Alexx who compiled a bash that didn't depend on optware's bash nor its needed libraries.

Besides installing bash and optware it will also install the necessary packages to run advanced scripts without awkward error messages..

It patches some minor flaws like the group write permission on the /root directory. The ssh-server doesn't like this when you have your ~/.ssh/authorized_keys there. It will also install cron and a directory structure in /etc which will make it easy for you to schedule a script (just place it in the appropriate directory). To minimize clutter in /var/log/messages I chose to run a 15-minute cronjob for cleaning that up. On my bluering I replaced the syslog with syslog-ng to prevent these annoying messages.

Although I took many precautions (most work went into checking if something failed) you are using this script at your own risk.
I ran it many times myself and there are no known issues to my knowledge….

Well….. Here it is…

wget -O prep_whitelight http://wd.mirmana.com/prep_whitelight
sh prep_whitelight

PS Some parts are hosted on my own system. Who should I ask to store data here "http://mybookworld.wikidot.com/local--files/optware/"??

unfold Migrating from bluering to whitelight by fraterfrater, 1244655367|%e %b %Y, %H:%M %Z|agohover
Re: Migrating from bluering to whitelight
alllexxalllexx 1244656842|%e %b %Y, %H:%M %Z|agohover

Who should I ask to store data here "http://mybookworld.wikidot.com/local--files/optware/"??

Just go to http://mybookworld.wikidot.com/optware page, press 'files' at the buttom and upload. May as well update the instructions for WhiteLight.

last edited on 1244656895|%e %b %Y, %H:%M %Z|agohover by alllexx + show more
unfold Re: Migrating from bluering to whitelight by alllexxalllexx, 1244656842|%e %b %Y, %H:%M %Z|agohover
Re: Migrating from bluering to whitelight
anpe008anpe008 1244659795|%e %b %Y, %H:%M %Z|agohover

Can I run the total wget command if I already have my optware, transmission, unzip etc progz? Will not delete my settings?

Thank you very much for the post. I would run the full process what you have coded, just wanted to make it sure, that i can use it after it as well. :)

I have installed the FeaturePacks Manager from TeinturMan and I would like to keep his web Admin GUI. - If it is possible.
http://mybookworld.wikidot.com/forum/t-149988/featurepacks-manager-for-the-whitelight-available

Thanks in advance.

last edited on 1244660325|%e %b %Y, %H:%M %Z|agohover by anpe008 + show more
unfold Re: Migrating from bluering to whitelight by anpe008anpe008, 1244659795|%e %b %Y, %H:%M %Z|agohover
Re: Migrating from bluering to whitelight
fraterfrater 1244660976|%e %b %Y, %H:%M %Z|agohover

It will do its best to keep all settings…
It will however change the bourne shell "/bin/sh" to /bin/bash
This is necessary to have a mature box…

Those featurepacks should not be affected.

unfold Re: Migrating from bluering to whitelight by fraterfrater, 1244660976|%e %b %Y, %H:%M %Z|agohover
Re: Migrating from bluering to whitelight
egalleegalle 1247498164|%e %b %Y, %H:%M %Z|agohover

Hi frater

I just downloaded and executed "prep_whitelight" on my 1TB white light my book world.
All went fine, optware was already there and the script just skipped it, same with some other packages (mc, cron, …)
After a while I decided to follow the last advice from the script and do a reboot, so I logged in the web interface and pressed the reboot button… bad idea!

I don't know why, but now the system is dead, it never returned from that reboot. After 10 minute or so I unplugged and plugged it again but i doesn't respond to ping, ssh or web interface. The bottom part of the front light gets lit, but only that, and it doesn't move like when starting up. The disk makes spinning noise anyway.

Any idea of what could have gone wrong? How can I test it without seeing any startup error messages?

I've been looking for restore procedures but I think all of them are for the blue rings version, which one is for the white light?
I would appreciate some help. Thank you!

unfold Re: Migrating from bluering to whitelight by egalleegalle, 1247498164|%e %b %Y, %H:%M %Z|agohover
Re: Migrating from bluering to whitelight
egalleegalle 1247502309|%e %b %Y, %H:%M %Z|agohover

Hi again :-)

Well, it was my fault in the end and is nothin related to "prep_whitelight", so I'll answer myself!
I disassembled the unit, connected the drive to my linux box and took a look at the startup scripts in /etc/init.d
There was a softlink to an executable that should not be there (pointing to fuppesd to be exact) instead of the corresponding start/stop/reboot script.

This caused all the trouble, I deleted it and the system is back to life :-D

Hope this could help anyone else!
Greets.

unfold Re: Migrating from bluering to whitelight by egalleegalle, 1247502309|%e %b %Y, %H:%M %Z|agohover
Re: Migrating from bluering to whitelight
andrew_shandrew_sh 1244705419|%e %b %Y, %H:%M %Z|agohover

hello frator,
thanks for your work. I have a couple of questions.
1) is it ok to run your script on the new 10.0.0.16 version?
2) what excactly is cleaned when a new vresion is applied? As I understand, md3 remains unchanged, but md0 is restored. Is this right? Any way to also restore md3 in order to have a fully factory-like firmware?

Thanks in advance

last edited on 1244706034|%e %b %Y, %H:%M %Z|agohover by andrew_sh + show more
unfold Re: Migrating from bluering to whitelight by andrew_shandrew_sh, 1244705419|%e %b %Y, %H:%M %Z|agohover
Re: Migrating from bluering to whitelight
fraterfrater 1244724715|%e %b %Y, %H:%M %Z|agohover

I have this whitelight just a few days so I don't know how things are exactly arranged on this one.

I have done several upgrades yesterday (I spoofed an old version) but focused on the behaviour of my script.

The worldbook almost behaved as it came out of the box, but not completely….
Maybe a firmware upgrade in combination with a "factory reset" which you can start from the webinterface can do this for you…..

I'd appreciate it if you test the script so I can recommend it to less savvy users….
I also wrote the script to automate the installation of my next one….

unfold Re: Migrating from bluering to whitelight by fraterfrater, 1244724715|%e %b %Y, %H:%M %Z|agohover
Re: Migrating from bluering to whitelight
andrew_shandrew_sh 1245142528|%e %b %Y, %H:%M %Z|agohover

Hello,
thanks for releasing this script. It's always nice to see new features/hacks added. And for anyone worried that he won't be able to uninstall, I can confirm that changing /etc/versions and re-updating firmware works great for reverting the whitelight to originals.

unfold Re: Migrating from bluering to whitelight by andrew_shandrew_sh, 1245142528|%e %b %Y, %H:%M %Z|agohover
Re: Migrating from bluering to whitelight
playdudeplaydude 1245207909|%e %b %Y, %H:%M %Z|agohover

Wonder what happens if the white ring file system is replaced with the Lenny file system for the blue ring. Anyone brave (or crazy) enough?

unfold Re: Migrating from bluering to whitelight by playdudeplaydude, 1245207909|%e %b %Y, %H:%M %Z|agohover
Re: Migrating from bluering to whitelight
fraterfrater 1245215922|%e %b %Y, %H:%M %Z|agohover

There's a seperate thread for Debian Lenny
This is about installing optware and "replacing" busybox for bash.

unfold Re: Migrating from bluering to whitelight by fraterfrater, 1245215922|%e %b %Y, %H:%M %Z|agohover
Re: Migrating from bluering to whitelight
alllexxalllexx 1245249940|%e %b %Y, %H:%M %Z|agohover

People, this script configures things in a neatly, nice fashion, checking whether it's safe to make each following step and outputing details on it's activity. You ought to check it out.

Frater, I think you should edit Optware wiki page and mention it there.

unfold Re: Migrating from bluering to whitelight by alllexxalllexx, 1245249940|%e %b %Y, %H:%M %Z|agohover
Re: Migrating from bluering to whitelight
CreakyCreaky 1245351406|%e %b %Y, %H:%M %Z|agohover

Does this install VSFTP as well, if not how do I install it after running the above.

unfold Re: Migrating from bluering to whitelight by CreakyCreaky, 1245351406|%e %b %Y, %H:%M %Z|agohover
Re: Migrating from bluering to whitelight
andrew_shandrew_sh 1245355818|%e %b %Y, %H:%M %Z|agohover

frater,
I noticed that since I installed your script, my mybook has never gone to sleep. Have you also noticed it?

unfold Re: Migrating from bluering to whitelight by andrew_shandrew_sh, 1245355818|%e %b %Y, %H:%M %Z|agohover
Re: Migrating from bluering to whitelight
fraterfrater 1245356924|%e %b %Y, %H:%M %Z|agohover

mmmm….
I don't really want it to go to sleep…
I immediately "hacked" the thing after I opened the box…

What's it supposed to do?
You could test it by reverting to the standard FW….

unfold Re: Migrating from bluering to whitelight by fraterfrater, 1245356924|%e %b %Y, %H:%M %Z|agohover
Re: Migrating from bluering to whitelight
fraterfrater 1245520022|%e %b %Y, %H:%M %Z|agohover

Because of the 1-minute cronjob and cron writing to /var/log/messages everytime it executes something the system will never run idle and thus will not go to sleep…
Not a big deal I think…
I may look into a better way to prevent these messages to /var/log/messages

unfold Re: Migrating from bluering to whitelight by fraterfrater, 1245520022|%e %b %Y, %H:%M %Z|agohover
Re: Migrating from bluering to whitelight
anpe008anpe008 1245359408|%e %b %Y, %H:%M %Z|agohover

OK, I installed the script. Everything went fine. when it suggested to restart I did and I just wanted to report back it worked when i suddenly lost the connection with the outerworld.
LAN worked but my linksys WRT54GL router lust its DNS servers and configured the IP to 192.168.100.1 (!). The LAN and the NAS connection worked. I tried to restore the router settings
and restart. Nothing. Restart NAS. Nothing. Than I shoot down NAS and then the router and then finally the router picked up the correcy DHCP settings. These were a bit hot hours. :)

But it seems it works now. Now I can try to get the watch-dog up and running…

Thanks frater for the script…

unfold Re: Migrating from bluering to whitelight by anpe008anpe008, 1245359408|%e %b %Y, %H:%M %Z|agohover
Re: Migrating from bluering to whitelight
fraterfrater 1245360919|%e %b %Y, %H:%M %Z|agohover

I can't think of anything relating to the script that could cause such a behaviour…
I guess some kind of coincedence….

You can now use "netstat -anp" and other utils with their "grown-up options" ;-)

unfold Re: Migrating from bluering to whitelight by fraterfrater, 1245360919|%e %b %Y, %H:%M %Z|agohover
Re: Migrating from bluering to whitelight
The PuppeteerThe Puppeteer 1245428816|%e %b %Y, %H:%M %Z|agohover

I ran your script and got this error at the end, after it talked about changing permissions to /root

prep_whitelight: prep_whitelight: 224: Syntax error: "fi" unexpected (expecting "then")

Has the script completed OK, or am I likely to see problems?

unfold Re: Migrating from bluering to whitelight by The PuppeteerThe Puppeteer, 1245428816|%e %b %Y, %H:%M %Z|agohover
Re: Migrating from bluering to whitelight
fraterfrater 1245434361|%e %b %Y, %H:%M %Z|agohover

I did a little change this morning without checking….
Sorry…
You can redownload and rerun it without any problem….

unfold Re: Migrating from bluering to whitelight by fraterfrater, 1245434361|%e %b %Y, %H:%M %Z|agohover
Re: Migrating from bluering to whitelight
The PuppeteerThe Puppeteer 1245454324|%e %b %Y, %H:%M %Z|agohover

Thanks so much, it ran fine.

Cheers

unfold Re: Migrating from bluering to whitelight by The PuppeteerThe Puppeteer, 1245454324|%e %b %Y, %H:%M %Z|agohover
Re: Migrating from bluering to whitelight
CreakyCreaky 1245864953|%e %b %Y, %H:%M %Z|agohover

As I'm only using the cron.daily and don't need the others is it safe to comment out the others until I need them, it wont cause anything to break or stop functioning.

unfold Re: Migrating from bluering to whitelight by CreakyCreaky, 1245864953|%e %b %Y, %H:%M %Z|agohover
Re: Migrating from bluering to whitelight
boondoklifeboondoklife 1245867245|%e %b %Y, %H:%M %Z|agohover

It should not have any side effects, but hwy would you need to do this as if you have nothing in the folders it will just not do anything anyway?


while ( love & passion ) {
for( fight = 0 ; rights < freedom ; rights++ )
fight = standup( rights );
free( babylon ); }

unfold Re: Migrating from bluering to whitelight by boondoklifeboondoklife, 1245867245|%e %b %Y, %H:%M %Z|agohover
Re: Migrating from bluering to whitelight
CreakyCreaky 1245868253|%e %b %Y, %H:%M %Z|agohover

It does appear to be doing something, before I installed this the system used to go to sleep but now it doesn't. This has already been mentioned in this thread. It's not a big problem, just wondered if it could be done.

http://mybookworld.wikidot.com/forum/t-161883/migrating-from-bluering-to-whitelight#post-513838

unfold Re: Migrating from bluering to whitelight by CreakyCreaky, 1245868253|%e %b %Y, %H:%M %Z|agohover
Re: Migrating from bluering to whitelight
boondoklifeboondoklife 1245869994|%e %b %Y, %H:%M %Z|agohover

Ahh ok I see what you are wanting, in that case it would do you good to comment it out. But again it should not cause you an issue by commenting it out as long as there is nothing you need running in those directories.


while ( love & passion ) {
for( fight = 0 ; rights < freedom ; rights++ )
fight = standup( rights );
free( babylon ); }

unfold Re: Migrating from bluering to whitelight by boondoklifeboondoklife, 1245869994|%e %b %Y, %H:%M %Z|agohover
Re: Migrating from bluering to whitelight
fraterfrater 1246400585|%e %b %Y, %H:%M %Z|agohover

I noticed another thing with the original whitelight…..

The busybox 'ls' doesn't reserve enough column space for the filesize, so an ls -altr looks ugly.
Even after prep_whitelight this is the case….

It's because there are 2 aliases in /root/.bashrc pointed to /bin/ls
I have added an extra entry in prep_whitelight which will change this to 'ls'
This way it will behave as it should and run the optware 'ls' if it exists….

I advice you to redownload prep_whitelight and run it again….

unfold Re: Migrating from bluering to whitelight by fraterfrater, 1246400585|%e %b %Y, %H:%M %Z|agohover
Re: Migrating from bluering to whitelight
fraterfrater 1246408680|%e %b %Y, %H:%M %Z|agohover

I did some more work.
It annoyed me that vi was still the old busybox-version because it was aliased in /root/.bashrc

I'm now aliasing it to vim if it is installed.

I also enabled 3 features by creating a /root/.vimrc file

  • syntax coloring
  • remembering last position of a previously edited file
  • backspace fix

cat /root/.vimrc

syntax on
if has("autocmd")
        autocmd BufReadPost *
        \  if line("'\"") > 0 && line("'\"") <= line("$") |
        \ exe "normal g`\"" |
        \ endif
endif
set backspace=2
unfold Re: Migrating from bluering to whitelight by fraterfrater, 1246408680|%e %b %Y, %H:%M %Z|agohover
New post
Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License