[HOW-TO] Fix SD image to boot with eMMC attch (OSuSE/Fedora)

Post Reply
don_apple
Posts: 32
Joined: Thu Apr 18, 2013 3:09 am
languages_spoken: german english
ODROIDs: ODROID-X2
Location: Germany
Contact:

[HOW-TO] Fix SD image to boot with eMMC attch (OSuSE/Fedora)

Unread post by don_apple » Mon Apr 22, 2013 3:46 am

Since booting from the SD card fails when the eMMC is connected (at least with the current Fedora 18 image), here are some instructions to fix this:
  1. Remove the eMMC and boot your ODROID from the SD card
  2. When the OS is up and running, open a root-shell (either by using the terminal program inside the OS, or via the UART-to-USB console)
  3. go to '/boot'

    Code: Select all

    # cd /boot
  4. extract the current settings from the boot.scr file (do not try to edit the boot.scr directly, it will render the OS on the SD card unbootable)

    Code: Select all

    # strings boot.scr >> boot.txt
  5. replace root=/dev/mmcblk0p2 with root=/dev/mmcblk1p2 in the boot.txt using your favorite text editor, sed, or whichever tool you prefer. The boot.txt should look similar to the following afterwards:

    Code: Select all

    # cat boot.txt
    setenv initrd_high "0xffffffff"
    setenv fdt_high "0xffffffff"
    setenv fb_x_res "1280"
    setenv fb_y_res "720"
    setenv hdmi_phy_res "720"
    setenv bootcmd "fatload mmc 0:1 0x40008000 zImage; bootm 0x40008000"
    setenv bootargs "console=tty1 console=ttySAC1,115200n8 fb_x_res=${fb_x_res} fb_y_res=${fb_y_res} hdmi_phy_res=${hdmi_phy_res} root=/dev/mmcblk1p2 rootwait rw mem=2047M"
    boot
    
  6. Create a new boot.scr from the modified boot.txt

    Code: Select all

    # mkimage -A arm -T script -C none -n "boot.scr for ODROID" -d boot.txt boot.scr
  7. Power off the ODROID, reattach the eMMC and switch the ODROID back on, which should now boot from the SD card without problems

mdrjr
Site Admin
Posts: 11697
Joined: Fri Feb 22, 2013 11:34 pm
languages_spoken: english, portuguese
ODROIDs: -
Location: Brazil
Contact:

Re: [HOW-TO] Fix SD image to boot with eMMC attch (OSuSE/Fed

Unread post by mdrjr » Mon Apr 22, 2013 8:28 am

Hi!

I've fixed the title, this applies to Fedora and OpenSUSE :)

xgzhang
Posts: 21
Joined: Mon Apr 22, 2013 5:35 pm
languages_spoken: english
ODROIDs: odroid-x2
Contact:

Re: [HOW-TO] Fix SD image to boot with eMMC attch (OSuSE/Fed

Unread post by xgzhang » Mon Apr 22, 2013 5:43 pm

hi ,i meet the same problem,my board is odroid-x2,if boot from sd when both connect sd and emmc ,how to modify the kernel code,thanks

don_apple
Posts: 32
Joined: Thu Apr 18, 2013 3:09 am
languages_spoken: german english
ODROIDs: ODROID-X2
Location: Germany
Contact:

Re: [HOW-TO] Fix SD image to boot with eMMC attch (OSuSE/Fed

Unread post by don_apple » Mon Apr 22, 2013 5:53 pm

mdrjr wrote:Hi!

I've fixed the title, this applies to Fedora and OpenSUSE :)
Thanks mdrjr! I wasn't sure which other distros besides Fedora were affected by this issue as well.

Regards,
don_apple

kibergus
Posts: 401
Joined: Sat Feb 23, 2013 11:23 pm
languages_spoken: english, russian
ODROIDs: U2 X2
Contact:

Re: [HOW-TO] Fix SD image to boot with eMMC attch (OSuSE/Fed

Unread post by kibergus » Mon Apr 22, 2013 8:48 pm

don_apple wrote:Thanks mdrjr! I wasn't sure which other distros besides Fedora were affected by this issue as well.
Other distros (I'm sure about ubuntu) use UUID for selecting boot partition. So they endure device name changes. But it has another drawback: if you flash the same image to SD card and to eMMC you end up with partitions with the same UUID. As a result you would be able to boot only from one of them. To fix it you need to change UUID with tune2fs and write it to boot.scr and to fstab.

Post Reply

Return to “Ubuntu (All Linux'es)”

Who is online

Users browsing this forum: No registered users and 3 guests