Difference between revisions of "EM Mode"

From NAS-Central Buffalo - The Linkstation Wiki
Jump to: navigation, search
m
m (How to get out of EM Mode:: link to ACP Commander)
 
(46 intermediate revisions by 15 users not shown)
Line 1: Line 1:
{{Template:Articles|Rescue-Backup|FAQ|Hardware}}
+
{{Template:Articles|Rescue-Backup|FAQ|LSLive|Hardware}}
 +
{|
 +
|-
 +
| __TOC__
 +
|[[image:Nuvola apps important.png|300px|right]]
 +
|}
 +
===EM Mode===
 
{{EM Mode}}
 
{{EM Mode}}
----
+
====LED Analysis====
:Take a look at the LED analysis for your LinkStation:  [[Information/PPCLED|LS1]], [[Information/MIPSelLED|LS2]], [[Information/HGLED|HG]]
+
Take a look at the LED analysis for your LinkStation:   
===Frequently asked questions about EM Mode===
+
*[[Information/PPCLED]]
<small>From the following forum thread: [http://forum.linkstationwiki.net/index.php?action=vthread&forum=4&topic=1589 The Linkstation Community Forum / Everything else / Clarifications regarding big drives and EM Mode - FAQ Entries]</small>
+
*[[Information/MIPSelLED]]
 +
*[[Information/HGLED]]
 +
*[[Information/LSproLED]]
  
EM Mode really is a mystery. there are some misunderstandings here.
+
====Frequently asked questions about EM Mode====
 +
<small>From the following forum thread: [http://forum.nas-central.org/index.php?action=vthread&forum=4&topic=1589 The Linkstation Community Forum / Everything else / Clarifications regarding big drives and EM Mode - FAQ Entries]</small><br>
 +
'''EM Mode really is a mystery, there are some misunderstandings here:'''
  
1)'' I read several times that some others wrote that pressing the reset button while powering the linkstation gets the LS into EM Mode.''
+
'''1)'' I read several times that some others wrote that pressing the reset button while powering the linkstation gets the LS into EM Mode.'''''
  
Thats simply not true. if you start your LS that way you will get into something i call "Christmas Tree Mode"...all leds of the LS are blinking together. this mode in reallity just bypasses the watchdog. if ppc_uartd or avr_evtd are missing the boxes stop working after 5 minutes. in christmas tree mode this processes are not needed. i suppose this was a way to deal with the diskchecks that take place from time to time and which are time consuming....they need more than 5 minutes...i changed it in openlink 0.73b that ppc_uartd (which is currently used...but will be replaced soon with avr_evtd) starts earlier....so this problem should not happen anymore.
+
Thats simply not true. If you start your LS that way you will get into something lets call "Christmas Tree Mode"...all leds of the LS are blinking together. This mode in reallity just bypasses the watchdog. If ''ppc_uartd'' or ''avr_evtd'' are missing the boxes stop working after 5 minutes. In christmas tree mode these processes are not needed. One supposes this was a way to deal with the diskchecks that take place from time to time and which are time consuming (they need more than 5 minutes). Mindbender changed openlink 0.73b so that ppc_uartd (which is currently used...but will be replaced soon with avr_evtd) starts earlier. So this problem should not happen anymore in OpenLink.
  
2) ''How do we get into EM Mode? how do we get out of it again? whats the status?''
+
'''2) ''How do we get into EM Mode? how do we get out of it again? whats the status?'''''
  
This is where everything is prepared for a change. lets start with the current status and then comment what is planned.
+
This is where everything is prepared to change. Lets start with the current status and then comment what is planned:
  
====General Info====
+
====General Info (PPC)====
 +
There is always a partition in flash that holds an endless <tt>'''OKOKOK...''' </tt> sequence inside. Just look at the content of the devices by cating the content of the flash-partitions:
  
There is always a partition in flash that holds an endless "OKOKOK..."-sequence inside.....just look at the content of the devices by cating the content of the flash-partitions...like "cat /dev/fl3 >/fl3_dump" for example for a LS1...use /dev/mtd2 for the HG instead. in the boot process after the kernel is loaded it is checked by the kernel if "OKOK.." is inside this partitions or not. if yes then the Operating System from the HDD is booted. if no, then EM Mode is loaded....in fact the Ramdisk which is also stored in flash inside the firmimg.bin. EM officialy means "Engineering Mode", but we also call it "Emergency Mode".
+
For example for a LS1:
 +
cat /dev/fl3 >/fl3_dump
 +
For the HG use this instead:
 +
cat /dev/mtd2 >/mtd2_dump
 +
 
 +
In the boot process after the kernel is loaded, the kernel checks if <tt>'''OKOK..'''</tt> is inside this partition or not. If yes, then the Operating System from the HDD is booted. If no, then EM Mode is loaded from the Ramdisk which is also stored in flash inside <tt>firmimg.bin</tt>
 +
-----
  
 
===Current Status===
 
===Current Status===
Line 25: Line 42:
 
modifying the content of the correct flash partition and therefore triggering EM Mode:
 
modifying the content of the correct flash partition and therefore triggering EM Mode:
  
=====1. If you open the LS: powering the LS without having the HDD attached=====
+
=====1. PPC/MIPSEL - Hard Drive Error=====
 +
* If you open the LS and remove the hard drive; powering the LS without having the Hard Drive attached.
 +
* If you delete or corrupt the contents of <tt>/hda1</tt> somehow, your LS may enter EM Mode on reboot
 +
* If you install a unpartitioned/blank hard drive, your LS may enter EM Mode when turned on.
 +
There is evidence that to force EM Mode with the stock bootloader you need to unplug the hdd and try to boot once...then connect the hdd (or a blank hdd) after shutting it down again and boot.
  
=====2. Via commandline while stock kernel=====
+
=====2. PPC - Via commandline while stock kernel=====
 
(can be dangerous if wrong device is echoed to)
 
(can be dangerous if wrong device is echoed to)
* LS1:  
+
* LS1: - 2.4.17
  echo "NGNGNG" > /dev/fl3 - 2.4.17
+
  echo "NGNGNG" > /dev/fl3  
* HG:
+
* HG: - 2.4.20
  echo "NGNGNG" > /dev/mtd2 - 2.4.20
+
  echo "NGNGNG" > /dev/mtdblock2
* HS: there is no proof...but it suppose it is the same as for the HG.
+
* HS: - 2.4.20
* LS2: the info from: [[Information/MIPSelFlashROM]] is quite incomplete...i am simply not sure. i would need one for testing.
+
echo 'NGNGNG' > /dev/mtdblock2
 +
* LS2: the info from: [[Information/MIPSelFlashROM]] is quite incomplete. someone testing is needed to make sure.
  
 
after reboot the LS should boot from Flash instead of from the HDD...
 
after reboot the LS should boot from Flash instead of from the HDD...
  
=====3. Starting the flashing process via the firmware updater and then just cut the network connection=====
+
=====3. U-boot =====
I got my LS1 several times into EM Mode by starting the flashing process via the firmware updater and then just cut the network connection
+
From u-boot shell:
{{Warning|Strongly recommend NOT to do it this way it did not work everytime}}
+
=> run emboot
But if it did not work it also did not do any harm, I never had big problems with that.
+
 
 +
=====4. MIPSEL - FreeLink only=====
 +
After complete boot (~ 4 minutes) press the red button on the back longer than 20 seconds. then reboot.
 +
 
 +
=====5. Starting the flashing process via the firmware updater and then just cut the network connection=====
 +
Mindbender has gotten his LS1 several times into EM Mode by starting the flashing process via the firmware updater and then just cutting the network connection
 +
{{Warning|It is strongly recommended NOT to do it this way. It did not work everytime but if it did not work it also did no harm.}}
 +
 
 +
=====6. ARM9 - Interupt boot process 3 times=====
 +
 
 +
''JonSenior: This doesn't appear to work on my LinkStation Live v2 running Freelink from a 2.10 stock firmware''
 +
 
 +
Do this 3 times
 +
# Turn on your LS Pro/Live and hear the first sound.
 +
#
 +
## Stock initrd: You will hear no second sound.
 +
##* Just go to 3 after 20 - 23 seconds
 +
## lb_worm`s enhanced initrd (bundled with freelink/custom firmwares):
 +
##* The second sound is played after about 20 - 23 seconds.
 +
# Press the power button as long as it takes so the LS Pro/Live turns off.
 +
 
 +
On the Pro Duo there is no such thing as a power button, but the software part of things works similarly - 3 times:
 +
 
 +
# Turn on the Pro Duo
 +
# Wait for about 60 seconds (it takes the Duo longer to start up)
 +
# Cut power (the on/off/auto switch doesn't do anything at this stage)
 +
 
 +
On the fourth boot, you will end in EM Mode.
  
 
====How to get out of EM Mode:====
 
====How to get out of EM Mode:====
 +
You have two possibilities.
 
=====1. Reflashing via the firmware updater=====
 
=====1. Reflashing via the firmware updater=====
Thats the only possibility currently for the normal user.
+
Reflashing via [[the LinkStation firmware flasher]] is the only possibility currently for the normal user.
 +
===== 2. ARM9-boxes only: Mark the rootfs as ok =====
 +
mv /boot/rootfs_* /boot/rootfs_ok
 +
echo `date` > /boot/rootfs_ok
 +
 
 +
-----
  
 
===Planned===
 
===Planned===
Line 52: Line 107:
 
====How to get into EM Mode:====
 
====How to get into EM Mode:====
 
=====1. Pressing the reset button longer than 20 seconds=====
 
=====1. Pressing the reset button longer than 20 seconds=====
After avr_evtd is built-in into OpenLink & FreeLink you will be able to get your LS into EM Mode simply by pressing the reset button longer than 20 seconds. this is already working really well. i just have to integrate it.
+
After ''[[avr_evtd]]'' is built-in into [[OpenLink]] & [[FreeLink]] you will be able to get your LS into EM Mode simply by pressing the reset button longer than 20 seconds. This is already working really well, it just has to be integrated.
  
 
====How to get out of EM Mode:====
 
====How to get out of EM Mode:====
=====1. Flashing=====
+
=====1. Reflashing via the firmware updater=====
Flashing of course also will get you out of EM Mode
+
Reflashing via [[the LinkStation firmware flasher]] of course will get you out of EM mode.
 
=====2. Telnet access=====
 
=====2. Telnet access=====
In EM Mode you will have telnet access in the future...i already created telnet + ftp-enabled ramdisks inside new firmimg.bins which you can use to partition the hdd to your needs while in EM Mode...executing "write_ok" gets you out again.
+
In EM Mode you will have telnet access in the future. Mindbender has already created [[Telnet and FTP enabled ramdisks]] inside new <tt>firmimg.bins</tt>  which you can use to partition the hdd to your needs while in EM Mode. Executing "write_ok" gets you out again.
 +
 
 +
The stock <tt>firmimg.bin</tt> does NOT have telnet + ftp enabled. These <tt>firmimg.bin</tt> here are enhanced versions which have telnet + ftp enabled. <br /> This makes it possible to fix various problems that normaly would lock you out of the box<br /> and that would demand a complete reflash via the firmware updater.
 +
 
 +
[http://downloads.nas-central.org/LS1_PPC/Initrds/telnet_and_ftp_enabled/LS1 the firmimg.bins from here can be used:]
  
Everything else just needs some work to integrate. but there is a high ambitious goal I set for myself. I want to totally rebuild the Ramdisk of EM Mode myself and enhance it with much new functionallity (support for XFS) to make it a good preparation and rescue system.
+
On the LS Pro series, you may be able to use [[ACP Commander]] to enable telnet, even on stock firmware.

Latest revision as of 15:32, 25 March 2009

Contents

Nuvola apps important.png

EM Mode

EM Mode officially means Engineering Mode, but we also call it Emergency Mode. If the LinkStation encounters a serious error with the hard drive or file system it will enter EM Mode. When in EM mode the LinkStation loads its file system from the flash instead of the hard drive. The LinkStation can be seen on the network with the IP address 192.168.11.150 but can only be reached via ping or the LinkStation firmware flasher. The firmware updater is able to find the Linkstation, only if UDP-Port 22936 is open. This is always true in EM Mode. An FTP server appears to be running but we currently don’t know the username/password and what can be done via FTP.
You will need to correct the hard drive error and re-flash the firmware to get the LinkStation out of EM mode. Some users have reported success with installing a blank hard drive (in ext3 format) and flashing the firmware.

LED Analysis

Take a look at the LED analysis for your LinkStation:

Frequently asked questions about EM Mode

From the following forum thread: The Linkstation Community Forum / Everything else / Clarifications regarding big drives and EM Mode - FAQ Entries
EM Mode really is a mystery, there are some misunderstandings here:

1) I read several times that some others wrote that pressing the reset button while powering the linkstation gets the LS into EM Mode.

Thats simply not true. If you start your LS that way you will get into something lets call "Christmas Tree Mode"...all leds of the LS are blinking together. This mode in reallity just bypasses the watchdog. If ppc_uartd or avr_evtd are missing the boxes stop working after 5 minutes. In christmas tree mode these processes are not needed. One supposes this was a way to deal with the diskchecks that take place from time to time and which are time consuming (they need more than 5 minutes). Mindbender changed openlink 0.73b so that ppc_uartd (which is currently used...but will be replaced soon with avr_evtd) starts earlier. So this problem should not happen anymore in OpenLink.

2) How do we get into EM Mode? how do we get out of it again? whats the status?

This is where everything is prepared to change. Lets start with the current status and then comment what is planned:

General Info (PPC)

There is always a partition in flash that holds an endless OKOKOK... sequence inside. Just look at the content of the devices by cating the content of the flash-partitions:

For example for a LS1:

cat /dev/fl3 >/fl3_dump

For the HG use this instead:

cat /dev/mtd2 >/mtd2_dump

In the boot process after the kernel is loaded, the kernel checks if OKOK.. is inside this partition or not. If yes, then the Operating System from the HDD is booted. If no, then EM Mode is loaded from the Ramdisk which is also stored in flash inside firmimg.bin


Current Status

How to get into EM Mode:

It depends if you risk to open the LS or not. modifying the content of the correct flash partition and therefore triggering EM Mode:

1. PPC/MIPSEL - Hard Drive Error
  • If you open the LS and remove the hard drive; powering the LS without having the Hard Drive attached.
  • If you delete or corrupt the contents of /hda1 somehow, your LS may enter EM Mode on reboot
  • If you install a unpartitioned/blank hard drive, your LS may enter EM Mode when turned on.

There is evidence that to force EM Mode with the stock bootloader you need to unplug the hdd and try to boot once...then connect the hdd (or a blank hdd) after shutting it down again and boot.

2. PPC - Via commandline while stock kernel

(can be dangerous if wrong device is echoed to)

  • LS1: - 2.4.17
echo "NGNGNG" > /dev/fl3 
  • HG: - 2.4.20
echo "NGNGNG" > /dev/mtdblock2 
  • HS: - 2.4.20
echo 'NGNGNG' > /dev/mtdblock2

after reboot the LS should boot from Flash instead of from the HDD...

3. U-boot

From u-boot shell:

=> run emboot
4. MIPSEL - FreeLink only

After complete boot (~ 4 minutes) press the red button on the back longer than 20 seconds. then reboot.

5. Starting the flashing process via the firmware updater and then just cut the network connection

Mindbender has gotten his LS1 several times into EM Mode by starting the flashing process via the firmware updater and then just cutting the network connection

Nuvola apps important.png 
WARNING!

It is strongly recommended NOT to do it this way. It did not work everytime but if it did not work it also did no harm.


6. ARM9 - Interupt boot process 3 times

JonSenior: This doesn't appear to work on my LinkStation Live v2 running Freelink from a 2.10 stock firmware

Do this 3 times

  1. Turn on your LS Pro/Live and hear the first sound.
    1. Stock initrd: You will hear no second sound.
      • Just go to 3 after 20 - 23 seconds
    2. lb_worm`s enhanced initrd (bundled with freelink/custom firmwares):
      • The second sound is played after about 20 - 23 seconds.
  2. Press the power button as long as it takes so the LS Pro/Live turns off.

On the Pro Duo there is no such thing as a power button, but the software part of things works similarly - 3 times:

  1. Turn on the Pro Duo
  2. Wait for about 60 seconds (it takes the Duo longer to start up)
  3. Cut power (the on/off/auto switch doesn't do anything at this stage)

On the fourth boot, you will end in EM Mode.

How to get out of EM Mode:

You have two possibilities.

1. Reflashing via the firmware updater

Reflashing via the LinkStation firmware flasher is the only possibility currently for the normal user.

2. ARM9-boxes only: Mark the rootfs as ok
mv /boot/rootfs_* /boot/rootfs_ok
echo `date` > /boot/rootfs_ok

Planned

Screenshot of Planned EM Mode

How to get into EM Mode:

1. Pressing the reset button longer than 20 seconds

After avr_evtd is built-in into OpenLink & FreeLink you will be able to get your LS into EM Mode simply by pressing the reset button longer than 20 seconds. This is already working really well, it just has to be integrated.

How to get out of EM Mode:

1. Reflashing via the firmware updater

Reflashing via the LinkStation firmware flasher of course will get you out of EM mode.

2. Telnet access

In EM Mode you will have telnet access in the future. Mindbender has already created Telnet and FTP enabled ramdisks inside new firmimg.bins which you can use to partition the hdd to your needs while in EM Mode. Executing "write_ok" gets you out again.

The stock firmimg.bin does NOT have telnet + ftp enabled. These firmimg.bin here are enhanced versions which have telnet + ftp enabled.
This makes it possible to fix various problems that normaly would lock you out of the box
and that would demand a complete reflash via the firmware updater.

the firmimg.bins from here can be used:

On the LS Pro series, you may be able to use ACP Commander to enable telnet, even on stock firmware.