Forum

Full Version: Boot XBian from USB
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28
If that doesn't work try (sh usbinstall).

Never a better time to break something than on a fresh install ;-)

If that doesn't work what does (cat usbinstall) show? Occasionally wget will download an html file instead of a file.
Here's a quick guide on how to install the script:

1. ssh to your RPi and exit the config menu OR, if you have a USB keyboard connected, just exit XBMC enter your credentials and exit the config menu.
2. Enter this:
Code:
wget http://tinyurl.com/xbianusb-install
chmod +x xbianusb-install
./xbianusb-install

Quote:I would put in a warning that all data on the selected partition will be erased.
Good idea! I will do that as soon as possible. Smile
Quote:What happens when someone chooses a non-existing partition?
mkfs.btrfs will exit with an error code and the script will stop.
Quote:What happens if the user already has something mounted at /mnt? You might want to do a 'sudo umount /mnt' just in case (don't know if this happens automatically when you mount another partition to the same location).
Hmmm... haven't thought of that. So far the script only unmounts the USB partition so it is available for formatting. I will add an appropriate command to make sure /mnt is not already in use.
The wget part works for me, but I can confirm that it does not always work correctly with non-direct links.
(29th Jul, 2013 06:52 AM)Fred Wrote: [ -> ]The wget part works for me, but I can confirm that it does not always work correctly with non-direct links.

I always use "curl -L someurl", the -L causes curl to follow http redirects.
wget didn't download the correct file for me on Fedora so I assumed it wouldn't work on XBian as well (I currently can't access my RPi). However it works for me on Mint, so actually I'm not sure. "curl -L > file" should always work but is curl installed by default in XBian?
(29th Jul, 2013 05:37 PM)InspMustache Wrote: [ -> ]wget didn't download the correct file for me on Fedora so I assumed it wouldn't work on XBian as well (I currently can't access my RPi). However it works for me on Mint, so actually I'm not sure. "curl -L > file" should always work but is curl installed by default in XBian?

No, not there by default.
Well, I tried wget on XBian and it actually works, so no need to install curl. So for anyone still having troubles this is how to start the script. From the shell:

Code:
wget http://tinyurl.com/xbianusb-install
chmod +x xbianusb-install
./xbianusb-install
(30th Jul, 2013 12:23 AM)InspMustache Wrote: [ -> ]Well, I tried wget on XBian and it actually works, so no need to install curl. So for anyone still having troubles this is how to start the script. From the shell:

Code:
wget http://tinyurl.com/xbianusb-install
chmod +x xbianusb-install
./xbianusb-install

My curl comment was for Fred, I was saying curl can follow http redirects where wget fails.
Great work by all involved. Worked like a dream. Maybe it can be included into xbian-config and put into Beta 2.
I hate me too post but....
Just like to add this is working here too.
Anybody with before and after speedresults (quantitative or qualitative)

Or better yet, what is the best way to measure the speed difference.

Also, is there a way to switch back to the SD card when your USB-stick turns out to be slower than your SD-card?
wow, i got a sandisk ultra class 10, those are my results:
Terminal


xbian@xbian ~/xbian-toch $ sudo dd if=/dev/mmcblk0p1 of=/dev/null bs=32M count=10 iflag=direct
1+1 records in
1+1 records out
35651584 bytes (36 MB) copied, 1.83987 s, 19.4 MB/s
xbian@xbian ~/xbian-toch $ sudo hdparm -Tt /dev/mmcblk0p1

/dev/mmcblk0p1:
Timing cached reads: 64 MB in 2.03 seconds = 31.56 MB/sec
Timing buffered disk reads: 26 MB in 3.18 seconds = 8.18 MB/sec

I think this is very low for a class 10 card...
It is pretty fast:
http://elinux.org/RPi_SD_cards#Performance

@Smultie check the above link for speedtest instructions. But this does not say all of course, most important (at least to me) is how XBMC feels (does it feel faster).

You can turn back to SD card installation by undoing changes made in cmdline (step 7 from mk01 post somewhere). You will then return to your installation before you moved to USB, so any changes made won't apply.
Actually, since the perl command is set up to make a backup of your cmdline.txt, switching back should be as simple as this:
Code:
sudo rm /boot/cmdline.txt
sudo mv cmdline.txt.backup cmdline.txt
(30th Jul, 2013 07:06 PM)brantje Wrote: [ -> ]wow, i got a sandisk ultra class 10, those are my results:
Terminal


xbian@xbian ~/xbian-toch $ sudo dd if=/dev/mmcblk0p1 of=/dev/null bs=32M count=10 iflag=direct
1+1 records in
1+1 records out
35651584 bytes (36 MB) copied, 1.83987 s, 19.4 MB/s
xbian@xbian ~/xbian-toch $ sudo hdparm -Tt /dev/mmcblk0p1

/dev/mmcblk0p1:
Timing cached reads: 64 MB in 2.03 seconds = 31.56 MB/sec
Timing buffered disk reads: 26 MB in 3.18 seconds = 8.18 MB/sec

I think this is very low for a class 10 card...

There were substantial SD card improvements made to the RPi kernel around 6/2012 to 8/2012, so pay no attention to speed results before this date.

This is from a SanDisk 16GB Class 4 MicroSD in an adapter, your results are not good. I was even streaming a show from the internet when I tested the speed.

Code:
root@xbian:~# dd if=/dev/mmcblk0p1 of=/dev/null bs=32M count=10 iflag=direct
1+1 records in
1+1 records out
35651584 bytes (36 MB) copied, 1.61464 s, 22.1 MB/s

root@xbian:~# hdparm -Tt /dev/mmcblk0

/dev/mmcblk0:
Timing cached reads: 226 MB in 2.01 seconds = 112.63 MB/sec
Timing buffered disk reads: 62 MB in 3.09 seconds = 20.07 MB/sec
Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28
Reference URL's