View previous topic :: View next topic |
Author |
Message |
g-w n00b
Joined: 06 Apr 2022 Posts: 8
|
Posted: Wed Apr 06, 2022 3:22 am Post subject: systemd-boot root=/dev/ram0 |
|
|
Today I installed Gentoo with OpenRC and systemd-boot. It created the following entry:
Code: |
title Gentoo/Linux
version 5.15.32-gentoo-dist
machine-id Default
options root=/dev/ram0
linux /Default/5.15.32-gentoo-dist/linux
initrd /Default/5.15.32-gentoo-dist/initrd
|
My actual root is /dev/sda3. Now, the entry created fails to boot, landing in a Dracut emergency shell. When corrected to /dev/sda3, it boots. But what is /dev/ram0 and why did systemd-boot set it as my root drive? It does not exist. |
|
Back to top |
|
|
jpsollie Apprentice
Joined: 17 Aug 2013 Posts: 291
|
Posted: Sat Apr 16, 2022 4:08 am Post subject: |
|
|
/dev/ram0 is the device name of your ramdisk.
When your kernel loads from an initial ramdisk, it creates a virtual device /dev/ram0 to boot from. the bootloader puts the ramdisk up there in memory, so your kernel can boot.
When you boot it, it will find things like kernel modules, basic settings etc in the ramdisk to instruct how to proceed.
The fact that it doesn't work sounds like:
-you didn't generate ramdisk correctly. Check the gentoo handbook / wiki for that, you may have missed something
-your fstab in the ramdisk has an incorrect device set for the root filesystem (/) _________________ The power of Gentoo optimization (not overclocked): [img]https://www.passmark.com/baselines/V10/images/503714802842.png[/img] |
|
Back to top |
|
|
Phoenix591 Guru
Joined: 17 Sep 2007 Posts: 488
|
Posted: Sat Apr 16, 2022 7:33 am Post subject: |
|
|
when trying to come up with the commandline to use for automatically generated entries, systemd-boot first looks at /etc/kernel/cmdline, and if it doesn't exist, looks at /usr/lib/kernel/cmdline, and if that also does not exist, falls back to /proc/cmdline ( the current commandline used for the kernel). This last option is what it did: it used the livecd's root=/dev/ram0 for your actual install. |
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54420 Location: 56N 3W
|
Posted: Sat Apr 16, 2022 9:48 am Post subject: |
|
|
g-w,
/dev/ram0 is your first ram disk.
Once upon a time, the initrd was loaded into /dev/ram0 and the kernel was told to look for it there.
That's not been the case for a long time now. Your kernel may not even have ramdisk support enabled. Its been replaced with tmpfs.
There is much tighter integration between the kernel and initramfs these days. The kernel will use it if its there so root=/dev/ram0 is no longer required to mouth the temporary root filesystem. _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
|