Boot on aufs layered root file system
Clash Royale CLAN TAG#URR8PPP
up vote
0
down vote
favorite
I would like to have a root file system composed of several aufs branches mounted on /
.
My Linux is a custom one created using buildroot and deployed on a board with a SAMA5D2 processor.
The mmc of my board is partionned as follow:
<device> <size> <type> <flag>
/dev/mmcblk0p1 20M FAT32 boot1
/dev/mmcblk0p2 20M FAT32 boot2
/dev/mmcblk0p3 500M ext2 rootfs
/dev/mmcblk0p4 13.2G Extended partition -
/dev/mmcblk0p5 100M ext2 factory_application
/dev/mmcblk0p6 500M ext2 update_overlays1
/dev/mmcblk0p7 500M ext2 update_overlays2
/dev/mmcblk0p8 12.1G ext2 persistant_data
There are two boot partition and two update overlays to be mounted as read/write when an update will be applied, then partitions are switched.
I want the root file system to be layered as follow
upper layer | persistant_data read-write
| update_overlays read-only
| factory_application read-only
| rootfs read-only
lower layer V boot read-only
What I have done so far
So far I have been able to mount partitions at boot and to create a aufs mount point as follow:
Here are kernel parameters
console=ttyS0,115200n8 root=/dev/mmcblk0p3 ro rootwait quiet g_ether.host_addr=00:b0:ce:00:00:02 g_ether.dev_addr=00:b0:ce:00:00:01
Here is fstab
# cat /etc/fstab
# <file system> <mount pt> <type> <options> <dump> <pass>
/dev/root / ext2 ro,noauto 0 1
proc /proc proc defaults 0 0
devpts /dev/pts devpts defaults,gid=5,mode=620,ptmxmode=0666 0 0
tmpfs /dev/shm tmpfs mode=0777 0 0
tmpfs /tmp tmpfs mode=1777 0 0
tmpfs /run tmpfs mode=0755,nosuid,nodev 0 0
sysfs /sys sysfs defaults 0 0
/dev/mmcblk0p1 /mnt/boot vfat ro 0 0
/dev/mmcblk0p5 /mnt/factory ext2 ro 0 0
/dev/mmcblk0p6 /mnt/update ext2 ro 0 0
/dev/mmcblk0p8 /mnt/pd ext2 defaults 0 0
And here is inittab
# cat /etc/inittab
# /etc/inittab
#
# Copyright (C) 2001 Erik Andersen <andersen@codepoet.org>
#
# Note: BusyBox init doesn't support runlevels. The runlevels field is
# completely ignored by BusyBox init. If you want runlevels, use
# sysvinit.
#
# Format for each entry: <id>:<runlevels>:<action>:<process>
#
# id == tty to run on, or empty for /dev/console
# runlevels == ignored
# action == one of sysinit, respawn, askfirst, wait, and once
# process == program to run
# Startup the system
::sysinit:/bin/mount -t proc proc /proc
::sysinit:/bin/mkdir -p /dev/pts
::sysinit:/bin/mkdir -p /dev/shm
::sysinit:/bin/mount -a
::sysinit:/bin/mount -t aufs -o br=/mnt/pd=rw:/mnt/update=ro:/mnt/factory=ro:/mnt/boot=ro,udba=reval none /mnt/aufs
::sysinit:/bin/hostname -F /etc/hostname
# now run any rc scripts
::sysinit:/etc/init.d/rcS
# Put a getty on the serial port
console::respawn:/sbin/getty -L console 0 vt100 # GENERIC_SERIAL
# Stuff to do for the 3-finger salute
#::ctrlaltdel:/sbin/reboot
# Stuff to do before rebooting
::shutdown:/etc/init.d/rcK
::shutdown:/sbin/swapoff -a
::shutdown:/bin/umount -a -r
As you can see, the aufs mount is working quite well
# mount
/dev/root on / type ext2 (ro,relatime,block_validity,barrier,user_xattr)
devtmpfs on /dev type devtmpfs (rw,relatime,size=222416k,nr_inodes=55604,mode=755)
proc on /proc type proc (rw,relatime)
devpts on /dev/pts type devpts (rw,relatime,gid=5,mode=620,ptmxmode=666)
tmpfs on /dev/shm type tmpfs (rw,relatime,mode=777)
tmpfs on /tmp type tmpfs (rw,relatime)
tmpfs on /run type tmpfs (rw,nosuid,nodev,relatime,mode=755)
sysfs on /sys type sysfs (rw,relatime)
/dev/mmcblk0p1 on /mnt/boot type vfat (ro,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=iso8859-1,shortname=mixed,errors=remount-ro)
/dev/mmcblk0p5 on /mnt/factory type ext2 (ro,relatime,block_validity,barrier,user_xattr)
/dev/mmcblk0p6 on /mnt/update type ext2 (ro,relatime,block_validity,barrier,user_xattr)
/dev/mmcblk0p8 on /mnt/pd type ext2 (rw,relatime,block_validity,barrier,user_xattr)
none on /mnt/aufs type aufs (rw,relatime,si=a9f95e05)
And the partitions are united in the folder /mnt/aufs
# ls /mnt/aufs/
boot_file lost+found sama5d2.dtb zImage
factory_file pd_file update_file
The problem I'm facing
What I would like to do is to have the aufs mount into /
instead of /mnt/aufs
- First try
However when I'm trying to use /
as the mountpoint, the mount command seems to work but I can't see any file from others partitions into /
folder
# mount -t aufs -o br=/mnt/pd=rw:/mnt/update=ro:/mnt/factory=ro:/mnt/boot=ro,udba=reval none /
# mount
[...]
none on / type aufs (rw,relatime,si=9ef5aaee)
Files from the different partitions aren't present into /
# ls /
bin etc lib linuxrc mnt proc run sys usr
dev home lib32 media opt root sbin tmp var
- Second try
I have also tried to mount /
as a layer into /mnt/aufs
which worked well.
# mount -t aufs -o br=/mnt/pd=rw:/mnt/update=ro:/mnt/factory=ro:/=ro:/mnt/boot=ro,udba=reval none /mnt/aufs
# mount
[...]
none on /mnt/aufs type aufs (rw,relatime,si=73ed3d1d)
Now files from the different partitions are present into /mnt/aufs
# ls /mnt/aufs/
bin home media root tmp
boot_file lib mnt run update_file
dev lib32 opt sama5d2.dtb usr
etc linuxrc pd_file sbin var
factory_file lost+found proc sys zImage
- Third try
The last try I have done was to try to mount /
as a layer into /
.
# mount -t aufs -o br=/mnt/pd=rw:/mnt/update=ro:/mnt/factory=ro:/=ro:/mnt/boot=ro,udba=reval none /
# mount
[...]
none on / type aufs (rw,relatime,si=73ed391d)
Once again the mount command seems to work but files aren't present into /
# ls /
bin etc lib linuxrc mnt proc run sys usr
dev home lib32 media opt root sbin tmp var
How could I achieve my goal of having my different partitions mounted into /
as aufs layered root filesystem ?
linux root-filesystem buildroot aufs
add a comment |
up vote
0
down vote
favorite
I would like to have a root file system composed of several aufs branches mounted on /
.
My Linux is a custom one created using buildroot and deployed on a board with a SAMA5D2 processor.
The mmc of my board is partionned as follow:
<device> <size> <type> <flag>
/dev/mmcblk0p1 20M FAT32 boot1
/dev/mmcblk0p2 20M FAT32 boot2
/dev/mmcblk0p3 500M ext2 rootfs
/dev/mmcblk0p4 13.2G Extended partition -
/dev/mmcblk0p5 100M ext2 factory_application
/dev/mmcblk0p6 500M ext2 update_overlays1
/dev/mmcblk0p7 500M ext2 update_overlays2
/dev/mmcblk0p8 12.1G ext2 persistant_data
There are two boot partition and two update overlays to be mounted as read/write when an update will be applied, then partitions are switched.
I want the root file system to be layered as follow
upper layer | persistant_data read-write
| update_overlays read-only
| factory_application read-only
| rootfs read-only
lower layer V boot read-only
What I have done so far
So far I have been able to mount partitions at boot and to create a aufs mount point as follow:
Here are kernel parameters
console=ttyS0,115200n8 root=/dev/mmcblk0p3 ro rootwait quiet g_ether.host_addr=00:b0:ce:00:00:02 g_ether.dev_addr=00:b0:ce:00:00:01
Here is fstab
# cat /etc/fstab
# <file system> <mount pt> <type> <options> <dump> <pass>
/dev/root / ext2 ro,noauto 0 1
proc /proc proc defaults 0 0
devpts /dev/pts devpts defaults,gid=5,mode=620,ptmxmode=0666 0 0
tmpfs /dev/shm tmpfs mode=0777 0 0
tmpfs /tmp tmpfs mode=1777 0 0
tmpfs /run tmpfs mode=0755,nosuid,nodev 0 0
sysfs /sys sysfs defaults 0 0
/dev/mmcblk0p1 /mnt/boot vfat ro 0 0
/dev/mmcblk0p5 /mnt/factory ext2 ro 0 0
/dev/mmcblk0p6 /mnt/update ext2 ro 0 0
/dev/mmcblk0p8 /mnt/pd ext2 defaults 0 0
And here is inittab
# cat /etc/inittab
# /etc/inittab
#
# Copyright (C) 2001 Erik Andersen <andersen@codepoet.org>
#
# Note: BusyBox init doesn't support runlevels. The runlevels field is
# completely ignored by BusyBox init. If you want runlevels, use
# sysvinit.
#
# Format for each entry: <id>:<runlevels>:<action>:<process>
#
# id == tty to run on, or empty for /dev/console
# runlevels == ignored
# action == one of sysinit, respawn, askfirst, wait, and once
# process == program to run
# Startup the system
::sysinit:/bin/mount -t proc proc /proc
::sysinit:/bin/mkdir -p /dev/pts
::sysinit:/bin/mkdir -p /dev/shm
::sysinit:/bin/mount -a
::sysinit:/bin/mount -t aufs -o br=/mnt/pd=rw:/mnt/update=ro:/mnt/factory=ro:/mnt/boot=ro,udba=reval none /mnt/aufs
::sysinit:/bin/hostname -F /etc/hostname
# now run any rc scripts
::sysinit:/etc/init.d/rcS
# Put a getty on the serial port
console::respawn:/sbin/getty -L console 0 vt100 # GENERIC_SERIAL
# Stuff to do for the 3-finger salute
#::ctrlaltdel:/sbin/reboot
# Stuff to do before rebooting
::shutdown:/etc/init.d/rcK
::shutdown:/sbin/swapoff -a
::shutdown:/bin/umount -a -r
As you can see, the aufs mount is working quite well
# mount
/dev/root on / type ext2 (ro,relatime,block_validity,barrier,user_xattr)
devtmpfs on /dev type devtmpfs (rw,relatime,size=222416k,nr_inodes=55604,mode=755)
proc on /proc type proc (rw,relatime)
devpts on /dev/pts type devpts (rw,relatime,gid=5,mode=620,ptmxmode=666)
tmpfs on /dev/shm type tmpfs (rw,relatime,mode=777)
tmpfs on /tmp type tmpfs (rw,relatime)
tmpfs on /run type tmpfs (rw,nosuid,nodev,relatime,mode=755)
sysfs on /sys type sysfs (rw,relatime)
/dev/mmcblk0p1 on /mnt/boot type vfat (ro,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=iso8859-1,shortname=mixed,errors=remount-ro)
/dev/mmcblk0p5 on /mnt/factory type ext2 (ro,relatime,block_validity,barrier,user_xattr)
/dev/mmcblk0p6 on /mnt/update type ext2 (ro,relatime,block_validity,barrier,user_xattr)
/dev/mmcblk0p8 on /mnt/pd type ext2 (rw,relatime,block_validity,barrier,user_xattr)
none on /mnt/aufs type aufs (rw,relatime,si=a9f95e05)
And the partitions are united in the folder /mnt/aufs
# ls /mnt/aufs/
boot_file lost+found sama5d2.dtb zImage
factory_file pd_file update_file
The problem I'm facing
What I would like to do is to have the aufs mount into /
instead of /mnt/aufs
- First try
However when I'm trying to use /
as the mountpoint, the mount command seems to work but I can't see any file from others partitions into /
folder
# mount -t aufs -o br=/mnt/pd=rw:/mnt/update=ro:/mnt/factory=ro:/mnt/boot=ro,udba=reval none /
# mount
[...]
none on / type aufs (rw,relatime,si=9ef5aaee)
Files from the different partitions aren't present into /
# ls /
bin etc lib linuxrc mnt proc run sys usr
dev home lib32 media opt root sbin tmp var
- Second try
I have also tried to mount /
as a layer into /mnt/aufs
which worked well.
# mount -t aufs -o br=/mnt/pd=rw:/mnt/update=ro:/mnt/factory=ro:/=ro:/mnt/boot=ro,udba=reval none /mnt/aufs
# mount
[...]
none on /mnt/aufs type aufs (rw,relatime,si=73ed3d1d)
Now files from the different partitions are present into /mnt/aufs
# ls /mnt/aufs/
bin home media root tmp
boot_file lib mnt run update_file
dev lib32 opt sama5d2.dtb usr
etc linuxrc pd_file sbin var
factory_file lost+found proc sys zImage
- Third try
The last try I have done was to try to mount /
as a layer into /
.
# mount -t aufs -o br=/mnt/pd=rw:/mnt/update=ro:/mnt/factory=ro:/=ro:/mnt/boot=ro,udba=reval none /
# mount
[...]
none on / type aufs (rw,relatime,si=73ed391d)
Once again the mount command seems to work but files aren't present into /
# ls /
bin etc lib linuxrc mnt proc run sys usr
dev home lib32 media opt root sbin tmp var
How could I achieve my goal of having my different partitions mounted into /
as aufs layered root filesystem ?
linux root-filesystem buildroot aufs
add a comment |
up vote
0
down vote
favorite
up vote
0
down vote
favorite
I would like to have a root file system composed of several aufs branches mounted on /
.
My Linux is a custom one created using buildroot and deployed on a board with a SAMA5D2 processor.
The mmc of my board is partionned as follow:
<device> <size> <type> <flag>
/dev/mmcblk0p1 20M FAT32 boot1
/dev/mmcblk0p2 20M FAT32 boot2
/dev/mmcblk0p3 500M ext2 rootfs
/dev/mmcblk0p4 13.2G Extended partition -
/dev/mmcblk0p5 100M ext2 factory_application
/dev/mmcblk0p6 500M ext2 update_overlays1
/dev/mmcblk0p7 500M ext2 update_overlays2
/dev/mmcblk0p8 12.1G ext2 persistant_data
There are two boot partition and two update overlays to be mounted as read/write when an update will be applied, then partitions are switched.
I want the root file system to be layered as follow
upper layer | persistant_data read-write
| update_overlays read-only
| factory_application read-only
| rootfs read-only
lower layer V boot read-only
What I have done so far
So far I have been able to mount partitions at boot and to create a aufs mount point as follow:
Here are kernel parameters
console=ttyS0,115200n8 root=/dev/mmcblk0p3 ro rootwait quiet g_ether.host_addr=00:b0:ce:00:00:02 g_ether.dev_addr=00:b0:ce:00:00:01
Here is fstab
# cat /etc/fstab
# <file system> <mount pt> <type> <options> <dump> <pass>
/dev/root / ext2 ro,noauto 0 1
proc /proc proc defaults 0 0
devpts /dev/pts devpts defaults,gid=5,mode=620,ptmxmode=0666 0 0
tmpfs /dev/shm tmpfs mode=0777 0 0
tmpfs /tmp tmpfs mode=1777 0 0
tmpfs /run tmpfs mode=0755,nosuid,nodev 0 0
sysfs /sys sysfs defaults 0 0
/dev/mmcblk0p1 /mnt/boot vfat ro 0 0
/dev/mmcblk0p5 /mnt/factory ext2 ro 0 0
/dev/mmcblk0p6 /mnt/update ext2 ro 0 0
/dev/mmcblk0p8 /mnt/pd ext2 defaults 0 0
And here is inittab
# cat /etc/inittab
# /etc/inittab
#
# Copyright (C) 2001 Erik Andersen <andersen@codepoet.org>
#
# Note: BusyBox init doesn't support runlevels. The runlevels field is
# completely ignored by BusyBox init. If you want runlevels, use
# sysvinit.
#
# Format for each entry: <id>:<runlevels>:<action>:<process>
#
# id == tty to run on, or empty for /dev/console
# runlevels == ignored
# action == one of sysinit, respawn, askfirst, wait, and once
# process == program to run
# Startup the system
::sysinit:/bin/mount -t proc proc /proc
::sysinit:/bin/mkdir -p /dev/pts
::sysinit:/bin/mkdir -p /dev/shm
::sysinit:/bin/mount -a
::sysinit:/bin/mount -t aufs -o br=/mnt/pd=rw:/mnt/update=ro:/mnt/factory=ro:/mnt/boot=ro,udba=reval none /mnt/aufs
::sysinit:/bin/hostname -F /etc/hostname
# now run any rc scripts
::sysinit:/etc/init.d/rcS
# Put a getty on the serial port
console::respawn:/sbin/getty -L console 0 vt100 # GENERIC_SERIAL
# Stuff to do for the 3-finger salute
#::ctrlaltdel:/sbin/reboot
# Stuff to do before rebooting
::shutdown:/etc/init.d/rcK
::shutdown:/sbin/swapoff -a
::shutdown:/bin/umount -a -r
As you can see, the aufs mount is working quite well
# mount
/dev/root on / type ext2 (ro,relatime,block_validity,barrier,user_xattr)
devtmpfs on /dev type devtmpfs (rw,relatime,size=222416k,nr_inodes=55604,mode=755)
proc on /proc type proc (rw,relatime)
devpts on /dev/pts type devpts (rw,relatime,gid=5,mode=620,ptmxmode=666)
tmpfs on /dev/shm type tmpfs (rw,relatime,mode=777)
tmpfs on /tmp type tmpfs (rw,relatime)
tmpfs on /run type tmpfs (rw,nosuid,nodev,relatime,mode=755)
sysfs on /sys type sysfs (rw,relatime)
/dev/mmcblk0p1 on /mnt/boot type vfat (ro,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=iso8859-1,shortname=mixed,errors=remount-ro)
/dev/mmcblk0p5 on /mnt/factory type ext2 (ro,relatime,block_validity,barrier,user_xattr)
/dev/mmcblk0p6 on /mnt/update type ext2 (ro,relatime,block_validity,barrier,user_xattr)
/dev/mmcblk0p8 on /mnt/pd type ext2 (rw,relatime,block_validity,barrier,user_xattr)
none on /mnt/aufs type aufs (rw,relatime,si=a9f95e05)
And the partitions are united in the folder /mnt/aufs
# ls /mnt/aufs/
boot_file lost+found sama5d2.dtb zImage
factory_file pd_file update_file
The problem I'm facing
What I would like to do is to have the aufs mount into /
instead of /mnt/aufs
- First try
However when I'm trying to use /
as the mountpoint, the mount command seems to work but I can't see any file from others partitions into /
folder
# mount -t aufs -o br=/mnt/pd=rw:/mnt/update=ro:/mnt/factory=ro:/mnt/boot=ro,udba=reval none /
# mount
[...]
none on / type aufs (rw,relatime,si=9ef5aaee)
Files from the different partitions aren't present into /
# ls /
bin etc lib linuxrc mnt proc run sys usr
dev home lib32 media opt root sbin tmp var
- Second try
I have also tried to mount /
as a layer into /mnt/aufs
which worked well.
# mount -t aufs -o br=/mnt/pd=rw:/mnt/update=ro:/mnt/factory=ro:/=ro:/mnt/boot=ro,udba=reval none /mnt/aufs
# mount
[...]
none on /mnt/aufs type aufs (rw,relatime,si=73ed3d1d)
Now files from the different partitions are present into /mnt/aufs
# ls /mnt/aufs/
bin home media root tmp
boot_file lib mnt run update_file
dev lib32 opt sama5d2.dtb usr
etc linuxrc pd_file sbin var
factory_file lost+found proc sys zImage
- Third try
The last try I have done was to try to mount /
as a layer into /
.
# mount -t aufs -o br=/mnt/pd=rw:/mnt/update=ro:/mnt/factory=ro:/=ro:/mnt/boot=ro,udba=reval none /
# mount
[...]
none on / type aufs (rw,relatime,si=73ed391d)
Once again the mount command seems to work but files aren't present into /
# ls /
bin etc lib linuxrc mnt proc run sys usr
dev home lib32 media opt root sbin tmp var
How could I achieve my goal of having my different partitions mounted into /
as aufs layered root filesystem ?
linux root-filesystem buildroot aufs
I would like to have a root file system composed of several aufs branches mounted on /
.
My Linux is a custom one created using buildroot and deployed on a board with a SAMA5D2 processor.
The mmc of my board is partionned as follow:
<device> <size> <type> <flag>
/dev/mmcblk0p1 20M FAT32 boot1
/dev/mmcblk0p2 20M FAT32 boot2
/dev/mmcblk0p3 500M ext2 rootfs
/dev/mmcblk0p4 13.2G Extended partition -
/dev/mmcblk0p5 100M ext2 factory_application
/dev/mmcblk0p6 500M ext2 update_overlays1
/dev/mmcblk0p7 500M ext2 update_overlays2
/dev/mmcblk0p8 12.1G ext2 persistant_data
There are two boot partition and two update overlays to be mounted as read/write when an update will be applied, then partitions are switched.
I want the root file system to be layered as follow
upper layer | persistant_data read-write
| update_overlays read-only
| factory_application read-only
| rootfs read-only
lower layer V boot read-only
What I have done so far
So far I have been able to mount partitions at boot and to create a aufs mount point as follow:
Here are kernel parameters
console=ttyS0,115200n8 root=/dev/mmcblk0p3 ro rootwait quiet g_ether.host_addr=00:b0:ce:00:00:02 g_ether.dev_addr=00:b0:ce:00:00:01
Here is fstab
# cat /etc/fstab
# <file system> <mount pt> <type> <options> <dump> <pass>
/dev/root / ext2 ro,noauto 0 1
proc /proc proc defaults 0 0
devpts /dev/pts devpts defaults,gid=5,mode=620,ptmxmode=0666 0 0
tmpfs /dev/shm tmpfs mode=0777 0 0
tmpfs /tmp tmpfs mode=1777 0 0
tmpfs /run tmpfs mode=0755,nosuid,nodev 0 0
sysfs /sys sysfs defaults 0 0
/dev/mmcblk0p1 /mnt/boot vfat ro 0 0
/dev/mmcblk0p5 /mnt/factory ext2 ro 0 0
/dev/mmcblk0p6 /mnt/update ext2 ro 0 0
/dev/mmcblk0p8 /mnt/pd ext2 defaults 0 0
And here is inittab
# cat /etc/inittab
# /etc/inittab
#
# Copyright (C) 2001 Erik Andersen <andersen@codepoet.org>
#
# Note: BusyBox init doesn't support runlevels. The runlevels field is
# completely ignored by BusyBox init. If you want runlevels, use
# sysvinit.
#
# Format for each entry: <id>:<runlevels>:<action>:<process>
#
# id == tty to run on, or empty for /dev/console
# runlevels == ignored
# action == one of sysinit, respawn, askfirst, wait, and once
# process == program to run
# Startup the system
::sysinit:/bin/mount -t proc proc /proc
::sysinit:/bin/mkdir -p /dev/pts
::sysinit:/bin/mkdir -p /dev/shm
::sysinit:/bin/mount -a
::sysinit:/bin/mount -t aufs -o br=/mnt/pd=rw:/mnt/update=ro:/mnt/factory=ro:/mnt/boot=ro,udba=reval none /mnt/aufs
::sysinit:/bin/hostname -F /etc/hostname
# now run any rc scripts
::sysinit:/etc/init.d/rcS
# Put a getty on the serial port
console::respawn:/sbin/getty -L console 0 vt100 # GENERIC_SERIAL
# Stuff to do for the 3-finger salute
#::ctrlaltdel:/sbin/reboot
# Stuff to do before rebooting
::shutdown:/etc/init.d/rcK
::shutdown:/sbin/swapoff -a
::shutdown:/bin/umount -a -r
As you can see, the aufs mount is working quite well
# mount
/dev/root on / type ext2 (ro,relatime,block_validity,barrier,user_xattr)
devtmpfs on /dev type devtmpfs (rw,relatime,size=222416k,nr_inodes=55604,mode=755)
proc on /proc type proc (rw,relatime)
devpts on /dev/pts type devpts (rw,relatime,gid=5,mode=620,ptmxmode=666)
tmpfs on /dev/shm type tmpfs (rw,relatime,mode=777)
tmpfs on /tmp type tmpfs (rw,relatime)
tmpfs on /run type tmpfs (rw,nosuid,nodev,relatime,mode=755)
sysfs on /sys type sysfs (rw,relatime)
/dev/mmcblk0p1 on /mnt/boot type vfat (ro,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=iso8859-1,shortname=mixed,errors=remount-ro)
/dev/mmcblk0p5 on /mnt/factory type ext2 (ro,relatime,block_validity,barrier,user_xattr)
/dev/mmcblk0p6 on /mnt/update type ext2 (ro,relatime,block_validity,barrier,user_xattr)
/dev/mmcblk0p8 on /mnt/pd type ext2 (rw,relatime,block_validity,barrier,user_xattr)
none on /mnt/aufs type aufs (rw,relatime,si=a9f95e05)
And the partitions are united in the folder /mnt/aufs
# ls /mnt/aufs/
boot_file lost+found sama5d2.dtb zImage
factory_file pd_file update_file
The problem I'm facing
What I would like to do is to have the aufs mount into /
instead of /mnt/aufs
- First try
However when I'm trying to use /
as the mountpoint, the mount command seems to work but I can't see any file from others partitions into /
folder
# mount -t aufs -o br=/mnt/pd=rw:/mnt/update=ro:/mnt/factory=ro:/mnt/boot=ro,udba=reval none /
# mount
[...]
none on / type aufs (rw,relatime,si=9ef5aaee)
Files from the different partitions aren't present into /
# ls /
bin etc lib linuxrc mnt proc run sys usr
dev home lib32 media opt root sbin tmp var
- Second try
I have also tried to mount /
as a layer into /mnt/aufs
which worked well.
# mount -t aufs -o br=/mnt/pd=rw:/mnt/update=ro:/mnt/factory=ro:/=ro:/mnt/boot=ro,udba=reval none /mnt/aufs
# mount
[...]
none on /mnt/aufs type aufs (rw,relatime,si=73ed3d1d)
Now files from the different partitions are present into /mnt/aufs
# ls /mnt/aufs/
bin home media root tmp
boot_file lib mnt run update_file
dev lib32 opt sama5d2.dtb usr
etc linuxrc pd_file sbin var
factory_file lost+found proc sys zImage
- Third try
The last try I have done was to try to mount /
as a layer into /
.
# mount -t aufs -o br=/mnt/pd=rw:/mnt/update=ro:/mnt/factory=ro:/=ro:/mnt/boot=ro,udba=reval none /
# mount
[...]
none on / type aufs (rw,relatime,si=73ed391d)
Once again the mount command seems to work but files aren't present into /
# ls /
bin etc lib linuxrc mnt proc run sys usr
dev home lib32 media opt root sbin tmp var
How could I achieve my goal of having my different partitions mounted into /
as aufs layered root filesystem ?
linux root-filesystem buildroot aufs
linux root-filesystem buildroot aufs
edited Dec 6 at 15:35
asked Dec 6 at 14:21
Arkaik
324319
324319
add a comment |
add a comment |
active
oldest
votes
Your Answer
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "106"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f486382%2fboot-on-aufs-layered-root-file-system%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
Thanks for contributing an answer to Unix & Linux Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f486382%2fboot-on-aufs-layered-root-file-system%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown