LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Debian (https://www.linuxquestions.org/questions/debian-26/)
-   -   /bin/dmesg > /dmesg-boot not Working in Knoppix 3.4 (https://www.linuxquestions.org/questions/debian-26/bin-dmesg-dmesg-boot-not-working-in-knoppix-3-4-a-200901/)

suguru 07-04-2004 01:28 AM

/bin/dmesg > /dmesg-boot not Working in Knoppix 3.4
 
thegeekster advised for LinuxQuestions.org > Forums > Linux - Distributions > Slackware > Mounting a DVDRW
>>>Quote
/etc/rc.d/rc.local:

code:

# Write the boot info to disk. Make sure it is the last entry in
# the startup sequence.
/bin/dmesg > /dmesg-boot

This will keep an updated dmesg output in the Root Directory (not root's home directory), in a file called "dmesg-boot".............This is handy to have whenever you need to troubleshoot startup problems or need to find the current startup info. Then when someone asks for the output of the command 'dmesg', you can use 'cat /dmesg-boot'
>>>EndQuote

It sounded like a goog idea so I made
/etc/rc.d/rc.local
with
# Write the boot info to disk. Make sure it is the last entry in
# the startup sequence.
/bin/dmesg > /dmesg-boot

Then after I reboot I only get this
root@45a:~# locate dmesg
/bin/dmesg
/usr/share/man/man8/dmesg.8.gz
/var/log/dmesg
root@45a:~# cat /dmesg-boot
cat: /dmesg-boot: No such file or directory
root@45a:~#
root@45a:~# ls -ls /bin/dmesg
4 -rwxr-xr-x 1 root root 4060 Dec 6 2003 /bin/dmesg
root@45a:~# ls -ls /var/log/dmesg
0 -rw-r--r-- 1 root root 0 Nov 28 2001 /var/log/dmesg
root@45a:~# emacs /bin/dmesg Doesn't show anything I can read!

qwijibow 07-04-2004 05:05 PM

maybe your distro (whatever that is) is not ececuting rc.local.

have a look at /etc/inittab and trace the boot scripts looking for mention of rc.local.
if its there, it will be at the end.

if not, addd it yourself.

acid_kewpie 07-04-2004 05:21 PM

Quote:

root@45a:~# emacs /bin/dmesg Doesn't show anything I can read!
I should chuffing well hope not! that's a binary program! generally i'd say this is a generl waste of time... you have no real need for this but....

1) run /bin/dmesg without the rest of it
2) run /bin/dmesg > /dmesg-boot directly
3) run cat /dmesg-boot to check if it works

if those steps all work, then you're putting it in the wrong startup file or something, maybe a typo... personally i wouldn't bother, you can run dmesg whenver you feel like it...


All times are GMT -5. The time now is 03:43 PM.