[closed] Cannot boot from eMMC or SPI, SD card works

Post Reply
whoneyc
Posts: 15
Joined: Tue May 07, 2019 12:06 am
languages_spoken: english
ODROIDs: N2
Has thanked: 15 times
Been thanked: 0
Contact:

[closed] Cannot boot from eMMC or SPI, SD card works

Unread post by whoneyc » Tue May 07, 2019 12:20 am

Recently purchased an N2, and I am having trouble booting.

Observations:
  • With the switch in the SPI position, no boot: red LED only.
  • With the switch in the MMC position and my eMMC installed, no boot: red LED only.
  • With the switch in the MMC position and an SD card in the reader, successful boot.
Hardware:
  • Odroid N2 + PSU purchased from Ameridroid
  • 128Gb Red Circle eMMC drive (Ubuntu) purchased from Ameridroid
Fix attempts:
  • After the eMMC which was supposed to come with Ubuntu pre-loaded failed to boot, I used the SD card flashed with the latest image downloaded from the wiki. I'm on a Kubuntu machine, so I use `dd` to flash images. The SD card works great.
  • I purchased a USB to eMMC reader and checked the files that were on the eMMC drive. They looked fine.
  • I flashed a new image of Ubuntu onto the drive using `dd`. When I mounted the disks on my Kubuntu machine, they again looked correct. No boot on the N2 still.
  • I checked the power supply. It reads 12-13V unconnected, this is what I expect.
Is there a hardware fault? Is there some output from the SD card boot that would help diagnose this? Am I doing something incorrectly? How do I get my fancy 128Gb eMMC to play nice?

User avatar
mad_ady
Posts: 6780
Joined: Wed Jul 15, 2015 5:00 pm
languages_spoken: english
ODROIDs: XU4, C1+, C2, N1, H2, N2
Location: Bucharest, Romania
Has thanked: 215 times
Been thanked: 163 times
Contact:

Re: Cannot boot from eMMC or SPI, SD card works

Unread post by mad_ady » Tue May 07, 2019 1:46 am

What is the name of the image you flashed? Did you uncompress it before flashing? I guess you did if you can see the files.
For SPI there's an upgrade sdcard image on the wiki you can try.
These users thanked the author mad_ady for the post:
whoneyc (Fri May 10, 2019 1:31 am)

whoneyc
Posts: 15
Joined: Tue May 07, 2019 12:06 am
languages_spoken: english
ODROIDs: N2
Has thanked: 15 times
Been thanked: 0
Contact:

Re: Cannot boot from eMMC or SPI, SD card works

Unread post by whoneyc » Tue May 07, 2019 2:45 am

mad_ady wrote:
Tue May 07, 2019 1:46 am
What is the name of the image you flashed?
ubuntu-18.04.2-4.9-mate-odroid-n2-20190325.img
mad_ady wrote:
Tue May 07, 2019 1:46 am
Did you uncompress it before flashing? I guess you did if you can see the files.
Yes.
mad_ady wrote:
Tue May 07, 2019 1:46 am
For SPI there's an upgrade sdcard image on the wiki you can try.
I'm having trouble with flashing that image. I picked a different SD card and the following command fails:

Code: Select all

sudo dd if=~/Downloads/spiupdate_odroidn2_20190417+95.img of=/dev/sdb conv=fsync

whoneyc
Posts: 15
Joined: Tue May 07, 2019 12:06 am
languages_spoken: english
ODROIDs: N2
Has thanked: 15 times
Been thanked: 0
Contact:

Re: Cannot boot from eMMC or SPI, SD card works

Unread post by whoneyc » Tue May 07, 2019 5:02 am

Update:

Petitboot updated on the N2. It turns out the SD card I was using earlier was corrupted. So now I have new observations:
  • SPI boot works. Petitboot to the minimal shell works when no drives are inserted and the toggle switch is set to SPI mode.
  • SPI with eMMC installed does NOT work. Red light only when the eMMC is in, no matter which toggle is selected, SPI or MMC.
So the original problem remains.

Kernel
Posts: 29
Joined: Sun May 05, 2019 2:23 am
languages_spoken: english
ODROIDs: C1, C2, N2
Has thanked: 11 times
Been thanked: 4 times

Re: Cannot boot from eMMC or SPI, SD card works

Unread post by Kernel » Tue May 07, 2019 6:32 am

Regarding corruption:
Some people claim dd is archaic and is prone to errors since it's more of a multi-tool and not intended to function how it's modernly used.
You can try to use copy which is more robust and automatically handles the block size itself.

A command like "dd if=ubuntu.img of=/dev/sdb bs=4M && sync"
Is equiv to this "cp ubuntu.img /dev/sdb && sync"

Make sure to wait the first time you boot it up for it to expand the filesystem and it will turn off on its own when it's finished.
These users thanked the author Kernel for the post:
whoneyc (Fri May 10, 2019 1:30 am)

whoneyc
Posts: 15
Joined: Tue May 07, 2019 12:06 am
languages_spoken: english
ODROIDs: N2
Has thanked: 15 times
Been thanked: 0
Contact:

Re: Cannot boot from eMMC or SPI, SD card works

Unread post by whoneyc » Tue May 07, 2019 6:49 am

Kernel wrote:
Tue May 07, 2019 6:32 am
Regarding corruption:
Some people claim dd is archaic and is prone to errors since it's more of a multi-tool and not intended to function how it's modernly used.
You can try to use copy which is more robust and automatically handles the block size itself.

A command like "dd if=ubuntu.img of=/dev/sdb bs=4M && sync"
Is equiv to this "cp ubuntu.img /dev/sdb && sync"
Thank you for your opinion, however this does not address the fact that I can create an eMMC disk with appropriate partitions with bootable flags.
Kernel wrote:
Tue May 07, 2019 6:32 am
Make sure to wait the first time you boot it up for it to expand the filesystem and it will turn off on its own when it's finished.
Yep, I have done that with the SD card version. The eMMC does not boot though, and that is the big issue.

User avatar
tobetter
Posts: 4106
Joined: Mon Feb 25, 2013 10:55 am
languages_spoken: Korean, English
ODROIDs: X, X2, U2, U3, XU3, C1
Location: Paju, South Korea
Has thanked: 46 times
Been thanked: 207 times
Contact:

Re: Cannot boot from eMMC or SPI, SD card works

Unread post by tobetter » Tue May 07, 2019 10:47 am

@whonesyc, can you boot from SD card while eMMC is attached?
If so, would you please share the full kernel log with dmesg?
These users thanked the author tobetter for the post:
whoneyc (Fri May 10, 2019 1:30 am)

whoneyc
Posts: 15
Joined: Tue May 07, 2019 12:06 am
languages_spoken: english
ODROIDs: N2
Has thanked: 15 times
Been thanked: 0
Contact:

Re: Cannot boot from eMMC or SPI, SD card works

Unread post by whoneyc » Tue May 07, 2019 11:13 pm

tobetter wrote:
Tue May 07, 2019 10:47 am
@whonesyc, can you boot from SD card while eMMC is attached?
If so, would you please share the full kernel log with dmesg?
No, the system will not boot from the SD card while the eMMC is attached. All I can do is boot from SD and then attach the eMMC. Doing so does not show any connection to the eMMC hard events in the normal logs. The added drive does not appear in `lsusb`, `lshw`, `fdisk`, etc.

Based on the boot order flowchart here, It would appear that when the eMMC drive and the SD card is connected before startup and the toggle is set to MMC, the boot sequence attempts to boot from the eMMC with priority. It fails, but it does not switch to the next available device in the sequence. Presumably there is an "enable" bit set somewhere on either the eMMC card or the reader that detects that a card is attached and prevents the next part of the sequence to occur.

User avatar
tobetter
Posts: 4106
Joined: Mon Feb 25, 2013 10:55 am
languages_spoken: Korean, English
ODROIDs: X, X2, U2, U3, XU3, C1
Location: Paju, South Korea
Has thanked: 46 times
Been thanked: 207 times
Contact:

Re: Cannot boot from eMMC or SPI, SD card works

Unread post by tobetter » Tue May 07, 2019 11:33 pm

whoneyc wrote:
Tue May 07, 2019 11:13 pm
tobetter wrote:
Tue May 07, 2019 10:47 am
@whonesyc, can you boot from SD card while eMMC is attached?
If so, would you please share the full kernel log with dmesg?
No, the system will not boot from the SD card while the eMMC is attached. All I can do is boot from SD and then attach the eMMC. Doing so does not show any connection to the eMMC hard events in the normal logs. The added drive does not appear in `lsusb`, `lshw`, `fdisk`, etc.

Based on the boot order flowchart here, It would appear that when the eMMC drive and the SD card is connected before startup and the toggle is set to MMC, the boot sequence attempts to boot from the eMMC with priority. It fails, but it does not switch to the next available device in the sequence. Presumably there is an "enable" bit set somewhere on either the eMMC card or the reader that detects that a card is attached and prevents the next part of the sequence to occur.
Since eMMC is not removable storage like SD card, attaching later after booting won't make it be recognized.

If your ODROID-N2 cannot boot from SD card while eMMC is attached, probably eMMC has U-boot on it such that the U-boot on eMMC is loaded and not proceeding more. If you are able to see the blue LED is on, not blinking, then it says then your ODROID-N2 is stuck on U-boot. If so, please do fill zero of 1MB on your eMMC in order to remove U-boot, you can do this dd if=/dev/zero of=<your/eMMC/path> bs=1M count=1 conv=fsync. Please do this and try to boot with SD card while eMMC is attached.

If the above does not work, please do update SPI with the latest image. And boot from SPI while SD card nor eMMC are not attached. If you have failed to update SPI flash memory or cannot boot from SPI nor eMMC, I doubt if eMMC/SPI nets have defected for some reason.
https://wiki.odroid.com/odroid-n2/os_im ... _to_update
These users thanked the author tobetter for the post:
whoneyc (Fri May 10, 2019 1:30 am)

User avatar
mad_ady
Posts: 6780
Joined: Wed Jul 15, 2015 5:00 pm
languages_spoken: english
ODROIDs: XU4, C1+, C2, N1, H2, N2
Location: Bucharest, Romania
Has thanked: 215 times
Been thanked: 163 times
Contact:

Re: Cannot boot from eMMC or SPI, SD card works

Unread post by mad_ady » Wed May 08, 2019 1:21 am

One more thing to test - is emmc visible/bootable if you attach it to the sd port via the emmc2sd adapter?
These users thanked the author mad_ady for the post:
whoneyc (Fri May 10, 2019 1:30 am)

whoneyc
Posts: 15
Joined: Tue May 07, 2019 12:06 am
languages_spoken: english
ODROIDs: N2
Has thanked: 15 times
Been thanked: 0
Contact:

Re: Cannot boot from eMMC or SPI, SD card works

Unread post by whoneyc » Wed May 08, 2019 2:47 am

tobetter wrote:
Tue May 07, 2019 11:33 pm
Since eMMC is not removable storage like SD card, attaching later after booting won't make it be recognized.
I knew that eMMC is usually like that, but I wasn't sure about the ODROID miniboard. I wasn't sure if it had some other capabilities which treated it similar removable media.
tobetter wrote:
Tue May 07, 2019 11:33 pm
If your ODROID-N2 cannot boot from SD card while eMMC is attached, probably eMMC has U-boot on it such that the U-boot on eMMC is loaded and not proceeding more. If you are able to see the blue LED is on, not blinking, then it says then your ODROID-N2 is stuck on U-boot. If so, please do fill zero of 1MB on your eMMC in order to remove U-boot, you can do this dd if=/dev/zero of=<your/eMMC/path> bs=1M count=1 conv=fsync. Please do this and try to boot with SD card while eMMC is attached.
This helped. I now boot from the SD card while the eMMC is installed. I pulled some information from `dmesg` (pastebin link) and `fdisk` (pastebin link). It would appear that the eMMC has two boot sectors (device id is /dev/mmcblk0). This does not show where those sectors are on the disk, so one might be the /dev/zero we dd'd in while the other is the original boot sector.

When I try to mount /dev/mmcblk0 I get:

Code: Select all

$ sudo mount /dev/mmcblk0 /media/test
mount: /media/test: wrong fs type, bad option, bad superblock on /dev/mmcbli0, missing codepage or helper program, or other error
Suggestions on course to take from here? Superblock errors make me nervous because I have suffered too many lost SD cards and HDD drives in the past.
tobetter wrote:
Tue May 07, 2019 11:33 pm
If the above does not work, please do update SPI with the latest image. And boot from SPI while SD card nor eMMC are not attached. If you have failed to update SPI flash memory or cannot boot from SPI nor eMMC, I doubt if eMMC/SPI nets have defected for some reason.
https://wiki.odroid.com/odroid-n2/os_im ... _to_update
I updated the SPI based on an earlier post and that part works fine.
mad_ady wrote:
Wed May 08, 2019 1:21 am
One more thing to test - is emmc visible/bootable if you attach it to the sd port via the emmc2sd adapter?
I don't have an emmc2sd converter. I only have the USB stick version.

User avatar
mad_ady
Posts: 6780
Joined: Wed Jul 15, 2015 5:00 pm
languages_spoken: english
ODROIDs: XU4, C1+, C2, N1, H2, N2
Location: Bucharest, Romania
Has thanked: 215 times
Been thanked: 163 times
Contact:

Re: Cannot boot from eMMC or SPI, SD card works

Unread post by mad_ady » Wed May 08, 2019 3:04 am

Ok, by overwriting the first MB with 0s you've also deleted its partition table.

The partitions are still there (they start after 1M), but the mbr is lost. You can attempt to manually recreate the mbr (with fdisk) and offsets from mmcblk1, but you'd still have to install uboot.

If you don't care about the data try flashing it again with dd/etcher.
These users thanked the author mad_ady for the post:
whoneyc (Fri May 10, 2019 1:30 am)

whoneyc
Posts: 15
Joined: Tue May 07, 2019 12:06 am
languages_spoken: english
ODROIDs: N2
Has thanked: 15 times
Been thanked: 0
Contact:

Re: Cannot boot from eMMC or SPI, SD card works

Unread post by whoneyc » Wed May 08, 2019 3:54 am

mad_ady wrote:
Wed May 08, 2019 3:04 am
Ok, by overwriting the first MB with 0s you've also deleted its partition table.

The partitions are still there (they start after 1M), but the mbr is lost. You can attempt to manually recreate the mbr (with fdisk) and offsets from mmcblk1, but you'd still have to install uboot.

If you don't care about the data try flashing it again with dd/etcher.
I need a sanity check on what I'm doing here. My order of operations are:
  1. Flash ubuntu image to eMMC
  2. Build U-Boot (I need to find an x86 computer to do this)
  3. Use sd_fuse to put U-Boot on the eMMC
  4. Start N2 with eMMC and toggle on MMC
I feel like I am reading the directions wrong.

User avatar
mad_ady
Posts: 6780
Joined: Wed Jul 15, 2015 5:00 pm
languages_spoken: english
ODROIDs: XU4, C1+, C2, N1, H2, N2
Location: Bucharest, Romania
Has thanked: 215 times
Been thanked: 163 times
Contact:

Re: Cannot boot from eMMC or SPI, SD card works

Unread post by mad_ady » Wed May 08, 2019 4:47 am

You should need just the first step: Flash ubuntu image to eMMC. It includes uboot at the correct offsets.
If you just restore the mbr on the existing emmc it should be bootable over spi.
These users thanked the author mad_ady for the post:
whoneyc (Fri May 10, 2019 1:30 am)

whoneyc
Posts: 15
Joined: Tue May 07, 2019 12:06 am
languages_spoken: english
ODROIDs: N2
Has thanked: 15 times
Been thanked: 0
Contact:

Re: Cannot boot from eMMC or SPI, SD card works

Unread post by whoneyc » Wed May 08, 2019 6:33 am

mad_ady wrote:
Wed May 08, 2019 4:47 am
You should need just the first step: Flash ubuntu image to eMMC. It includes uboot at the correct offsets.
If you just restore the mbr on the existing emmc it should be bootable over spi.
That's a problem though. I flashed the image just now to test before I wrote this comment, and it still does not work correctly.

I'm running through `testdisk` right now, and the GPT table is not found. I'm going to go digging around to find the available drives. Of note, it appears the boot partition starting at 2048 is formatted as FAT16 instead of FAT32 as is stated in the wiki: https://wiki.odroid.com/odroid-n2/softw ... tion_table. Plus the CHS values are all messed up, I'm getting warnings about head/track mismatches.

User avatar
tobetter
Posts: 4106
Joined: Mon Feb 25, 2013 10:55 am
languages_spoken: Korean, English
ODROIDs: X, X2, U2, U3, XU3, C1
Location: Paju, South Korea
Has thanked: 46 times
Been thanked: 207 times
Contact:

Re: Cannot boot from eMMC or SPI, SD card works

Unread post by tobetter » Wed May 08, 2019 8:23 am

whoneyc wrote:
mad_ady wrote:
Wed May 08, 2019 4:47 am
You should need just the first step: Flash ubuntu image to eMMC. It includes uboot at the correct offsets.
If you just restore the mbr on the existing emmc it should be bootable over spi.
That's a problem though. I flashed the image just now to test before I wrote this comment, and it still does not work correctly.

I'm running through `testdisk` right now, and the GPT table is not found. I'm going to go digging around to find the available drives. Of note, it appears the boot partition starting at 2048 is formatted as FAT16 instead of FAT32 as is stated in the wiki: https://wiki.odroid.com/odroid-n2/softw ... tion_table. Plus the CHS values are all messed up, I'm getting warnings about head/track mismatches.
After zeroing the 1MB of eMMC and can boot from SD card while eMMC is attched, can you try if SPI can boot from? Obviously the boot switch must be placed at SPI. If it works, then eMMC module is a bit suspicious. Would you please picture the PCB both side and attach them?

Since you've done some research, for SD and eMMC, ODROID does not use GPT, only FAT partition table and the boot partition could be FAT16 or FAT32, the wiki page should be corrected.

"Tapatalk wishes you to have fun with ODROID"

These users thanked the author tobetter for the post:
whoneyc (Fri May 10, 2019 1:30 am)

whoneyc
Posts: 15
Joined: Tue May 07, 2019 12:06 am
languages_spoken: english
ODROIDs: N2
Has thanked: 15 times
Been thanked: 0
Contact:

Re: Cannot boot from eMMC or SPI, SD card works

Unread post by whoneyc » Thu May 09, 2019 2:02 am




CLICK THUMBNAILS TO INCREASE SIZE



tobetter wrote:
Wed May 08, 2019 8:23 am
After zeroing the 1MB of eMMC and can boot from SD card while eMMC is attched, can you try if SPI can boot from? Obviously the boot switch must be placed at SPI. If it works, then eMMC module is a bit suspicious.

Code: Select all

$ sudo dd if=/dev/zero of=/dev/sdb bs=1M count=1 conv=fsync status=progress
1+0 records in
1+0 records out
1048576 bytes (1.0 MB, 1.0 MiB) copied, 0.0309419 s, 33.9 MB/s
Test 01:
Toggle: SPI Mode
eMMC: Inserted
SD Card: none
Result: No boot. Red light only.
Image

Test 02:
Toggle: SPI Mode
eMMC: none
SD Card: Inserted
Result: Boots to SPI bootloader.
Image

Test 03:
Toggle: SPI Mode
eMMC: Inserted
SD Card: Inserted
Result: Boots to SD Card
Image
tobetter wrote:
Wed May 08, 2019 8:23 am
Would you please picture the PCB both side and attach them?
eMMC Receptacle Closeup, 10x zoom
Image

N2 Top
Image

eMMC Board Back, 10x zoom
Image

None of the contacts appear to be dirty, and there seems to be no solder bridging on the connector. Do you need photos of the N2 Back? I will need to figure out out to take off the heatsink to do that, but I would prefer not to try and mess things up if not necessary.

whoneyc
Posts: 15
Joined: Tue May 07, 2019 12:06 am
languages_spoken: english
ODROIDs: N2
Has thanked: 15 times
Been thanked: 0
Contact:

Re: Cannot boot from eMMC or SPI, SD card works

Unread post by whoneyc » Thu May 09, 2019 2:37 am

I ran testdisk with an Intel/PC type MBR. Pastebin link to results. TL;DR-- Bad sector and not bootable.

Unless someone says something otherwise, I am going to begin the RMA process through Ameridroid.

Ameridroid
Posts: 228
Joined: Thu Mar 17, 2016 4:19 am
languages_spoken: english
Has thanked: 17 times
Been thanked: 21 times
Contact:

Re: Cannot boot from eMMC or SPI, SD card works

Unread post by Ameridroid » Thu May 09, 2019 6:16 am

whoneyc wrote:
Thu May 09, 2019 2:37 am
I ran testdisk with an Intel/PC type MBR. Pastebin link to results. TL;DR-- Bad sector and not bootable.

Unless someone says something otherwise, I am going to begin the RMA process through Ameridroid.
Yes, contact us to send it back and we will replace it with a verified working one. Then, we'll do some further testing on yours.
These users thanked the author Ameridroid for the post:
whoneyc (Fri May 10, 2019 1:30 am)

User avatar
tobetter
Posts: 4106
Joined: Mon Feb 25, 2013 10:55 am
languages_spoken: Korean, English
ODROIDs: X, X2, U2, U3, XU3, C1
Location: Paju, South Korea
Has thanked: 46 times
Been thanked: 207 times
Contact:

Re: Cannot boot from eMMC or SPI, SD card works

Unread post by tobetter » Thu May 09, 2019 8:23 am

whoneyc wrote:I ran testdisk with an Intel/PC type MBR. Pastebin link to results. TL;DR-- Bad sector and not bootable.

Unless someone says something otherwise, I am going to begin the RMA process through Ameridroid.
Thank you for the very detail test. One thing what I am curious is that Test03, does it boot from SPI and Petitboot, or directly boot to SD card? If it boots to SD card directly, then eMMC module itself would have defected somehow. Whenever eMMC breaks the boot procedues, I guess.

"Tapatalk wishes you to have fun with ODROID"

These users thanked the author tobetter for the post:
whoneyc (Fri May 10, 2019 1:30 am)

whoneyc
Posts: 15
Joined: Tue May 07, 2019 12:06 am
languages_spoken: english
ODROIDs: N2
Has thanked: 15 times
Been thanked: 0
Contact:

Re: Cannot boot from eMMC or SPI, SD card works

Unread post by whoneyc » Thu Jun 06, 2019 5:52 am

Follow-up: I got the new eMMC drive in the mail from an RMA with Ameridroid. The new drive works correctly in the same N2.

Post Reply

Return to “Issues”

Who is online

Users browsing this forum: No registered users and 0 guests