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
@skinlee78 Please reread the whole thread again.

If you are running a btrfs file system dd is not the command to use.

@brice83 - Looking at dmesg shows a lot of corruption.

As you are also getting USB errors, this seems to point to a power issue. Can you check the power to the RPi and USB hub
(24th Dec, 2013 11:54 PM)IriDium Wrote: [ -> ]@skinlee78 Please reread the whole thread again.

If you are running a btrfs file system dd is not the command to use.

@brice83 - Looking at dmesg shows a lot of corruption.

As you are also getting USB errors, this seems to point to a power issue. Can you check the power to the RPi and USB hub

i'm out of town, will check usb hub and pi power later in the week and will report back
Hello all,
Im also trying to boot XBian from USB.
I copied the SD to the USB (sda1) with the XBian-copier option 6.
Now, i wanted to edit the cmdline.txt, but it says "root=LABEL=xbian-beta2" instead of "root=/dev/mmcblk0p2" which i changed to "root=/dev/sda1"
Is there a way to see if its booting from the USB?
(26th Dec, 2013 12:38 AM)phunkhead Wrote: [ -> ]Hello all,
Im also trying to boot XBian from USB.
I copied the SD to the USB (sda1) with the XBian-copier option 6.
Now, i wanted to edit the cmdline.txt, but it says "root=LABEL=xbian-beta2" instead of "root=/dev/mmcblk0p2" which i changed to "root=/dev/sda1"
Is there a way to see if its booting from the USB?
If you do df -h you should see that root "/" is mounted on /dev/sda1
If it is /dev/mmcblck0p2 then it is not mounting via the USB
(26th Dec, 2013 12:38 AM)phunkhead Wrote: [ -> ]Hello all,
Im also trying to boot XBian from USB.
I copied the SD to the USB (sda1) with the XBian-copier option 6.
Now, i wanted to edit the cmdline.txt, but it says "root=LABEL=xbian-beta2" instead of "root=/dev/mmcblk0p2" which i changed to "root=/dev/sda1"
Is there a way to see if its booting from the USB?

@phunkhead

if you run
Code:
sudo blkid

you will see that this is the same filesystem, just called with different kind of name. /dev/mmcblk0p2 should have label (name) "xbian-beta2".

so yes, you changed correctly.
Hey guys!
I've been using Xbian for a while now and a couple of weeks ago I decided to use the Xbian copier in the config tool to copy Xbian to an USB flash drive.
First I created a partion on my USB flash drive and then I launched the copy tool and provided /dev/sda1 as destination.

After that I changed the boot devices in /boot/cmdline to /dev/sda1. currently cmdline.txt looks like this
Code:
sdhci-bcm2708.sync_after_dma=0 dwc_otg.lpm_enable=0 console=tty1 root=/dev/sda1 rootflags=subvol=root/@,autodefrag,compress=lzo rootfstype=btrfs rootwait=10 smsc95xx.turbo_mode=Y elevator=cfq logo.nologo quiet noswap loglevel=0 mod_scsi.scan=sync partswap startevent=mountall splash nohdparm --startup-event mountall

The problem now is that when, before powering on I plug in my other USB hard disk (used for videos and other content), Xbian won't launch. After booting and briefly seeing the Xbian loading screen, the screen stops with this message:
Code:
bin/sh: can't access tty: job control turned off

When I unplug the external HD, Xbian starts fine.

Does anyone of you have any clue about what is going on here?
The weird thing is that this was working fine when I used the usb copy script mentioned earlier in this thread, when this copy tool was not available.
kernel detects your second disk faster as your XBian install. that's why it becomes sda1 and of course there is no system, system fail to boot.

instead of using root=/dev/sda1 in cmdline.txt, use LABEL or UUID of your boot drive.

remove the second drive, boot XBian, ssh into console and do:
Code:
sudo -i
blkid -s UUID -o value /dev/root
blkid -s LABEL -o value /dev/root

the UUID get's returned you can use in cmdline.txt like this:
Code:
………… root=UUID=12be0411-8c24-4a0f-b58d-bf8978c99398 …………

(your actual UUID will be different). or the LABEL
Code:
………… root=LABEL=xbian-root-btrfs …………
(26th Dec, 2013 08:15 AM)mk01 Wrote: [ -> ]kernel detects your second disk faster as your XBian install. that's why it becomes sda1 and of course there is no system, system fail to boot.

instead of using root=/dev/sda1 in cmdline.txt, use LABEL or UUID of your boot drive.

remove the second drive, boot XBian, ssh into console and do:
Code:
sudo -i
blkid -s UUID -o value /dev/root
blkid -s LABEL -o value /dev/root

the UUID get's returned you can use in cmdline.txt like this:
Code:
………… root=UUID=12be0411-8c24-4a0f-b58d-bf8978c99398 …………

(your actual UUID will be different). or the LABEL
Code:
………… root=LABEL=xbian-root-btrfs …………

Thanks! That did the trick!
In the meanwhile I also read how to change the label, maybe I want to do that because mine is having an ugly label called "xbian-backup". Reading this nice instruction tells how to do it, the only thing is that the file system needs to be unmounted which is not easy to do with a running pi. I think i'll leave it for what it is, I'll do no harm Smile
if you have USB keyboard, as RPI starts booting (you plug AC), hold left shift down. initramfs will drop you down to the recovery session. umount /rootfs , change label, run "reb" (it will umount all, sync and reboot)

second option is to boot from your SD ! you still have the XBian you made USB copy from, no? put /dev/mmcblk0p2 back, let it boot. change label, reboot into USB.

and few other options, but this should be enough.
In my experience, when booting from a USB I have the "Boot" USB drive in the first USB slot, and then followed by other drives. So dmesg will show something like:

[ 4.622829] hub 1-1.2:1.0: USB hub found
[ 4.624307] hub 1-1.2:1.0: 4 ports detected
[ 5.027182] usb 1-1.2.1: Product: Mass Storage Device
[ 5.027194] usb 1-1.2.1: Manufacturer: JetFlash ------------> Boot
[ 12.076450] usb 1-1.2.3: Product: Ext HDD 1021
[ 12.076464] usb 1-1.2.3: Manufacturer: Western Digital ---------> Movies


This has always worked for me.
(24th Dec, 2013 11:54 PM)IriDium Wrote: [ -> ]@skinlee78 Please reread the whole thread again.

If you are running a btrfs file system dd is not the command to use.

@brice83 - Looking at dmesg shows a lot of corruption.

As you are also getting USB errors, this seems to point to a power issue. Can you check the power to the RPi and USB hub
i've use the same accesories(sd card, usb key and power supplies) to install raspbmc and thereis no problem. but in xbian the usb is always reset during xbian-copy ("new high-speed USB device number 5 using dwc_otg")and it is why there is a lot of corruption.
I was just wondering if the usb install process can be repated.
What I mean by that is, if I want to do another image of the existing sd card on to a newly formated usb drive. Is that possible?
Just to clarify I first revert back the changes on the /boot/cmdline.txt to say =/dev/mmcblk0p2 and reboot followed by inserting the new usb and select option to do another image from the xbian-config menu. And of course change the /boot/cmdline.txt back to root= /dev/sdxx /
@macsimus:

Sure, why not? But please note: Changes that are stored on your formerly USB stick won't be there of course. If you do it just again, you will
get to the state back like when you copied it to your formerly stick the first time. If you don't want to lose any changes made by you that are
stored on the stick you want to exchange, why don't you just copy from USB stick to USB stick?

Think the easiest way is to first redo the copy via xbian-config like you want to do. That way you are sure, that the new stick gets the right
partition and formation. Afterwards copy your files from your old stick to the new one. That way you swapped the USB stick but won't notice
any change in your XBMC.
Thats good to hear. That will save me some time when I wanna have another fresh start. Thank you.
@macsimus In reality you could make multiple copies one after another. Just plug in USB1, USB2, USBn and then rerun the copy program using sda1, sda2, sdan as the case may be.
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