![]() |
Happy eMMC and SDcard OS usage for Pinebook Pro Newbies... - Printable Version +- PINE64 (https://forum.pine64.org) +-- Forum: Pinebook Pro (https://forum.pine64.org/forumdisplay.php?fid=111) +--- Forum: General Discussion on Pinebook Pro (https://forum.pine64.org/forumdisplay.php?fid=112) +--- Thread: Happy eMMC and SDcard OS usage for Pinebook Pro Newbies... (/showthread.php?tid=11666) |
RE: Happy eMMC and SDcard OS usage for Pinebook Pro Newbies... - wdt - 10-07-2020 Well, you can do an experiment First, and formost, if emmc is diasbled, does a good SD boot? If so, blank emmc uboot (1st save emmc mbr, restore at end), re-enable emmc, then run fdisk on good SD, note sector numbers (write down) delete all partitions (later you will restore partitions with written down sector numbers) This forces cpu to use uboot from SD, the only OS that it can find is on emmc, might work, no guarantees BTW, what ubuntu version? there are more than 1 I think RE: Happy eMMC and SDcard OS usage for Pinebook Pro Newbies... - Mangled - 10-08-2020 (10-07-2020, 08:53 PM)wdt Wrote: Well, you can do an experimentSorry its Ubuntu 20.04 from ayufan. https://github.com/ayufan-rock64/linux-build/releases Using etcher to extract image to emmc won't work? Isn't uboot on internal memory? Maybe just need to rename partitions to what manjaro had? RE: Happy eMMC and SDcard OS usage for Pinebook Pro Newbies... - wdt - 10-08-2020 Ayufan, I think, usually uses GPT partitoning, better check No, uboot is not in internal memory, bootrom is quite limited, it searches, in its boot order (SPI, emmc, SD, usb-not-for-booting) for the signature of idbloader, on the above media (3B 8C DC FC BE 9F 9D 51) Signature (for rk3399) is 64 sectors in, this is a "raw" read Then idbloader sets up memory, has more memory available, loads uboot, I think it is assumed that it will be on that same media as idbloader, 8M in To have space for this (idbloader, uboot, trust) is why 1st user partition is at 16m, 32768 sectors The bootrom will use the 1st idbloader found, ignore all others (in its search path) So,.... if SPI is blank, if emmc uboot area is blank, then idbloader & uboot on SD will be used To blank,,, save mbr, dd /dev/zero to 1st-16M, restore mbr,, GPT mbr is 34 sectors --edit-- uboot nearly always has a different search path, looking for extlinux.conf or boot.scr, for example @localhost mrfixit-uboot]$ strings uboot.img |grep _target boot_targets=mmc1 nvme0 usb0 mmc0 pxe dhcp ,,,,, mmc0 is emmc In previous post, if SD partitions are deleted, can't find anything on disk it is still there, just in unknown place (idbloader/uboot/trust) is equivalent of bios, they are loaded by "raw" reads RE: Happy eMMC and SDcard OS usage for Pinebook Pro Newbies... - Mangled - 10-08-2020 I think it might be easier to flash manjaro back on emmc and hopefully fix the emmc boot. Then i can boot from sd card and run ubuntu from there again. I'm still new to Linux, this process sounds complicated. On the wiki it does state that ayufan Ubuntu image boots to emmc or SD. If I were to follow these steps for install on SD card, would it work if I made an image with partitions from SD card and duplicated to emmc? # Remove invalid X11 config, and fix bootloaders sudo rm /etc/X11/xorg.conf.d/20-armsoc.conf sudo rm /etc/apt/sources.list.d/ayufan-rock64-0.8-*.list sudo new_extlinux_boot.sh rootfs sudo rock64_upgrade_bootloader.sh Maybe my issue was that I flashed the image directly to emmc before doing all of these steps from within os. RE: Happy eMMC and SDcard OS usage for Pinebook Pro Newbies... - Mangled - 10-08-2020 (10-08-2020, 10:10 AM)Mangled Wrote: I think it might be easier to flash manjaro back on emmc and hopefully fix the emmc boot. Then i can boot from sd card and run ubuntu from there again. I'm still new to Linux, this process sounds complicated. On the wiki it does state that ayufan Ubuntu image boots to emmc or SD. If I were to follow these steps for install on SD card, would it work if I made an image with partitions from SD card and duplicated to emmc?I think I had found the information I was looking for. The spi does require uboot to be flashed to it. Link below: https://github.com/ayufan-rock64/linux-build/blob/master/recipes/flash-spi.md RE: Happy eMMC and SDcard OS usage for Pinebook Pro Newbies... - wdt - 10-08-2020 The image, whatever it is, is supposed to "just work", whether it is flashed to emmc or SD No editing should be needed, but some images are not so good It is often hard to tell just exactly what is wrong, unless you have a serial connection If there is a SD inserted, if there is a bootable image on it, the emmc uboot will find it 1st and boot from it (if the search path has MMC1 as first item, this is common) If it is a non-bootable SD or absent, then nvme0, then usb0 will be searched, then emmc will be examined uboot is looking for extlinux.conf or boot.scr >would it work if I made an image with partitions from SD card and duplicated to emmc? I would guess not --edit-- >The spi does require uboot to be flashed to it. Any uboot will do (if it is "good") wherever it is (not usb) Flashing uboot to SPI, at this time, is NOT recommended unless you are somewhat "expert" All of this is a bit "beta", somewhat immature And, if you read closely, this is more for rockpro rather than pinbookpro RE: Happy eMMC and SDcard OS usage for Pinebook Pro Newbies... - Mangled - 10-09-2020 (10-08-2020, 12:02 PM)wdt Wrote: The image, whatever it is, is supposed to "just work", whether it is flashed to emmc or SDI did a little test. I have Ubuntu installed on my SD card and manjaro on emmc. It boots fine into Ubuntu. However removing the emmc with SD still in, the device will turn on but remain on black screen. So I tried to flash the Ubuntu image on emmc and remove SD card. Again, turns on but remains on black screen. I then reinstalled manjaro on emmc and put SD card back in, it boots fine into Ubuntu. Next I will try to duplicate my SD card to emmc to see if it boots. Its possible that running ubuntu via sd and updating os may have fixed the boot. I will try tonight. I find it odd that it boots from SD card but will not from emmc RE: Happy eMMC and SDcard OS usage for Pinebook Pro Newbies... - wdt - 10-09-2020 > I find it odd that it boots from SD card but will not from emmc When emmc is in, its uboot will be 1st found & used I think that your post shows that the uboot for ubuntu is not good When it loads manjaro uboot (from emmc) and then that uboot finds SD, boots OK So, a test would be,, save SD mbr (gpt, so 34 sectors),, dd 1st 16M emmc->SD,, restore SD mbr Then try to boot with ONLY SD (emmc removed,disabled, check with lsblk, no boot0 or boot1) (check that SD mbr is gpt,, run gdisk /dev/SD, the page that shows gives status, q (to quit)) Do you need more detailed info? RE: Happy eMMC and SDcard OS usage for Pinebook Pro Newbies... - Mangled - 10-09-2020 (10-09-2020, 08:15 AM)wdt Wrote: > I find it odd that it boots from SD card but will not from emmcYes please. I'm a newb to Linux. Just learning as I go. How do I dd the MBR? Dd if=/dev/mmcblk2(?mbr of emmc?) bs=16M of=/dev/mmcblk1(SD card) I read online somewhere that mbr is generally 512b from first boot sector. Should bs=512 ? RE: Happy eMMC and SDcard OS usage for Pinebook Pro Newbies... - wdt - 10-09-2020 OK, lsblk 1st,, boot0 and boot1 are on emmc, I will use terms /dev/SD and /dev/emmc,, replace SD and emmc with right mmcblkX Then, sudo gdisk /dev/SD,,, the screen that comes up will have this section Partition table scan: MBR: MBR only BSD: not present APM: not present GPT: not present So you can tell the partitioning style of the disk, Ayufan often uses GPT If it is mbr, you save 1 sector, if gpt save 34 sectors,,, (dd default bs is 512 Bytes, 1 sector) (GPT has protective mbr, 1 sector, GPT boot code, 1 sector, partition table, 32 sectors,,4/sector,128 partitions) make a directory to work in, empty cd ; mkdir uboot-sav ; cd uboot-sav save SD mbr dd if=/dev/SD of=SD.ubuntu.mbr count=(either 1 OR 34) save ubuntu uboot(optional), good practice to always be able to go back dd if=/dev/SD of=ubuntu.uboot.16M bs=1M count=16 Transfer 1st-16M emmc->SD dd if=/dev/emmc of=/dev/SD bs=1M count=16 restore mbr dd if=SD.ubuntu.mbr of=/dev/SD (count not necessary, will stop at end of file) Also a good practice to give self documenting names, very helpful a month later This assumes manjaro on emmc,, ayufan ubuntu on SD,, ubuntu boots OK Doesn't matter where you boot from, but if SD card is in, will boot ubuntu Then test, remove/disable emmc, can SD boot OK? If so, transfer ubuntu to emmc,, with rsync (already in forum OR on other computer OR do an install from image,, BUT BEFORE rebooting transfer manjaro uboot to emmc (saving emmc mbr 1st, and restoring last) |