Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 4895

Advanced users • Configuration when booting to RAM

$
0
0
I am attempting to boot my RPi completely from RAM over PXE without an SD card or any other local storage. I have already successfully configured the bootloader to boot from network, and am using dnsmasq's DHCP and TFTP servers to transmit the kernel to the bootloader. I would now like my operating system to be packaged in a single image, so that the root file system can be mounted from ramdisk.

I found several guides and threads online on this topic, but nothing exhaustive:I followed some of these guides but I still have questions. They use initramfs, initcpio and initrd interchangeably, which had me confused, so I tried to be very careful.

What I have done so far:
  1. Patched /etc/default/raspberrypi-kernel to enable INITRD=Yes. According to the guide, this will enable generation of /boot/initrd.img-KVER.
  2. I ran as root: `update-initramfs -c -k $(uname -r)`. This produced the actual image.
Since I have now an image of sorts, I am thinking about how it should be plumbed into the rest of my setup. Specifically:
  • Does the generated .img file contain just the kernel, or does it also have the root partition as well? It seems a bit too small for that.
  • How do I convince the kernel to use a root file system from an image? Do I need to modify /boot/cmdline.txt? I would imagine that at least the `root=` parameter will need to be changed.
  • I have seen people in my situation change /etc/fstab to mount the root file system as tmpfs. Do I need to do that as well? And if I do it, every new tmpfs is empty -- how will this get populated with my system's data?
I would appreciate any advice that you can share!

Statistics: Posted by pmane — Thu Jan 18, 2024 10:43 am



Viewing all articles
Browse latest Browse all 4895

Trending Articles