cloudius-systems / osv

OSv, a new operating system for the cloud.
osv.io
Other
4.05k stars 603 forks source link

ramfs and /dev/ #1303

Open m-mueller678 opened 4 months ago

m-mueller678 commented 4 months ago

when using ramfs and the cli image with a custom command line, /dev/ is empty:

./scripts/build modules=cli fs=ramfs -j$(nproc) && ./scripts/run.py -e cli
/# ls /dev

When either omitting -e cli or changing to fs=rofs , /dev/ is populated:

/# ls /dev
console null    random  urandom vblk0   vblk0.1
/# 

I stumbled upon this with a custom binary (not cli) where the lack of /dev/random was causing problems

wkozaczuk commented 3 months ago

Thanks for reporting this issue. This looks like a bug. I wonder if the /dev is not mounted correctly when running an image with a ramfs root filesystem. Or it is a bug in ramfs vnodes layer or maybe something else. I will try to take a look.