I know it's not possible to directly boot from an external USB stick / drive, but instead you have to boot from the SD card and then the external device can take over. What's the easiest and preferred way to set this up, therefore boot from SD card and then let an external device take over? Thanks for any hint!
|
If you have an existing OS running on the Pi, then firstly it would be useful to know if the USB device is supported. You can do this by mounting it like normal:
If that fails then you wont be able to use the USB device as a root partition without enabling the kernel modules for it. And for that you may need to compile your own kernel. If it suceeds then it should work fine with some tweaking of the boot parameters that the Pi uses: On an existing image, open
All you must then do is flash that image to the SD card and boot the Pi. If all is well, I suggest that you copy the root partition from an existing Raspberry Pi image to your USB drive and use that to boot from. Let me know if you need any further information. |
|||||||||||||||
|
|
The easiest way to set this up would be to use BerryBoot. It supports installation to, or from, one or more images on a USB stick (or on the SD card itself) out of the box through a nice GUI interface. To set it up all you have to do is copy the ~70MB of install files on to a FAT32 formatted SD card, insert it into your device and boot away. It even has a list of preconfigured images that it can automatically download and install for you over an ethernet or wi-fi connection. You then select the OS you would like to be booted by default from your available images, and if you want to add new images or change the default at a later date you simply hit enter during the boot process to reconfigure! |
|||||
|
|
I prefer to use e2fs labels for partitions to UUIDs when not using lvm. e2label /dev/sda2 USBROOT for instance and then in /etc/fstab use : LABEL=USBROOT / ext4 ... |
|||||
|
|
ok, to clarify - further to @Jivings answer - There are several ways that you can refer to a disk in the fstab. Using /dev/sdXX might not always be safe, as the order that scsi disks appear may not be guaranteed. What I do not know, is if the boot configuration understands anything but basic device labels. "root=/dev/sda1" is an abstraction however, so in theory root=LABEL=TEST might work. I need to investigate. I apologize if I am not being very clear. I've got some skill gain to do in explaining linux to new folks, obviously. |
|||
|
|