PINE64
How to boot from eMMC but have root directory on an NVME? - Printable Version

+- PINE64 (https://forum.pine64.org)
+-- Forum: Pinebook Pro (https://forum.pine64.org/forumdisplay.php?fid=111)
+--- Forum: Linux on Pinebook Pro (https://forum.pine64.org/forumdisplay.php?fid=114)
+--- Thread: How to boot from eMMC but have root directory on an NVME? (/showthread.php?tid=10401)



How to boot from eMMC but have root directory on an NVME? - QazTheWsx - 06-23-2020

I have a PBP and is currently running Manjaro KDE from factory on it. I have the adapter and a NVME. I was wondering if I could have just the necessary files on the eMMC to boot and then have everything else on the NVME like home directory and programs and such. I have not found an updated way to do this. Also I am open to suggestions for alternatives. I would just like to have everything touching NVME after booting while still running Manjaro KDE.


RE: How to boot from eMMC but have root directory on an NVME? - xmixahlx - 06-23-2020

partition your nvme the way you want it, make filesystems, move files over, edit fstab, check the boot config, then reboot.

i do the same thing on debian currently - my emmc just has boot partitions until i go all out with the SPI boot method.


RE: How to boot from eMMC but have root directory on an NVME? - QazTheWsx - 06-23-2020

(06-23-2020, 07:54 PM)xmixahlx Wrote: partition your nvme the way you want it, make filesystems, move files over, edit fstab, check the boot config, then reboot.

i do the same thing on debian currently - my emmc just has boot partitions until i go all out with the SPI boot method.

Ok, there seems to be two partitions a BOOT_MNJRO and a ROOT_MNJRO.

I have found the fstab file but it has only one entry which would be for BOOT_MNJRO. So just add a new entry for the new "ROOT_MNJRO"?

Also where is the boot config and what should I change in it?

Thank you for the quick reply still a noob when it comes to file systems.


RE: How to boot from eMMC but have root directory on an NVME? - firefox-58 - 06-24-2020

(06-23-2020, 08:14 PM)QazTheWsx Wrote:
(06-23-2020, 07:54 PM)xmixahlx Wrote: partition your nvme the way you want it, make filesystems, move files over, edit fstab, check the boot config, then reboot.

i do the same thing on debian currently - my emmc just has boot partitions until i go all out with the SPI boot method.

Ok, there seems to be two partitions a BOOT_MNJRO and a ROOT_MNJRO.

I have found the fstab file but it has only one entry which would be for BOOT_MNJRO. So just add a new entry for the new "ROOT_MNJRO"?

Also where is the boot config and what should I change in it?

Thank you for the quick reply still a noob when it comes to file systems.


After bricking my PBP more than one time with flashing U-Boot i handled it in this way
  1. install partitionmanger or gparted
  2. format the NVMe and make one partition with EXT4 on it
  3. mount the newly created NVMe partition to /mnt
  4. "cd /mnt"
  5. "mkdir dev proc sys mnt"
  6. "rsync -aHxv --numeric-ids --progress /* /mnt --exclude=/dev --exclude=/proc --exclude=/sys --exclude=/mnt"
  7. start partitionmanager KDE or gparted
  8. edit the partition and rename the original partition label from "MNJRO_ROOT to MNJRO_ROOT_1 on the SD card
  9. edit and rename the partition label of the NVMe partition to MNJRO_ROOT
  10. apply all changes and reboot
Now the PBP boots from /boot on the EMMC and mounts / from the NVMe
Mission accomplished and no need for u-boot updates or renewals
NO warranties that it works the same way on other PBP's of other users !!!!


RE: How to boot from eMMC but have root directory on an NVME? - xmixahlx - 06-24-2020

you don't need /boot on the emmc if you are using a uboot with nvme support like mrfixit2001 v2.0.

you can also pass the label to mkfs (depending on your fs it is -L -l -n etc.) eliminating a step.

i am also expecting you can name your new nvme label whatever you want and then change that reference in uboot and fstab configs if you are loading by name.

it may also be a good time to make a swap partition.

i replicated the whole unofficial debian partition install structure from emmc to nvme to prepare for SPI boot sometime in the future. you may want to consider that approach for manjaro, also. if you don't end up doing that it is just a lost few MB on your recently huge new nvme. Wink


RE: How to boot from eMMC but have root directory on an NVME? - QazTheWsx - 06-25-2020

So I was able to have /boot on the eMMC and /root on the NVME. Here is the process that I did:

1. Made a Ubuntu SD card booted from it and installed Gparted.

2. Open Gparted then unmounted ROOT_MNJRO. Right click and select copy.

3. Open the NVME drive in Gparted. Create a partition table msdos. 

4. Apply table to drive.

5. Right click on the partition diagram of the NVME and select paste.

6. Size the partition to desired size. 

7. Apply all operations. This may take some time depending on how much data is moved.

8. Rename the new copy of the partition to ROOT_MNJRO_0

9. Open file manager and navigate to /BOOT_MNJRO/extlinux

10. Open extlinux.conf in your text editor of choice.

11. On line 4 you see "root=LABEL=ROOT_MNJRO". At the end of MNJRO add "_0". Now it should be "root=LABEL=ROOT_MNJRO_0".

12. Shutdown and remove SD card.

Now it should run /boot off of the eMMC and / off of the NVME. 

I can't guarantee that it would work on other machines but it is how I was able to get it to work.


RE: How to boot from eMMC but have root directory on an NVME? - firefox-58 - 06-26-2020

(06-24-2020, 11:56 AM)xmixahlx Wrote: you don't need /boot on the emmc if you are using a uboot with nvme support like mrfixit2001 v2.0.

you can also pass the label to mkfs (depending on your fs it is -L -l -n etc.) eliminating a step.

i am also expecting you can name your new nvme label whatever you want and then change that reference in uboot and fstab configs if you are loading by name.

it may also be a good time to make a swap partition.

i replicated the whole unofficial debian partition install structure from emmc to nvme to prepare for SPI boot sometime in the future. you may want to consider that approach for manjaro, also. if you don't end up doing that it is just a lost few MB on your recently huge new nvme. Wink

ALL uboot updates so far now procuced anger like "noo boot", "PBP dead" and so on.
For now I have lost all interest in experimenting with unsupported uboot-releases and let the PBP boot from the EMMC.

Maybe Manjaro will in the future release an official uboot to boot entirely from the NVMe disk......


RE: How to boot from eMMC but have root directory on an NVME? - QazTheWsx - 06-26-2020

(06-24-2020, 11:56 AM)xmixahlx Wrote: you don't need /boot on the emmc if you are using a uboot with nvme support like mrfixit2001 v2.0.

you can also pass the label to mkfs (depending on your fs it is -L -l -n etc.) eliminating a step.

i am also expecting you can name your new nvme label whatever you want and then change that reference in uboot and fstab configs if you are loading by name.

it may also be a good time to make a swap partition.

i replicated the whole unofficial debian partition install structure from emmc to nvme to prepare for SPI boot sometime in the future. you may want to consider that approach for manjaro, also. if you don't end up doing that it is just a lost few MB on your recently huge new nvme. Wink

My goal was to stay away from dealing with uboot. Don't want to deal with the possibility of bricking the device. Since I moved the / partition only, the eMMC still has a swap partition from my initial install. This way the keeps the power consumption down from the NVME and keeps the filesystem from competeing with swap for bandwidth when in heavy use. Think of the eMMC after boot as a slower dedicated RAM. Also if the install breaks on my NVME I can change one config file from an SD and get an entire identical system running. Finally I did not have to deal with fstab.