You are not logged in.

#1 2023-06-27 14:51:21

Kaziuuu
Member
From: Opatów
Registered: 2023-06-27
Posts: 2

Trouble without nitrd/initramfs in kernel arch | LVM2,GRUB,EXT4,NVME

I recently started compiling my own kernel (based on arch), and I decided to delete initrd/initramfs from my kernel option.
   [ ] Initial RAM filesystem and RAM disk (initramfs/initrd) support

Unfortunately, I met many problems with booting process, and I decided to write that on topic for smartest people which maybe resolve that.
In arch wiki I didn't found any thread about compiling arch kernel without initrd/initramfs, then I decided to research information.
I read that instruction about compiling system without initial RAM, and carefully doing steps.
   https://firasuke.github.io/DOTSLASHLINU … initramfs/

It's good to mention, I'm using lvm2, ext4, nvme, grub.
   [.] The Extended 4 (ext4) filesystem
   <.> NVM Express block device
    [.] Multiple devices driver support (RAID and LVM)
    I turned off many things (a lot), like ATA, SCSI, etc...
    I am not using that devices in my computer.

If someone click in the link on top, will see fstab configuration. In this case I found first issue.
When everyone have disk like /dev/sda1... I have that:

NAME                                  MAJ:MIN RM   SIZE RO TYPE MOUNTPOINTS
nvme1n1                            259:0        0 476.9G       0 disk
|-vol_mapper-BACKUP    253:0        0    80G         0 lvm  /mnt/BACKUP
`-vol_mapper-FULL           253:1        0 429.3G      0 lvm  /mnt/FULL
nvme0n1                            259:1        0 232.9G      0 disk
|-nvme0n1p1                    259:2        0   512M      0 part
`-nvme0n1p2                     259:3        0 232.4G      0 part
  |-vol_mapper-FULL        253:1        0 429.3G      0 lvm  /mnt/FULL
  |-vol_mapper-SYSTEM  253:2         0    80G        0 lvm  /
  `-vol_mapper-USER        253:3         0   120G      0 lvm  /home

And big question, which one is correct? I think it's /dev/mapper/vol_mapper-SYSTEM, because it is root (/).
However I don't know that will works properly, because I don't have found any information about compatible with LVM2.

But, kernel such as xanmod, and normal linux can read fstab and boot.
  /dev/mapper/vol_mapper-SYSTEM         /               ext4            rw,relatime,stripe=32   0 1

I wrote grub like that:
  GRUB_CMDLINE_LINUX="root=/dev/mapper/vol_mapper-SYSTEM rootfstype=ext4 "

Later copy the bzImage, updated grub, and... only title: "booting linux" or something like that...
WHY? Because my computer has a USB mass storage device, and that was it. My usb blocked boot process.
After four hours of compiling kernel, I finally unplug USB mass storage device, and then...
Panic kernel... ); In nutshell: /dev/root: Can't open, go away! Seriously, root fs can't be mount. I have screenshots of error comunication.

Someone know what's went wrong?

Offline

#2 2023-06-27 14:54:10

Scimmia
Fellow
Registered: 2012-09-01
Posts: 13,726

Re: Trouble without nitrd/initramfs in kernel arch | LVM2,GRUB,EXT4,NVME

And how are you expecting to access the LVM without an initrd? The whole point of early userspace is to make the root filesystem available.

Offline

Board footer

Powered by FluxBB