MediaBoot Script (en): Unterschied zwischen den Versionen

Aus Gemini-Wiki
Zur Navigation springen Zur Suche springen
Zeile 218: Zeile 218:
 
Back to [[#top | table of contents]]
 
Back to [[#top | table of contents]]
  
 +
= DM8000HD mit SATA SSD Speichermedium =
 +
[[Bild:Dumbo Plugin ssd.jpg|thumb|SSD Power|150px]]
 +
 +
Media-Boot kann das Image auch auf einem [http://de.wikipedia.org/wiki/Serial_ATA SATA] [http://de.wikipedia.org/wiki/Solid-State-Drive SSD] Speichermedium einrichten. Vorteil ist, dass das Image '''sehr schnell''' von diesem Medium booten kann. Als Speichermedium kann z.B. der [http://www.delock.de/produkte/gruppen/flash+speicher/SATA_Flash_Modul_2GB_Vertikal_54162.html DeLOCK SATA 2GB Flash Modul] (vertikal) verwendet werden. Das Speichermedium passt (in der Höhe) perfekt in die DM 8000HD PVR und kann mit dem mitgelieferten Stromkabel ohne Probleme an die Spannungsversorgung der Dreambox angeschlossen werden.
 +
 +
Das BIOS der Dreambox muss auch für das SATA SDD Gerät angepasst werden. Aber '''nicht''' wie es oben im Artikel beschrieben ist. Booten kann die Dreambox nur von einem SATA Gerät, wenn die '''Kernel Command Line''' eingeschaltet und korrekt angepasst worden ist. Beachtet bitte, dass das booten vom Flashspeicher nur funktioniert, wenn die Kernel Command Line wieder deaktiviert wird. Ansonsten bootet immer nur das Image auf dem SSD Speichermedium.
 +
 +
Wichtig ist auch zu wissen, dass die Dreambox eigentlich nicht direkt von SATA booten kann, sondern nur von USB. In dieser Variante bootet der Flashkernel und anschliessend wird durch die aufgezwungene Kernel command line die Rootpartition vom SSD Speichermedium geladen. Deshalb ist es sehr wichtig, dass ihr im Flash wie auch auf dem SSD Speichermedium die selben Images verwendet. Und natürlich muss bei einem Kernelupdate immer sichergestellt sein, dass das Image auf SSD wie auch das Image im Flash aktualisiert werden.
 +
 +
 +
== SATA SSD Medium anschliessen ==
 +
{|
 +
|[[Bild:Dumbo Plugin SSD installation.png|thumb|SSD - 8K alte Revision|280px]]
 +
|[[Bild:Dumbo Plugin SSD installation new.png|thumb|SSD - 8K neue Revision|280px]]
 +
|}
 +
 +
Benutzt beim Anschliessen des SSD Speichermediums die beiden Bilder. 
 +
 +
 +
== BIOS anpassen ==
 +
 +
Folgender Abschnitt zeigt die BIOS Einstellungen für Dreamboxen. Im BIOS aktiviert man die '''Change Command Line''' (enabled) und passt die '''Kernel Command Linie''' wie es nachfolgend beschrieben ist an. Bei root=/dev/sdX3 muss für das X der korrekte Buchstabe eingetragen werden. Benutzt dazu das media-boot Skript oder den Befehl fdisk -l, um den Gerätenamen des SSD Speichermediums herauszufinden.
 +
 +
Change Command Line      [ENABLED ]
 +
 +
Kernel Command Line      [console=ttyS0,115200 root=/dev/sdX3 rootfstype=ext4 rw]
 +
 +
 +
== Media-Boot einrichten ==
 +
Startet das Media-Boot Skript wie oben im Artikel beschrieben. Das Paket Chkbootmedia muss übrigens nicht installiert werden, da die autoexec_.bat in diesem Fall nicht gelesen wird.
 +
 +
 +
Zurück zum [[#top | Inhaltsverzeichnis]]
  
 
= Tips & Tricks =
 
= Tips & Tricks =

Version vom 22. August 2012, 20:27 Uhr

Deutsch.png - in Deutsch English.png - in English
The Gemini Project

Install an OE2.0 Image on a media device

The media-boot script by emanuel installs an image onto a media device such as USB, CF, SD or SSD, inclusive the GP3 Feed. While executing the script the device gets partitioned into 3 partitions (boot, swap and root). Subsequently the image (as tar.bz2 archive) is downloaded and unpacked onto the device. After an automatic restart of the Dreambox the image from the device is booted and offers enough memory for all your needs. Interesting e.g. for the DM800se with small flash capacity ;)


The Media-Boot Script is available in two versions. You can choose between following OE2.0 based images.

  • media-boot (DMM exp. OE2.0)
  • merlin-media-boot (Merlin 3 OE2.0)


Requirements:

  • DM500HD (needs a USB Mod), DM800se, DM8000HD, DM7020HD.
  • An OE2.0 image in flash.
  • A functioning internet connection.
  • Bios of the Dreambox needs to be configured correctly.
  • A media device larger than 1GB.
  • Create Bootlog, if the boot fails.
  • The media device needs to be formated in FAT32.
  • Use other media device, if the boot fails. Mainly USB Sticks can be problematic.
  • Media-Boot uses a plugged media device. Problems occur when plugging additional devices into the Dreambox. As a result the device names move and booting is no longer possible. This problem can only be solved by making a Bootlog and editing the autoexec_*.bat.
  • Take a look at Tips & Tricks.

Bios configuration

Bios - DM 8000 HD PVR
Bios - DM 800 HD se

You need to prepare the Bios to be able to boot via a removable media containing the FAT filesystem.
The following chapter shows you the needed preparation for the different kind of Dreamboxes.

The USB support needs to be activated for all Boxes.

Ambox notice.png Changing the Bios
Like flashing the Bios via Webbrowser you can connect to the Bios.
After you see "STOP" at the display you can connect via telnet ip_of_dreambox to the Bios. Than you can change the needed values. Further informations about accessing the BIOS can be found in Wiki article The Dreambox Bios.


Ambox notice.png Choose Boot Source
If you cannot change the values at Boot Source between Flash / CF / USB,
then use the [Page UP] or [Page Down] keys at your keyboard.
Mac users can use the following combination [Fn]+[Shift]+[Arrow up/down].

The following picture shows how these keys can look ;)

Dumbo Plugin keys example.png


DM 500 HD

Primary boot source: usb [/autoexec_dm500hd.bat]

Secondary boot source: flash

Enable USB support: [ENABLED]


DM 800HD PVR

Primary boot source: usb [/autoexec_dm800.bat]

Secondary boot source: flash

Enable USB support: [ENABLED]


DM 800HD se

Primary boot source: usb [/autoexec_dm800se.bat]

Secondary boot source: flash

Enable USB support: [ENABLED]


DM 7020HD

Primary boot source: usb [/autoexec_dm7020hd.bat]

Secondary boot source: flash

Enable USB support: [ENABLED]


DM 8000HD PVR

Primary boot source: usb [/autoexec_dm8000.bat]

Secondary boot source: flash

Enable USB support: [ENABLED]


Back to table of contents


Configure Media-Boot

Download the wanted script from Media-Boot Thread unpack and copy the file with FTP onto the Dreambox in the directory /home/root.

Make sure the script has the correct rights, otherwise it can not be executed. Use the following command when connected via telnet or ssh. Attention this command is for the script for the DMM exp. Image. If you use the script for Merlin, you need to replace media-boot by merlin-media-boot!

chmod 755 media-boot


Back to table of contents


Media-Boot Script

Informations

Informations about Media-Boot can be displayed as follows.

root@dm800se:~# ./media-boot --help

media-boot: is a script to install dreambox image (OE2) on extern device >= 1GB

NOTE:   this script is only for advanced users!
        Make sure the selected device is not your harddisk!!

Usage: media-boot -i /dev/sd<a-z>
        install image on selected device /dev/sd<a-z>

Usage: media-boot -d
        shows avaible devices on box

root@dm800se:~#


Back to table of contents


List the available media devices

With the following command you can list the available devices. In the example (output reduced) a hard disk and a USB Stick with 8GB is found. The name of the device is important for starting the Media-Boot script in the next step. In this example the USB Stick has the name /dev/sdb.

root@dm800se:~# ./media-boot -d

media-boot: found following devices on box:

Disk /dev/sda: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks  Id System
/dev/sda1               1       60801   488384028+ 83 Linux

Disk /dev/sdb: 8006 MB, 8006926336 bytes
84 heads, 6 sectors/track, 31028 cylinders
Units = cylinders of 504 * 512 = 258048 bytes

   Device Boot      Start         End      Blocks  Id System
/dev/sdb1               5       31025     7817216   b Win95 FAT32


Back to table of contents


Execute Media-Boot

Media-Boot is started with the following command. Make sure you use the correct device name, pay attention you don't make a mistake and specify your hard disk. Be patient, the initializing, downloading and unpacking of the image takes a while.

Afterwards the box restarts automatically, and the image from the stick is booted. You can check the available memory with df -h.

root@dm800se:~# ./media-boot -i /dev/sdb

media-boot: installing on device: /dev/sdb
media-boot: stoping automount reboot to get back
media-boot: stoping udev
.
.
.


Back to table of contents


Install Chkbootmedia

After booting the Dreambox successfully from the media device the additional package (chkbootmedia_x.xx_all.ipk) needs to be installed. This is needed to prevent overwriting the autoexec_*.bat when kernel updates are installed. This would lead to a failed boot of the media device.

Download the package from here and copy the file with FTP onto the Dreambox in the directory /tmp. Install the package with the following commmand.

opkg install /tmp/chkbootmedia*


Back to table of contents


Backup / Restore Image

You can create or restore a backup with the following commands. The example uses again the media device /dev/sdb. The name of the media device can be found with the command fdisk -l.

Backup Image

When the image is running from the media device you can make a backup with the dd command. In this example the path for the backup refers to the hard disk and the file name is my_backup.img. The size of the backups is the same size as the used media device. The process takes a while, please be patient and wait until the command line shows a prompt again.

dd if=/dev/sdb of=/media/hdd/my_backup.img


Restore Image

Start the Dreambox from Flash memory and use the following command for restoring. Make sure the device name is correct. Again use the command fdisk -l to double check!

Make sure you use a media device which is at least the same size as the backup file (*.img). The process takes a while, please be patient and wait until the command line shows a prompt again.

dd if=/media/hdd/my_backup.img of=/dev/sdb


Back to table of contents

DM8000HD mit SATA SSD Speichermedium

SSD Power

Media-Boot kann das Image auch auf einem SATA SSD Speichermedium einrichten. Vorteil ist, dass das Image sehr schnell von diesem Medium booten kann. Als Speichermedium kann z.B. der DeLOCK SATA 2GB Flash Modul (vertikal) verwendet werden. Das Speichermedium passt (in der Höhe) perfekt in die DM 8000HD PVR und kann mit dem mitgelieferten Stromkabel ohne Probleme an die Spannungsversorgung der Dreambox angeschlossen werden.

Das BIOS der Dreambox muss auch für das SATA SDD Gerät angepasst werden. Aber nicht wie es oben im Artikel beschrieben ist. Booten kann die Dreambox nur von einem SATA Gerät, wenn die Kernel Command Line eingeschaltet und korrekt angepasst worden ist. Beachtet bitte, dass das booten vom Flashspeicher nur funktioniert, wenn die Kernel Command Line wieder deaktiviert wird. Ansonsten bootet immer nur das Image auf dem SSD Speichermedium.

Wichtig ist auch zu wissen, dass die Dreambox eigentlich nicht direkt von SATA booten kann, sondern nur von USB. In dieser Variante bootet der Flashkernel und anschliessend wird durch die aufgezwungene Kernel command line die Rootpartition vom SSD Speichermedium geladen. Deshalb ist es sehr wichtig, dass ihr im Flash wie auch auf dem SSD Speichermedium die selben Images verwendet. Und natürlich muss bei einem Kernelupdate immer sichergestellt sein, dass das Image auf SSD wie auch das Image im Flash aktualisiert werden.


SATA SSD Medium anschliessen

SSD - 8K alte Revision
SSD - 8K neue Revision

Benutzt beim Anschliessen des SSD Speichermediums die beiden Bilder.


BIOS anpassen

Folgender Abschnitt zeigt die BIOS Einstellungen für Dreamboxen. Im BIOS aktiviert man die Change Command Line (enabled) und passt die Kernel Command Linie wie es nachfolgend beschrieben ist an. Bei root=/dev/sdX3 muss für das X der korrekte Buchstabe eingetragen werden. Benutzt dazu das media-boot Skript oder den Befehl fdisk -l, um den Gerätenamen des SSD Speichermediums herauszufinden.

Change Command Line      [ENABLED ]

Kernel Command Line      [console=ttyS0,115200 root=/dev/sdX3 rootfstype=ext4 rw]


Media-Boot einrichten

Startet das Media-Boot Skript wie oben im Artikel beschrieben. Das Paket Chkbootmedia muss übrigens nicht installiert werden, da die autoexec_.bat in diesem Fall nicht gelesen wird.


Zurück zum Inhaltsverzeichnis

Tips & Tricks

Install the GP3.2 Plugin

The script offers the possibility to install the GP3.2 Plugin, GP3 Addons or GP3-Skins. This way the BluePanel and the additional plugins and Skins are available immediately after booting the media device.

Edit the script and search the following lines:

EXTRA=""

#EXTRA="geminiplugin geminidreamnetcast geminijukebox geminirezapp geminigweather gemininetcastwebif geminirssreader geminiwebcam"

You should add the wanted packages at EXTRA="" between the quotes. The line for installing the GP3.2 Plugin, NFS Server and Gemini Jukebox looks like the following example.

 EXTRA="geminiplugin gemininfs geminijukebox"

If you don't know the package name you can list the name when using an image with the GP3 Plugin using the following command. But before using the command do opkg update. The first command shows all GP3 packages, the second only the GP3 Skins.

opkg list *gemini* 
opkg list *gp-skin*
Ambox notice.png If you use the Merlin script, you should remove the Quickbutton Plugin with the command
opkg remove enigma2-plugin-extensions-quickbutton.

Back to table of contents

Support thread

If you need help with Media-Boot, follow the Link ;)

Media-Boot


Back to overview: Gemini-Wiki:English Portal or Mainpage