Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 6980

Advanced users • HowTo: Install fresh OS on Pi5 NVMe 4tb 8tb drives

$
0
0
If anyone is interested, I installed a fresh os on the NVMe drive with 4TB.

Raspbian has MBR which can only make partitions with max. 2TB, in my case with a 4TB drive I had to switch to GPT. My System is a Geekwork X1001 with a Crucial P3 M.2 Series 4TB. Benchmark can be found here

Here the steps:

1. Boot your pi with a SD card and already installed NVMe, and install a image with `imager` on the rpi desktop, you can also make the settings (e.g. username, password, wifi, ...)
2. make sure with `raspi-config` the boot order is `B1: SD Card Boot Boot from SD card if available, otherwise boot from NVMe`.
3. Poweroff system and remove SD card and poweron again
4. when the pi has booted and everything runs well (e.g. wifi connection), poweroff again and insert SD card again
5. Poweron and wait system is ready, then in terminal
6. `sudo gdisk /dev/nvme0n1` and press `w` and then `y`
7. `sudo partprobe /dev/nvme0n1`
8. `sudo apt install cloud-guest-utils`
9. `sudo growpart /dev/nvme0n1 2`
10. `sudo e2fsck -f /dev/nvme0n1p2`
11. `sudo resize2fs /dev/nvme0n1p2`
12. `sudo blkid`, example output(!!)

Code:

/dev/nvme0n1p1: LABEL_FATBOOT="bootfs" LABEL="bootfs" UUID="EF6E-C078" BLOCK_SIZE="512" TYPE="vfat" PARTLABEL="Microsoft basic data" PARTUUID="52278156-f55b-45e4-b17a-a59a5605c65e"/dev/nvme0n1p2: LABEL="rootfs" UUID="4aa56689-dcb4-4759-90e6-179beae559ac" BLOCK_SIZE="4096" TYPE="ext4" PARTLABEL="Linux filesystem" PARTUUID="a469ab3f-6602-473f-8f93-c2b91f60b5f8"
13. Mount the system

Code:

sudo mkdir -p /media/rpibootsudo mkdir -p /media/rpirootsudo mount /dev/nvme0n1p1 /media/rpiboot/sudo mount /dev/nvme0n1p2 /media/rpiroot/
14. `sudo nano /media/rpiroot/etc/fstab` and replace the first PARTUUID number with the PARTUUID number from nvme0n1p1 and replace the second one with the number from nvme0n1p2, in my case

Code:

proc            /proc           proc    defaults          0       0PARTUUID=52278156-f55b-45e4-b17a-a59a5605c65e  /boot/firmware  vfat    defaults          0       2PARTUUID=a469ab3f-6602-473f-8f93-c2b91f60b5f8  /               ext4    defaults,noatime  0       1# a swapfile is not a swap partition, no line here#   use  dphys-swapfile swap[on|off]  for that
15. `sudo nano /media/rpiboot/cmdline.txt` and replace the PAARTUUID number with the PARTUUID number from nvme0n1p2, in my case

Code:

console=serial0,115200 console=tty1 root=PARTUUID=a469ab3f-6602-473f-8f93-c2b91f60b5f8 rootfstype=ext4 fsck.repair=yes rootwait quiet splash plymouth.ignore-serial-consoles cfg80211.ieee80211_regdom=AT
16. `sudo nano /media/rpiboot/config.txt` and add the lines on the bottom of the file

Code:

# Enable the PCIe external connectordtparam=pciex1# Force Gen 3.0 speedsdtparam=pciex1_gen=3
17. `sudo poweroff` and take out the SD card and power on again
18. `sudo apt install gparted` and open it in the desktop
19. Be happy, it should looks like this
Image

I know, my "manual" is very short in words, but I hope it helps... Maybe it will get a sticky too ;)

What is also possible, make an image from your existing os from SD card and flash it with step 1, so there is no need to use a fresh os...

Statistics: Posted by mcpatric — Wed Jan 31, 2024 8:51 pm — Replies 1 — Views 71



Viewing all articles
Browse latest Browse all 6980

Trending Articles