PDA

View Full Version : How To Boot Your DM800 From A USB Stick



cokesux
17-04-2012, 12:05 AM
To configure your Dm800 to boot from a USB stick, all that is required:



A USB stick that is supported by your DB.
A telnet connection to access your DB.
The image.nfi you want to install.
Nfidump to extract your desired image & kernel.



If you don't have a Linux PC available, setting up the USB stick on your DB will probably be easier than attempting to do it on a M$ or Apple PC. Unfortunately, during the process of writing this guide, I noticed that my DB's image has no ability to create a vfat (Windows) filesystem. As this is required to boot from USB, a PC that is able to create a vfat filesystem may also be required.


This basic procedure will most likely also work on other similar models, such as the 800se, 7020hd, 8000, etc...


Note: This form of manual USB booting sounds quite similar to what DUMBO (the DUMbBOot loader) is supposed to do. Personally, I was never able to get DUMBO to work on my box. Unlike DUMBO though, this method allows you to install multiple images on the same USB stick, although requiring one to enter the BIOS to select different images to boot. More info on multiple image setup in the Final Thoughts section.





Copyright (C) 2012 hemispherical1


Permission is granted to copy, distribute and/or modify this document under the
terms of the GNU Free Documentation License, Version 1.3 or any later version
published by the Free Software Foundation; with no Invariant Sections,no
Front-Cover Texts, and no Back-Cover Texts. A copy of the license may be found @
http://www.gnu.org/copyleft/fdl.html




Download as PDF (http://www.divshare.com/download/17415861-75e)

cokesux
17-04-2012, 12:06 AM
Plug your USB stick into your DB, then telnet/ssh into the box. I think many image will automatically mount the USB when you plug it in, but it needs to be unmounted for preparation. Verify what device the USB stick is. If you have no hard drive installed, it's probably /dev/sda, if there is a hard drive, it's probably /dev/sdb, etc...


Use the "df" command to see if it is mounted, & if so, use the umount command to unmount, something like:


http://irc2.db4na.net/guide/db1.jpg


... or something similar, depending on your setup...


Note: I downloaded & installed fdisk through my image's package management (opkg), by default OpenPLi uses sfdisk which I don't like. Feel free to use whatever method you prefer to partition & configure your USB stick.


Caution, all data on the USB will be lost! In telnet:


http://irc2.db4na.net/guide/db2.jpg


A. fdisk /dev/sdb <enter> (or whatever device your USB actually is)


B. p <enter> (print the current partition table)


C. d <enter> (delete any existing partitions, answer the on screen questions)


D. p <enter> (verify all existing partitions were removed)


http://irc2.db4na.net/guide/db3.jpg


*Note: The average vmlinux.gz (kernel) file size is less than 2MB. A 10MB partition for the kernels & 200MB or more for the actual image should be fine. If you want your image to have gigabytes of space, make it's partition larger. If you want to install multiple images on the stick, create 3 or 4 primary partitions, but all images can use the same small vfat partition for the 1-3 kernels.


E. n <enter> (add a partition)


F. p <enter> (create 2-4 primary partitions, follow on screen directions)


*Use the default starting point and the command +10M to create the small kernel partition & follow the on screen instructions to create the large image partition/s. i.e. +200M for 200MB partition, +1G for a 1 GB partition, etc...


G. p <enter> (verify the partition layout is acceptable)


http://irc2.db4na.net/guide/db4.jpg


H. t <enter> (change partition type menu)


I. 1 <enter> (select small kernel partition, 1 in this case)


J. b <enter> (selects windows vfat partition type)


K. a <enter> (toggle bootable flag menu)


L. 1 <enter> (set bootable flag on for the kernel/vfat partition)


M. p <enter> (verify the changes made)


N. w <enter> (save all changes made to the USB partition layout)


Note: fdisk may give a warning about having created a DOS partition, it may be ignored for our purposes.

cokesux
17-04-2012, 12:07 AM
http://irc2.db4na.net/guide/db5.jpg

Now that the USB stick is partitioned and set up for use, it's time to format it (create filesystems). Again, in telnet:


A. mkfs.ext3 /dev/sdb2 <enter> (create the ext3 filesystem for the image partition)


B. mkfs.vfat /dev/sdb1 <enter> (create the vfat filesystem for the kernel partition)


Well DAMNIT, my DB image has no function for creating vfat/DOS file systems!!! I guess that is understandable, after all the DB does use a bare bone OS, it can't contain everything. I can't even find a downloadable package to add support... Looks like the usb stick will need to be transferred to a Linux or Windows PC to format the first (kernel) partition.


On a Linux PC, simply plug the USB stick in & figure out what device it is. MAKE SURE you have the correct device or you'll wipe out something you didn't intend, like your hard drive. On the terminal:


mkfs.vfat /dev/sd?1 <enter> (where ? Is the proper device)

cokesux
17-04-2012, 12:08 AM
Plug your USB stick into your XP PC (I assume Win7/8 procedure would be similar). Open up my computer and double click on the USB stick, the following prompt should appear


http://irc2.db4na.net/guide/1a.JPG


Select "Yes"...


http://irc2.db4na.net/guide/2a.JPG


Verify that Windows is only formatting the small ?kernel? partition, not the entire stick, i.e. 10MB above, click "Start".


http://irc2.db4na.net/guide/3a.JPG


Select "OK" to format the partition.


http://irc2.db4na.net/guide/4a.JPG


Congratulations, the M$ crap is over (sorry again) and you're USB stick is ready to receive your desired image.

cokesux
17-04-2012, 12:09 AM
Locate & install gutemine's nfidump. OpenPLi includes it in it's download (opkg) feeds, but if your image doesn't, you'll have to manually install it yourself. As of this writing I believe v. 0.4.0 was the latest.


Copy the image.nfi you've chosen to boot from USB to your DB, I recommend to your DB's hard drive or /tmp. In this example we're using openpli-enigma2-2.1-dm800.nfi & copying it to the DB's /tmp/.


In telnet:


http://irc2.db4na.net/guide/db6.jpg


Create the mount points, in this example we'll use /media/hdd/sdb1 & media/hdd/sdb2:


A. mkdir /media/hdd/sdb1 <enter>


B. mkdir /media/hdd/sdb2 <enter>


Mount your USB sticks partitions to these newly created mount points.


C. mount /dev/sdb1 /media/hdd/sdb1 <enter>


D. mount /dev/sdb2 /media/hdd/sdb2 <enter>


Now extract your desired image to /media/hdd/sdb2 using nfidump.


E. nfidump /tmp/openpli-enigma2-2.1-dm800.nfi /media/hdd/sdb2 <enter>


Your image is now installed to the correct partition on your USB stick. Next we copy the kernel from the newly installed image to the smaller kernel partition on your USB stick, /media/hdd/sdb1.


F. cp /media/hdd/sdb2/boot/vmlinux.gz /media/hdd/sdb1 <enter>


The next step will be to create the autoexec.bat file on the kernel partition (sdb1), containing the information necessary for the DB to know how to boot, such as the kernel name, filesystem location, etc.


Personally I use the vi editor, but I'm not about to start trying to explain it's use here. That truly would be a How-To unto itself. Use whatever editor you're comfortable with, but remember:


*If you create the file in a Windows editor, I'd suggest running dos2unix on it after copying it back to the USB stick.


dos2unix /media/hdd/sdb1/autoexec.bat <enter>


The contents of the autoexec.bat file will look something like:


/usb/vmlinux.gz console=null rootdelay=10 root=/dev/sdb2 rootfstype=ext3 rw


... all on one line. A brief overview:


/usb/vmlinux.gz (kernel name & location)


console=null (leaves the serial port open to add card readers, etc.)


rootdelay=10 (gives extra time for the USB stick to respond)


root=/dev/sdb2 (the root filesystem's partition)


rootfstype=ext3 (the root filesystem type)


rw (mount the filesystem with read/write permissions)


The previous descriptions aren't required knowledge, but I figured anyone that made it this far might actually find the information interesting. Feel free to disregard...


We're in the home stretch now. All that is left is to configure the DB to boot from USB by default, rather than it's flash.

cokesux
17-04-2012, 12:10 AM
Put your DB into "stop mode", as if you were flashing it through the web interface, i.e. power it up while depressing the standby/power button until the OLED reads "stop". Telnet to your DB and you will be dumped into the box's BIOS. Use your keyboard arrow buttons to navigate to the 4th tab, "boot", and again down to the Primary Boot Source.


http://irc2.db4na.net/guide/BIOS2a.jpg


Use your page up & down keys to change it from flash to usb, then enter /autoexec.bat into the field to the right. Change the Secondary Boot Source to flash. Navigate to the ?Exit? tab again using your arroe keys.


Note: To change tabs you need to be in a field that the arrow keys work from, try Default Boot Sources, Enable Prerun, Change Command Line, etc...


http://irc2.db4na.net/guide/BIOS3a.jpg


Use the arrow keys to navigate to "Save Settings and Reboot" & press enter. If your USB stick is plugged in it should boot up, if not, your DB should boot the image in flash. Booting from USB is a bit slower than from flash, so don't panic if it takes a couple minutes to boot. You can also watch the OLED on bootup and it will tell you what it is booting from.


Congratulations, you now have your DB running directly off of your USB stick!!!


Even if you don't use it often, it could be handy to keep a USB stick configured & ready to use as a Rescue Disk. This would also come in handy in the rare case that your flash chip dies.

cokesux
17-04-2012, 12:10 AM
Unlike some other "multi-boot" methods, this method does not mix kernels, drivers, & binaries from different images. Each running image is completely independent from any other image that may also be installed. This eliminates strange problems that can occur occasionally.

In the past I've run into trouble trying to use an image extracted from a backup for use with Network Boot, which is similar to USB boot. Although slightly more complicated (setting up DHCP, NFS, & TFTPD servers) than USB booting, the basic DB configuration is similar between the 2 methods. Extracting an actual released image may work better than trying to extract from a backup. Your mileage may vary...


As I mentioned earlier, it is possible to install multiple images on the USB stick. Each image requires it's own partition. I don't know if the DB will boot from an extended partition, I have no need to try it. Feel free to test for yourself if you need more than 3 images on a stick (primary partitions are limited to 4).


For multiple images, each image's kernel must have a unique name, so they can all coexist in the kernel partition. Something like vmlinux_pli.gz, vmlinux_sif.gz, etc. Each image & kernel also needs a uniquely named autoexec.bat file, something like autoexec_pli.bat, autoexec_sif.bat, etc... Each autoexec.bat file must also be edited, pointing at it's correctly named kernel & the partition that holds it's root filesystem, i.e. /usb/vmlinux_pli.gz, etc. & root=/dev/sdb2, root=/dev/sdb3, etc...


To choose which image to boot you'd have to go into the DB's BIOS and edit the Primary Boot Source to point at it's specific autoexec.bat file, save changes & reboot as we did above. You may also experiment with other configurations & Boot Sources in the BIOS.


I also have not played with DMM's 3.0 images, I don't believe in their closed source concept, but I would think they'd work the same as described here. Also, the new "fad" of using an initramfs that some images now use may or may not play nicely. I suspect they won't work, but again I have no interest in trying myself. I support open sourced images that allow people to fix problems rather than deal with some people's attempts at obfuscating an image's inner workings. Feel free to support such efforts, but I choose not to.



**SIM2 SSL84b & it's required drivers (11-9-11 iirc) do not play nicely with USBBOOT or NETBOOT. To use either method with SIm2 clones, using an old binary patched tuner driver is required, I'll add a link here for those that can't find it.

Download the old patched tuner driver HERE (http://www.divshare.com/download/17421569-b21). To install simply unzip it and copy it to the USBBOOT running DB's /lib/modules/2.6.18-7.4-dm800/extra/ , overwriting the existing bcm7401.ko module...

gjstroom
17-04-2012, 06:03 PM
Nice Job. Does this work with ssl84b and matching drivers ?
I know from the networkboot adventure that it only worked with patched drivers. I mean real binary patched drivers, not a mix of old and new.

cokesux
17-04-2012, 07:54 PM
Thanks for reminding me. I had actually forgot about the patched tuner driver requirement. No, SSL84b & it's required drivers (11-9-11 iirc) do not play nicely with USBBOOT or NETBOOT. To use either method with SIm2 clones, using the very old patched tuner driver is required, I'll add a link here for those that can't find it.

Maybe next time they release a new SSL they can fix the problem... ;)


Download the old patched tuner driver HERE (http://www.divshare.com/download/17421569-b21). To install simply unzip it and copy it to the DB's /lib/modules/2.6.18-7.4-dm800/extra/ , overwriting the existing bcm7401.ko module...

--

jake1981
03-05-2012, 11:46 PM
Anyone got it to work? I downloaded old patched tuner driver but still while booting, no boot image on tv and when boot process is complete, I get a notification about that I should be contacting Dream Multimedia since my hardware cannot be regocnized or something like that.. Obviously contacting them doesn't help at all but I would love to get this to work :)

cokesux
04-05-2012, 01:50 AM
Works for me on a sim2.01 clone... ;) Are you using a clone image on the USB?

--

jake1981
04-05-2012, 08:44 AM
I have Sunray SR4 with triple tuner. I tried to use newnigma2 image designed for Sunray, but I wanted a bit cleaner image, so I used a newnigma2 image for SIM2 dm800se - where I have changed satellites.xml and terrestrial.xml (not sure if terrestrial.xml is necessary)..

So my hardware should be SIM2.10. I used nfidump to dump clean image to usb stick as it was advised. Then I tried few tricks:
- Checked installed ipkg packages and decided to install SSL84b ipkg package as it wasn't in the list.
- Installed mentioned driver.
- Tried with new trial tuner driver(=triple tuner driver?) mentioned in another post.

None of these tricks helped me out as the results were always the same. I am a new owner of sunray box - and I was wondering am I doing everything correctly, I think I saw some post somewhere that told me that I should do something with second stage bootloader - have I skipped this?

cokesux
04-05-2012, 03:46 PM
The patched tuner driver I attached to this thread is for the 800, I don'y know if it can work w/ the 800se & I don't know if a patched driver was ever released for the SE. If there was, perhaps someone can direct you twords where it could be found.

--

jake1981
05-05-2012, 05:44 AM
That explains a lot.. How did you get your hands on the patch? Maybe something similar could be archieved for 800SE too..?

Bassie
05-05-2012, 01:11 PM
The sim-team releases patched drivers for our loaders.

Drivers for the 800 dont work on the 800se and vice versa.

For both models a few patched drivers where released to work with loader 82 like:

dvb-modulles 20110506, 20110821 and 20110902 which can work with ssl82 and 84(a)

Last patched driver for 800se dreambox-dvb-modules-dm800se-2.6.18-7.4-dm800se-20110902-r0-sim http://www.multiupload.nl/F73EINHYLO

firsyah
09-06-2012, 06:37 PM
not work for me..



>>>>>> nfidump 0.4.0 by gutemine <<<<<<

based on code from tmbinc, noggie and others

extracting dm800se nfi image ...
extracting boot.jffs2 from nfi ...
extracting boot from boot.jffs2 ...
extracting root.jffs2 from nfi ...
extracting root from root.jffs2 ...
nfi extract finished!

root@dm800se:~# cp /media/sdb2/boot/vmlinux media/sdb1
cp: can't stat '/media/sdb2/boot/vmlinux': No such file or directory
root@dm800se:~#

the extraction dont get success, i didnt find vmlinux on the flashdisk after extraction...
where is wrong?? i think is on the extraction process dont work good..

cokesux
09-06-2012, 07:15 PM
I don't have a SE, but I would think it should work similar.

Perhaps you are using a newer image using that wonderful initramfs / anti-clone feature (like non-clone nemesis, etc...)?

--

Ps. you did extract the image to /media/sdb2, not a subdirectory like /media/sdb2/image, or /media/hdd/sdb2, etc...? Triple check your paths...

firsyah
10-06-2012, 05:09 AM
I triple check the path, n follow precisely as you sadi, and it work, IT BOOT, But afterall it say :
THE HARDWARE COULD NOT BE VERIFIED
PLEASE CONTACT DREAM MULT

ERROR CODE : BLA BLA BLA

I use icvs image, should i use another? And what is different beetween put the image on the flash instead of usb. Why the one work and the another didnt.

cokesux
10-06-2012, 05:39 AM
At the very least you'll need patched tuner driver as mentioned in post #15. I never used icvs so I don't know if they have any other protections built in. Is your icvs image a clone image? If not, use a clone image & drivers mentioned above. The clone SSLs only work as designed in flash, booting from USB or the network requires the older patched drivers. If the Sim2 folks ever release a new SSL, perhaps they'll add support for running from USB/network, or perhaps release recent "patched" drivers...

The more I think about it, I don't think the 20110821 or 20110902 drivers were "patched", but rather original drivers that worked w/ clone SSL in flash, I'm thinking it was probably the 20110506 drivers that were patched? Maybe if we ask nice someone will post the patched "New Method" drivers for the SE, mfaraj57 perhaps, or anyone that happens to have them kicking around... ;)

--

firsyah
10-06-2012, 08:47 AM
S*#T!! It does work, thanks bassie, for the driver, n specially cokesux, without your support, maybe i will give up, because uncle google dont have answer at all.

I use latest openpli, maybe i should try another, or run with multiple image,

Keep at goodwork cokesux,

biohazard
30-08-2013, 11:29 AM
Anyone able to help me on this. I am using dm800hd with philips tuner (cable) and have created a bootable usb with latest open pli image ssl84b. It was able to boot up on the usb but found tuner empty. Do i need a patched tuner driver to work on my usb.

gjstroom
30-08-2013, 12:23 PM
You need a patched bcm7401 driver.
I think this is the newest patched version https://dl.dropboxusercontent.com/u/9860949/dm800-bcm7401-new-drv-9-2.rar

cokesux
30-08-2013, 08:52 PM
Nevermind... ;)

--
hemi

biohazard
01-09-2013, 10:54 AM
You need a patched bcm7401 driver.
I think this is the newest patched version https://dl.dropboxusercontent.com/u/9860949/dm800-bcm7401-new-drv-9-2.rar

It works! Thanks gjstroom for the driver and cokesux for the tutorial. Btw gjstroom, do u have also the patched driver for dm800se.

gjstroom
02-09-2013, 01:40 PM
Patched driver for dm800se: https://dl.dropboxusercontent.com/u/9860949/bcm7405-2-9-dm800se.rar

gentongbocor
26-12-2013, 03:53 AM
Does this method can be applied to any SIM2 images running OE2.0 ?

gjstroom
26-12-2013, 02:14 PM
Does this method can be applied to any SIM2 images running OE2.0 ?
It should be possible I think, but you also need a patched driver I suppose. For some strange reason it only worked with patched (unprotected) drivers.
As far as I know we never had a patched OE2.0 driver for the 800hd.
The SSL #84D maybe fixed this, it's worth a try...

gentongbocor
28-12-2013, 03:52 PM
It should be possible I think, but you also need a patched driver I suppose. For some strange reason it only worked with patched (unprotected) drivers.
As far as I know we never had a patched OE2.0 driver for the 800hd.
The SSL #84D maybe fixed this, it's worth a try...

I'm using DM800SE. I would like to boot OE 2.0 image from usb. Do i need patched dreambox-dvb-modules which suitable for OE 2.0?
Do u have?

gentongbocor
29-12-2013, 06:39 AM
Please give us instruction on how to install & make usb bootable for all OE 2.0 images for DM800SE. I really need to install OE 2.0 but i want to install many plugins. Since DM800SE has less memory, thats why it needs to boot from usb flashdisk to get more storages.

gjstroom
29-12-2013, 02:32 PM
Please try yourself before you start asking questions.
You can find the patched driver for dm800se here: https://dl.dropboxusercontent.com/u/9860949/dm800se/bcm7405.ko
I don't use the usb boot, so can't help you on that subject.

c4bl3guy
27-08-2014, 03:38 PM
Hi sorry to dig up an old thread but I tried this guide yesterday all went well up until the command to copy vmlinux.gz and I got a not found message. Looking in sdb2/boot folder there was "vmlinux-2.6.18-7.4-dm800.gz", "autoexec.bat" & "autoexec_dm800.bat". I renamed the gz file to vmlinux.gz and edited the autoexec.bat with the line in the guide to no avail.. box just went back to the IP flash screen after the reboot. I went into the BIOS and set it back to flash boot. All is working but now I cannot access the IP stop screen anymore, the box just boots through to the image when holding the power button. I tried the bootloader programs to see if that was the problem but it doesn't detect the box at all. Just the COM port... any ideas what this could be? Is there a way I can reset the BIOS somehow?

Thanks people.