View previous topic :: View next topic |
Author |
Message |
dcljr Tux's lil' helper
Joined: 20 Aug 2005 Posts: 139 Location: Austin, TX
|
Posted: Tue Aug 05, 2014 2:25 am Post subject: mounting partitions prints dmesg content to console |
|
|
Note: The following post seems to be about installing Gentoo, but I think my issue is really independent of that process, so I'm posting this to the "Other Things Gentoo" forum.
Background:
I'm about to reboot into a fresh Gentoo installation (i.e., have created a new root partition on /dev/sda9 and followed the AMD64 Handbook up to the point where I would reboot into the new system), but I rebooted back into my current system first, just to be sure I could do that if anything went wrong with the new one. (Note that I am using the same /boot partition as before, and this required an update to [Legacy] Grub on-disk.)
FYI, my current system's /etc/fstab (which I am still using for the moment) is:
Code: | /dev/sda1 /boot ext2 defaults,noatime 1 2
/dev/sda2 none swap sw 0 0
/dev/sda3 / ext3 noatime 0 1
/dev/sda5 /usr/portage ext2 noatime 0 2
/dev/sda6 /var/tmp ext2 noatime 0 2
/dev/sda7 /home ext4 noatime 0 2
/dev/cdrom /mnt/cdrom auto noauto,user 0 0
proc /proc proc defaults 0 0
shm /dev/shm tmpfs nodev,nosuid,noexec 0 0 |
My new system (which I have not rebooted into yet) is:
Code: | /dev/sda1 /boot ext2 defaults,noatime 0 2
/dev/sda2 none swap sw 0 0
/dev/sda9 / ext4 noatime 0 1
/dev/sdb4 /var/tmp ext4 noatime 0 2
/dev/sdb7 /home ext4 noatime 0 2
/dev/cdrom /mnt/cdrom auto noauto,user 0 0 |
Now for my problem:
When I started to check various settings to make sure everything was as it should be (e.g., checking dmesg for errors and the like), I got sidetracked into looking at a bunch of /proc/* and /etc/* files I'd never really considered before. Eventually I was doing a bunch of ls, find, cat, less, diff, and file operations on them -- but not (intentionally) doing anything that would actually write anything to the files.
When I got tired of that, I mounted /dev/sda9 again to leave a note to myself in the /root (superuser) directory for future reference, and when I executed the mount command I got new dmesg content written to the console:
Code: | ~ # mount dev/sda9 /mnt/gentoo/
~ # <6>kjournald2 starting: pid 5683, dev sda9:8, commit interval 5 seconds
<6>EXT4-fs (sda9): internal journal on sda9:8
<6>EXT4-fs (sda9): delayed allocation enabled
<6>EXT4-fs: file extents enabled
<6>EXT4-fs: mballoc enabled
<6>EXT4-fs (sda9): mounted filesystem with ordered data mode
^C
~ # |
(As indicated there at the end, I Ctrl-C'd to get back to the command prompt, but simply hitting Enter also works.)
I verified that this was exactly what was written to the dmesg log:
Code: | ~ # dmesg | tail
[...]
kjournald2 starting: pid 5710, dev sda9:8, commit interval 5 seconds
EXT4-fs (sda9): internal journal on sda9:8
EXT4-fs (sda9): delayed allocation enabled
EXT4-fs: file extents enabled
EXT4-fs: mballoc enabled
EXT4-fs (sda9): mounted filesystem with ordered data mode |
(The "[...]" above indicates the end of the previous "normal" dmesg output.)
Same thing happens when I simply connect a USB drive (MP3 player), which automatically mounts it.
A little Googling suggested that I could use dmesg -n 1 to get back to the normal behavior, but that didn't do it. But dmesg -n alert (from the manpage) seems to have done the trick.
Now, I'm wondering what I could have done to cause this in the first place. After carefully reviewing the commands I have used since the reboot, I see only one typo where I accidentally used:
Code: | ~ # find /proc/ -maxdepth 1 -type f -exec less {} ; |
instead of:
Code: | ~ # find /proc/ -maxdepth 1 -type f -exec less {} \; |
Of course, this failed in the usual way (i.e., I don't think it actually did anything).
Other than that, the only other weirdness was when I was doing the last (correct) find command shown above and it got "stuck" on one of the files (not displaying anything and not responding to normal keyboard commands) and I had to Ctrl-C out of it. I assume that was either /proc/kmsg, /proc/kpagecount, or /proc/kpageflags, since those are some of the very few files under /proc that are only root-readable.
So, I assume that was the problem -- perhaps a keystroke before I Ctrl-C'd actually modified something?
Does anyone have a better idea what caused this?
Edit: Just to clarify, I rebooted into the same kernel as I usually use, with the same mounted partitions and everything. The only reason I mentioned the new Gentoo installation is because that's what I was doing at the beginning of the session before the problem started. But like I said, I'm sure that has nothing to do with what happened. |
|
Back to top |
|
|
steveL Watchman
Joined: 13 Sep 2006 Posts: 5153 Location: The Peanut Gallery
|
Posted: Tue Aug 05, 2014 1:43 pm Post subject: Re: mounting partitions prints dmesg content to console |
|
|
dcljr wrote: | So, I assume that was the problem -- perhaps a keystroke before I Ctrl-C'd actually modified something? |
The find won't have changed anything: the only command it was running was less, which doesn't write.
Quote: | Does anyone have a better idea what caused this? |
Are you using systemd? ISTR it does its own thing around mount'ing, logs and display of dmesg amongst others. (If so, someone else will have to advise.)
Sorry I can't be of more help: I just wanted to assure you that the find you ran, isn't the cause of the problem, imo.
You might get quicker help on IRC: #gentoo at chat.freenode.org. #gentoo-chat also has some knowledgeable people in it, though don't ask there before #gentoo as it's really a downtime channel. |
|
Back to top |
|
|
dcljr Tux's lil' helper
Joined: 20 Aug 2005 Posts: 139 Location: Austin, TX
|
Posted: Sun Aug 10, 2014 8:46 am Post subject: Re: mounting partitions prints dmesg content to console |
|
|
steveL wrote: | Are you using systemd? |
No. OpenRC. (In fact, my "current" system is so old, I'm still using openrc-0.11.8.)
steveL wrote: | Sorry I can't be of more help: I just wanted to assure you that the find you ran, isn't the cause of the problem, imo. |
Thanks for the reply, anyway. Sorry for the late response. The first time I tried to respond the forums went down. :(
I've rebooted into my "current" system several more times, and this hasn't happened again. If it does, I'll look into it more at that time. |
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54232 Location: 56N 3W
|
Posted: Sun Aug 10, 2014 9:33 am Post subject: |
|
|
dcljr,
It look like you have changed the kernel log level. Thats built into the kernel at build time and becomes the default at boot but you can change it on the fly too.
Look at the help in the kernel. _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
dcljr Tux's lil' helper
Joined: 20 Aug 2005 Posts: 139 Location: Austin, TX
|
Posted: Fri Aug 29, 2014 4:36 am Post subject: |
|
|
No, I didn't touch the kernel I rebooted into. It's been the same for 4 years. Somehow the level being logged to the console became changed. I have no idea how. Anyway, I changed it back and, like I said, it hasn't happened again. |
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54232 Location: 56N 3W
|
Posted: Fri Aug 29, 2014 9:40 pm Post subject: |
|
|
dcljr,
Its a /proc entry. _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|