Sometimes manual intervention on various Linux system's, including Debian, is required to fix things after waking up from sleep.
One persistent issue is the sound system / pulseaudio needing to be reset and not working until you do that after waking up. It's not clear if it's an OS issue itself or the sound driver, but this will fix things.
Where do we put scripts or commands that need to be used upon wakeup automatically?
Debian based OS's have a similar issue as the behavior in RHEL/CentOS dhclient, which is that if you have an interface that relies on DHCP, if the first attempt fails, it will quit and stop. This is a problem especially if you are using your Linux as a router or something else mission critical, but where the internet for some reason may have been down or the DHCP server it gets a lease from broken.
The expected behavior you would hope is that when things are back online that the........
Here is the scenario, you are using QEMU/KVM and are using something like the AC97 sound driver to pass the host audio to the guest via pulseaudio. This is useful because you can transparently pass your mic input from the host which means you can mute your microphone from the host, which prevents the guest from receiving any mic input even if unmuted.
Mute / Unmute Fix
This issue also seems to happen even if you press the mute button on the microphone and then unmute,........
It is very silly but the default on the ifup-eth script tells dhclient ( the program that obtains a DHCP IPaddress if you have selected DHCPin your ifcfg-eth* config file) to EXIT / QUIT if the first attempt to obtain a lease fails.
No amount of dhclient.conf settings will fix this because if dhclient is started with -1 (which it is by default)then dhclient will quit.
This is obviously very bad for MOST cases. Say for example you have a power outage or........
sshcommand="ssh -N -R 20000:localhost:22 firstname.lastname@example.org"
result=`ps aux|grep $sshcommand"|grep -v grep`
if [ -z "$result" ]; then
echo "we are going to connect"
echo "we are already connected"
This is a handy script you can use and then add it to cron.
First you need the "iptables-persistent" package. This gives you an init script that loads your settings from /etc/iptables/rules.v4 and rules.v6
When you install it, it wll save your default setings in /etc/iptables.
sudo apt-get install iptables-persistent
Remember that the rules are stored here:
For IPV4: /etc/iptables/rules.v4
For IPV6: /etc/iptables/r........
If you move your hard drive(s) around to other computers/servers, you'll find that your eth0 keeps getting higher, the first time it will become eth1 and then eth2 etc and even higher if your server has dual or quad NICs. The reason is that udevd basically assigns eth0 tot he first NIC it finds and remembers it, if it encounters a NIC with a differentMAC, it assigns it one higher (eg. eth1).
See the example below, I have eth2 now so how doI fix it?........
Neither the blkid or the UUID internal to mdadm work to automount for some reason in Debian
partprobe doesn't work but was a good suggestion from: http://pato.dudits.net/2008/11/03/special-device-uuidxxxxxxxxxxxxxxxx-does-not-exist-especially-with-lvm
mount: special device /dev/disk/by-uuid/431b9b96-29e8f298-e89bd504-7065bddd does not exist
mdadm -D /dev/md_d12
mdadm: metadata format 00.90 unknown, ignored.
I separated the 2 drives in the RAID 1 array.
1 is the old one /dev/sda and is out of date, while the separated other one /dev/sdc was in another drive and mounted and used with more data (updated).
I wonder how mdadm will handle this:
usb-storage: device scan complete
md: md127 stopped.
md: md127: raid array is not clean -- starting background reconstruction
raid1: raid set md127 active with 1 out of 2 m........
Create New RAID 1 Array:
First setup your partitions (make sure they are exactly the same size)
In my example I have sda3 and sdb3 which are 500GB in size.
mdadm --create /dev/md2 --level=1 --raid-devices=2 /dev/sda3 /dev/sdb3
mdadm: array /dev/md2 started.
Check Status Of The Array
*Note I already have other arrays md0 and md1.
You can see below that md2 is syn........
Which one does the OS care about? blkid says the UUID is "787f1fa4-b010-4d77-a010-795b42884f56" while md insists its UUID is "4d96dd3b:deb5d555:7adb93cb:ce9182d9"
When in doubt, do we assume the OS takes the one from blkid?
/dev/md0: UUID="787f1fa4-b010-4d77-a010-795b42884f56" TYPE="ext3"
[root@localhost ~]# mdadm -D /dev/md0
Version : 0.90
I successfully created a single RAID 1 partition which includes /boot inside it and my root directory through the Debian installer. It said GRUB installed successfully but when I try booting the OS it seems GRUB can't read anything.
When trying to boot from GRUB
GRUB Loading stage 1.5.
GRUB loading, please wait...
I get "Error 2" when trying to boot Debian. I also notice from a LiveCD that........
mdadm --assemble --scan
mdadm: /dev/md/diaghost05102010:2 has been started with 2 drives.
mdadm: /dev/md/diaghost05102010:1 has been started with 2 drives.
mdadm: /dev/md/diaghost05102010:0 has been started with 2 drives.
-bash-3.1# cat /proc/mdstat
Personalities : [linear] [raid0] [raid1] [raid6] [raid5] [raid4] [multipath]
md125 : active raid1 sda1 sdb1
14658185 blocks super 1.2........
Igot this after copying a VMWare image onto another machine in Debian.
SIOCSIFADDR No such device eth0 error while getting interface flags
1.) Find and edit the device line in persisent-net.rules note it will be prefixed with something like z25 or something else.
The easiest way is to comment anything out.
If you are feeling........