jetsonhacks / rootOnNVMe

Switch the rootfs to a NVMe SSD on the Jetson Xavier NX and Jetson AGX Xavier
MIT License
393 stars 145 forks source link

Error: cannot create regular file '/mnt/etc/systemd/system/setssdroot.service' #7

Open rafiqrana opened 3 years ago

rafiqrana commented 3 years ago

Hi there, I used this repo to boot Jetson AGX Xavier from the newly installed NVMe. At the first attempt, I had successfully finished all the steps, and it booted from the NVMe thereafter. Few days later, it was, however, not booting for some reasons. Therefore, I used the same steps from this repo to reinstall the os to NVMe, but ended up the following error:

cp: cannot create regular file '/mnt/etc/systemd/system/setssdroot.service': No such file or directory
cp: cannot create regular file '/mnt/sbin/setssdroot.sh': No such file or directory
Service to set the rootfs to the SSD installed.
Make sure that you have copied the rootfs to SSD.
Reboot for changes to take effect.

It looks like to me, the NVMe was not mounted properly

What version of L4T/JetPack L4T/JetPack version: 4.4.x

Which Jetson Jetson: NVIDIA Jetson AGX Xavier Developer Kit

To Reproduce Steps to reproduce the behavior:

cd rootOnNVMe
./setup-service.sh

Expected behavior ./setup-service.sh command should copy all the required system file to NVMe and create a service to boot from the NVMe.

lecramex commented 2 years ago

Hello,

In my case the disk was not in the path /dev/nvme0n1p1, it was in /dev/nvme0n1 I had to change it in all the files to solve this issue.

gayathri81 commented 2 years ago

Hello @rafiqrana , Were you able to solve this issue, even I am facing the same problem. I had to format my SSD and run the scripts to work as expected. It happened again today and I cannot afford formatting my SSD as there are some time consuming installation there. Please do share your hacks on this issue. Thanks, Gayathri.

lecramex commented 2 years ago

Hello @gayathri81

Just check with an application like Disks (select your SSD and see on Device the location) where your device is, in my case it was /dev/nvme0n1, then I searched for all the places where this application refers to /dev/nvme0n1p, and changed it by /dev/nvme0n1. For example:

In file copy-rootfs-ssd.sh I change (in line 3): sudo mount /dev/nvme0n1p1 /mnt by: sudo mount /dev/nvme0n1 /mnt

I think you also need to fix the path in:

  1. data/setssdroot.service
  2. data/setssdroot.sh
gayathri81 commented 2 years ago

Hi @cramirezhe , thanks for the reply, but I'm able to mount the device properly. the location is correctly pointed to dev/nvme0n1p1. When I boot the service and script to mount SSD works fine, but not able to see the graphical interface. Able to access through terminal interface.