Why can issuing the same command create more output in tty than in pts/gnome-terminal

gnome-terminalstderrstdouttty

gnome-terminal:

$ sudo update-grub
[sudo] password for user: 
Generating grub configuration file ...
Found background image: .background_cache.png
Found linux image: /boot/vmlinuz-3.16.0-4-amd64
Found initrd image: /boot/initrd.img-3.16.0-4-amd64
done

tty1 as accessed by Ctrl+Alt+F1:

$ sudo update-grub
[sudo] password for user: 
Generating grub configuration file ...
Found background image: .background_cache.png
Found linux image: /boot/vmlinuz-3.16.0-4-amd64
Found initrd image: /boot/initrd.img-3.16.0-4-amd64
[ 1603.545926] EXT4-fs (sda2): unable to read superblock
... (repeats twice)
[ 1603.560671] FAT-fs (sda2): invalid media value (0x4c)
... (repeats once)
[ 1603.573245] qnx4: no qnx4 filesystem (no root dir).
done

While attempting to redirect the output of the tty1 to be able to directly copy it here I noticed that these additional lines are not coming from either stdout or stderr of the command. Where from then? Why?

Best Answer

They're coming from the kernel. You'll see them also by running

dmesg

Kernel messages are displayed on virtual console by default; they aren't in X terminal emulators (such as GNOME Terminal).