Sign up here and you can log into the forum!

How to boot wdlxtv directly from a flash device or hdd

Have a question about devices internals, memory layout, reverse engineering, etc---This is the place for anything so technical that it would cause a n00b's head to 'splode

How to boot wdlxtv directly from a flash device or hdd   

Postby b-rad.cc » Mon Apr 26, 2010 8:19 pm

Theres a little known feature thats in wdlxtv-live&g2 that I think more people should be enjoying, especially since I just patched a little bug so it works again :mrgreen:

There is a built in ability to pivot and boot a firmware directly off a flash device or fast hard drive. This is not root.bin I'm talking about, this is all the files directly on your device. The device you use must be formatted in either ext2 or ext3, I suggest ext3 since the journal will come into use occasionally.

In order to see what I'm talking about:

Option 1
grab the latest ext3-boot-live root.bin, save it to the device you want to play with, and open your closest shell. Example below is done on the wdtv-live itself.

Code: Select all
cd /tmp/media/usb/ext3A
mkdir ext3-boot
mount -o loop root.bin ext3-boot
mkdir .rootFS
rsync -avHS ext3-boot/ .rootFS
umount ext3-boot
rm root.bin
sync && sync && sync && reboot


Now when this boots you should be greeted with ext3-boot, without root.bin.

Notes:
* Your device MUST come alive fast to work
* Any device that is already known to work with ext3-boot-live root.bin will work with .rootFS
* Only one external 3.5 hdd I've tried out of ~10 will boot .rootFS / root.bin, the rest will not because they are too slow
* All 5 of my various 2.5" 'portable' external hdd's successfully boot root.bin / .rootFS

Option 2
With subversion you can run bleeding edge if you have an ext3 device:
Code: Select all
cd /tmp/media/usb/ext3A
mkdir .rootFS
svn co --username guest --password guest https://svn.wdlxtv.com/svn/wdlxtv-live/trunk .rootFS
chmod 4755 .rootFS/usr/bin/sudo
chmod 440 .rootFS/etc/sudoers
chmod 440 .rootFS/etc/sudoers.d/README
chmod 700 .rootFS/root/.ssh
sync && sync && sync && sync


If you're a dev and want to try your hand at patching, then you can make svn diff's to show modifications.

:ugeek: :mrgreen:
PM's are for private matters only, please post public matters on the forum to help others who might have the same issue.
:mrgreen:
User avatar
b-rad.cc
WDLXTV Team
 
Posts: 3003
Joined: Sat Apr 03, 2010 9:35 am
Location: New York

Re: How to boot wdlxtv directly from a flash device or hdd   

Postby awx » Thu May 13, 2010 9:44 am

@brad:
is this functionality supported by the stock firmware as well or do i have to flash wdlxtv first?
btw: the .rootFS folder will be created by the svn command ;)
regards
awx
awx
Developer
 
Posts: 34
Joined: Sun Apr 11, 2010 11:54 am

Re: How to boot wdlxtv directly from a flash device or hdd   

Postby awx » Thu May 13, 2010 11:03 am

hmm...there must be something wrong. either your howto our my brain ;-)
i tried it with three different devices, but had NO success with booting .rootFS
how i understand it:

1. umount the device if it was mounted
2. format the device with i.e. mkfs.ext3 /dev/sdb1
3. mount the device with i.e. mount /dev/sdb1 /tmp/mountpoint_that_exists
4. change into that directory i.e. cd /tmp/mountpoint_that_exists
5. grab the svn stuff with "svn export https://svn.wdlxtv.com/svn/wdlxtv-live/trunk .rootFS"
6. check the created folder .rootFS
7. sync, unmount and reboot

and the result is - nothing! just the wd-logo for hours
i tried two (fast) usb sticks and one 2.5" usb 160GB harddisk
all work perfectly with root.bin
can you see where i'm wrong?
greetz
awx

EDIT: got it to work! flashed version 0.4.2.0 :evil:
awx
Developer
 
Posts: 34
Joined: Sun Apr 11, 2010 11:54 am

Re: How to boot wdlxtv directly from a flash device or hdd   

Postby spidi » Sun May 16, 2010 11:43 am

works perfect,
but is there a possibility to update directly.
or can i only update when i unplug the harddisk and mount it later?

rtorrent works create by the way!!!

Greets, spidi
spidi
n00b
 
Posts: 1
Joined: Sun May 16, 2010 11:38 am

Re: How to boot wdlxtv directly from a flash device or hdd   

Postby b-rad.cc » Sun May 16, 2010 3:14 pm

Code: Select all
cd /
svn update
PM's are for private matters only, please post public matters on the forum to help others who might have the same issue.
:mrgreen:
User avatar
b-rad.cc
WDLXTV Team
 
Posts: 3003
Joined: Sat Apr 03, 2010 9:35 am
Location: New York

Re: How to boot wdlxtv directly from a flash device or hdd   

Postby player_sct » Mon May 17, 2010 3:27 am

heh :) i'ts work :) thx b-rad for this :) now i have in /root much more space than 8-10 mb :)
User avatar
player_sct
Beta Tester
 
Posts: 90
Joined: Sun Apr 11, 2010 6:29 am
Location: Poland

Re: How to boot wdlxtv directly from a flash device or hdd   

Postby dopedangel » Wed May 19, 2010 12:10 am

I was wondering will this method solve my problem
Whenever I forget to turn of my external hard disk when I reboot it is selected instead of my 2gb flash drive as sda1.
or is their another way to force wdtv to select a particular drive to load root.bin
dopedangel
WDTVer
 
Posts: 35
Joined: Thu Apr 15, 2010 2:32 am

Re: How to boot wdlxtv directly from a flash device or hdd   

Postby b-rad.cc » Wed May 19, 2010 6:08 am

No theres not and there will never be ;) That'd just add excess time to the boot cycle and you can swap usb slots for your devices and figure out where /dev/sda1 is--it never changes
PM's are for private matters only, please post public matters on the forum to help others who might have the same issue.
:mrgreen:
User avatar
b-rad.cc
WDLXTV Team
 
Posts: 3003
Joined: Sat Apr 03, 2010 9:35 am
Location: New York

Re: How to boot wdlxtv directly from a flash device or hdd   

Postby dopedangel » Wed May 19, 2010 7:39 am

I tried using different slots but didn't matter if the drive was in the back slot or side slot it became sda1 instead of my flash drive.
Not really important now that I am using msheet ext plugin so don't need to reboot alot.
But to make it clear sda1 is decided by the usb slot and has nothing to do with what kind of harddrive it is?
dopedangel
WDTVer
 
Posts: 35
Joined: Thu Apr 15, 2010 2:32 am

Re: How to boot wdlxtv directly from a flash device or hdd   

Postby nerve » Sun May 30, 2010 2:42 pm

Hi,
i followed all the instructions, but it continues to boot from flash instead from .rootFS....
Could it be because i use an usb disk with 2 different partitions? My ext3 partition is recognized as SDA5..
:(

Thank you.

Ciao,
Nerve
nerve
n00b
 
Posts: 14
Joined: Thu May 27, 2010 4:16 am

Next

Return to WDTV Live

Who is online

Users browsing this forum: No registered users and 2 guests

cron