Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Copy trusty from SD card to eMMC doesnt' work (beaglebone black) #33

Open
ferraith opened this issue Aug 20, 2014 · 5 comments
Open

Copy trusty from SD card to eMMC doesnt' work (beaglebone black) #33

ferraith opened this issue Aug 20, 2014 · 5 comments

Comments

@ferraith
Copy link

Hello!

I tried a netinstall of trusty on a beaglebone black using your script. First of all a tried to directly install it on the internal eMMC. During the ubuntu installation process the internal eMMC isn't detected anymore.

After some research with google I found out that the netinstall script doesn't work for installations directly on eMMC. (#17)

So I did a "normal" installation on my sd card. Afterwards I booted from eMMC and did a "dd if=/dev/mmcblk1 of=/mnt/netinstall.img" to a mounted network share at /mnt. (/mnt/mmcblk1 is my SD card in this case)

In the next step I booted from SD card again and copied the image on my network share back to eMMC with the help of dd.

I thought now I'm done, but when I remove my SD card and boot directly from eMMC my boot partition is detected but the kernel is looking for the wrong root-partition.

The following message comes up:
"Waiting for root device /dev/mmcblk1p2..."

It looks like the kernel is waiting for the wrong partition, because the root parition is now /dev/mmcblk0p2.

When I insert the sd card the boot process continues. But now the beaglebone is using the boot parition from eMMC and the root parition from SD card.

In this situation I tried to do a update-initramfs -u, but this doesn't help.

How can I fix this wrong path?

Remarks:

  • UUIDs of partitions on eMMC and SD card are equals because of dd
  • There is no uEnv.txt in /boot/uboot by default

Thank you for help!

@RobertCNelson
Copy link
Owner

Incorrect... dd is not able to preserve the "UUID", i found this personally (1) when i switched my card script to use uuid's and ran into issues with my *.img generation.

uEnv.txt is under /boot/ (on the rootfs)

1: RobertCNelson/omap-image-builder@327da11

@ferraith
Copy link
Author

I checked the equality of the UUID with "blkid" and both boot and root parititions had the same UUID. Only to be sure I changed the UUID of the root parition at eMMC with tune2fs. Now both root partitions (one on the SD card and the new one on eMMC) have a different UUID.
Afterwards I updated the eEnv.txt with the new UUID:

uname_r=3.8.13-bone63
uuid=6bead1c1-2f86-45d2-8fec-0b23ceb038dc
optargs=console=tty0

Last I updated the initramfs with:
update-initramfs -u

But the problem still exits. Is there anything else to modifiy?

@RobertCNelson
Copy link
Owner

pastebin.com your serial boot log

@ferraith
Copy link
Author

At the moment I have no TTL-USB cable. I ordered now a cable to get the serial boot log. So hopefully in a few days I can pastebin the boot log. If you have some additional hints during the meantime let me know. Thanks for your help!

@ferraith
Copy link
Author

I got it finally working:
From my working hybrid SDCard/eMMC-system I did a chroot to the root parition of my eMMC. From the chroot environment I did the following:
update-initramfs -u -k $(uname -r)
cp -v /boot/vmlinuz-$(uname -r) /boot/uboot/zImage
cp -v /boot/initrd.img-$(uname -r) /boot/uboot/initrd.img
mkimage -A arm -O linux -T ramdisk -C none -a 0 -e 0 -n initramfs -d /boot/initrd.img-$(uname -r) /boot/uboot/uInitrd

After poweroff the system and remove the SD card, the system booted successfully from the eMMC and mounted the root-parition of eMMC.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants