Commit Graph

8 Commits

Author SHA1 Message Date
Alexey Sheplyakov
08639c8faf open_log: print logs to /dev/ttyprintk
- A complete boot log (both early userspace and kernel) is preserved
  and can be obtained via `dmesg`
- Messages are ordered and timestamped, so the log is more clear

Example:

[    5.616453] [U] * /sbin/mount.cifs //10.42.0.4/dist/slinux-9.1-x86_64.iso /image -oguest,vers=1.0
[    5.616932] CIFS: Attempting to mount //10.42.0.4/dist/slinux-9.1-x86_64.iso
[    5.616940] CIFS: VFS: Use of the less secure dialect vers=1.0 is not recommended unless required for access to very old servers
[    5.621647] CIFS: VFS: Could not allocate crypto cmac(aes)
[    5.623263] CIFS: VFS: Could not allocate crypto cmac(aes)
[    5.626645] [U] mount error(20): Not a directory
[    5.626649] [U] Refer to the mount.cifs(8) manual page (e.g. man mount.cifs) and kernel log messages (dmesg)
[    5.626747] [U] * assuming ISO image, Samba path://10.42.0.4/dist
[    5.626749] [U] * mounting //10.42.0.4/dist on /image as type cifs
[    5.626753] [U] * cifsmount: attempting to mount //10.42.0.4/dist with default protocol version
[    5.626758] [U] * /sbin/mount.cifs //10.42.0.4/dist /image -oguest
[    5.627299] CIFS: Attempting to mount //10.42.0.4/dist
[    5.629106] CIFS: VFS: Could not allocate crypto cmac(aes)
[    5.631290] CIFS: VFS: Could not allocate crypto cmac(aes)
[    5.638261] CIFS: VFS: \\10.42.0.4 generate_key: crypto alloc failed
[    5.638264] CIFS: VFS: \\10.42.0.4 Send error in SessSetup = -2
[    5.638275] CIFS: VFS: cifs_mount failed w/return code = -2
[    5.638294] [U] mount error(2): No such file or directory
[    5.638296] [U] Refer to the mount.cifs(8) manual page (e.g. man mount.cifs) and kernel log messages (dmesg)
[    5.638376] [U] * cifsmount: failed, retrying with vers=1.0
[    5.638383] [U] * /sbin/mount.cifs //10.42.0.4/dist /image -oguest,vers=1.0
[    5.639582] CIFS: Attempting to mount //10.42.0.4/dist
[    5.639590] CIFS: VFS: Use of the less secure dialect vers=1.0 is not recommended unless required for access to very old servers
[    5.649559] [U] * assuming ISO image, path:/image/slinux-9.1-x86_64.iso

Related: #40554
2021-09-06 17:57:38 +04:00
Alexey Sheplyakov
a8fa5f19bf cifsmount: capture std{err,out} of mount.cifs to log
So it's easier to debug a failed boot.
While at it avoid closing stdin, since a printf might inject
unexpected input into a wrong place (a socket with FD 0).
Redirect stdin from /dev/null instead.

While at it improved error handling a bit (fork, waitpid can fail)

nfsmount: same here

Related: #40554
2021-09-06 17:57:38 +04:00
Arseny Maslennikov
2440a17fbe Remove unnecessary whitespace from C program text 2018-05-09 15:21:26 +03:00
Sisyphus
6e000ec0e3 add missed includes 2013-11-06 20:34:30 +04:00
Anton V. Boyarshinov
3d2e77074f tty3 creation
waiting /dev/disk added
2010-11-20 19:20:08 +03:00
Anton V. Boyarshinov
235e6e0e39 20090301-alt13.1
- silly bug in waiting fixed
2010-11-19 23:28:16 +03:00
Anton V. Boyarshinov
fccb211884 wait for tty[23], seems also fix hard drives presense on el-smp 2010-11-18 14:56:54 +03:00
Anton Kachalov
46438969c6 Initial revision 2004-01-20 18:32:43 +00:00