Is PCIE x4 bootable for NVMe SSD under Linux - Printable Version +- PINE64 (https://forum.pine64.org) +-- Forum: ROCKPRO64 (https://forum.pine64.org/forumdisplay.php?fid=98) +--- Forum: Linux on RockPro64 (https://forum.pine64.org/forumdisplay.php?fid=101) +--- Thread: Is PCIE x4 bootable for NVMe SSD under Linux (/showthread.php?tid=6082) |
RE: Is PCIE x4 bootable for NVMe SSD under Linux - Tigger - 08-14-2018 Sorry that I can't be of anymore help. I haven't got a RockPro64 yet. [off-topic](Sales is not answering one of my questions. Although I made them aware of it. So I'm not buying yet.)[/off-topic] RE: Is PCIE x4 bootable for NVMe SSD under Linux - dukla2000 - 08-15-2018 (08-13-2018, 11:59 AM)jzhang18 Wrote: At 4.4 the pcie & nvme initialisation is ready before the rootfs is mounted (even though I am booting off the SDcard).I opened an issue on github - Ayufan says we must use initramfs. (Which makes sense as it is only the RockPro64 that needs these modules.) So now to work out how to cook an enhanced initramfs. (And it is probably the same issue with eMMC not working at 4.18?) RE: Is PCIE x4 bootable for NVMe SSD under Linux - Tigger - 08-15-2018 #-- If the ISO files from the following URL are live bootable to a command line or desktop with NVMe support. #-- Make sure that the one you download has the exact same kernel version as the failing installation. #-- https://www.ubuntu.com/download/server/arm #-- Mount the installation that is failing to boot at : /media/live-user-name or ubuntu here/.......... (or similar). This will become the new root file system (/). #-- Hide the ugly path in a meaning variable name, for repetitive use. failing_target="/media/live-user-name or ubuntu here/.........." . #-- Move into the failing target. cd "$failing_target" mount -t sysfs /sys sys/ mount -t proc /proc proc/ mount -o bind /dev dev/ mount --rbind /run run/ cp /etc/resolv.conf etc/resolv.conf #-- Descend into failing (s)hell. Swaps root file systems, from live to failing. chroot "/$failing_target" /bin/bash #-- Ask the developer of the distro for the kernel module names, and in which file to enable them. I'm not an Ubuntu user, sorry. Arch Linux here. #-- Or look in /proc/modules and try to find them, then use module-assistant and lsmod. But then you still need to find out how to dynamically load them. #-- Maybe this is of use, although i doubt it : http://manpages.ubuntu.com/manpages/bionic/man4/nvd.4freebsd.html #-- Backup/Rename your current initramfs (/boot/initrd.img-*) #-- Update initramfs against the newest/latest kernel version. update-initramfs -u #-- If update-initramfs fails with a read-only file system message (shouldn't). Use mkinitramfs instead. mkinitramfs -o /boot/initrd.img-$(uname -r) #-- For the currently running kernel. #-- Leave the chrooted environment. Returning to the live root file system. exit This is from Arch Linux (except for the commands to build initrd). It might be (slightly) different on Ubuntu. RE: Is PCIE x4 bootable for NVMe SSD under Linux - jzhang18 - 08-15-2018 That is exactly what we need to deal -- for Kernel4.18, build initramfs to include pcie and nvme 2 modules inside. When Kernel is loaded, those modules can be instantiated immediately before re-mounting rootfs which we want to mount nvme device as rootfs. There is another issue I found, lxde and mate desktop have some conflict with nvme disk. When I use LXDE release image, after I login, the system hangs when MVMe disk is inserted (the red led on my PCIe -M.2 adapter is turned on, then off). When I use minimal release image, MVMe disk is recognized (the red led on my PCIe -M.2 adapter is turned on and keeps on) Based on minimal release image, I installed Ubuntu-Mate-Deskstop and LightDM. The systems works after I log in, but MVMe disk is not recognized (the red led on my PCIe -M.2 adapter is turned on, then off). I think there are some Memory Address or IRQ conflict between GUI module and nvme module. Could someone repeat and report the same issue, or it just happened to me? RE: Is PCIE x4 bootable for NVMe SSD under Linux - dukla2000 - 08-15-2018 OK - got rootfs on NVMe and 4.18 kernel: Code: $ uname -a And yup, that NVMe is quicker than under 4.4: Code: $ sudo iozone -e -I -a -s 100M -r 4k -r 16k -r 512k -r 1024k -r 16384k -i 0 -i 1 -i 2 RE: Is PCIE x4 bootable for NVMe SSD under Linux - jzhang18 - 08-15-2018 a nice job! thanks RE: Is PCIE x4 bootable for NVMe SSD under Linux - dukla2000 - 08-15-2018 (08-15-2018, 09:29 AM)jzhang18 Wrote: There is another issue I found, lxde and mate desktop have some conflict with nvme disk.I have no desire to try MATE, but my thoughts: 1) LXDE release is known to be less usable than minimal, stick to minimal. 2) If you boot a newly flashed minimal then hopefully you can see the NVMe? I suggest lsblk and sudo blkid all the time to check what is happening. If you add the Mate-Desktop and NOT lightdm presumably you login to a console prompt? Check again. Then add lightdm etc. I do not have the Pine64 PCIe riser for my NVMe (got some other no-name) so have no insight what is correct LED behaviour, sorry. RE: Is PCIE x4 bootable for NVMe SSD under Linux - jzhang18 - 08-16-2018 (08-15-2018, 04:07 PM)dukla2000 Wrote: 1) LXDE release is known to be less usable than minimal, stick to minimal. Thanks, dukla2000 It turned out my NVMe SSD is not stable. Today I submit a RMA on the manufacture's web site. (https://www.corsair.com/us/en/) https://www.amazon.com/Corsair-Force-MP500-120GB-NVMe/dp/B01MQU72O9 I am also considering to buy Samsung NVMe SM961 SSD, just like most people used here in the forum. Nothing is related to M.2 ->PCIe adapter. the circuit seems very simple and stable. majority of no-named adapter should work with Rockpro64 board. After I get a new SSD, I will report it back. BTW -- how about your instructions for kernel-4.18.0-rc8-1060-ayufan? eager to see it. RE: Is PCIE x4 bootable for NVMe SSD under Linux - dukla2000 - 08-16-2018 (08-16-2018, 08:31 AM)jzhang18 Wrote: BTW -- how about your instructions for kernel-4.18.0-rc8-1060-ayufan? eager to see it. It is here (in the tutorials sub-forum). RE: Is PCIE x4 bootable for NVMe SSD under Linux - jzhang18 - 08-16-2018 Thanks for the quick response. it is a really nice solution! I choose another approach https://www.amazon.com/Express-Expansion-Asmedia-Chipset-Windows/dp/B074QK68XS/ref=sr_1_7?ie=UTF8&qid=1534447695&sr=8-7&keywords=PCIe%2BX4%2Bto%2BUSB-C&th=1 I hooked up a regular 2.5 inch SSD through SATA6.0 to USB3 cable. I can use regular SSD as rootfs now. The PCIe x4 provide enough current to power an USB external SSD. no extra 5v power needed. jzhang18@rockpro64:~$ df -h Filesystem Size Used Avail Use% Mounted on udev 1.9G 0 1.9G 0% /dev tmpfs 388M 696K 387M 1% /run /dev/sda1 116G 2.9G 108G 3% / tmpfs 1.9G 23M 1.9G 2% /dev/shm tmpfs 5.0M 4.0K 5.0M 1% /run/lock tmpfs 1.9G 0 1.9G 0% /sys/fs/cgroup /dev/mmcblk0p6 112M 10K 112M 1% /boot/efi tmpfs 388M 4.0K 388M 1% /run/user/112 tmpfs 388M 20K 388M 1% /run/user/1001 |