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
2 Likes
This is strange right ?
Why mounted twice /boot ?
I found an old issue on GitHub, but I don’t really understand….
opened 10:50AM - 18 Jun 19 UTC
closed 05:14AM - 03 Nov 19 UTC
flyspray
*ldir:*
Supply the following if possible:
- Device problem occurs on- seen on… x86 APU2 - may be others.
- Software versions of OpenWrt master
- Steps to reproduce - boot system
<code>
root@Router:~# df
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/root 14080 14080 0 100% /rom
tmpfs 2011892 156 2011736 0% /tmp
/dev/loop0 246016 15140 161244 9% /overlay
overlayfs:/overlay 246016 15140 161244 9% /
/dev/sda1 16112 4172 11616 26% /boot
/dev/sda1 16112 4172 11616 26% /boot
tmpfs 512 0 512 0% /dev
root@Router:/etc/config# block info
/dev/loop0: UUID="cbbd153a-60b0-40e0-800e-b79833957b9f" VERSION="1.12" MOUNT="/overlay" TYPE="f2fs"
/dev/sda1: UUID="57f8f4bc-abf4-655f-bf67-946fc0f9f25b" VERSION="1.0" MOUNT="/boot" TYPE="ext4"
/dev/sda2: UUID="b9caa0dd-b7eb255f-2c2775da-3aa40e49" VERSION="4.0" MOUNT="/rom" TYPE="squashfs"
/dev/sda3: UUID="e92b8416-fe49-409b-a4cf-c71476027159" VERSION="1.12" MOUNT="/mnt/sda3" TYPE="f2fs"
root@Router:/etc/config# cat /etc/config/fstab
config global
option anon_swap '0'
option anon_mount '0'
option auto_swap '1'
option auto_mount '1'
option delay_root '5'
option check_fs '1'
config mount
option target '/mnt/loop0'
option uuid 'dd87006a-ba8e-44f4-a40b-f2cb6181dc4e'
option enabled '0'
config mount
option target '/mnt/sda1'
option uuid '57f8f4bc-abf4-655f-bf67-946fc0f9f25b'
option enabled '0'
config mount
option target '/mnt/sda2'
option uuid '8a1c0748-3d6b7bd1-0192e5c4-7fe0165c'
option enabled '0'
config mount
option target '/mnt/sda3'
option uuid 'e92b8416-fe49-409b-a4cf-c71476027159'
option enabled '1'
root@Router:/etc/config# uname -a
Linux Router 4.14.126 #0 SMP Tue Jun 18 09:45:23 2019 x86_64 GNU/Linux
</code>
1 Like
trendy
January 30, 2023, 11:04pm
5
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
system
Closed
February 10, 2023, 7:51am
8
This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.