Occasionally long boot after ext4 mount

cancel
Showing results for 
Search instead for 
Did you mean: 

Occasionally long boot after ext4 mount

630 Views
yoav_rubin2
Contributor I

Linux 32bit 4.1.8 kernel , PowerPC , embedded , real time patch , systemV init.
I had an ext4 file system mounted at /run/media/mmcblk0p1.
I unmounted and erased it and then recreated it:

1)
```
fdisk /dev/mmcblk0
-> select: n
-> enter (choose default value for start)
-> enter (choose default value for end)
-> enter (choose default)
-> enter (choose default)
-> select: w  (write changes to MBR)
```
(pressed n , four times enter and w).

2) mkfs.ext4 -E nodiscard -F /dev/mmcblk0p1

After restart I got the following error:
```
EXT4-fs (mmcblk0p1): Filesystem with huge files cannot be mounted RDWR without CONFIG_LBDAF
```

Because I don't need huge_files support (files bigger than 2TB)
I used:
```
mkfs.ext4 -O ^huge_file -E nodiscard -F /dev/mmcblk0p1
```
and now the system works with /dev/mmcblk0p1 mounted at /run/media/mmcblk0p1.

the problem is that since these actions , sometimes the boot takes a long time and sometimes not. I have no Idea why.


**bad dmesg:**
```
[    5.775060] udevd[872]: renamed network interface eth0 to fm2-gb0
[    5.793777] udevd[873]: renamed network interface eth1 to fm2-gb1
[    7.482486] EXT4-fs (mmcblk0p1): recovery complete
[    7.487834] EXT4-fs (mmcblk0p1): mounted filesystem with ordered data mode. Opts: (null)
[    7.728026] random: dd urandom read with 29 bits of entropy available
[    9.113007] random: nonblocking pool is initialized
[   43.058167]
               [rmStart]:The OSA version is: LINUXA4.1.0 from 16-04-2019
[   43.094075] [rmStart] gpr: id: 0 - physAddr: 0x1a0000000 - len: 0x1000 - memAddr: 0xf1afe000
[   43.104048] [rmStart] dcfg: id: 7 - physAddr: 0x1900e0000 - len: 0x1000 - memAddr: 0xf1c7a000
```


**good dmesg:**
```
[    5.773918] udevd[872]: renamed network interface eth0 to fm2-gb0
[    5.792785] udevd[873]: renamed network interface eth1 to fm2-gb1
[    7.508329] EXT4-fs (mmcblk0p1): recovery complete
[    7.513673] EXT4-fs (mmcblk0p1): mounted filesystem with ordered data mode. Opts: (null)
[    7.754070] random: dd urandom read with 29 bits of entropy available
[    9.699353]
               [rmStart]:The OSA version is: LINUXA4.1.0 from 16-04-2019
[    9.710210] [rmStart] gpr: id: 0 - physAddr: 0x1a0000000 - len: 0x1000 - memAddr: 0xf1afe000
```

**/etc/fstab:**
```
/dev/root            /                    auto       defaults              1  1
proc                 /proc                proc       defaults              0  0
devpts               /dev/pts             devpts     mode=0620,gid=5       0  0
tmpfs                /run                 tmpfs      mode=0755,nodev,nosuid,strictatime 0  0
tmpfs                /var/volatile        tmpfs      defaults              0  0
/dev/mmcblk0p1 /run/media/mmcblk0p1 ext4 defaults,async,noauto 0 0
```

**tune2fs -l /dev/mmcblk0p1**
```
tune2fs 1.42.9 (28-Dec-2013)
Filesystem volume name:   <none>
Last mounted on:          <not available>
Filesystem UUID:          49ef04af-109b-433d-81b8-e5d42c947c8c
Filesystem magic number:  0xEF53
Filesystem revision #:    1 (dynamic)
Filesystem features:      has_journal ext_attr resize_inode dir_index filetype needs_recovery extent flex_bg sparse_super large_file uninit_bg dir_nlink extra_isize
Filesystem flags:         unsigned_directory_hash
Default mount options:    user_xattr acl
Filesystem state:         clean
Errors behavior:          Continue
Filesystem OS type:       Linux
Inode count:              956592
Block count:              3825408
Reserved block count:     191270
Free blocks:              3723263
Free inodes:              956581
First block:              0
Block size:               4096
Fragment size:            4096
Reserved GDT blocks:      933
Blocks per group:         32768
Fragments per group:      32768
Inodes per group:         8176
Inode blocks per group:   511
Flex block group size:    16
Filesystem created:       Wed Dec 13 15:17:05 2017
Last mount time:          Thu Jan  1 00:00:07 1970
Last write time:          Thu Jan  1 00:00:07 1970
Mount count:              9
Maximum mount count:      -1
Last checked:             Wed Dec 13 15:17:05 2017
Check interval:           0 (<none>)
Lifetime writes:          132 MB
Reserved blocks uid:      0 (user root)
Reserved blocks gid:      0 (group root)
First inode:              11
Inode size:               256
Required extra isize:     28
Desired extra isize:      28
Journal inode:            8
Default directory hash:   half_md4
Directory Hash Seed:      d3fe2c1f-7dbb-43d5-b6d6-7b867b71386c
Journal backup:           inode blocks
```

Any idea what can goes wrong and why sometimes booting takes long time and sometimes not?

Labels (1)
0 Kudos
2 Replies

443 Views
yipingwang
NXP TechSupport
NXP TechSupport

The message "nonblocking pool is initialized" appears when the kernel has collected enough entropy in order to start delivering numbers via /dev/random. If you try to read from /dev/random before this point, the read will block until data is available.

0 Kudos

443 Views
yoav_rubin2
Contributor I

thank you for your reply.

Since I'm not familiar with this concept and I'm using the default settings and files (didn't change kernel or environment) maybe you can guide me where such a blocking read might appear and how to bypass this problem?

0 Kudos