Tags Archives: linux

Mcelog – Bad memory?

The original hardware did all kinds of strange things, stuff like SSH not working and RPM checksums failing, random rebooting, ect. I ended up swapping the chassis, mainboard and RAM but kept the HDD’s to avoid an OS reinstall. Now, I’ve gotten this twice on the new box followed by a hard freeze about 2 […]

Vanilla Kernel on CentOS

If compiling a Vanilla kernel for CentOS, you may encounter the following after rebooting: Setuproot: moving /dev failed: No such file or directory Setuproot: error mounting /proc: No such file or directory Setuproot: error mounting /sys: No such file or directory […] Kernel panic – not syncing: Attempted to kill init! To resolve the booting […]

Copy one disk to another using Linux and DD

The following will copy two disks, partition table and all, with forensic quality, and pad the destination disk with zeroes if any data is unreadable on the source disk. Be sure you’ve identified which disk is which using combinations of dmesg and ‘fdisk -l’. The destination disk must also be equal or greater in size. […]

Linux: Shutdown/Poweroff command

The other day I was surprised to find the ‘shutdown -h now’ command on the Redhat/Centos rescue CD doesn’t work. I’ve since discovered a few other ways to get a Linux OS to power off, each should accomplish the same thing – gracefully power down. shutdown -h now halt poweroff init 0

Linux: Sort disk usage with awk

Sort the output of ‘du’ in human readable format (similar to the -h switch). du -k | sort -nr | awk ‘ BEGIN { split(“KB,MB,GB,TB”, Units, “,”); } { u = 1; while ($1 >= 1024) { $1 = $1 / 1024; u += 1 } $1 = sprintf(“%.1f %s”, $1, Units[u]); print $0; } […]

Fixing RTL8111/8168B kernel module on Debian/Ubuntu

For many years, issues with the r8169 module have plagued Debian and related Linux distributions such as Ubuntu. You’ll see lots of ifconfig errors and stuff like this on desktop mainboards with a Realtek NIC: Oct 29 07:40:32 c1100d335 kernel: [1996163.743022] NETDEV WATCHDOG: eth0: transmit timed out Oct 29 07:40:32 c1100d335 kernel: [1996163.777667] r8169: eth0: […]