PDA

Archiv verlassen und diese Seite im Standarddesign anzeigen : [Allgemein] Initialize harddisk menu entry does not work: a solution



Audioniek
23.09.2013, 20:54
Much has been written about initializing a harddisk in this forum with the usual answer "use Morly's admin tool" or "do it by hand using telnet". I thought of something else: fix the menu.

In the attached zip-file you find a changed and enhanced Harddisk.py which is to be installed in /usr/lib/enigma2/python/Components. Rename the existing file Harddisk.pyo so you can go back to the original situation (in HDMU Harddisk.py does not exist). Restart Enigma.
Work carefully: when Harddisk.py(o) is not correct, the image will refuse to start.

The Menu entry will do the following:
- The harddisk used will be /dev/sda. This is the first hardisk or USB stick that is detected during startup.
- Hotplugging is switched off, otherwise the newly formatted disk will be mounted spontaniously to an unwanted location. Hotplugging will be available again after a restart of Enigma
- The procedure will create 1 or 2 partitions depending on disk size. If the disk/stick is smaller than 20GB, 1 partition will be created, otherwise 2.
- The first or only partition will be labeled RECORD and will be formatted as ext3 or ext4 if it is available in the image. The partition size will be the full disk capacity, or when two partitions are made the full capacity minus 1 GB.
- The second partition wll have a size of 1 GB, will be setup as swap, and have the label SWAPPART.
- If absent, the folder /media/hdd will be (re-)created.
- If absent, the link /hdd -> /media/hdd will be made.
- The folder /movie will be made in the first or only partition.
- The final step is to remount the newly formatted disk to /hdd, so it can be used immediately.

The procedure will use parted if available, otherwise the standard tools.

WARNING: all data on the harddisk/stick is lost forever!

After he initialization is started, you can leave the menu and watch TV as the initialization job runs silently in the background. Progress can be monitored through the serial log if desired. When the job finishes you will see this:

5322

The disk/stick can be used immediately using the standard HDMU settings. A restart of Enigma is recommended however.
The other two menu entries handled by the file Harddisk.py(o) (filesystem check and conversion to ext4) have not been changed and operate as intended.

I have tested this on a spark7162 using the latest HDMU image and a Western Digital 500GB USB harddisk.

Regards,

Audioniek.