1

I've been rolling my own "minimal" linux system under WMware based on the 5.15.x kernel. I don't use an initramfs but do include support for the default max 16 ramdrives in the kernel build config. Everything works great. For fun I decided to mount a ramdisk on /tmp so I did

mknod /dev/ram1 b 1 1 
mkfs.ext2 /dev/ram1 4096
mount -t ext2 /dev/ram1 /tmp

It seems fine, and mount shows that /dev/ram1 is mounted on /tmp, but df thinks /dev/loop0 is mounted on /tmp. I use loop0 for another purpose which is now broken, so there is some confusion in the system between loop0 and ram1. I wonder why? loop0 has device numbers 7,0 and ram1 has numbers 1,1.

  • 1
    output of df as well as /proc/mounts? – frostschutz Jan 31 '22 at 17:11
  • 1
    You're rolling your own. So have you inadvertently got ram and loop sharing the same device major number? Have you got /dev/ram* and /dev/loop* device nodes incorrect? – Chris Davies Feb 01 '22 at 14:52
  • I deleted /dev/ram1 and recreated and now all is well. I think I had made it a character device rather than block. Maybe in that situation the first available block device gets recruited to buffer writes? Anyway thx 4 comments. – Okhariatane Feb 02 '22 at 14:29

0 Answers0