/boot is mounted twice

Hello,

I installed OpenWrt on my x86 router, version 22.03.3 and I dont remember if on my previous installation have the same issue, but I now notice /root is mounted twice:

root@OpenWrt:~# df -h
Filesystem                Size      Used Available Use% Mounted on
/dev/root               115.0G     62.3M    114.9G   0% /
tmpfs                     7.7G    404.0K      7.7G   0% /tmp
/dev/mmcblk0p1           16.0M      5.7M     10.2M  36% /boot
/dev/mmcblk0p1           16.0M      5.7M     10.2M  36% /boot
tmpfs                   512.0K         0    512.0K   0% /dev
root@OpenWrt:~# lsblk
NAME          MAJ:MIN RM   SIZE RO TYPE MOUNTPOINTS
mmcblk0       179:0    0 116.5G  0 disk
├─mmcblk0p1   179:1    0    16M  0 part /boot
│                                       /boot
├─mmcblk0p2   179:2    0 116.5G  0 part /
└─mmcblk0p128 259:0    0   239K  0 part
mmcblk0boot0  179:8    0     4M  1 disk
mmcblk0boot1  179:16   0     4M  1 disk

is this normal ?

thank you :grinning:

2 Likes

No one ? :face_with_raised_eyebrow:

Same here.

1 Like

This is strange right ?
Why mounted twice /boot ? :thinking:

I found an old issue on GitHub, but I don’t really understand….

1 Like

It doesn't seem to cause any harm, so I guess we can ignore it.

Well, there is nothing too-complex to understand here. This mount looks like a duplicate, but it really isn't.

What OpenWrt intends to do is to mount a subdirectory of the filesystem stored on /dev/mmcblk0p1 to /boot. This is impossible to make in one go. So, first, they mount the whole filesystem from /dev/mmcblk0p1 to /boot. Then they have access to the subdirectory, but it is at /boot/boot, which is not what they want. Thus they use a second mount (a so-called "bind mount", a special mode which makes an already-existing directory appear elsewhere, instead of taking a block device) to make it appear directly on /boot. However, the Linux kernel displays the underlying block device for such bind mounts, which is what confused you.

7 Likes

Ok, I undertstand better but yes it's a bit confusing :sweat_smile:

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.