LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 11-12-2020, 01:33 AM   #1
bplis*
Member
 
Registered: Nov 2011
Distribution: Fedora
Posts: 72

Rep: Reputation: Disabled
Unhappy Move Installation To NVME Drive


I have a slightly older Fedora install that has been upgraded to Fedora 32.
Current kernel 5.8.17-200.fc32.x86_64
Logical volumes set up, separate /home /swap and /, all underlying partitions are EXT4
Grub2 installed in the MBR in my msdos partitioned 1TB SATA SSD

I just acquired a new 1TB NVME drive, and want to move my Fedora installation to the NVME from my SATA drive. As I use LVMs, I thought this would be relatively simple- Create a partition on the new drive, adopt it into the volume group, pvmove all my logical volumes over, remove the SATA drive from the volume group, and install Grub2 to the new drive.

However, this has not been the case. This failed miserably, and my system would not boot. I booted up a liveUSB, pvmoved all my volumes back to the old drive, and booting from Grub on either the SATA or on the NVME drive works fine. As soon as I move one volume to the NVME, boot fails. I found that strange, and so I shut down, booted the LiveUSB again, and just straight up used dd to copy the entirety of the SATA drive to the NVME one. This resulted in the exact same issue booting as before.

I added rd.break=initqueue to get into a shell in the initramfs, and found that the NVME drive was not showing up in /dev. Strange, it seems that my initramfs did not get NVME support built in. So I booted to my old drive, created a new initramfs manually specifying for the nvme module to be loaded, copied that over and tried again. Also did not work.

I tried using the --no-hostonly argument as well adn rebuilt the initramfs again, but I still cannot see the nvme drive in the initramfs. I installed a fresh install of Fedora 33 on the NVME drive, and it booted just fine. However, the auto-setup used GPT and EFI boot, instead of a legacy BIOS/Grub2.

My question at this point, is if there is an issue getting my system to build in nvme support to the initramfs correctly, or if there is a known issue when booting NVMEs that have been set up as a BIOS/msdos disk. I am not super interested in converting to use EFI boot at this time, and would like to be able to get my current system running off the NVME drive if possible.

Thank you.


**edit**
It appears that I cannot figure out how to edit my signature. I am running a new rig- Ryzen 7 1700X, MSI X470 Gaming Plus, 32GB DDR4-3400, RX 5700XT, 1TB Samsung 860 Evo SATA, 1TB SK Hynix Gold P31 NVME, Fedora 32

Last edited by bplis*; 11-12-2020 at 01:38 AM. Reason: Additional info
 
Old 11-12-2020, 05:51 AM   #2
mrmazda
LQ Guru
 
Registered: Aug 2016
Location: SE USA
Distribution: openSUSE 24/7; Debian, Knoppix, Mageia, Fedora, others
Posts: 5,810
Blog Entries: 1

Rep: Reputation: 2067Reputation: 2067Reputation: 2067Reputation: 2067Reputation: 2067Reputation: 2067Reputation: 2067Reputation: 2067Reputation: 2067Reputation: 2067Reputation: 2067
Did you try booting vmlinuz-0-rescue...UUID... and initramfs-0-rescue...UUID... like all my Fedoras have?

I had a similar experience on switch from SSD to NVME with both using GPT/UEFI. IIRC I solved the missing nvme support by booting something else, then chrooting into Fedora to build a new initramfs.
 
Old 11-12-2020, 06:11 AM   #3
bplis*
Member
 
Registered: Nov 2011
Distribution: Fedora
Posts: 72

Original Poster
Rep: Reputation: Disabled
My rescue is from... like Fedora 22 I think? I have had the same install and just upgraded, repeatedly, since Fedora... 17? The rescue one will not even try to boot, fails right away.

Regardless, I tried rebuilding my initramfs as explained above, which *should* have included the nvme driver module.

Last edited by bplis*; 11-12-2020 at 06:37 AM.
 
Old 11-12-2020, 06:20 PM   #4
mrmazda
LQ Guru
 
Registered: Aug 2016
Location: SE USA
Distribution: openSUSE 24/7; Debian, Knoppix, Mageia, Fedora, others
Posts: 5,810
Blog Entries: 1

Rep: Reputation: 2067Reputation: 2067Reputation: 2067Reputation: 2067Reputation: 2067Reputation: 2067Reputation: 2067Reputation: 2067Reputation: 2067Reputation: 2067Reputation: 2067
Rescue initramfs from F22 may be too old to have had nvme support. I expect rebuild should have worked, but I don't see you used chroot to do it, which is what worked for me.

If you want to try a shortcut, send me your current kernel version via private message and I'll install that version kernel with lvm forced into it and provide a URL for you to download it. It still might not work because it's from an Intel only PC, but mine needs a kernel upgrade anyway. I can also do one for F33.

Code:
# inxi -Say
System:
  Host: ab250 Kernel: 5.8.13-200.fc32.x86_64 x86_64 bits: 64 compiler: gcc v: 2.34-4.fc32)
  parameters: noresume audit=0 mitigations=auto consoleblank=0
  Desktop: IceWM 1.8.3 dm: SDDM Distro: Fedora release 32 (Thirty Two)
# blkid | grep -i f32
/dev/nvme0n1p15: LABEL="zm2p15f32 UUID="3d102843-d2a9-4279-83cc-28e9fb07ca21" BLOCK_SIZE="2048" TYPE="ext4" PARTLABEL="ZM2P15 Fedora 32" PARTUUID="5b331e86-fae9-4df5-ac51-dd73d17cb87e"
# mount | grep -i p15
/dev/nvme0n1p15 on / type ext4 (rw,noatime)
# lsinitrd | grep -i nvme
drwxr-xr-x   3 root     root            0 May 29 14:35 usr/lib/modules/5.8.13-200.fc32.x86_64/kernel/drivers/nvme
drwxr-xr-x   2 root     root            0 May 29 14:35 usr/lib/modules/5.8.13-200.fc32.x86_64/kernel/drivers/nvme/host
-rw-r--r--   1 root     root        41728 May 29 14:35 usr/lib/modules/5.8.13-200.fc32.x86_64/kernel/drivers/nvme/host/nvme-core.ko.xz
-rw-r--r--   1 root     root        19064 May 29 14:35 usr/lib/modules/5.8.13-200.fc32.x86_64/kernel/drivers/nvme/host/nvmeko.xz
#
 
Old 11-12-2020, 10:53 PM   #5
bplis*
Member
 
Registered: Nov 2011
Distribution: Fedora
Posts: 72

Original Poster
Rep: Reputation: Disabled
I don't need to chroot, as I am booted into the system. I have everything operating fine on the SATA SSD.

Update/solved-
The rescue initramfs wouldn't boot either. But after some more digging, I found that I have both the nvme and nvme_core kernels module loaded when fully booted. I modified my Dracut settings to include nvme_core as well as nvme, and rebuilt it again. This time, it worked!

For anyone that needs to do this from the command-line, this appears to be the simplest solution. Please note that this will only update the current kernel, so you will not be able to boot into any older ones without doing the same for them as well, and maually specifying the kernel versions by hand. Int he future, kernel updates from dnf *should* auto-include the module now, but I will update you as to whether that is actually the case.
Code:
sudo dracut -f --no-hostonly --add-drivers nvme --add-drivers nvme_core

Last edited by bplis*; 11-13-2020 at 03:34 AM.
 
Old 11-13-2020, 03:09 AM   #6
bplis*
Member
 
Registered: Nov 2011
Distribution: Fedora
Posts: 72

Original Poster
Rep: Reputation: Disabled
I managed to get the rescue kernel up to my latest Fedora version.
 
Old 11-13-2020, 04:09 AM   #7
mrmazda
LQ Guru
 
Registered: Aug 2016
Location: SE USA
Distribution: openSUSE 24/7; Debian, Knoppix, Mageia, Fedora, others
Posts: 5,810
Blog Entries: 1

Rep: Reputation: 2067Reputation: 2067Reputation: 2067Reputation: 2067Reputation: 2067Reputation: 2067Reputation: 2067Reputation: 2067Reputation: 2067Reputation: 2067Reputation: 2067
Quote:
Originally Posted by bplis* View Post
I have everything operating fine on the SATA SSD.
Are you using the NVME at all?
Code:
# inxi -S
System:    Host: ab250 Kernel: 5.8.13-200.fc32.x86_64 x86_64 bits: 64 Console: tty 3 Distro: Fedora release 32 (Thirty Two)
# mount | grep -i p15
/dev/nvme0n1p15 on / type ext4 (rw,noatime)
# hdparm -t /dev/nvme0n1
/dev/nvme0n1:
 Timing buffered disk reads: 3198 MB in  3.00 seconds = 1065.39 MB/sec
# hdparm -t /dev/nvme0n1
/dev/nvme0n1:
 Timing buffered disk reads: 3202 MB in  3.00 seconds = 1066.57 MB/sec
This is just a cheap 128G ADATA XPG I paid $23 for 20 months ago. It's about twice the speed of the fastest SATA SSD I've had.
 
Old 11-17-2020, 11:13 PM   #8
bplis*
Member
 
Registered: Nov 2011
Distribution: Fedora
Posts: 72

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by bplis* View Post
I don't need to chroot, as I am booted into the system. I have everything operating fine on the SATA SSD.

Update/solved-
The rescue initramfs wouldn't boot either. But after some more digging, I found that I have both the nvme and nvme_core kernels module loaded when fully booted. I modified my Dracut settings to include nvme_core as well as nvme, and rebuilt it again. This time, it worked!

For anyone that needs to do this from the command-line, this appears to be the simplest solution. Please note that this will only update the current kernel, so you will not be able to boot into any older ones without doing the same for them as well, and maually specifying the kernel versions by hand. Int he future, kernel updates from dnf *should* auto-include the module now, but I will update you as to whether that is actually the case.
Code:
sudo dracut -f --no-hostonly --add-drivers nvme --add-drivers nvme_core


I can confirm that after manually including those modules, the initramfs built for all the new kernel updates now includes them.
 
  


Reply

Tags
boot, dracut, fedora, initramfs, nvme



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: Data in a Flash, Part II: Using NVMe Drives and Creating an NVMe over Fabrics Network LXer Syndicated Linux News 0 05-20-2019 11:41 PM
Migrate Linux/win10 dual boot from MBR nvme drive to a new GPT nvme drive bluemoo Linux - Software 7 09-25-2018 06:42 PM
[SOLVED] NVMe drive kernel fail after hotplug kernel 4.16.12 albr0da Linux - Kernel 4 07-05-2018 12:56 AM
LXer: SteamOS 2.0 Stable Now Has Improved Auto-Repair and NVMe Drive Support LXer Syndicated Linux News 0 10-20-2015 05:20 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 10:02 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration