DebianThis forum is for the discussion of Debian Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I have a debian bullseye. I bought a new NVME via PCI that doesnt show in bios. However, I am able to install debian into it and that completes successfully. However, upon reboot, it shows up with the grub from original drive and cannot boot into the NVME. I dont mind grub in the original disk but want the entire OS in the NVME since that is the purpose of buying the drive.
Any thoughts how I can configure grub to boot from the new drive? I tried installing debian again into the original disk which created boot entries for the nvme disk (hence it does recognize it), but gives errors if I select it.
would be nice to post those error messages and other details (like which hardware, which version...). Actually it (the same setup) works for me very well.
What OS is running on the original drive? Have you run grub-mkconfig on that OS? Is this an EFI install or Legacy/CSM? WHen you install a Linux system, you should have an option for bootloader installation. WHich opton did you select? If the drive doesn't show in the BIOS I would expect problems. Could you post the outpt of this command run with root privileges: parted -l
I bought a new NVME via PCI that doesnt show in bios.
If you have an M.2 slot on your motherboard and the drive is installed there but not detected, check your motherboard manual and bios setup; there may be a setting there which is required to activate the M.2 slot and NVME drive. Something is definitely amiss either with your bios setup settings or there may be some compatibility issue between your bios and the particular NVME drive. Posting the make and model of each would be helpful. Also, check to see if your motherboard has a bios update which may address this issue.
As to why it's not booting has to do with the way the linux boot process works. Basically, on power up, the bios loads grub which looks to the bios for the location of the linux kerenel and initrd.img and they are loaded into memory. Once the kernel and initrd is loaded, linux kisses the bios goodbye and all further hardware detection is done by the kernel. When you installed Debian from a flash drive, the kernel was on the installation flash drive and loaded into memory where your NVME drive was detected by the kernel. Since your bios doesn't detect the NVME drive, there's no way for the kernel on the NVME drive to load into memory.
You could try reinstalling and putting the /boot partition on another drive that the bios can detect along with installing the bootloader there. That way, your Debian grub and kernel can be loaded from that location since the drive is detected by the bios. After the kernel loads from that location on the bios detected drive, the Debian linux kernel can find and use your NVME drive.
Last edited by kilgoretrout; 01-10-2022 at 12:14 PM.
The errors were before booting and didnt get to var/log. They are:
Quote:
error: No such device: <guid>
error: disk 'hostdisk //dev/nvme01,msdos1' not found
error: you need to load the kernel first
Same USB to install OS on both drives, not using efi and no M.2 on MB hence the PCI. Didnt run grub-mkconfig and avoided it by reinstalling OS in the old drive to leverage on the install finding all installed OSs. It found windows also which boots fine. parted results are :
Quote:
Disk /dev/nvme0n1: 500GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Disk Flags:
Number Start End Size Type File system Flags
1 1049kB 499GB 499GB primary ext4
2 499GB 500GB 1022MB extended
5 499GB 500GB 1022MB logical linux-swap(v1)
So put it in a location where it can be loaded. Reread my above post on the boot process. Reinstall putting /boot, which contains the kernel, on a drive detectable by your bios. You will never be able to boot from a drive not detectable by your bios, but you can put the boot code(grub, kernel intrd.img) on a drive detectable by your bios and put everything else on your add-in card NVME.
Does it mean I need to reinstall the OS or is there a console script that I can use ?
That would be the easiest way; there is no magic script to make all the changes that would need to be made otherwise. You need to create a partition on your bios recognized drive that will be your /boot partition. It's probably easier to do that before installation with a livecd like gparted:
Size wise, 1GB should be more than enough. During installation select manual partitioning at the partitioning set up. Then select your previously made 1GB partition where you will be given a list of options for mount point. Select "other" or "manual" since none of the options listed will be appropriate. Then for mount point write:
Code:
/boot
Then go back and select your NVME drive and create a partition for your Debian installation and for its mount point select the "/" option which I believe would be the default. You will also have to direct the grub installation to install on the bios detected hard drive.
I don't know how familiar you are with linux installations so some or all of this may be over your head. The above procedure summarizes what needs to be done. If anything is not clear or you run into issues, feel free to post back with any questions.
That would be the easiest way; there is no magic script to make all the changes that would need to be made otherwise.
... ...
I don't know how familiar you are with linux installations so some or all of this may be over your head. The above procedure summarizes what needs to be done. If anything is not clear or you run into issues, feel free to post back with any questions.
Can you show how to steer Grub2 to boot from the first partition, (I guess just the initrd), then hand-off control to the NVME partition? (I have the same problem, using Ubuntu 18).
So put it in a location where it can be loaded. Reread my above post on the boot process. Reinstall putting /boot, which contains the kernel, on a drive detectable by your bios. You will never be able to boot from a drive not detectable by your bios, but you can put the boot code(grub, kernel intrd.img) on a drive detectable by your bios and put everything else on your add-in card NVME.
bios? What do you mean by bios?
What if people are experiencing problems because of UEFI?
You understand what UEFI is right?
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.