I was playing with Grub from its command line, I noticed something that grabbed my intention, I listed the devices through Grub's ls
command and I noticed there's a virtual device named (proc):
grub> ls
(proc) (hd0) (hd0, msdos1)
The interesting aspect of the (proc)
device is that, it contains a compressed Linux kernel, and it's structure is just like is similar to the root directory,
(grub)> ls (proc) /
Device proc: Filesystem type procfs - Sector size 512B - Total size 0Kid
lost+found/ swapfile etc/ bin/ boot/ dev/ home/ lib/ lib64/ mnt/ opt/
vmlinuz initrd.img
--snip--
I conclude that (proc) is an in-memory filesystem where Grub mounts its own root filesystem, it seems to me that grub also uses proc filesystem as usually found in Linux kernel as its root filesystem. What is (proc)
device in Grub and why is it there?