Solved: Cubox-i and RPi 2 booting from USB (WARNING)
|
17th Mar, 2015, 01:55 AM
Post: #1
|
|||
|
|||
Cubox-i and RPi 2 booting from USB (WARNING)
I successfully used the xbian-copier on the CB and changed the boot.scr.txt to point to sda1. Rebooted and all worked as expected.
However, (This was reported in the CB thread) that when additional USB drives were attached the CB failed to boot. It seemed that the drive locations change during a reboot - possibly USB hub get's priority over the CB USB port. Removing all additional USB drives, the CB booted off of the USB boot drive successfully. So I tried it on the RPI2 with full updates. NB: **** The Xbian-copier works on copy and image creation (I restored from the img file created) All went well. Used the Xbian-copier to write to a USB flash drive, changed cmdline.txt to point to sda1 and it booted successfully. ******** THIS IS WHERE IT ALL WENT WRONG ********** I then attached a USB HDD and a USB Flash drive and rebooted. The boot USB was in the RPi2 (Slot 1 if 1 is top left as looking at the 4 ports) and the others on a USB HUB. The system seemed to boot with the xbian init screen and then I saw resize, copying root directory and then it hung. Checking the USB drives, I saw that my USB Flash drive now had xbian files written to it. It would seem that "somewhere" the kernel is favouring another port as sda1 when additional USB ports are used. BUT what is more worrying is that XBian started writing files to my USB Flash drive and even began to partition it. Has anyone managed to get the CB or RPi2 to boot from the USB in the same scenario? Please read before you post How to post a log file If you liked my help, click on "Thanks" to show your appreciation.
|
|||
17th Mar, 2015, 11:23 AM
Post: #2
|
|||
|
|||
RE: Cubox-i and RPi 2 booting from USB (WARNING)
Couldn't that be easily resolved with udev?
Please read rules and do a search before you post! | FAQs | How to post log file? | Can't find an answer? Contact us. |
|||
17th Mar, 2015, 12:16 PM
Post: #3
|
|||
|
|||
RE: Cubox-i and RPi 2 booting from USB (WARNING)
This is pretty normal - see http://www.ibm.com/developerworks/library/l-boot-rootfs/ for a ~detailed explanation.
Use the label or UUID of the partition. So change "root=/dev/something" in cmdline.txt to root=LABEL=xbian or root=UUID=123456. Both are shown in the output of "blkid": Terminal xbian@xbian ~ $ sudo blkid /dev/mmcblk0p1: SEC_TYPE="msdos" LABEL="xbianboot" UUID="E79D-A183" TYPE="vfat" /dev/mmcblk0p2: LABEL="xbian" UUID="9852b9d5-35a5-4132-964f-e07532dad70f" UUID_SUB="94ba7d57-7ac1-44d3-b149-8f179d339959" TYPE="btrfs" /dev/root: LABEL="xbian" UUID="9852b9d5-35a5-4132-964f-e07532dad70f" UUID_SUB="94ba7d57-7ac1-44d3-b149-8f179d339959" TYPE="btrfs" See also the wiki: http://wiki.xbian.org/doku.php/installation_usb#to_another_device |
|||
17th Mar, 2015, 12:28 PM
Post: #4
|
|||
|
|||
RE: Cubox-i and RPi 2 booting from USB (WARNING)
@menakite Nice diagnosis.
Please read rules and do a search before you post! | FAQs | How to post log file? | Can't find an answer? Contact us. |
|||
17th Mar, 2015, 07:00 PM
Post: #5
|
|||
|
|||
RE: Cubox-i and RPi 2 booting from USB (WARNING)
Wonderful. That was my thought to use the UUID but I didn't know how. Will give it a go.
Please read before you post How to post a log file If you liked my help, click on "Thanks" to show your appreciation.
|
|||
18th Mar, 2015, 12:52 AM
Post: #6
|
|||
|
|||
RE: Cubox-i and RPi 2 booting from USB (WARNING)
Ok, It's now running on the Flash Drive.
However, I have noticed that the original swap partition (on the SD card) is still being used. Is there a way to stop it being used? There's nothing in FSTAB. I guess I could just reformat it but then I'd have issues if I wanted to go back to the SD card for whatever reason. Please read before you post How to post a log file If you liked my help, click on "Thanks" to show your appreciation.
|
|||
18th Mar, 2015, 06:05 AM
Post: #7
|
|||
|
|||
RE: Cubox-i and RPi 2 booting from USB (WARNING)
I think I tried removing the swap partition and it was regenerated, I could be mistaken though. I have just been using 'sudo swapoff - a' since I rarely reboot.
Please read rules and do a search before you post! | FAQs | How to post log file? | Can't find an answer? Contact us. |
|||
18th Mar, 2015, 07:43 AM
(This post was last modified: 18th Mar, 2015 07:44 AM by menakite.)
Post: #8
|
|||
|
|||
RE: Cubox-i and RPi 2 booting from USB (WARNING)
Add "noswap" to your cmdline.txt. It prevents the creation of a swap partition on boot (but existing ones should be deleted manually).
I didn't need it even on a Pi 1 (512 MB). |
|||
18th Mar, 2015, 08:04 PM
Post: #9
|
|||
|
|||
RE: Cubox-i and RPi 2 booting from USB (WARNING)
Ok, thanks. Looks like the best way is to delete the swap partition on the SD card as it looks like XBian (Debian) allocates all drives that are classed as "SWAP".
I still want "some" swap but not on the SD card or at least as a last resort. I can't see a way to lower the priority on just one swap partition. So it will swap to the flash drive first and only if necessary to the SD card. On another note: I tried "many times" to create a boot partition on a SSD USB "Hard drive" without success. It gets as far as init and then just reboots. I've tried dev/sda1 UUID=xxxx but without any success. Is this because it's not recognised as a USB drive? Please read before you post How to post a log file If you liked my help, click on "Thanks" to show your appreciation.
|
|||
19th Mar, 2015, 10:31 PM
Post: #10
|
|||
|
|||
RE: Cubox-i and RPi 2 booting from USB (WARNING)
(18th Mar, 2015 08:04 PM)IriDium Wrote: I still want "some" swap but not on the SD card or at least as a last resort. I can't see a way to lower the priority on just one swap partition. So it will swap to the flash drive first and only if necessary to the SD card. It seems a swap priority problem You can set different priorities in fstab or with swapon /dev/sda1 none swap defaults,pri=100 0 0 /dev/sdb2 none swap defaults,pri=10 0 0 # swapon -p 100 /dev/sda1 But maybe I'm mistaken since I don't kwown Cubox |
|||
« Next Oldest | Next Newest »
|