sert00 wrote:Is there a way to use boot from sd,without pull-off emmc?something doable within yours odroid-utility where i can choose which (sd or emmc)storage will be used next reboot as a boot partition?
I don't know about mdrj's utility because I haven't tried it yet.
What I do when I want to change boot devices:
#1 figure out which device the bootloader will be looking at when it tries to boot (for X2 anyway, you have a switch on the board to select, but for others, it should
always be emmc first)
#2 mount the first partition (the vfat one) of that disk somewhere (or find it, if it's already mounted)
#3 check UUIDs of all attached drives. If two duplicate UUIDs exist for linux the partitions, either rename one disk's UUID (with tune2fs -U) or its Label (with tune2fs -L)
#4 change boot.scr on the actual boot device to point to new root device
(change the kernel boot line from root= to root=UUID=... or root=LABEL=...). (Instructions elswhere for regenerating boot.scr; also note that changing this doesn't change the default boot kernel)
#5 change fstab on the target
root filesystem (which is not necessarily the one where the kernel resides). Replace line for '/' (2nd field) so that the first field says UUID=... or LABEL=... as appropriate
Note that this with method you may end up with the bootloader loading the kernel from one device, but uinitrd and/or root filesystem being loaded from the other. This may lead to problems...
The other method of choosing a device to boot from is using the UART debug console. Connect to a (Linux) PC with it, run minicom (usually /dev/ttyUSB0, but check dmesg |tail output to be sure). First, run 'strings boot.scr' on your current boot.scr while the machine is still running. Copy that off into a file somewhere so you can copy and paste from it.
Next, reboot the machine, being ready to hit a key in minicom to interrupt the boot process. If you get a boot prompt, you can issue commands. It will also tell you what devices (SD/eMMC) the bootloader can see.
Now go back to the boot.scr. As an example, one I have says:
Code: Select all
boot.scr for X with HDMI auto-pr
setenv initrd_high "0xffffffff"
setenv fdt_high "0xffffffff"
setenv bootcmd "fatload mmc 0:1 0x40008000 zImage; fatload mmc 0:1 0x42000000 uInitrd; bootm 0x40008000 0x42000000"
setenv bootargs "console=tty1 console=ttySAC1,115200n8 root=UUID=e139ce78-9841-40fe-8823-96a304a09859 rootwait ro mem=2047M"
You want to copy and paste in all those lines (except the first, which is just a comment; if you do paste it in, it'll give an error you can ignore), but make two changes:
* fatload mmc 0:1 has to change to the correct boot device to find the kernel (I can't remember if it's 0:0 or 0:2 for the other device; check the boot messages!)
* change root= in the 'setenv bootargs' line the same way you would in method 1 above.
Using this method, if you picked the right device your kernel and associated files (modules, root file system, fstab) should all agree and there won't be a problem. Obviously, you do need the UART debug cable to do this...
I hope that helped.