Modify

Opened 3 years ago

Closed 3 years ago

#19038 closed defect (fixed)

extroot broken

Reported by: rudoyeugene@… Owned by: jow
Priority: response-needed Milestone: Chaos Calmer 15.05
Component: packages Version: Trunk
Keywords: extroot Cc:

Description

Part o the logread output

Thu Feb 19 19:53:18 2015 user.emerg syslog: this file has been obseleted. please call "/sbin/block mount" directly
Thu Feb 19 19:53:18 2015 user.err syslog: /dev/mtdblock3 is already mounted
Thu Feb 19 19:53:18 2015 user.emerg syslog: block: /dev/mtdblock3 is already mounted
Thu Feb 19 19:53:19 2015 authpriv.info dropbear[938]: Not backgrounding
Thu Feb 19 19:53:20 2015 user.emerg syslog: kmodloader: loading kernel modules from /etc/modules-boot.d/*
Thu Feb 19 19:53:20 2015 user.debug syslog: ran 1 iterations
Thu Feb 19 19:53:20 2015 user.err syslog: extroot: failed to load /tmp/jffs_cfg/etc/config/fstab: Entry not found
Thu Feb 19 19:53:20 2015 user.emerg syslog: block: extroot: failed to load /tmp/jffs_cfg/etc/config/fstab: Entry not found
Thu Feb 19 19:53:20 2015 user.emerg syslog: jffs2 is ready
Thu Feb 19 19:53:20 2015 user.emerg syslog: rootfs_data:/dev/mtdblock3 is already mounted as /overlay

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      '1'
        option  check_fs        '0'

config 'mount'
        option  target  '/'
        option  uuid    '62ede9ed-3967-4708-bd61-8fe163d7dc8e'
        option  enabled '1'
        option  fstype 'ext4'
        option  options 'rw,sync'

From official trunk: CHAOS CALMER (Bleeding Edge, r44487)

If I try to mount the drive as /mnt/sda1 - everything is OK
If I try extroot or overlay - not working
Please, help

Attachments (0)

Change History (17)

comment:1 Changed 3 years ago by anonymous

root@OpenWrt:~# export PREINIT=1
root@OpenWrt:~# mount_root
block: extroot: failed to load /tmp/jffs_cfg/etc/config/fstab: Entry not found
jffs2 is ready
rootfs_data:/dev/mtdblock3 is already mounted as /overlay

comment:2 Changed 3 years ago by anonymous

Got same problem with ext overlay on current git.
I think problem comes because /overlay now contains upper and work dirs, so etc path now: /overlay/upper/etc.

comment:3 Changed 3 years ago by anonymous

I was right.
Workaround: make links in jffs and ext4 overlays:

cd /overlay && ln -s upper/etc etc
cd /mnt/sda1 && ln -s upper/etc etc

comment:4 Changed 3 years ago by anonymous

Thia Workaround is not working for me :(
Hope we see a Fix ASAP.

comment:5 Changed 3 years ago by ambrosa

See /ticket/18999.html

A fix is in progress.
I see first fix some hours ago: /changeset/44535.html 44536 44537

comment:6 Changed 3 years ago by jow

  • Owner changed from developers to jow
  • Priority changed from high to response-needed
  • Status changed from new to accepted

I've see na tleast one report of a working whole external root after the latest changes and personally tested external overlay on TP-Link routers and within x86 KVMs using ext4 images.

If some more people can confirm that it is working I'm going to close this ticket.

comment:7 Changed 3 years ago by ambrosa

Ok, I will build new trunk (target Lantiq , TPLINK TDW 8970) saturday morning and I will report asap here.

comment:8 Changed 3 years ago by danielb7390@…

Hi,
I'm using r44532 and have same problem.
Tried overlay and full root. same problem it doesn't mount.

root@OpenWrt:~# 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      '50'
        option  check_fs        '0'

config 'mount'
        option  target        '/'
        option  uuid          'd34f7ee6-9448-4965-b523-b87f1a4c2190'
        option  enabled       '1'
        option fstype         'ext4'
        option options        'rw,sync'
        option enabled_fsck   '0'

If i then type those commands as shown above it works!

root@OpenWrt:~# export PREINIT=1
root@OpenWrt:~# mount_root
fs-state: switched to extroot
root@OpenWrt:/rom/root# df
Filesystem           1K-blocks      Used Available Use% Mounted on
rootfs                  222988      8859    198309   4% /
/dev/root                 2048      2048         0 100% /rom/rom
tmpfs                    14512        64     14448   0% /tmp
/dev/mtdblock6             768       632       136  82% /overlay
overlayfs:/overlay         768       632       136  82% /rom
tmpfs                      512         0       512   0% /dev
/dev/sda1               222988      8859    198309   4% /

And yes if i change the target to for example '/mnt/sda1' it mounts on boot ok.
Also i increased delay_root just to be sure and same.

comment:9 Changed 3 years ago by ambrosa

EDIT
I'm building 44553 (latest today fix) just now. Tomorrow morning I will test it and I report here.

But target should not to be :
config 'mount'

option target '/overlay'
option uuid 'd34f7ee6-9448-4965-b523-b87f1a4c2190'
option enabled '1'
option fstype 'ext4'
option options 'rw,sync'
option enabled_fsck '0'

(I suppose that 'd34f7ee6-9....' is /dev/sda1)

Last edited 3 years ago by ambrosa (previous) (diff)

comment:10 Changed 3 years ago by anonymous

r44532 is before the extroot fixes that got merged.

comment:11 Changed 3 years ago by anonymous

/overlay is for pivot overlay, i tried that one also, the config i showed was for pivot root.

Yes you are right its a previous version... how much time until it shows up in trunk??

comment:12 Changed 3 years ago by ambrosa

Latest today trunk version is 44553 and I'm building it just now.
So overlay should be fixed.

comment:13 follow-up: Changed 3 years ago by anonymous

build just now trunk 44570
overlayfs and pivot_overlay work very fine.

root@openwrt:~# uname -a
Linux openwrt 3.18.7 #4 Sat Feb 28 12:04:48 CET 2015 mips GNU/Linux

root@openwrt:~# cat /etc/openwrt_*
DISTRIB_ID='OpenWrt'
DISTRIB_RELEASE='44570'
DISTRIB_REVISION='r44570'
DISTRIB_CODENAME='ambrosa'
DISTRIB_TARGET='lantiq/xrx200'
DISTRIB_DESCRIPTION='OpenWrt ambrosa 44570'
DISTRIB_TAINTS='no-all busybox'
44570

root@openwrt:~# mount
rootfs on / type rootfs (rw)
/dev/root on /rom type squashfs (ro,relatime)
proc on /proc type proc (rw,noatime)
sysfs on /sys type sysfs (rw,noatime)
tmpfs on /tmp type tmpfs (rw,nosuid,nodev,noatime)
/dev/sda1 on /overlay type ext4 (rw,relatime,data=ordered)
overlayfs:/overlay on / type overlay (rw,noatime,lowerdir=/,upperdir=/overlay/upper,workdir=/overlay/work)
tmpfs on /dev type tmpfs (rw,relatime,size=512k,mode=755)
devpts on /dev/pts type devpts (rw,relatime,mode=600)

root@openwrt:~# df
Filesystem           1K-blocks      Used Available Use% Mounted on
rootfs                 7475128     16988   7441756   0% /
/dev/root                 4864      4864         0 100% /rom
tmpfs                    30064       280     29784   1% /tmp
/dev/sda1              7475128     16988   7441756   0% /overlay
overlayfs:/overlay     7475128     16988   7441756   0% /
tmpfs                      512         0       512   0% /dev

root@openwrt:~# 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 '10'
	option check_fs '0'

config mount
	option device '/dev/sda1'
	option target '/overlay'
	option label 'FLASH'
	option fstype 'ext4'
	option options 'rw,sync,noatime,nodiratime'
	option enabled '1'
	option enabled_fsck '0'

comment:14 Changed 3 years ago by danielb7390

When can i expect a new build available on "http://downloads.openwrt.org/snapshots" ??
Specifically "openwrt-ramips-rt305x-wt1520"
Thanks!

comment:15 in reply to: ↑ 13 Changed 3 years ago by ambrosa

Sgrunt. I hate TRAC and its "I don't remember" login system :-(

The msg was made by me.

Please close my ticket 18999 : extroot problem looks to be solved.

Replying to anonymous:

build just now trunk 44570
overlayfs and pivot_overlay work very fine.

root@openwrt:~# uname -a
Linux openwrt 3.18.7 #4 Sat Feb 28 12:04:48 CET 2015 mips GNU/Linux

root@openwrt:~# cat /etc/openwrt_*
DISTRIB_ID='OpenWrt'
DISTRIB_RELEASE='44570'
DISTRIB_REVISION='r44570'
DISTRIB_CODENAME='ambrosa'
DISTRIB_TARGET='lantiq/xrx200'
DISTRIB_DESCRIPTION='OpenWrt ambrosa 44570'
DISTRIB_TAINTS='no-all busybox'
44570

root@openwrt:~# mount
rootfs on / type rootfs (rw)
/dev/root on /rom type squashfs (ro,relatime)
proc on /proc type proc (rw,noatime)
sysfs on /sys type sysfs (rw,noatime)
tmpfs on /tmp type tmpfs (rw,nosuid,nodev,noatime)
/dev/sda1 on /overlay type ext4 (rw,relatime,data=ordered)
overlayfs:/overlay on / type overlay (rw,noatime,lowerdir=/,upperdir=/overlay/upper,workdir=/overlay/work)
tmpfs on /dev type tmpfs (rw,relatime,size=512k,mode=755)
devpts on /dev/pts type devpts (rw,relatime,mode=600)

root@openwrt:~# df
Filesystem           1K-blocks      Used Available Use% Mounted on
rootfs                 7475128     16988   7441756   0% /
/dev/root                 4864      4864         0 100% /rom
tmpfs                    30064       280     29784   1% /tmp
/dev/sda1              7475128     16988   7441756   0% /overlay
overlayfs:/overlay     7475128     16988   7441756   0% /
tmpfs                      512         0       512   0% /dev

root@openwrt:~# 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 '10'
	option check_fs '0'

config mount
	option device '/dev/sda1'
	option target '/overlay'
	option label 'FLASH'
	option fstype 'ext4'
	option options 'rw,sync,noatime,nodiratime'
	option enabled '1'
	option enabled_fsck '0'

comment:16 Changed 3 years ago by danielb7390

It's working on openwrt-ramips-rt305x-wt1520 with the last snapshot

comment:17 Changed 3 years ago by jow

  • Resolution set to fixed
  • Status changed from accepted to closed

Add Comment

Modify Ticket

Action
as closed .
The resolution will be deleted. Next status will be 'reopened'.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.