June 3, 201313 yr I recently moved; I set up my server and booted it expecting to see it on the network. It didn't show up, so I hooked up a monitor to investigate. I don't have the exact error, but it was something along the lines of: Warning: failed to start console Kernel panic - bad init I thought that perhaps my flash drive had died. I copied its contents and ran a diff -r compared to a vanilla copy of 4.7. Everything seems in order, the only differences were expected ones such as my disk configuration. To make sure that the boot order wasn't wrong, I attempted to change it in the BIOS. My flash drive was listed after the hard drives, so I moved it to the top. After this change, the server fails with: Verifying DMI Pool Data Boot error If my flash drive isn't dead, it should be booting correctly, but can't. Am I missing something obvious? Note: I like unRaid because after my initial configuration, I haven't had to touch it too much in the past year or two. Any help would be greatly appreciated, cheers!
June 4, 201313 yr You do NOT have it set to boot first ... that's why you're seeing that message. Look carefully at your boot settings -- on some systems the USB drive is listed as a hard drive; and you have to set the 1st boot device as a hard drive; and the first hard drive as the USB flash drive. On others, you have to list the USB drive independently as the first boot device. It just depends on exactly how your BIOS works. But it's clear that at this point it is NOT the first device.
June 4, 201313 yr Author Interesting. I was googling around and followed some other suggestions. I unplugged the hard drives, but it still wouldn't boot. I realized I have a Windows USB installer handy, so I swapped it in for my current flash drive. That seems to work, so that points back to the flash drive. I would try reformatting it, but I'm not sure that's the best plan. I certainly don't want to lose my data, even though I would make a back-up of the flash drive first, obviously.
June 4, 201313 yr Interesting. I was googling around and followed some other suggestions. I unplugged the hard drives, but it still wouldn't boot. I realized I have a Windows USB installer handy, so I swapped it in for my current flash drive. That seems to work, so that points back to the flash drive. I would try reformatting it, but I'm not sure that's the best plan. I certainly don't want to lose my data, even though I would make a back-up of the flash drive first, obviously. just re-run the make-bootable batch file. DO NOT reformat, as that is already done.
June 4, 201313 yr Author Thanks for the advice. Now the flash drive seems bootable again. (Not sure how it became "corrupt" in the first place...) I'm back to the initial error (with no drives attached): Warning: unable to open an initial console. Kernel panic - not syncing: No init found. Try passing init= option to kernel. Pid: 1, comm: swapper Not tainted 2.6.32.9-unRAID #8 Call Trace: ... Anything I can find about this seems unrelated and beyond my knowledge.
June 4, 201313 yr Author Sorry, I read the sticky before posting, but was unsure how to obtain one. All three methods mentioned seem to require that the system is already running or has a console session available. Is there a way to extract a log from the flash drive rather than with a terminal session? Thanks again.
June 4, 201313 yr The flash drive should have a Logs folder containing syslogs. I'm not sure WHEN those are copied to the flash drive -- I THINK it's after each boot => if that's the case there may not be one written when it's not a successful boot, but I really don't know. Hopefully one of the Linux gurus will chime in and confirm that -- but you can at least look on the flash drive and see what logs you have. The time/date should give you a good indication if it's what you need.
June 5, 201313 yr Author I don't recall seeing any logs before, and I can't seem to find them now. Here's the structure of my flash drive: G:\make_bootable.bat G:\memtest G:\menu.c32 G:\readme.txt G:\syslinux.cfg G:\syslinux.exe G:\bzimage G:\bzroot G:\license.txt G:\config\disk.cfg G:\config\go G:\config\ident.cfg G:\config\network.cfg G:\config\secrets.tdb G:\config\share.cfg G:\config\super.dat G:\config\shares G:\smarthistory\flatfile.php G:\smarthistory\flatfile_utils.php G:\smarthistory\smarthistory.php G:\smarthistory\smarthistory.program.conf.sample G:\smarthistory\smarthistory.token.conf
June 5, 201313 yr Interesting ... I wonder if the "logs" folder is something UnMenu sets up and maintains. Since Joe L is monitoring this question, hopefully he'll chime in and confirm whether that's the case ... and also if there's some other way you can access a log without being able to log in to either the Web GUI or the UnRAID console [i doubt it, but I'm definitely NOT a Linux guy ... so I'll let Joe confirm that ]
June 5, 201313 yr There will be no syslog if the system is not started. If that is the case then ignore my last post. unRAID does not save syslogs. Try loading a second flash drive with the free version.
June 8, 201313 yr Author I've finally had time to look at this. It appears that it was the flash drive's fault. I formatted a new one with a fresh 4.7 AiO and it booted correctly. Now I need to migrate my configuration so that I don't lose any data. I used the forum search, but didn't find anything. Can I copy my previous disk configuration to the new one? Is there a better way to do this? Thanks to everyone for their help!
June 8, 201313 yr The flash drive should have a Logs folder containing syslogs. I'm not sure WHEN those are copied to the flash drive -- I THINK it's after each boot => if that's the case there may not be one written when it's not a successful boot, but I really don't know. Hopefully one of the Linux gurus will chime in and confirm that -- but you can at least look on the flash drive and see what logs you have. The time/date should give you a good indication if it's what you need. This is incorrect. unRAID does NOT keep a "logs" directory on the flash drive. It is NOT ever kept on the flash drive unless you installed some kind of add-on to save it. unMENU has no such feature. It does not save logs to the flash drive. The system log is entirely in memory and is gone when you crash or reboot. It is in /var/log/syslg Joe L.
June 8, 201313 yr unRAID does NOT keep a "logs" directory on the flash drive. Joe => BOTH my v4.7 system and v5 system have a "logs" folder on the flash drive. Both are absolutely STOCK systems with NOTHING added to them except UnMenu with the CleanPowerDown and APC UPS packages installed. I have NEVER added anything else along the way to even "play" with; nor have I copied any logs to these drives. So ... where did they come from Looking at the dates of the files, I assume they were written after each successful boot, but your comment that they shouldn't even be there is interesting. I'll attach the contents of the folders ...
June 9, 201313 yr Both are absolutely STOCK systems with NOTHING added to them except UnMenu with the CleanPowerDown and APC UPS packages installed. CleanPowerDown package writes log files as part of the shutdown routine. #!/bin/bash # Start/stop/restart unRAID. if [ ${DEBUG:=0} -gt 0 ] then set -x -v fi P=${0##*/} # basename of program R=${0%%$P} # dirname of program # Set Your LOG directory here LOGDIR=/boot/logs # Set amount of syslogs you want to keep. # Number of syslogs to save in logdir LOGSAVE="10" # If the LOG directory does not exist, make it! [ ! -d ${LOGDIR} ] && mkdir -p ${LOGDIR} PATH=$PATH:/sbin:/usr/sbin:/boot/custom/bin # Alter this to NO or anything other then YES # To disable calls to these diagnostics SMARTCTL=${SMARTCTL:=YES} HDPARM=${HDPARM:=YES} # Source external file to replace anything that is defined if [ -f /etc/${P} ] then source /etc/${P} fi logger() { typeset F=${1##-t*} if [ "${F}" != "${1}" ] then F="" else F="-t${P}" fi # /usr/bin/logger -is -plocal7.info ${F} $* /usr/bin/logger -i -plocal7.info ${F} $* } diagnostic_dump() { echo "Capturing information to syslog. Please wait..." logger -tversion -s < /proc/version logger -tcmdline < /proc/cmdline logger -tmeminfo < /proc/meminfo logger -tdevices < /proc/devices logger -tinterrupts < /proc/interrupts logger -tioports < /proc/ioports logger -tdma < /proc/dma logger -tmounts < /proc/mounts logger -tdiskstats < /proc/diskstats if [ "${HDPARM}" = "YES" ] ; then ls -1 /dev/sd[a-z] /dev/hd[a-z] | while read DEVICE do hdparm -I -i ${DEVICE} done 2>&1 | logger -thdparm fi if [ "${SMARTCTL}" = "YES" ] ; then ls -1 /dev/sd[a-z] /dev/hd[a-z] | while read DEVICE do smartctl -n standby -d ata -a ${DEVICE} done 2>&1 | sed 's/\t/ /g' | logger -tsmartctl fi lspci 2>&1 | logger -tpspci lsmod 2>&1 | logger -tlsmod ifconfig eth0 2>&1 | logger -tifconfig ( ethtool eth0 ; ethtool -S eth0 ) | sed 's/\t/ /g' 2>&1 | logger -tethtool BC=/boot/config for FILE in ${BC}/*.cfg ${BC}/shares/* do BFILE=${FILE##*/} # Basename of FILE logger -t${BFILE} < ${FILE} done if [ -e /proc/mdcmd ] then echo status > /proc/mdcmd sleep 1 logger -tmdcmd < /proc/mdcmd fi unRAID_status | logger -tstatus -s } save_syslog() { TS="%Y%m%d-%H%M%S" LOGDATE=`ls -l --time-style="+${TS}" /var/log/syslog | cut -d' ' -f6` LOGNAME="${LOGDIR}/syslog-${LOGDATE}.txt" # Save only the $LOGSAVE number of current files i=0 ls -1t ${LOGDIR}/syslog*.txt | while read SYSLOG do ((i++)) if [ $i -gt ${LOGSAVE} ] then echo "Removing old syslog: ${SYSLOG}" rm -f ${SYSLOG} fi done # logger "Saving current syslog to ${LOGNAME}" echo "Saving current syslog: ${LOGNAME}" todos < /var/log/syslog > "${LOGNAME}" touch --reference=/var/log/syslog ${LOGNAME} chmod a-x ${LOGNAME} ls -l "${LOGNAME}" # Save latest syslog in a .zip archive for uploading # logger "zipping current syslog to ${LOGDIR}/syslog.zip" # only zip a new syslog.txt if syslog newer then current .zip if [ ! -x /usr/bin/zip ] then echo "zip not installed. Consider installing to automatically zip current syslog" return fi if [ /var/log/syslog -nt ${LOGDIR}/syslog.zip ] then cd /var/log # make a symlink to syslog.txt for windows viewing ln -s syslog syslog.txt rm -f ${LOGDIR}/syslog.zip # -o (set .zip time to mtime of syslog) # -l (convert lf to crlf on the fly!) zip -o -l ${LOGDIR}/syslog.zip syslog.txt rm -f syslog.txt # remove symlink chmod a-x ${LOGDIR}/syslog.zip # remove samba attributes fi }
June 9, 201313 yr CleanPowerDown package writes log files as part of the shutdown routine. Ah ha => Mystery solved ... mostly. Is this an early step in the CleanPowerDown process? Given that this is how the logs are written, it seems that there are too many of them !! I'm wondering if it writes the log when power fails ... but before the actual shutdown is initiated ==> so if power is restored at that point there's a new log, but no actual shutdown.
June 9, 201313 yr Both are absolutely STOCK systems with NOTHING added to them except UnMenu with the CleanPowerDown and APC UPS packages installed. CleanPowerDown package writes log files as part of the shutdown routine. #!/bin/bash # Start/stop/restart unRAID. if [ ${DEBUG:=0} -gt 0 ] then set -x -v fi P=${0##*/} # basename of program R=${0%%$P} # dirname of program # Set Your LOG directory here LOGDIR=/boot/logs # Set amount of syslogs you want to keep. # Number of syslogs to save in logdir LOGSAVE="10" # If the LOG directory does not exist, make it! [ ! -d ${LOGDIR} ] && mkdir -p ${LOGDIR} PATH=$PATH:/sbin:/usr/sbin:/boot/custom/bin # Alter this to NO or anything other then YES # To disable calls to these diagnostics SMARTCTL=${SMARTCTL:=YES} HDPARM=${HDPARM:=YES} # Source external file to replace anything that is defined if [ -f /etc/${P} ] then source /etc/${P} fi logger() { typeset F=${1##-t*} if [ "${F}" != "${1}" ] then F="" else F="-t${P}" fi # /usr/bin/logger -is -plocal7.info ${F} $* /usr/bin/logger -i -plocal7.info ${F} $* } diagnostic_dump() { echo "Capturing information to syslog. Please wait..." logger -tversion -s < /proc/version logger -tcmdline < /proc/cmdline logger -tmeminfo < /proc/meminfo logger -tdevices < /proc/devices logger -tinterrupts < /proc/interrupts logger -tioports < /proc/ioports logger -tdma < /proc/dma logger -tmounts < /proc/mounts logger -tdiskstats < /proc/diskstats if [ "${HDPARM}" = "YES" ] ; then ls -1 /dev/sd[a-z] /dev/hd[a-z] | while read DEVICE do hdparm -I -i ${DEVICE} done 2>&1 | logger -thdparm fi if [ "${SMARTCTL}" = "YES" ] ; then ls -1 /dev/sd[a-z] /dev/hd[a-z] | while read DEVICE do smartctl -n standby -d ata -a ${DEVICE} done 2>&1 | sed 's/\t/ /g' | logger -tsmartctl fi lspci 2>&1 | logger -tpspci lsmod 2>&1 | logger -tlsmod ifconfig eth0 2>&1 | logger -tifconfig ( ethtool eth0 ; ethtool -S eth0 ) | sed 's/\t/ /g' 2>&1 | logger -tethtool BC=/boot/config for FILE in ${BC}/*.cfg ${BC}/shares/* do BFILE=${FILE##*/} # Basename of FILE logger -t${BFILE} < ${FILE} done if [ -e /proc/mdcmd ] then echo status > /proc/mdcmd sleep 1 logger -tmdcmd < /proc/mdcmd fi unRAID_status | logger -tstatus -s } save_syslog() { TS="%Y%m%d-%H%M%S" LOGDATE=`ls -l --time-style="+${TS}" /var/log/syslog | cut -d' ' -f6` LOGNAME="${LOGDIR}/syslog-${LOGDATE}.txt" # Save only the $LOGSAVE number of current files i=0 ls -1t ${LOGDIR}/syslog*.txt | while read SYSLOG do ((i++)) if [ $i -gt ${LOGSAVE} ] then echo "Removing old syslog: ${SYSLOG}" rm -f ${SYSLOG} fi done # logger "Saving current syslog to ${LOGNAME}" echo "Saving current syslog: ${LOGNAME}" todos < /var/log/syslog > "${LOGNAME}" touch --reference=/var/log/syslog ${LOGNAME} chmod a-x ${LOGNAME} ls -l "${LOGNAME}" # Save latest syslog in a .zip archive for uploading # logger "zipping current syslog to ${LOGDIR}/syslog.zip" # only zip a new syslog.txt if syslog newer then current .zip if [ ! -x /usr/bin/zip ] then echo "zip not installed. Consider installing to automatically zip current syslog" return fi if [ /var/log/syslog -nt ${LOGDIR}/syslog.zip ] then cd /var/log # make a symlink to syslog.txt for windows viewing ln -s syslog syslog.txt rm -f ${LOGDIR}/syslog.zip # -o (set .zip time to mtime of syslog) # -l (convert lf to crlf on the fly!) zip -o -l ${LOGDIR}/syslog.zip syslog.txt rm -f syslog.txt # remove symlink chmod a-x ${LOGDIR}/syslog.zip # remove samba attributes fi } OK, so that is what is saving logs... An add-on (that many install)
June 9, 201313 yr OK, so that is what is saving logs... An add-on (that many install) "... that many install ..." ==> I suspect a BIG understatement. I'd think that's the most-installed package in UnMenu !! [Probably roughly tied with the APC UPS package]
Archived
This topic is now archived and is closed to further replies.