Installing on M.2 drive- root partition not mounted at boot
-
- Offline
- 4 months 6 days ago
- 2016-01-30
Hi,
I'm trying to install Alpine on a desktop - following specs:
a) M.2 SSD drive (Samsung 950 Pro 512GB) - NVME
b) Gigabyte GA-Z170M-D3H Intel Z170 motherboard.
More info:
(*) Version: alpine-xen-3.3.1-x86_64.iso (want to use the desktop for creating VM on Xen)
(*) The iso is copied to a USB key (using dd) and am able to boot the desktop with this USB drive.
(*) Upon booting the NVME drive is detected as /dev/nvme0n1.
(*) The disk is set-up as with GPT.
(*) I run 'setup-alpine' after boot up and choose 'none for disk.
(*) Then, following the instructions from: [url]http://wiki.alpinelinux.org/wiki/Setting_up_LVM_on_GPT-labeled_disks [/url], to creat the necessary partitions:
-
nvme0n1p1 (256 MB with ext4 for boot)
nvme0n1p2 - PV
[indent]vg0 VG
alpine_root (8G w/ ext4 LV)
alpine_swap (4G w/ mkswap LV) [/indent]
Problem
On rebooting; I get the following error:
[ui]mount: mounting /dev/vg0/alpine_root on /sysroot failed: No such file or directory
Mouting root failed
initramfs emergency recovery shell launched. [/ui].
I try to run the following in the recovery shell:
lvm vgchange -ay
lvm lvdisplay
mount -t ext4 /dev/vg0/alpine_root /sysroot
mount: mounting /dev/vg0/alpine_root on /sysroot failed: No such device
If it is of any value; the kernel boot parameters are (from dmesg):
kernel command line: root=/dev/vg0/alpine_root modules=sd-mod,usb-storage,ext4 nomodeset quiet .
Appreciate any guidance on how to resolve this and boot the desktop
Many thanks.
Kz.
Here is the solution to my own problem - with many thanks to N Copa for the guidance:
short version....
The problem was that the kernel couldn't understand the NVME partition as it did not have the right module. Thus, the solution was to add nvme.ko to the initramfs.
long version....
As Alpine was already installed on the NVME device - here are the steps I followed to fix the not-booting problem:
PS:
(A) as lvm2 & mkinitfs are available in the USB (i.e. the local repository) - connection to Internet is not mandatory ... as I was in debug mode; I didn't want to take chances with any stale packages.
(B) To check if the new initramfs has the nvme module - do the following:
before unmounting the nvme partitions
mkdir /tmp/blowup note this is the tmp for in RAM OS
cp /mnt/boot/initramfs-grsec /tmp/blowup/initramfs-grsec.gz
cd /tmp/blowup
gunzip initramfs-grsec.gz
cpio -ivF initramfs.grsec this expands the initram file system in the current dir
cd ./lib/modules/4.1.15-2-grsec/kernel/drivers/block within the tmp/blowup dir ... the kernel version matching that of the running kernel in Alpine v3.3
ls -l
voila the dir has nvme.ko