title: No network interface for the lan9118 emulated on QEMU 1.4.0 overo machine

text: Im using QEMU 1.4.0 Ubuntu 13.04 distribution. Im trying to make the virtrual machine part of the host network so Im ussing this command:               sudo qemu-system-arm -M overo -m 1024 -sd ./test.img -clock unix -device usb-mouse -device usb-kbd -serial pty -monitor pty -net nic,vlan=1,macaddr=00:aa:00:60:00:01,model=lan9118 -net tap,vlan=1,ifname=tap0,script=no      In QEMU's monitor I see this:               (qemu) info network                                                                  hub 1                                                                                \ tap.0: index=0,type=tap,ifname=tap0,script=no,downscript=/etc/qemu-ifdown          \ lan9118.0: index=0,type=nic,model=lan9118,macaddr=00:aa:00:60:00:01          (qemu) info qtree                                                                    bus: main-system-bus                                                                   type System                                                                          dev: lan9118, id ""                                                                    mac = 00:aa:00:60:00:01                                                              vlan = 1                                                                             netdev = hub1port0                                                                   bootindex = -1                                                                       mode_16bit = 0                                                                       irq 1                                                                                mmio ffffffffffffffff/0000000000000100       I see that the device is been emulated and the vlan attached to the tap device. So far everything looks good. Inside the virtual machine I get this:               [root@overo ~]# ifconfig -a                                                         lo        Link encap:Local Loopback                                                            inet addr:127.0.0.1  Mask:255.0.0.0                                                  UP LOOPBACK RUNNING  MTU:16436  Metric:1                                             RX packets:0 errors:0 dropped:0 overruns:0 frame:0                                   TX packets:0 errors:0 dropped:0 overruns:0 carrier:0                                 collisions:0 txqueuelen:0                                                            RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)                                          usb0      Link encap:Ethernet  HWaddr F2:9D:C9:7F:69:F7                                        BROADCAST MULTICAST  MTU:1500  Metric:1                                              RX packets:0 errors:0 dropped:0 overruns:0 frame:0                                   TX packets:0 errors:0 dropped:0 overruns:0 carrier:0                                 collisions:0 txqueuelen:1000                                                         RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)       No eth0 interface was given to the lan9118 device. Insted I get a usb0 for which device is no where in the `info qtree` listing at the QEMU's monitor. I guessed that it could be the drivers for the lan9118 weren't installed. So I checked the `linux-3.2.8.config` file and this is what the ethernet part does look like:               #     # CAIF transport drivers     #     CONFIG_ETHERNET=y     CONFIG_NET_VENDOR_BROADCOM=y     # CONFIG_B44 is not set     CONFIG_NET_VENDOR_CHELSIO=y     # CONFIG_DM9000 is not set     # CONFIG_DNET is not set     CONFIG_NET_VENDOR_FARADAY=y     # CONFIG_FTMAC100 is not set     # CONFIG_FTGMAC100 is not set     CONFIG_NET_VENDOR_INTEL=y     CONFIG_NET_VENDOR_I825XX=y     CONFIG_NET_VENDOR_MARVELL=y     CONFIG_NET_VENDOR_MICREL=y     CONFIG_KS8851=y     CONFIG_KS8851_MLL=y     CONFIG_NET_VENDOR_MICROCHIP=y     # CONFIG_ENC28J60 is not set     CONFIG_NET_VENDOR_NATSEMI=y     CONFIG_NET_VENDOR_8390=y     # CONFIG_AX88796 is not set     # CONFIG_ETHOC is not set     CONFIG_NET_VENDOR_SEEQ=y     # CONFIG_SEEQ8005 is not set     CONFIG_NET_VENDOR_SMSC=y     CONFIG_SMC91X=y     #CONFIG_SMC911X is not set     CONFIG_SMSC911X=y     # CONFIG_SMSC911X_ARCH_HOOKS is not set     CONFIG_NET_VENDOR_STMICRO=y     # CONFIG_STMMAC_ETH is not set     CONFIG_NET_VENDOR_TI=y     # CONFIG_TI_DAVINCI_EMAC is not set     # CONFIG_TI_DAVINCI_MDIO is not set     # CONFIG_TI_DAVINCI_CPDMA is not set     CONFIG_PHYLIB=y      I see CONFIG_SMSC911X=y which in this case should be good. I also tried CONFIG_SMC911X=y but nothing changed. If anyone has ever managed to bring an overo VM under the host network I will also be glad to hear from you. Also, I tried getting a x86-64 VM to the host network using the same methode and it worked fine. The x86-64 VM use a e1000 device. Looking at hw/overo.c on QEMU's code I see this:               88     /* Strictly this should be a LAN9221 */      89     if (nd_table[0].vlan) {      90         /* The ethernet chip hangs off the GPMC */      91         NICInfo *nd = &nd_table[0];      92         qemu_check_nic_model(nd, "lan9118");      93         s->eth = qdev_create(NULL, "lan9118");      94         qdev_set_nic_properties(s->eth, nd);      95         qdev_init_nofail(s->eth);      96         omap_gpmc_attach(s->cpu->gpmc, OVERO_NET_CS, s->eth, 0, 0);      97         sysbus_connect_irq(sysbus_from_qdev(s->eth), 0,      98                            qdev_get_gpio_in(s->cpu->gpio, 176));       the comment at line 88 says it should be strictly a LAN9221 device, but the qemu_check_nic_model(nd, "lan9118") is a LAN9118. What device driver should be installed then? Looking at hw/overo.c on QEMU's code I see this:               88     /* Strictly this should be a LAN9221 */      89     if (nd_table[0].vlan) {      90         /* The ethernet chip hangs off the GPMC */      91         NICInfo *nd = &nd_table[0];      92         qemu_check_nic_model(nd, "lan9118");      93         s->eth = qdev_create(NULL, "lan9118");      94         qdev_set_nic_properties(s->eth, nd);      95         qdev_init_nofail(s->eth);      96         omap_gpmc_attach(s->cpu->gpmc, OVERO_NET_CS, s->eth, 0, 0);      97         sysbus_connect_irq(sysbus_from_qdev(s->eth), 0,      98                            qdev_get_gpio_in(s->cpu->gpio, 176));       the comment at line 88 says it should be strictly a LAN9221 device, but the qemu_check_nic_model(nd, "lan9118") is a LAN9118. I searched on internet and SMSC911X should be de same driver for both device. CONFIG_SMSC911X=y I wondering if `CONFIG_SMSC911X_ARCH_HOOKS` should also be set. But the info about this config is not well detailed. On smsc.com I found this; SRC-118-UBOOT-ARM LAN91xx/LAN92xx UBOOT driver for ARM processor But have no idead If my uboot has does driver or even how to add them.


title: mount other encrypted volume on wrong password entry

text: I have fully encrypted my laptop using dm-crypt and luks. So If I start my laptop I was prompted for a password before init will start. This works just fine. ### The problem A possible attacker will know if he types in a password (i.e by trying) that his guessed password is wrong because luks refuses to decrypt that device. So I'm wondering if there is a way to circumvent this. If someone enters a wrong password (read: Any literal that was not defined), a fake block device should get mounted (maybe I have to format and install another plain-unix there before) and booted, so that no one can determine (without inspecting the hard-disk any further) if the password was correct or not. If this is not possible, it can also be another literal which is predefined to mount another block-device.


title: not able to add files to HDD

text: I created a single primary partition to my WD WD800BB-55JHA0 80GB HDD using MBR partitioning scheme. Into this partition I created an ext4 file-system with 200048640 inodes! Then I created loads of very small files with `while true; do echo a > /media/$RANDOM$RANDOM$RANDOM; done` command. At some point I was not able to add more files:               sh-4.2# strace echo a > /media/$RANDOM$RANDOM$RANDOM      The file is not created and there is no output to shell. It just hangs there forever. Output of `dumpe2fs /dev/sdb1` can be seen below:               Filesystem volume name:   <none>     Last mounted on:          /media     Filesystem UUID:          233d7f5b-51b0-4c3d-8f1d-5d8c34f08a8f     Filesystem magic number:  0xEF53     Filesystem revision #:    1 (dynamic)     Filesystem features:      has_journal ext_attr resize_inode dir_index filetype needs_recovery extent flex_bg sparse_super large_file huge_file uninit_bg dir_nlink extra_isize     Filesystem flags:         signed_directory_hash      Default mount options:    user_xattr acl     Filesystem state:         clean with errors     Errors behavior:          Continue     Filesystem OS type:       Linux     Inode count:              200048640     Block count:              19536000     Reserved block count:     976871     Free blocks:              6665698     Free inodes:              199748660     First block:              0     Block size:               4096     Fragment size:            4096     Reserved GDT blocks:      1024     Blocks per group:         3200     Fragments per group:      3200     Inodes per group:         32768     Inode blocks per group:   2048     Flex block group size:    16     Filesystem created:       Thu Jan  5 11:20:15 2006     Last mount time:          Thu Jan  5 11:48:02 2006     Last write time:          Thu Jan  5 11:53:15 2006     Mount count:              1     Maximum mount count:      -1     Last checked:             Thu Jan  5 11:20:15 2006     Check interval:           0 (<none>)     Lifetime writes:          3540 MB     Reserved blocks uid:      0 (user root)     Reserved blocks gid:      0 (group root)     First inode:              11     Inode size:               256     Required extra isize:     28     Desired extra isize:      28     Journal inode:            8     First orphan inode:       280161     Default directory hash:   half_md4     Directory Hash Seed:      84caa27e-4e4c-4853-b222-e739c0fda1de     Journal backup:           inode blocks     FS Error count:           1     First error time:         Thu Jan  5 11:53:15 2006     First error function:     ext4_mb_generate_buddy     First error line #:       741     First error inode #:      0     First error block #:      0     Last error time:          Thu Jan  5 11:53:15 2006     Last error function:      ext4_mb_generate_buddy     Last error line #:        741     Last error inode #:       0     Last error block #:       0     Journal features:         (none)     Journal size:             128M     Journal length:           32768     Journal sequence:         0x000000c7     Journal start:            29840      I clearly did not run out of inodes and there is enough space left to create more files:               sh-4.2# df -i /dev/sdb1     Filesystem        Inodes  IUsed     IFree IUse% Mounted on     /dev/sdb1      200048640 299980 199748660    1% /media     sh-4.2# df /dev/sdb1     Filesystem     1K-blocks    Used Available Use% Mounted on     /dev/sdb1       28079472 1416684  22755304   6% /media     sh-4.2#       What might restricting new files? Is there a limit of files per directory?


title: CUPS filter for a raw queue

text: I am having issues figuring out how to add a filter for a raw queue in CUPS - if this is possible. Basically, what I need to do, is convert a TIFF to PS before sending it to the raw queue. The printer does not have built-in TIFF support, so the output is junk. I need to keep the printer setup as a raw queue, and cannot add a second print queue for this same printer for the filtering. Is there anyway to capture a TIFF file (desirably for a single printer) and convert it to PS before sending it raw? Would this be something I would do in the mime.convs for the raw application?


title: Grepping for a block of text with parts that can be optional

text: I have multiple entries that describes an _event_ in a very large log file, say _A.log_. I would like to do two things with the _event_ entries in the log file:   1. Count the number of occurrences of each such entry.(This is not a mandatory requirement but would be nice to have.)   2. Extract the actual entries in a separate file and study them later on. A typical event entry would look like the following and will have other texts between them. So in the example below there are two _event_ entries, the first one containing two `DataChangeEntry` payload and second one containing one `DataChangeEntry` payload.                   Data control raising event :DataControl@263c015d[[         #### DataChangeEvent #### on [DataControl name=PatternMatch_LegendTimeAxis, binding=.dynamicRegion1.                         beam_project_PatternMatch_dashboard_LegendTimeAxis_taskflow_LegendTimeAxis_beamDashboardLegendTimeAxisPageDef_beam_project_PatternMatch_dashboard_LegendTimeAxis_taskflow_LegendTimeAxis_beamDashboardLegendTimeAxis_xml_ps_taskflowid.dynamicRegion58.                                                                                beam_project_PatternMatch_view_LegendTimeAxis_taskflow_LegendTimeAxis_beamVizLegendTimeAxisPageDef_beam_project_PatternMatch_view_LegendTimeAxis_taskflow_LegendTimeAxis_beamVizLegendTimeAxis_xml_ps_taskflowid.QueryIterator]         Filter/Collection Id : 0         Collection Level     : 0         Sequence Id             : 616         ViewSetId            : PatternMatch.LegendTimeAxis_V1_0_SN49         ==== DataChangeEntry (#1)         ChangeType           : UPDATE         KeyPath              : [2014-06-26 06:15:00.0, 0]         AttributeNames       : [DATAOBJECT_CREATED, COUNTX, QueryName]         AttributeValues      : [2014-06-26 06:15:00.0, 11, StrAvgCallWaitTimeGreaterThanThreshold]         AttributeTypes       : [java.sql.Timestamp, java.lang.Integer, java.lang.String,  ]         ==== DataChangeEntry (#2)         ChangeType           : UPDATE         KeyPath              : [2014-06-26 06:15:00.0, 0]         AttributeNames       : [DATAOBJECT_CREATED, COUNTX, QueryName]         AttributeValues      : [2014-06-26 06:15:00.0, 9, AverageCallWaitingTimeGreateThanThreshold]         AttributeTypes       : [java.sql.Timestamp, java.lang.Integer, java.lang.String,  ]              ]]          someother non useful text     spanning multiple lines            Data control raising event :DataControl@263c015d[[         #### DataChangeEvent #### on [DataControl name=PatternMatch_LegendTimeAxis, binding=.dynamicRegion1.                         beam_project_PatternMatch_dashboard_LegendTimeAxis_taskflow_LegendTimeAxis_beamDashboardLegendTimeAxisPageDef_beam_project_PatternMatch_dashboard_LegendTimeAxis_taskflow_LegendTimeAxis_beamDashboardLegendTimeAxis_xml_ps_taskflowid.dynamicRegion58.                                                                                beam_project_PatternMatch_view_LegendTimeAxis_taskflow_LegendTimeAxis_beamVizLegendTimeAxisPageDef_beam_project_PatternMatch_view_LegendTimeAxis_taskflow_LegendTimeAxis_beamVizLegendTimeAxis_xml_ps_taskflowid.QueryIterator]         Filter/Collection Id : 0         Collection Level     : 0         Sequence Id             : 616         ViewSetId            : PatternMatch.LegendTimeAxis_V1_0_SN49         ==== DataChangeEntry (#1)         ChangeType           : UPDATE         KeyPath              : [2014-06-26 06:15:00.0, 0]         AttributeNames       : [DATAOBJECT_CREATED, COUNTX, QueryName]         AttributeValues      : [2014-06-26 06:15:00.0, 11, StrAvgCallWaitTimeGreaterThanThreshold]         AttributeTypes       : [java.sql.Timestamp, java.lang.Integer, java.lang.String,  ]              ]]      Please note that the the number of `==== DataChangeEntry` lines in an event entry can be variable. It can also be completely absent which would indicate empty events payload and is a error condition and would definitely like to catch this case as well. Since in this case the output of entry spans across multiple lines I am not getting far using plain vanilla grep. So I am seeking expert advice. P.S:   1. Let me be more explicit about my requirement. I would like to capture the whole block of text shown above verbatim and optionally count the number of instances of such blocks encountered. The option to count the number of instances is good to have but not a mandatory requirement.    2. If the solution to the problem is using awk I would like to save the awk file and re-use it. So please mention the steps to execute the script also. I know regex and grep but I am not familiar with sed and/or awk.


title: How to Reset Forgotten Root Password in Fedora 19 from GRUB

text: YES, FEDORA 19. I saw a lot of information about how to do it but doesn't work with this version. All the tutorials explain the method for older versions of Fedora, i didn't found anything about doing it on the v19 or the v18. The GRUB menu is different (and i installed the GRUB's version from fedora installation, I only have this system ). I can enter to the recovery console but asks me the root password, so this doesn't solves anything. If anyone knows a way to do it; or if it's impossible, please tell me why.


title: lxde-rc.xml: set keybindings for PgDn

text: I am using LXDE, and I need to create keybinding for `ALT` + `PgDn` and `ALT` + `PgUp` in my `$HOME/.config/openbox/lxde-rc.xml` I already have the necessary code, the only thing missing is the correct description for `PgDn` and `PgUp`:               <keybind key="INSERT CODE FOR PAGE DOWN HERE">       <action name="Execute">         <startupnotify>           <enabled>true</enabled>           <name>amixer</name>         </startupnotify>         <command>amixer -c 0 set Master 5- unmute</command>       </action>     </keybind>      Could somebody please advise what is the code for those two keys?


title: Can't delete 777 file with permissions on parent directory

text: As my VCS I use git version 1.7.10.4 . However, when trying to perform a pull, I got the following message:               error: unable to unlink old 'somedir/config.php' (Permission denied)      So what I did is:               developer@ip-ipnone:~/websites/macarena.loc/public$ ls -lah somedir | grep config.php     -rwxrwxrwx  1 developer developer  13K Jun 24 19:22 config.php     You have new mail in /var/mail/developer     developer@ip-ipnone:~/websites/macarena.loc/public$ whoami     developer     developer@ip-ipnone:~/websites/macarena.loc/public$ ls -lah | grep somedir     drwxr-xr-x 19 developer developer 4.0K Jun 16 10:19 somedir      As you can see, I have write permissions on parent directory and still can't delete the file. I tried to find out if any process is using the file with:               fuser somedir/config.php      But it returned an empty result. What do I keep getting this error? // UPDATE Sorry, I just noticed that I can't even copy the file using the regular cp command. Why can't I do this if I'm the owner and have the corresponding permission on parent dir?


title: Is it possible to have two seperate one way (simplex) serial ports to make single tty device?

text: I am building embeded device, which has IR comunication with PC and it will have two IR Led/detector pairs which are one-way and are setup like this: IR source input commands -> near embeded device located detector for receiving commands, IR source near embeded for monitoring output -> detector near output for external device to get monitoring data. I found that the simplest method to implement in hardware is to have separate one-way serial comunication ports for each IR/detector pair: first for sending commands, second for monitoring output. In my Linux PC box I have these two separate serial ports listed as, say `/dev/ttyUSB1` and `/dev/ttyUSB2`. What I want is to have one ttyUSB act as an input, other as output, but be able to access both with terminal as single two-way port. Virtual device solution on `/dev/` should be enough, but is not must, the possibility to make program like minicom (or its substitute) to react on two separate ports without any new virtual devices would suffice. The problem is only on PC side and I think should be solved in software: if there is no really any solution to this problem I will probably add some custom hardware multiplexing/buffering to make single comunication port from these two. Edit: I added (rather rough draft) image for better ilustration where is my problem: ![enter image description here](http://i.stack.imgur.com/9HsPp.png)


title: NIC missing in 70-persistent-net.rules

text: I am using Ubuntu and typing               ifconfig -a      shows all interfaces but one(eth4), while the file 70-persistent-net.rules contains all(including eth4) but one (eth8). Any idea why is that and what are the consequences?


title: Debian package very large compared to zip file

text: I've just made a debian package, when all the files are zipped together the size is `60 MB`, however my `.deb` file made from the same directory is `~150 MB`. Have I done something wrong or are there lots of overheads involved with `.deb` files, and if so would it be possible to get a brief run-down of what is added to the raw files?


title: Unix Awk group by

text: Can anyone shed me light how to group by based on the username and sum the values divide it by number of rows of that specific username. for example below.               root 25 oracle 25  batch 30  griduser 20 admin 35          root 55 oracle 45 batch 30  griduser 10          oracle 35 batch 30  griduser 30 xuser 45 admin 85      * * * My output should be as follows.               root 40 oracle 35 batch 30 griduser 20 xuser 45 admin 60      Thanks in Advance


title: Mount a workstation dir upon login to server over ssh

text: I'd like to have a local directory be mounted upon logging into a remote server via SSH. So if I were to ssh into foo.bar.com as user baz then there would be a directory mounted in /home/baz/roaming - that corresponds to my local workstations roaming dir - for the length of my connection. My local workstation in this case is a Mac, but the methodology is likely more generally *nix in nature. Most likely an SSH wrapper would be necessary that performs some sort of mount related actions after a new ssh connection occurs. Has anyone done this? Suggestions or existing utilities would be very helpful!


title: Benchmarking Apache using ab

text: I was doing some performance testing for Apache using ab. Apache in our case is only working as a load balancer balancing load between two Liferay servers. Initially, I did the testing for 1000 requests with 100 concurrent requests. The tests went fine. But when I perform the tests for 500 concurrent users with 1000 requests, the tests were failing.               $ ab -c 500 -n 1000 http://103.X.X.X/web/guest/statistics      This is ApacheBench, Version 2.3 <$Revision: 655654 $>      Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/      Licensed to The Apache Software Foundation,             Benchmarking  (be patient)          Completed 100 requests     Completed 200 requests     Completed 300 requests          apr_socket_recv: Connection timed out (110)          Total of 386 requests completed      Can see the following message in Kernel.               May 13 14:21:15 www kernel: possible SYN flooding on port 80. Sending cookies.      I tried increasing the value for the following two parameters , but the tests were still failing and same error can be seen in system log file.               # echo "1024" > /proc/sys/net/core/somaxconn      # echo "2048" > /proc/sys/net/ipv4/tcp_max_syn_backlog       We have a campaign coming up where we are expecting large numbers of hits to our server. Since the tests were failing, we are somewhat worried whether our server will be able to take up the load. We are expecting around 500-700 concurrent requests for one single day during the campaign. Kindly suggest how to improve our server performance to take the load.


title: How to get Evolution to run in VNC on Debian/Wheezy?

text: For many years I've been in the habit of, when away from home, VNC-ing (over ssh) back into my "home machine" and running Evolution (for email, contacts etc) in a tightvncserver environment there. This worked fine when the home machine was running Debian/Squeeze, but now it's been updated to Wheezy, attempting to start Evolution in the VNC server session outputs:               Xlib:  extension "GLX" missing on display ":1".     Failed to connected to any renderer:     XServer appears to lack required GLX support      tightvncserver not supporting GLX isn't a surprise, but Evolution moving to a GL backend (through its use of the "clutter" toolkit?) is. (Just to be clear: Evolution works absolutely fine on the desktop; the machine has the nvidia drivers via DKMS.) What are the prospects for working round this? I'm thinking along the lines of:   * Is there a command line option to Evolution which will fix this?   * Is there some way of getting GLX support in a VNC server? (Alternatives to tightvncserver which support it?) Note that I tend to be VNC-ed in over high-latency/low-bandwidth links; I've tried running Evolution remotely over X11 before and it's not a good experience; VNC works much better. Debian-friendly (apt-get -able) solutions preferred.


title: How to use output of one command as input in another command

text: I made a copy of all the backups made on Wed of every week The time stamp of each file is not sorted but the day is Wednesday of every file Now, I need to sort each file based on time Stamp e.g if date is 1-May then it should first display the backup files of 1-May then it should display the files of 8-May I used this command but of course it is slapping me with error               sort $(cat /home/emerg/Wedbackup.txt)      Error is               sort: invalid option -- w      As i don't know how to use the output of one command as input of 2nd command. I need advice how to do it.


title: How to repair a corrupted HFS+ partition from a damaged hard-disk?

text: I have a friend's Mac OS X disk that comes with an `HFS+` partition. I am supposed to recover the personal data from this disk, and I'm not yet sure if the filesystem is corrupted or the disk is dying). * * * **Background** : The full symptoms are as follows. The drive gets recognized by Linux and even gets automounted (using `Xfce` here):               liv@liv-HP-Compaq-dc7900:~$ cat /etc/mtab | grep -i hfs     /dev/sdb2 /media/Macintosh\040HD hfsplus ro,nosuid,nodev,uhelper=udisks 0 0      The kernel reports the following:               [ 4382.681310] usb 2-5: USB disconnect, device number 2     [ 4390.104044] usb 2-5: new high-speed USB device number 3 using ehci_hcd     [ 4390.259178] Initializing USB Mass Storage driver...     [ 4390.259983] scsi6 : usb-storage 2-5:1.0     [ 4390.260077] usbcore: registered new interface driver usb-storage     [ 4390.260079] USB Mass Storage support registered.     [ 4391.260684] scsi 6:0:0:0: Direct-Access     ASMT     2105             0    PQ: 0 ANSI: 6     [ 4391.261346] sd 6:0:0:0: Attached scsi generic sg2 type 0     [ 4391.494924] sd 6:0:0:0: [sdb] 488397168 512-byte logical blocks: (250 GB/232 GiB)     [ 4391.495668] sd 6:0:0:0: [sdb] Write Protect is off     [ 4391.495672] sd 6:0:0:0: [sdb] Mode Sense: 43 00 00 00     [ 4391.496551] sd 6:0:0:0: [sdb] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA     [ 4391.560091]  sdb: sdb1 sdb2     [ 4391.565039] sd 6:0:0:0: [sdb] Attached SCSI disk     [..]     [10376.614742] hfs: Filesystem was not cleanly unmounted, running fsck.hfsplus is recommended.  mounting read-only.     [10380.531230] sd 6:0:0:0: [sdb] Unhandled sense code     [10380.531234] sd 6:0:0:0: [sdb]  Result: hostbyte=invalid driverbyte=DRIVER_SENSE     [10380.531239] sd 6:0:0:0: [sdb]  Sense Key : Medium Error [current]      [10380.531243] sd 6:0:0:0: [sdb]  Add. Sense: Unrecovered read error     [10380.531253] sd 6:0:0:0: [sdb] CDB: Read(10): 28 00 00 1e 22 e8 00 00 08 00     [10380.531259] end_request: critical target error, dev sdb, sector 1975016     [10380.531264] Buffer I/O error on device sdb2, logical block 195672     [10384.353981] sd 6:0:0:0: [sdb] Unhandled sense code     [10384.353985] sd 6:0:0:0: [sdb]  Result: hostbyte=invalid driverbyte=DRIVER_SENSE     [10384.353990] sd 6:0:0:0: [sdb]  Sense Key : Medium Error [current]      [10384.353995] sd 6:0:0:0: [sdb]  Add. Sense: Unrecovered read error     [10384.354004] sd 6:0:0:0: [sdb] CDB: Read(10): 28 00 00 1e 22 e8 00 00 08 00     [10384.354011] end_request: critical target error, dev sdb, sector 1975016     [10384.354015] Buffer I/O error on device sdb2, logical block 195672      Here's relevant output from `lshw`:                *-scsi           physical id: 3           bus info: usb@2:5           logical name: scsi7           capabilities: emulated scsi-host           configuration: driver=usb-storage         *-disk              description: SCSI Disk              product: 2105              vendor: ASMT              physical id: 0.0.0              bus info: scsi@7:0.0.0              logical name: /dev/sdb              version: 0              serial: 00000000000000000000              size: 232GiB (250GB)              capabilities: gpt-1.00 partitioned partitioned:gpt              configuration: ansiversion=6 guid=6b43402b-9887-4a33-a329-9801b59ccdc7            *-volume:0                 description: Windows FAT volume                 vendor: BSD  4.4                 physical id: 1                 bus info: scsi@7:0.0.0,1                 logical name: /dev/sdb1                 version: FAT32                 serial: 70d6-1701                 size: 199MiB                 capacity: 199MiB                 capabilities: boot fat initialized                 configuration: FATs=2 filesystem=fat label=EFI name=EFI System Partition            *-volume:1                 description: Apple HFS partition                 vendor: Mac OS X (fsck)                 physical id: 2                 bus info: scsi@7:0.0.0,2                 logical name: /dev/sdb2                 version: 4                 serial: d9a741cc-8313-cc78-0000-000000800000                 size: 232GiB                 capabilities: journaled bootable osx hfsplus initialized                 configuration: boot=osx checked=2009-09-24 02:29:07 created=2009-09-23 17:29:07 filesystem=hfsplus lastmountedby=fsck modified=2013-11-03 01:02:00 name=Customer state=unclean      When I open the drive in `Thunar`, I get the following error message: `"Failed to open directory "Macintosh HD". Error when getting information for file '/media/Macintosh HD/.journal': Input/output error."` (I can access the mount point and some subdirs, though, if I use `emelFM2`.) ![enter image description here](http://i.stack.imgur.com/a5ygN.png) If I try `ls` on the mount point, I get a bunch of I/O errors:               liv@liv-HP-Compaq-dc7900:/media/Macintosh HD$ ls -lha     ls: cannot access .hotfiles.btree: Input/output error     ls: cannot access .journal: Input/output error     ls: cannot access .journal_info_block: Input/output error     ls: cannot access .Spotlight-V100: Input/output error     ls: cannot access .Trashes: Input/output error     ls: cannot access home: Input/output error     ls: cannot access libpeerconnection.log: Input/output error     ls: cannot access net: Input/output error     ls: reading directory .: Input/output error     total 20M     drwxrwxr-t 1 root   80   35 Oct 13 22:56 .     drwxr-xr-x 3 root root 4.0K Jan 16 21:09 ..     drwxrwxr-x 1 root   80   53 Oct 18 22:07 Applications     drwxr-xr-x 1 root root   39 Sep 26 00:51 bin     drwxrwxr-t 1 root   80    2 Jul  9  2009 cores     dr-xr-xr-x 1 root root    2 Jul  9  2009 dev     -rw-rw-r-- 1  501   80  16K Sep  8 14:19 .DS_Store     lrwxr-xr-x 1 root root   11 Sep 24  2009 etc -> private/etc     ---------- 1 root   80    0 Jul  9  2009 .file     drwx------ 1   99   99  246 Nov  3 00:29 .fseventsd     lrwxr-xr-x 1 root   80   60 Mar 20  2010 Guides de l’utilisateur et informations -> /Library/Documentation/User Guides and Information.localized     dr-xr-xr-t 1 root root    2 Sep 24  2009 .HFS+ Private Directory Data?     d????????? ? ?    ?       ?            ? home     -????????? ? ?    ?       ?            ? .hotfiles.btree     -????????? ? ?    ?       ?            ? .journal     -????????? ? ?    ?       ?            ? .journal_info_block     -????????? ? ?    ?       ?            ? libpeerconnection.log     drwxrwxr-t 1 root   80   58 Mar 27  2013 Library     drwxrwxrwt 1 root root    4 Sep 18  2012 lost+found     -rw-r--r-- 1 root root  20M Jun  8  2011 mach_kernel     d????????? ? ?    ?       ?            ? net     drwxr-xr-x 1 root root    2 Jul  9  2009 Network     drwxr-xr-x 1  501   80    3 Oct 26  2010 opt     drwxr-xr-x 1 root root    6 Sep 24  2009 private     drwxr-xr-x 1 root root   67 Sep 26 00:52 sbin     d????????? ? ?    ?       ?            ? .Spotlight-V100     drwxr-xr-x 1 root root    4 Jul  3  2011 System     lrwxr-xr-x 1 root root   11 Sep 24  2009 tmp -> private/tmp     d????????? ? ?    ?       ?            ? .Trashes     drwxr-xr-x 1 root root    2 May 18  2009 .vol     -rw-r--r-- 1  501   80  70K Jun 26  2013 .VolumeIcon.icns      Lastly, I already tried to install `hfsprogs` and run `fsck.hfsplus`, but without much luck:               root@liv-HP-Compaq-dc7900:/home/liv# fsck.hfsplus -q /dev/sdb2     ** /dev/sdb2     QUICKCHECK ONLY; FILESYSTEM DIRTY          root@liv-HP-Compaq-dc7900:/home/liv# fsck.hfsplus -d /dev/sdb2     ** /dev/sdb2         Using cacheBlockSize=32K cacheTotalBlock=1024 cacheSize=32768K.     ** Checking HFS Plus volume.        Invalid B-tree node size     (8, 0)     ** Volume check failed.     volume check failed with error 7          volume type is pure HFS+          primary MDB is at block 0 0x00          alternate MDB is at block 0 0x00          primary VHB is at block 2 0x02          alternate VHB is at block 487725342 0x1d12191e          sector size = 512 0x200          VolumeObject flags = 0x07          total sectors for volume = 487725344 0x1d121920          total sectors for embedded volume = 0 0x00       * * * **Question** : From the error messages above, is the filesystem corrupted or the drive failing? How can I fix the corrupted filesystem? And if that's not the issue, how can I recover the user data from a partially failing disk? * * * **UPDATE1** : Given the useful input that I got from Which 'smartctl -d' option should I use on this hard-disk: 'scsi' or 'ata'?, I now managed to successfully run `smartctl` on the hard-drive:               root@liv-HP-Compaq-dc7900:/home/liv# smartctl -d sat -H -i -c -A -l error -l selftest -l selective '/dev/sdb'     smartctl 5.41 2011-06-09 r3365 [x86_64-linux-3.2.0-57-generic] (local build)     Copyright (C) 2002-11 by Bruce Allen, http://smartmontools.sourceforge.net          === START OF INFORMATION SECTION ===     Device Model:     TOSHIBA MK2555GSXF     Serial Number:    10J9SA69S     LU WWN Device Id: 5 000039 245a067fd     Firmware Version: FH205B     User Capacity:    250,059,350,016 bytes [250 GB]     Sector Size:      512 bytes logical/physical     Device is:        Not in smartctl database [for details use: -P showall]     ATA Version is:   8     ATA Standard is:  Exact ATA specification draft version not indicated     Local Time is:    Fri Jan 17 18:02:43 2014 CET     SMART support is: Available - device has SMART capability.     SMART support is: Enabled          === START OF READ SMART DATA SECTION ===     SMART overall-health self-assessment test result: PASSED     [..]          SMART Attributes Data Structure revision number: 16     Vendor Specific SMART Attributes with Thresholds:     ID# ATTRIBUTE_NAME          FLAG     VALUE WORST THRESH TYPE      UPDATED  WHEN_FAILED RAW_VALUE       1 Raw_Read_Error_Rate     0x000b   100   100   050    Pre-fail  Always       -       0       2 Throughput_Performance  0x0005   100   100   050    Pre-fail  Offline      -       0       3 Spin_Up_Time            0x0027   100   100   001    Pre-fail  Always       -       1031       4 Start_Stop_Count        0x0032   100   100   000    Old_age   Always       -       16237       5 Reallocated_Sector_Ct   0x0033   100   100   050    Pre-fail  Always       -       18       7 Seek_Error_Rate         0x000b   100   100   050    Pre-fail  Always       -       0       8 Seek_Time_Performance   0x0005   100   100   050    Pre-fail  Offline      -       0       9 Power_On_Hours          0x0032   081   081   000    Old_age   Always       -       7987      10 Spin_Retry_Count        0x0033   253   100   030    Pre-fail  Always       -       0      12 Power_Cycle_Count       0x0032   100   100   000    Old_age   Always       -       5274     191 G-Sense_Error_Rate      0x0032   100   100   000    Old_age   Always       -       1119     192 Power-Off_Retract_Count 0x0032   084   084   000    Old_age   Always       -       8196     193 Load_Cycle_Count        0x0032   037   037   000    Old_age   Always       -       635340     194 Temperature_Celsius     0x0022   100   100   000    Old_age   Always       -       25 (Min/Max 7/49)     196 Reallocated_Event_Count 0x0032   100   100   000    Old_age   Always       -       3     197 Current_Pending_Sector  0x0032   100   100   000    Old_age   Always       -       124     198 Offline_Uncorrectable   0x0030   100   100   000    Old_age   Offline      -       0     199 UDMA_CRC_Error_Count    0x0032   200   253   000    Old_age   Always       -       0     220 Disk_Shift              0x0002   100   100   000    Old_age   Always       -       57     222 Loaded_Hours            0x0032   087   087   000    Old_age   Always       -       5415     223 Load_Retry_Count        0x0032   100   100   000    Old_age   Always       -       0     224 Load_Friction           0x0022   100   100   000    Old_age   Always       -       0     226 Load-in_Time            0x0026   100   100   000    Old_age   Always       -       346     240 Head_Flying_Hours       0x0001   100   100   001    Pre-fail  Offline      -       0     254 Free_Fall_Sensor        0x0032   100   100   000    Old_age   Always       -       8107          SMART Error Log Version: 1     ATA Error Count: 1210 (device log contains only the most recent five errors)     [..]          Error 1210 occurred at disk power-on lifetime: 7984 hours (332 days + 16 hours)       When the command that caused the error occurred, the device was active or idle.            After command completion occurred, registers were:       ER ST SC SN CL CH DH       -- -- -- -- -- -- --       40 51 08 e8 22 1e 40  Error: UNC 8 sectors at LBA = 0x001e22e8 = 1975016            Commands leading to the command that caused the error were:       CR FR SC SN CL CH DH DC   Powered_Up_Time  Command/Feature_Name       -- -- -- -- -- -- -- --  ----------------  --------------------       25 da 08 e8 22 1e 40 00      00:08:36.484  READ DMA EXT       25 da 08 e8 22 1e 40 00      00:08:32.637  READ DMA EXT       25 da 08 00 66 22 40 00      00:08:32.637  READ DMA EXT       25 da 08 f8 65 22 40 00      00:08:32.625  READ DMA EXT       25 da 08 50 c3 28 40 00      00:08:32.625  READ DMA EXT          [..]          SMART Self-test log structure revision number 1     No self-tests have been logged.  [To run self-tests, use: smartctl -t]               SMART Selective self-test log data structure revision number 1      SPAN  MIN_LBA  MAX_LBA  CURRENT_TEST_STATUS         1        0        0  Not_testing         2        0        0  Not_testing         3        0        0  Not_testing         4        0        0  Not_testing         5        0        0  Not_testing     Selective self-test flags (0x0):       After scanning selected spans, do NOT read-scan remainder of disk.     If Selective self-test is pending on power-up, resume after 0 minute delay.      I'm not sure how to parse this output, but two things pop to my eyes:   * `SMART overall-health self-assessment test result: PASSED`   * `ATA Error Count: 1210 (device log contains only the most recent five errors)` So how bad is it? And how should I proceed? * * * **UPDATE2** : Following the suggestions in the comments, I used a Mac OS X to run `diskutil verifyVolume`:               mac:~ admin$ diskutil list     [..]     /dev/disk1     #:                       TYPE NAME                    SIZE       IDENTIFIER     0:      GUID_partition_scheme                        *250.1 GB   disk1     1:                        EFI                         209.7 MB   disk1s1     2:                  Apple_HFS Macintosh HD            249.7 GB   disk1s2          mac:~ admin$ diskutil verifyVolume /dev/disk1s2     Started filesystem verification on disk1s2 Macintosh HD     Checking Journaled HFS Plus volume     Invalid B-tree node size     The volume Macintosh HD could not be verified completely     Error: -9957: Filesystem verify or repair failed     Underlying error: 8: POSIX reports: Exec format error      And `fsck`:               mac:~ admin$ fsck -d /dev/disk1s2      ** /dev/rdisk1s2     BAD SUPER BLOCK: MAGIC NUMBER WRONG          LOOK FOR ALTERNATE SUPERBLOCKS? [yn] y          SEARCH FOR ALTERNATE SUPER-BLOCK FAILED. YOU MUST USE THE     -b OPTION TO FSCK TO SPECIFY THE LOCATION OF AN ALTERNATE     SUPER-BLOCK TO SUPPLY NEEDED INFORMATION; SEE fsck(8).      So, how bad are these error messages? Is the drive toast? * * * **UPDATE3** : I played a bit more with `smartctl` and it seems to me (but please confirm!!) that the drive is definitely toast:               # 'smartctl' -d sat,16 -H -i -c -A -l error -l selftest -l selective '/dev/sdb'          smartctl 5.41 2011-06-09 r3365 [x86_64-linux-3.2.0-57-generic] (local build)     Copyright (C) 2002-11 by Bruce Allen, http://smartmontools.sourceforge.net          === START OF INFORMATION SECTION ===     Device Model:     TOSHIBA MK2555GSXF     Serial Number:    10J9SA69S     LU WWN Device Id: 5 000039 245a067fd     Firmware Version: FH205B     User Capacity:    250,059,350,016 bytes [250 GB]     Sector Size:      512 bytes logical/physical     Device is:        Not in smartctl database [for details use: -P showall]     ATA Version is:   8     ATA Standard is:  Exact ATA specification draft version not indicated     Local Time is:    Mon Jan 27 15:20:57 2014 CET     SMART support is: Available - device has SMART capability.     SMART support is: Enabled          === START OF READ SMART DATA SECTION ===     SMART overall-health self-assessment test result: FAILED!     Drive failure expected in less than 24 hours. SAVE ALL DATA.     See vendor-specific Attribute list for failed Attributes.          General SMART Values:     Offline data collection status:  (0x00) Offline data collection activity                         was never started.                         Auto Offline Data Collection: Disabled.     Self-test execution status:      (  88) The previous self-test completed having                         the electrical element of the test                         failed.     Total time to complete Offline      data collection:        (  120) seconds.     Offline data collection     capabilities:            (0x5b) SMART execute Offline immediate.                         Auto Offline data collection on/off support.                         Suspend Offline collection upon new                         command.                         Offline surface scan supported.                         Self-test supported.                         No Conveyance Self-test supported.                         Selective Self-test supported.     SMART capabilities:            (0x0003) Saves SMART data before entering                         power-saving mode.                         Supports SMART auto save timer.     Error logging capability:        (0x01) Error logging supported.                         General Purpose Logging supported.     Short self-test routine      recommended polling time:    (   2) minutes.     Extended self-test routine     recommended polling time:    (  90) minutes.     SCT capabilities:          (0x0039) SCT Status supported.                         SCT Error Recovery Control supported.                         SCT Feature Control supported.                         SCT Data Table supported.          SMART Attributes Data Structure revision number: 16     Vendor Specific SMART Attributes with Thresholds:     ID# ATTRIBUTE_NAME          FLAG     VALUE WORST THRESH TYPE      UPDATED  WHEN_FAILED RAW_VALUE       1 Raw_Read_Error_Rate     0x000b   100   100   050    Pre-fail  Always       -       0       2 Throughput_Performance  0x0005   100   100   050    Pre-fail  Offline      -       0       3 Spin_Up_Time            0x0027   100   100   001    Pre-fail  Always       -       1025       4 Start_Stop_Count        0x0032   100   100   000    Old_age   Always       -       1       5 Reallocated_Sector_Ct   0x0033   100   100   050    Pre-fail  Always       -       0       7 Seek_Error_Rate         0x000b   100   100   050    Pre-fail  Always       -       0       8 Seek_Time_Performance   0x0005   100   100   050    Pre-fail  Offline      -       0       9 Power_On_Hours          0x0032   100   100   000    Old_age   Always       -       0      10 Spin_Retry_Count        0x0033   100   100   030    Pre-fail  Always       -       0      12 Power_Cycle_Count       0x0032   100   100   000    Old_age   Always       -       1     191 G-Sense_Error_Rate      0x0032   100   100   000    Old_age   Always       -       0     192 Power-Off_Retract_Count 0x0032   100   100   000    Old_age   Always       -       0     193 Load_Cycle_Count        0x0032   100   100   000    Old_age   Always       -       3     194 Temperature_Celsius     0x0022   100   100   000    Old_age   Always       -       27 (Min/Max 26/30)     196 Reallocated_Event_Count 0x0032   100   100   000    Old_age   Always       -       0     197 Current_Pending_Sector  0x0032   100   100   000    Old_age   Always       -       0     198 Offline_Uncorrectable   0x0030   100   100   000    Old_age   Offline      -       0     199 UDMA_CRC_Error_Count    0x0032   200   253   000    Old_age   Always       -       0     220 Disk_Shift              0x0002   100   100   000    Old_age   Always       -       57     222 Loaded_Hours            0x0032   100   100   000    Old_age   Always       -       0     223 Load_Retry_Count        0x0032   100   100   000    Old_age   Always       -       0     224 Load_Friction           0x0022   100   100   000    Old_age   Always       -       0     226 Load-in_Time            0x0026   100   100   000    Old_age   Always       -       353     240 Head_Flying_Hours       0x0001   001   001   001    Pre-fail  Offline  FAILING_NOW 3     254 Free_Fall_Sensor        0x0032   100   100   000    Old_age   Always       -       0          Error SMART Error Log Read failed: scsi error badly formed scsi parameters     Smartctl: SMART Error Log Read Failed     Error SMART Error Self-Test Log Read failed: scsi error badly formed scsi parameters     Smartctl: SMART Self Test Log Read Failed     Error SMART Read Selective Self-Test Log failed: scsi error badly formed scsi parameters     Smartctl: SMART Selective Self Test Log Read Failed      I could single out:   * `SMART overall-health self-assessment test result: FAILED! Drive failure expected in less than 24 hours. SAVE ALL DATA.`   * `240 Head_Flying_Hours 0x0001 001 001 001 Pre-fail Offline FAILING_NOW 3` I suspect that any solutions like `testdisk` or `photorec` on the drive itself are pretty much out of the question right now. So my only hope to rescue any data would be to get myself a bigger hard-disk and make a bit-for-bit copy of the failing drive using `dd` or `ddrescue`, and then play with `photorec` on the resulting image. Any other ideas most welcome! * * * **UPDATE4** : As inquired in Recovering data from a damaged hard-drive: the "freezer trick", I am posting the output of `smartctl -H /dev/yourdisk` and `smartctl -A /dev/yourdisk`:               [Output was misleading so I removed that. See UPDATE5.]      Does this allow to identify the type of failure? * * * **UPDATE5** : About a week ago I foolishly ran `testdisk` on the disk for a night (after a couple of native Mac OS X `fsck` attempts), and the damage likely became worse than it had been when the owner simply had dropped it. At the end of the `testdisk` session I was clearly hearing a clicking noise ("click of death"?), and the drive was incapable of any further reads (all reads resulted in an error). Initially I assumed that this was happening because of overheating, but now I tend to believe that the damage simply propagated and the drive is now in very bad shape. When I try to run `smartctl` `short self-test` on the drive, the test `Completed with electrical failure` and the `smartctl` output is the same as in UPDATE3, including the `240 Head_Flying_Hours 0x0001 001 001 001 Pre-fail Offline FAILING_NOW 3` error. ![enter image description here](http://i.stack.imgur.com/heDwf.png) I also attempted a `ddrescue` session, which ended with a grand total of `0 bytes` rescued.               root@xubuntu:/mnt/ram# ddrescue -f -n /dev/sdc /dev/sda /mnt/ram/ddrescue.log          Press Ctrl-C to interrupt     Initial status (read from logfile)     rescued:         0 B,  errsize:       0 B,  errors:       0     Current status     rescued:         0 B,  errsize:    250 GB,  current rate:        0 B/s        ipos:     65024 B,   errors:       1,    average rate:        0 B/s        opos:     65024 B,     time from last successful read:     3.5 m     Finished                         At each read attempt the kernel was complaining in `dmesg` of `Buffer I/O error on device`:               [ 3706.642819] sd 9:0:0:0: [sdc]  Sense Key : Medium Error [current]     [ 3706.642824] sd 9:0:0:0: [sdc]  Add. Sense: Unrecovered read error     [ 3706.642834] sd 9:0:0:0: [sdc] CDB: Read(10): 28 00 00 00 00 18 00 00 08 00     [ 3706.642842] end_request: critical target error, dev sdc, sector 24     [ 3706.642845] Buffer I/O error on device sdc, logical block 3     [ 3710.910060] sd 9:0:0:0: [sdc] Unhandled sense code     [ 3710.910064] sd 9:0:0:0: [sdc]  Result: hostbyte=invalid driverbyte=DRIVER_SENSE      So all this definitely points to hardware damage. But what is the exact type of damage? (In part, I would like to check if the "freezer trick" is in any way appropriate.) As suggested in a related question, I checked How to Recover Data When Your Hard Drive Goes Belly Up and it seems to me, given the symptoms that I've noticed, that it's either:   * Your Drive Is Spinning Up and Making Clicking Noises, or   * Your Drives Spins Ups and Is Detected by Your Computer, But Hangs When You Try to Access It So given all the additional information posted here, is it possible identify the **type** of failure that the disk is experiencing? And would the "freezer trick" be appropriate in this case? (It was suggested to me that "When read write heads touch the surface of the disk, then they are toss and twist, so no read is possible anymore", and this does sound like a realistic explanation, but I'm not sure how to confirm it.)


title: Audio not working on Google Chrome (Linux Mint 16 Cinnamon)

text: Audio works perfectly fine on Firefox, but I can't get Chrome to play audio. Linux Mint 16 Cinnamon Not sure how to explain it more. Youtube doesn't play sound in chrome, but it will in firefox. Audio works on the system, just not in the chrome browser


title: Mutt not sending email when specifying smtp server

text: I am trying to use `mutt` as my email client, and it works fine for my gmail account. But when I use my work email, it does not send the emails. It doesn't give any error, it just doesn't send them. The line in my `.muttrc` file that causes this problem is: > set smtp_url = "smtp://mail.my_work_email_server.com:587" The behaviour does not change when adding the `smtp_pass`, nor does it by altering the name of the email server (i.e. using a 'fictional' server address).


title: Ignoring dependencies when installing with yum (Scientific Linux)

text: How can I ignore dependencies of a single package I am attempting to install using `yum` in Scientific Linux? The answer would presumably the same for CentOS/RHEL. To elaborate, I am looking to get the utility `lsb_release`, which I know would be put into `/usr/bin/lsb_release`. The command `yum whatprovides /usr/bin/lsb_release` tells me that it is part of the `redhat-lsb` packages (for the respective architectures), but those have a bunch of dependencies, including some X11-related. Since I am only after the `lsb_release` program, I would like to dodge the "crud" that comes with the dependencies. How can I achieve that?


title: Shell script filtering through jpg files attributes

text: I'm trying to find a way to filter through thousands of jpg files, and keep only the files with a certain attribute (such as the camera brand with which the picture was captured). How can I do so?


title: Where can I learn more about how to use the GRUB `ntldr` command (module?)

text: I recently stumbled across the GRUB `ntldr` module. Apparently one of the things it can be used for is as an alternative to `chainloader` to boot the NT >= 6.0 versions of Windows as in the example below. (Very handy if the Volume Boot Record for a Windows partition is, uh, corrupted.)               menuentry "Windows 7 (bootmgr on /dev/sda1)" --class windows --class os {         insmod part_msdos         insmod ntfs         insmod ntldr         set root='(hd0,msdos1)'         search --no-floppy --fs-uuid --set=root 1EA0019AA0017A13         ntldr ($root)/bootmgr     }      Where can I learn more about how this boot directive can be used? I did not see it listed when I looked in the **HTML version** of the _GNU GRUB manual_. * * * ### Replying to ckhan's answer Thank you very much! I had pretty much decided I would have to try digging through the source code to learn more about the GRUB `ntldr` command/module. But you have done a much better job than I would have. It never would have occurred to me to look at the email archives to see what design discussions the person who wrote the code might have had. That method sounds like it could be very helpful in the future. Thanks for mentioning it. **My thoughts about GRUB`ntldr` support**   1. While I'm not really sure how much the distinction means, `ntldr` is a module, not a command. Or perhaps a dynamically loaded command if you wish.      Following your source code link and looking at lines 152 (`GRUB_MOD_INIT`) and 159 (`GRUB_MOD_FINI`) you can see the code to load and ... I'm guessing ... unload the module.      GRUB apparently implements many functions which you might think are " _commands_ " as modules. The only difference in usage that I'm aware of is that before using a module one must ensure it has been loaded with the command `insmod ntldr`.      _Aside:_ I always wondered why GRUB does not support `reboot`. It turns out the command exists, but it is a module. If `reboot` returns `unknown command`, then `insmod reboot` allows GRUB to "remember" the `reboot` command.      _Aside:_ When and why GRUB might " _unload_ " a module, I have no idea yet. Maybe it is the result of something similar to " _garbage collection_ "?? I have noticed that once loaded the modules seem to persist, even after a system is powered down and rebooted. Of course, you cannot **depend** on that, but that appears to be how it often works in practice.   2. It is interesting that they based `ntldr` on `chainloader`. I have not looked at the `chainloader.c` code. I guess it probably also does a relocating load in Intel 16-bit _real_ mode?      I **am** rather glad they did not implement `ntldr` as an option of `chainloader`. I agree with Vladimir. Whatever the similarities under the covers, the usage syntax is very different. The current approach is less kludgy.   3. It is also interesting to see the apparent lack of enthusiasm for adding this command to GRUB. Apparently the GRUB developers thought damage to the Windows _Partition Boot Record (PBR)_ was extremely unlikely. However, I can sketch out how to do it during an ordinary enough install.      Start by assuming a user has Windows installed on their system. They now install Ubuntu (12.04 LTS) " _alongside_ " Windows. At one point during the Ubuntu install they can apparently decide where they want GRUB to be installed. For reasons I cannot begin to guess at, some of them decide to install GRUB into the partition Windows is installed in.      The install completes and they can successfully start Ubuntu. However, when they try to start Windows by selecting the entry in the GRUB menu, Windows does **not** start. Instead attempting to start Windows with GRUB just re- displays the GRUB menu?      Why? Well, apparently when they elected to install GRUB into the windows partition part of what actually happened was the PBR for the Windows partition was over-written with GRUB's PBR. So `chainloader +1` does not chain load a Windows bootloader, but instead re-loads GRUB.      IMO, the safest _quick_ way to allow a user to boot Windows in that situation is to use the GRUB's new `ntldr`. I wonder if this would be of interest to the developers. I expect they did not anticipate this scenario. I wonder what bootloaders other than the Windows ones, `ntldr` and `bootmgr`, the GRUB `ntldr` command might be able to load?


title: Some settings in 50-synaptics.conf have no effect

text: I am having trouble with editing the synaptics file for my touchpad, `/etc/X11/xorg.conf.d/50-synaptics.conf`. I got Debian-based Linux with Gnome 3.4.2. The relevant portion (I suppose) of said file goes as follows:               Section "InputClass"     Identifier "touchpad catchall"     Driver "synaptics"     MatchIsTouchpad "on"     Option "TapButton1" "1"     Option "MaxSpeed" "4"     Option "AccelFactor" "0.0825"     Option "ClickPad" "1"     Option "VertEdgeScroll" "1"     Option "VertTwoFingerScroll" "1"     Option "RBCornerButton" "3"      What is interesting is that some of these settings are obeyed, while others are ignored. It appears that the `AccelFactor` is obeyed, yet `VertTwoFingerScroll` is certainly ignored. I tweaked the former, restarted, and saw the actual difference under `synclient -l`. By the way, I checked this: http://askubuntu.com/questions/26290/50-synaptics- conf-options-not-working And I can confirm I have no `/etc/X11/xorg.conf` file, only `/etc/X11/xorg.conf.d/50-synaptics.conf`. I reviewed the Debian-wiki for Synaptics and it may be that something else is overriding these. I can elaborate. Otherwise it could be something else. But I prefer to get the community's feedback before venturing further. I had Debian-based Linux for 4-6 weeks now and am in the early stages of the learning. My main goal is to tweak this as soon as possible, to get onto another routine for learning besides looking into immediate items. My constraints are time and ignorance. I prefer few steps over many in any solution, and GUI over CLI, so that I can continue my learning in a different order than that dictated just by problem-fixing. But in this case it seems that a simpler correction of some settings file should do.


title: GlusterFS & Mercurial don't like each other

text: I did setup GlusterFS but when I mounted the directory on the client and did `hg clone myrepo myrepo` in that mounted directory, it's giving the following error:               requesting all changes     adding changesets     transaction abort!     rollback completed     abort: integrity check failed on 00changelog.i:6!        1. When I go to a none Glusterfs directory then clone, hg works fine.    2. I checked out the code to a different directory then moved it to the mounted GlusterFS directory and it works fine. So it must be that either Mercurial or GlusterFS has a bug but don't know if there is an alternative. Else I will have to use rsync from non mounted directory. Any idea what's going on here? **Versions**               GlusterFS 3.2.6     Mercurial 2.1.1


title: How to find the currently running app from terminal on OS X?

text: I'm writing a shell script runs in the background and monitors user activity. I'd like to be able to capture current application/document if possible. Can I do that? (Cross-posting this from http://superuser.com/questions/738443/how-to-find- the-currently-running-app-from-terminal-on-os-x, since I didn't know about this site when I posted there. Apologies if that's a faux pas.)


title: How to active tabs on windows by terminal? wmctrl doesn't have option available

text: I'd like improve a script of mine that uses firefox to perform tasks. I need activate a window and a tab with a specific name. For example, the window name could be `Mozilla Firefox` and the tab `http://localhost/site.php`. I can activate windows using `wmctrl -a`, but this doesn't work very well because all firefox windows could have `Mozilla Firefox` on its name, even the windows without tabs named `http://localhost/site.php`. An example of what I need is: activate the tab `http://localhost/site.php` at the window `Mozilla Firefox`. I use linux and I would like a solution for this kind of system. Probably I will use shellscript (and OS commands) and python to improve the script, so solutions with them are welcome to me.


title: Why does mutt retain deleted emails in view until you "sync your mailbox" using $?

text: Every other mail client I have used will remove emails from my sight when I delete them. If I change my mind and want the email back, I can always go look for it in the trash. Why does mutt continue to show emails in my inbox after I have deleted them? Is it possible to hide them as soon as I delete them?


Just migrate one site from one vps to another(ubuntu 14lts) I used virtualmin as control panel I can access mysite via mysite.com, but can not access via www.mysite.com Your comment welcome Updated question: mysite.com.conf               ServerAlias admin.mysite.com     DocumentRoot /home/mysite/public_html     ErrorLog /var/log/virtualmin/mysite.com_error_log     CustomLog /var/log/virtualmin/mysite.com_access_log combined     ScriptAlias /cgi-bin/ /home/mysite/cgi-bin/     ScriptAlias /awstats/ /home/mysite/cgi-bin/     DirectoryIndex index.html index.htm index.php index.php4 index.php5     <Directory /home/mysite/public_html>     Options -Indexes +IncludesNOEXEC +SymLinksIfOwnerMatch +ExecCGI     allow from all     AllowOverride All Options=ExecCGI,Includes,IncludesNOEXEC,Indexes,MultiViews,SymLinksIfOwnerMatch     Require all granted     AddHandler fcgid-script .php     AddHandler fcgid-script .php5     FCGIWrapper /home/mysite/fcgi-bin/php5.fcgi .php     FCGIWrapper /home/mysite/fcgi-bin/php5.fcgi .php5     </Directory>     <Directory /home/mysite/cgi-bin>     allow from all     AllowOverride All Options=ExecCGI,Includes,IncludesNOEXEC,Indexes,MultiViews,SymLinksIfOwnerMatch     Require all granted     </Directory>     RewriteEngine on     RewriteCond %{HTTP_HOST} =webmail.mysite.com     RewriteRule ^(.*) https://mysite.com:20000/ [R]     RewriteCond %{HTTP_HOST} =admin.mysite.com     RewriteRule ^(.*) https://mysite.com:10000/ [R]     RemoveHandler .php     RemoveHandler .php5     php_admin_value engine Off     IPCCommTimeout 31     FcgidMaxRequestLen 1073741824     <Files awstats.pl>     AuthName "mysite.com statistics"     AuthType Basic     AuthUserFile /home/mysite/.awstats-htpasswd     require valid-user


title: How to Free Up Space in a Dynamically Growing qcow2 VM image?

text: This has happened to one of my VM's that's running CentOS under Proxmox. I copied about 40 GB of data into a VM. I then deleted that 40 GB data a day later. Now taking a backup of the same VM takes over 30 minutes and over 40 GB in size when there is only 9 GB in the VM. ### Questions   * So how can I actually free up that space after that file deletion?   * Is there a command that I can run on the VM to free up that space?    * A command on the hypervisor's level to free it up?


title: nfsroot freezing every once in a while presumably due to network glitch

text: **Setup** I've set up a thin client running gentoo according to these instructions. It seems to work quite nicely except that every once in a while it freezes. I've found that I can duplicate the issue by pulling the network, running ls, and then plugging the network back in. For whatever reason it's not recovering from the loss of network. I would assume that the OS should be able to handle momentary I/O loss (let's say that a hard drive takes a second or two to respond), so I think it can't be just a glitch in the filesystem, but rather that the nfs connection isn't coming back at all. The filesystem is mounted as nfs4 with the following options:               rw,relatime,vers=4.0,rsize=4096,wsize=4096,namlen=255,hard,proto=udp,port=0,timeo=11,retrans=3,sec=sys,clientaddr=xxx.xxx.xxx.xxx,local_lock=none,addr=yyy.yyy.yyy.yyy      ~~Previously, I was using no proto spec (defaulting to tcp) and that didn't work any better.~~ I've found that after removing the udp flag from boot it still boot as udp, so now I think I may have been looking at the `/home` mount instead of the `/` mount. I figure what's happening when I'm not pulling the cord is that the network glitches for a second, something's trying to access a file (seems to be freezing when I'm compiling some software), and then it doesn't recover. **Information from dmesg** I have run a bunch of tests, and found that apparently disconnecting/reconnecting the cable doesn't always cause a problem, but sometimes does. In the dmesg log, when this happens, the last line is:               nfs: server yyy.yyy.yyy.yyy not responding, still trying      **Question** What can I do to make the system robust to network problems?


title: Kernel booting stops right after "Uncompressing Linux..."

text: I'm trying to bring up an ARM-based board. I've got U-Boot working but can't seem to get the kernel to load. Most of the time it only goes as far as:               Starting kernel ...          Uncompressing Linux...      A couple of times while playing with U-Boot env settings it followed up with:               uncompression error           -- System halted      I found some threads that suggested using LZO compression instead of GZIP so I've reconfigured the kernel, but now it's getting the LZO compression error message:               Compressed data violation           -- System halted      Any suggestions how I could try to debug this? I've already enabled DEBUG_LL and printk in the kernel, but those haven't served me at all.


title: Why is Apache running on port 8080 instead on port 80?

text: I am confused why Apache is not responding on port 80 ...               $ wget http://localhost:80       --2014-05-06 15:32:44--  http://localhost/     Resolving localhost (localhost)... 127.0.0.1     Connecting to localhost (localhost)|127.0.0.1|:80... failed: Connection refused.      ... but instead on post 8080 ...               $ wget http://localhost:8080     --2014-05-06 15:32:38--  http://localhost:8080/     Resolving localhost (localhost)... 127.0.0.1     Connecting to localhost (localhost)|127.0.0.1|:8080... connected.     HTTP request sent, awaiting response... 200 OK     Length: 177 [text/html]     Saving to: ‘index.html’          100%[=================================================>] 177 --.-K/s   in 0s          2014-05-06 15:32:38 (16,4 MB/s) - ‘index.html’ saved [177/177]      Not too much too see in the output of _apache2ctl_ :               $ apache2ctl -t -D DUMP_VHOSTS     VirtualHost configuration:     *:80 is a NameVirtualHost        default server localhost (/etc/apache2/sites-enabled/000-default.conf:1)        port 80 namevhost localhost (/etc/apache2/sites-enabled/000-default.conf:1)        port 80 namevhost localhost (/etc/apache2/sites-enabled/000-default.conf:1)      However, _netstat_ confirms the port:               $ sudo netstat -anp | grep :8080     tcp6       0      0 :::8080        :::*       LISTEN      5353/apache2      * * * As asked by Joel here is the `ports.conf`:               $ sudo cat /etc/apache2/ports.conf     # If you just change the port or add more ports here, you will likely also     # have to change the VirtualHost statement in     # /etc/apache2/sites-enabled/000-default          Listen 8080          <IfModule ssl_module>         Listen 443     </IfModule>          <IfModule mod_gnutls.c>         Listen 443     </IfModule>          # vim: syntax=apache ts=4 sw=4 sts=4 sr noet     # NameVirtualHost *:8800     Listen 8800


title: Getting a Bad Hour Error in crontab

text: I am getting **Bad Hour** error for below peice of code in crontab               */05 17-05 * * * wget -q -O /dev/null "http://abcd/cron/abcd"      Is there any issue with this. I want the cron to run from evening 5 PM to morning 5 AM


title: What is `--` called?

text: Recently I got to know of `\--` that is double-hyphen which is used to tell a command that the option list has ended and what follows should not be considered as a option. So,               grep --  'search_word' *      would search for the given `search_word`. But you could see a unexpected behavior if you remove `\--` and if there is a single file that start with `-`, which would switch on the option that match with the chars in _filename_. What is this `\--` called ? Is there any technical term to this ?


title: Gallium renderer used instead of Intel Mesa

text: I have got GPU (Intel Haswell HD4600) performance troubles on my Debian. I installed `driconf`, because I read it can help. When I ran it from my user account I saw my default renderer is `Gallium (VMWare)`, but when I ran it from root - `Mesa Intel Haswell`. I think my troubles with performance could be caused by that. I tried `usermod -a -G video myuser`, but with no effect (rebooted OS). How can I change that, can you give me any suggestions?


title: Find the PID's of all threads of a process without ps or pidof

text: So the system I'm working on (BusyBox) has a `ps` that takes no command line arguments and `pidof` returns nothing even though it exists within `/sbin` and points to `killall5`. Another issue I had is that `top` takes no `-H`, but you can hit `h` (not `H`) in top to view the individual threads. Any tips on how I can generate a list of all PID's under a given process name?


title: Are there any multiformat image viewers, which are similar to feh and can show SVG files?

text: At the moment I'm working with a lot of SVG files and I don't have a good tool to inspect this files. Normally I use `feh` to take a look at an image, but `feh` can't show SVG files. Now I'm looking for a replacement. The replacement should have all the features of `feh` and should be able to open SVG files. Especially the following features are mandatory   * simple `feh` like GUI   * the tool should be designed for the use in a shell   * `$command ~/image1.svg image2.jpg` should only open these two files not the directory `~/`   * support multiple image formats   * small memory footprint and not to many dependencies  I know the Eye of GNOME (`eog`) does all this, but it is a GNOME tool and as such it needs to many GNOME dependencies.


title: How to make a PAM substack "requisite"?

text: For the auth section of my PAM configuration, `login` and `mdm` etc. call `common-auth`. I have `common-auth` calling the following as a substack (as `auth substack krb5ldap-cache-auth`):               auth optional pam_echo.so Trying UNIX     # Try UNIX, empty passwords OK     auth sufficient pam_unix.so nullok          auth optional pam_echo.so Checking UID     # If the uid < 500 and UNIX didn't work, then die.     auth requisite pam_succeed_if.so uid >= 500 quiet_success          auth optional pam_echo.so Trying Kerberos     # Try Kerberos, using the same password     # If the password is correct (success), then skip next lines     # If the password is wrong (auth_err), then die     # If Kerberos can't connect (?), then ignore     auth [success=2 auth_err=die default=ignore] pam_krb5.so debug use_first_pass          # Try the cache, using the same password     # Last chance.     auth optional pam_echo.so Trying cache     auth [success=done default=die] pam_ccreds.so action=validate use_first_pass          # Kerberos validated our password.     auth optional pam_echo.so Kerberos validated     # Store the password hash.     auth optional pam_ccreds.so action=store use_first_pass     # See if we can mount user drives, since we have a Kerberos token.     auth optional pam_mount.so     auth optional pam_echo.so Done.      (Using `pam_echo.so` just for debugging.) This seems to work fine for successful authentication. The substack mechanism is convenient, because I can use "sufficient" and "done" to terminate the substack without terminating the larger stack. But for failing authentication, the larger stack continues (for example, `mdm` will uselessly call `pam_gnome_keyring.so`, `login` will uselessly call `pam_group.so`) when it ought to die. Is there a way of calling a substack so that if the substack fails, the stack will die? I tried `auth requisite substack krb5ldap-cache-auth` but that's just bad PAM syntax.


title: ssh: "Error reading response length from authentication socket"

text: I have a Makefile with some `ssh` and `rsync` commands. All of them are executed correctly, but give the following error message:               Error reading response length from authentication socket.      I don't like enigmatic error messages - do you know what it means and how to fix it?


title: caching a master passphrase on a linux server

text: I am trying to use keychain on debian latest stable with some difficulty. Searching online I could not find a solution, but thought perhaps a different approach or a different tool might be better in this case. I want to achieve something reasonably straight-forward:   * When logging in to the server as root after reboot, the user is prompted for a _master passphrase_ **once**.   * This passphrase is loaded into memory and used to unlock **both** the `ssh private key` (used for pulling code from a remote git repository, remote authentication etc) and a `gpg private key` (used to decrypt some configuration parameters also coming from git). This way, only having access to the root account or being able to dump memory would allow extracting the passphrase. As soon as the server is rebooted the passphrase is cleared. I don't have the budget/resources for an HSM or anything more elaborate. I want something simple and cheap and that works reliably and securely enough. Keychain seems like a good candidate, but I can't get it to work properly to fulfill both requirements. Namely, it asks for the pasphrase twice, and also when trying to decrypt something with gpg it asks for it a 3rd time... Is there a way to achieve this securely with keychain or any other tool or shell script? [p.s. not sure if this belongs on ServerFault or here]


title: How to mount/recover data on a disk that was part of a mdadm raid 1 on another machine?

text: ## Some background   * The disk itself was "worked on" by a friend and is said to be still intact, undamaged and still mountable/recoverable   * The disk was part of a software raid 1 on Ubuntu 12.04   * The other disk in the original raid 1 was formatted and used for another purpose, leaving the current disk (the one in question) still technically part of a raid that no longer exists ## What I have tried already   * Basic mounting     * I added an entry to fstab, marked the disk as ext3/ext4 and tried to mount.     * Upon mounting the following error appears `wrong fs type, bad option, bad superblock on`     * And in **dmesg** `EXT4-fs (sdc1): VFS: Can't find ext4 filesystem`   * I have tried to find the file system type of the disk and have come up with `$sudo file -s /dev/sdc`   `/dev/sdc: x86 boot sector; partition 1: ID=0x83, starthead 254, startsector 63, 1953520002 sectors, code offset 0xb8` ## Where I need some help / My Questions   * Is there a way to convert the disk to ext4 without damaging the data?   * Is there a simple way to mount the Linux 83 file type disk and recover the data?   * I have another disk currently free in case it is a possibility to somehow rebuild the raid   * My main goal is to recover the data from the disk. I am open to all options. ## Update Some commands' output   * **fdisk -l /dev/sdc** `$fdisk -l /dev/sdc` `Disk /dev/sdc: 1000.2 GB, 1000204886016 bytes`   `255 heads, 63 sectors/track, 121601 cylinders, total 1953525168 sectors`   `Units = sectors of 1 * 512 = 512 bytes`   `Sector size (logical/physical): 512 bytes / 512 bytes`   `I/O size (minimum/optimal): 512 bytes / 512 bytes`   `Disk identifier: 0x0005ed9c`   `Device Boot Start End Blocks Id System`   `/dev/sdc1 63 1953520064 976760001 83 Linux`     * **file -s /dev/sdc1** `$file -s /dev/sdc1`   `/dev/sdc1: data`     * **hexdump -C -n 32256 /dev/sdc** (Not sure if this could help or not)              $hexdump -C -n 32256 /dev/sdc`     00000000  fa b8 00 10 8e d0 bc 00  b0 b8 00 00 8e d8 8e c0  |................|     00000010  fb be 00 7c bf 00 06 b9  00 02 f3 a4 ea 21 06 00  |...|.........!..|     00000020  00 be be 07 38 04 75 0b  83 c6 10 81 fe fe 07 75  |....8.u........u|     00000030  f3 eb 16 b4 02 b0 01 bb  00 7c b2 80 8a 74 01 8b  |.........|...t..|     00000040  4c 02 cd 13 ea 00 7c 00  00 eb fe 00 00 00 00 00  |L.....|.........|     00000050  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|     *     000001b0  00 00 00 00 00 00 00 00  9c ed 05 00 00 00 00 fe  |................|     000001c0  ff ff 83 fe ff ff 3f 00  00 00 82 59 70 74 00 00  |......?....Ypt..|     000001d0  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|     *     000001f0  00 00 00 00 00 00 00 00  00 00 00 00 00 00 55 aa  |..............U.|     00000200  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|     *     00007e00


title: Linux - get shared memory values from Perl script

text: I'm trying to get shared memory information from a linux box. I'm looking for shmmax, shmmni, shmall, msgmax, msgmni, semmsl, semmns etc. How to get all those values from a Perl script. any help is appreciated?


title: Pulseaudio doesn't record sound

text: Pulseaudio fails to record any sound, even though the sound configuration applications (both KDE and Gnome) correctly show the input level as I speak something. I am using the microphone built into my Logitech webcam. No microphone is connected to the sound card built into the motherboard, and this device is disabled for input. I configured Pulseaudio using `pavucontrol`, as suggested in this answer: http://unix.stackexchange.com/a/13571/10950. I am running Debian Wheezy (Stable). Tried Gnome sound recorder and Skype for recording. How can I fix it?


title: crontab is giving only 2045 lines of output instead of 6000 lines

text: I am executing one shell script with crontab which has to give more than 6000 lines output only it is giving output up to 2045 lines then coming out. when I run that shell script it is working fine giving more than 6000 lines My script is not having any errors when run from bash. But when I run from crontab it is redirecting output up to only 2045 or 2046 lines. my script file is with following line /script/scriptip.sh               #!/bin/bash     awk '$2 ~ /10.169/ || $2 ~ /10.170/ {print $2}' /script/iplist.txt > /script/ipid.txt      my iplist.txt will have 18000 lines text and my crontab entry is                * * * * * /script/scriptip.sh      i run manually with               ./script/scriptip.sh


title: aptitude current status warning

text: After installing some packages, i.e. sudo aptitude install pkg ... , there was a line of message at the end of the output:                   Current status: 0 updates [-66].      What does it mean?


title: Linux kernel for Nintendo Wii

text: I'm trying to compile a Linux kernel for the Nintendo Wii newer than the version 2.6.32 with mike p5 patches, which I have been using since now without problems. Since version 2.6.33 Wii support is included in the mainline kernel, but I can't manage to make it working. I tried using the old .config I used for version 2.6.32 and also the default .config for Wii platform. Of course in all these configs the option Wii platform support is selected but although the Wii seems to execute kernel code (the blue LED flashes) I can't see anything in the TV nor connecting by ssh. I tried almost all the branches included the last test version but with always the same result. I also updated my cross compiling tools with no luck. Am I missing some option or has something changed since version 2.6.32?


title: Easily switching over to a dynamic window manager from KDE

text: I've been using KDE on Opensuse for some time now and I feel like improving performance and using the most of my dual screens. I discovered tiling window managers and thought it would be a cool thing to try out. However, I'm stuck on a couple of issues.   * Will all my applications still be compatible? LibreOffice? Google Chrome? The GIMP? Kate? VLC? VirtualBox?   * Will it fully support my dual screens?   * Is it difficult to change environments from the one OpenSuse shipped with? Do I need to change anything internally?   * How easy is it to switch back to KDE and keep all my previous settings?   * Which tiling window manager should I be looking for? I realize that the last bullet point might be seen as off-topic (recommendation), but I will remove it if it's an issue.


title: Allow users to run only specific binaries with root permissions/privileges

text: I would like to allow a specific user to be able to sudo `/sbin/iptables` only. I have a bash script which configures iptables. The problem is that configuring `/sbin/iptables` as sudoable is not enough - The script itself also has to be sudoable. The problem is that that file could be edited by the user (he may change configurations there), giving him the ability to run any command as root. What is the proper approach to this problem?


title: Running Debian i386 binary on Debian armel via qemu

text: I am trying to follow this guide to set up a Ventrilo server on my SheevaPlug, running Debian armel. This page states that I can use QEMU to run the binary that was made for i386 on my arm system. The setup for qemu says that I need to install qemu, qemu-user, and qemu- libc-i386. I found the first two in **apt-get** , but **qemu-libc-i386** is not a package. So I tried to run qemu to run ventrilo server like this:               # qemu-i386 ./ventrilo_srv     /lib/ld-linux.so.2: No such file or directory      It seems that `ld-linux.so.2` is the i386 version of what I have in armel as `ld-linux.so.3`. So I know the how-to is for a different distribution of Linux, but it seems that I should be able to get this running in Debian if they could in their crazy distro. Is there a package that I can get that will install the **libc-i386** so I can get this to run (similar to **ia32-libs** for an x64 system?) I tried also copying the `so.2` from another i386 system and that didn't get me anywhere.


title: Protecting file system contents with TPM and Encrypted File System

text: I have been assured that this is possible, but have so far not found any reference that will clue me as to how to do it. I need to deploy an "appliance" with software and data that the user is permitted to use, but which I would prefer to keep them from poking around inside. The user will not have root access, so the running system should be protected. I want to stop the HDD being pulled and mounted elsewhere. So far I have installed all but /boot into an Encrypted file system, and I am challenged for a password very early in the boot process. One of my colleagues heard from "somewhere" that TPM would be the solution to protecting the password challenge, which would allow the system to boot and unencrypt the root partition without root user presence. How do I get this working, been googling for various combinations a words, to no avail. I also installed a TPM-aware version of GRUB, but have no idea how/if this actually helps me.


title: How to process directory first, then files and directories under it?

text: On my Linux system, I've got into a situation where there are not write/execute permissions on directories on a mounted drive. As a result, I can't get into a directory before I open its permissions up. This happens every time I mount that drive. The mounting operation is done by a tool under its hood, so I doubt if could modify mount parameters to address this problem. As a workaround, I am using this `find` command to modify permissions on directories. I use it repetitively, since it gets one more level of directories on each run.               find . -type d -print0 | xargs -0 -n 1 chmod a+wrx      I am sure there is a better way to do this. I wonder if there is a `find` option that processes a directory first and then its contents - the opposite of `-depth|-d` option. Any tips?


title: /proc/sys/kernel/hung_task_timeout_secs error

text: I am building a CentOS 6.2 webserver on a Hyper-V Cluster and have hit a major issue. The current setup is this: **Operating System:** CentOS 6.2. Minimal Server Install **Installed software includes:**   * Hyper-V Linux integration Drivers   * Webmin   * Apache 2   * MySQL 5.*   * php 5 with APC php accelerator   * webserver is running Moodle (if it making any difference mentioning it) The last thing I installed was the _"Hyper-V Linux integration Drivers"_ after which ... a few days later the entire OS locked up with "task blocked for more than 120 seconds" error right down the console. I now find this error rears it's ugly head over a prolonged running time and be triggered via a yum update command flagging right after the second download. ![Picture of terminal](http://i.stack.imgur.com/HWNmL.png) I've tried `fsck` as suggested on other forums but to no avail. Most other forums indicate hardware issues as the cause which can not fit here with the Hyper-V cluster (currently running a dozen high demand services with no issues) EDIT: (should have mentioned this first time around) this error is the last thing I see prior to the whole Kernel locking up. after this the only way to fix it, is to hard re-boot the virtual machine. Any help solving or diagnosing the problem is much appreciated. Thank You (in advance) **UPDATE 1:** OK serious escalation here. I've now got 2 other Linux machine of the same cluster with related issue and all of them fall over at the same time. I have a Ubuntu server complaining of a status: {DRDY} and a second CentOS 6.2 server complain of the same error as the first and the first server has crashed in a new way... **Ubuntu DRDY Error** ![Ubuntu DRDY Error](http://i.stack.imgur.com/4PlBF.png) **The First CentOS Kernel Crash** ![CentOS Kernel Crash](http://i.stack.imgur.com/RQZ5B.png) **UPDATE 2:** OK we got the cluster fixed but the problem still persisted with the two CentOS VMs. I have fix the first problem centOS by moving it the a un- clusterd Hyper-V and blacklisting all the Linux Integration Drivers followed by completely uninstalling them. it appears that the Linux integration drivers for the guest Machine along a the issues with clustered system causes this issue. the second CentOS machine is not so lucky... even though I have moved it to the un-clustered Hyper-V and blacklisted the drivers it still crashed unfortunately right in the middle of the uninstall of the linux integration driver. now I have the very big issue of the driver package showing in the rpm DB and only being half there. Question: is there a way of completely removing these drivers without using rpm or yum as now both complain it's there and not there and fails to remove it and trying to do anything too disk heavy like using rpm and yum cause the whole system to crash again. at this rate I may end up completely re-building it, but I need it stabilise soon as it host critical services. **THE ANSWER** OK my final troublesome CentOS VM has now been fixed. to remove the botched Linux Integration Driver and stabilise the system I did the following:   1. I downloaded a CentOS Live CD and booted it up in the faulty VM.   2. I then created a new folder with               $mkdir /mnt/OS        3. then mounted the root filesystem of the faulty OS (which in my case is sda2)              $mount /dev/sda2 /mnt/OS        4. I then mount the boot partition (which in my case is sda1)              $mount /dev/sda1 /mnt/OS/boot        5. I then chroot to the fault OS              $chroot /mnt/OS        6. and then ran rpm remove package command (ensuring all duplicates were removed in the process)              $rpm -e --allmatches kmod-microsoft-hyper-v        7. this process can take a little time but once done I could reboot the VM and my system was up and running without the integration drivers, but it now allows package updates without crashing.  After this I think I'll leave the Hyper-V drivers out of the mix until I am comfortable that they work and are stable.


title: Installed using apt-get, then ran out of storage

text: I attempted to install a large package, forgetting that I had little space left, and now I am a little stuck. When I attempt to remove any packages I get the following error: E: dpkg was interrupted, you must manually run 'sudo dpkg --configure -a' to correct the problem. And when I run the dpkg command, it complains I have no space. Is there a way I can explicitly tell it to abort installing, or free up the space (preferably without manually deleting package manager files).


title: Running Python script over multiple directories and multiple files

text: Here is my command line for `python`:               python script.py -a .faa -n .fna      I have a directory containing multiple directories. Out of these multiple directories, there could be 1 or more folders. In these 1 or more folders, I need to run my python script on the `.faa` and `.fna` files. How do I do this? Example tree:               Staph1 ----> [CO1, CO2] ----> [.fna, .faa] from CO1, [.fna, .faa] from CO2          Staph2 ----> [CO6] ----> [.fna, .faa] from CO6 My Python script will use the inputs `.fna` and `.faa` and output within the folder. Also the folder and directory are synonymous, sorry for the confusion.


title: Is `cal` broken? What happened in September 1752?

text: If you look at the output of `cal 9 1752` you will see this strange output:                  September 1752      S  M Tu  W Th  F  S            1  2 14 15 16     17 18 19 20 21 22 23     24 25 26 27 28 29 30      The following story titled "cal 9 1752 explained"" was copied off of a newslist in the early 90's and archived under Collections of funny stuff for a computer audience by David G. Wiseman (a Network Manager in the Department of Computer Science at The University of Western Ontario). > The guy that originally wrote the "cal" command on some old Version 7 > machine had an off-by-one error in his code. This showed up as some > erroneous output when a malloc'd variable overwrote 12 extra bytes with > zeroes, thus leading to the strange calendar output seen above. > > Now, nobody in his right mind really cares about the calendar for September > 1752. Even the _idea_ of the year 1752 does not exist under UNIX, because > time did not begin for UNIX until early 1970. As a result, nobody even knew > that "cal" had this error until much later. By then there were thousands of > copies of "cal" floating around, many of them binary-only. It was too late > to fix them all. > > So in mid-1975, some high-level AT&T officials met with the Pope, and came > to an agreement. The calendar was retroactively changed to bring September > 1752 in line with UNIX reality. Since the calendar was changed by counting > _backwards_ from September 14, 1752, none of the dates after that were > affected. The dates before that were all moved by 12 days. They also fixed > the man page for "cal" to document the bug as a feature. > > The 11 days from September 3 to September 13 were simply gone from the > records. They searched the history books and found that fortunately nothing > of much significance happened during those 11 days. > > Overall, this whole incident was pretty much a non-event. One science > fiction author later heard about it, and blew the thing up into a full- > length work of science-fiction called "The Lathe of Heaven", a book that in > my opinion bears little resemblence to what really happened. What is the real explanation for the output anomaly?


title: How to build a gateway from my Linux OS

text: I want to configure my Linux so that it will be used as a network router (gateway). Can anybody give me some hints on this? (links are welcome!)


title: Can I allow a non-root user to log in when /etc/nologin exists?

text: Suppose a non-root user with sudo privileges executes a delayed shutdown (`shutdown +10` or whatever) and logs out. Then, before the shutdown occurs, he wants to log back in and cancel the shutdown. The problem is that `shutdown` creates `/etc/nologin`, and `login` only allows root to log in when that file exists... is it possible to create an exception from this for a user? If not, what would be the best way to let a user initiate a delayed shutdown, then logging in and cancelling it at a later point?


title: Why can't gcc find libevent when building tmux from source?

text: I want to install tmux on a machine where I don't have root access. I already compiled libevent and installed it in `$HOME/.bin-libevent` and now I want to compile tmux, but configure always ends with `configure: error: "libevent not found"`, even though I tried to point to the libevent directory in the `Makefile.am` by modifying `LDFLAGS` and `CPPFLAGS`, but nothing seems to work. How can I tell the system to look in my home dir for the libevent?


title: yum install failing with strange output

text: I am using below command to install gcc on my laptop running fedora 17.               yum install gcc      But I am getting strange output.               Loaded plugins: langpacks, presto, refresh-packagekit     Resolving Dependencies     There are unfinished transactions remaining. You might consider running yum-complete-                transaction first to finish them.     --> Running transaction check     ---> Package gcc.x86_64 0:4.7.0-5.fc17 will be installed     --> Processing Dependency: glibc-devel >= 2.2.90-12 for package: gcc-4.7.0-5.fc17.x86_64     --> Running transaction check     ---> Package glibc-devel.x86_64 0:2.15-37.fc17 will be installed     --> Processing Dependency: glibc-headers = 2.15-37.fc17 for package: glibc-devel-2.15-37.fc17.x86_64     --> Processing Dependency: glibc = 2.15-37.fc17 for package: glibc-devel-2.15-37.fc17.x86_64     --> Processing Dependency: glibc-headers for package: glibc-devel-2.15-37.fc17.x86_64     --> Running transaction check     ---> Package glibc-devel.x86_64 0:2.15-37.fc17 will be installed     --> Processing Dependency: glibc = 2.15-37.fc17 for package: glibc-devel-2.15-37.fc17.x86_64     ---> Package glibc-headers.x86_64 0:2.15-37.fc17 will be installed     --> Processing Dependency: glibc = 2.15-37.fc17 for package: glibc-headers-2.15-37.fc17.x86_64     --> Finished Dependency Resolution     Error: Package: glibc-headers-2.15-37.fc17.x86_64 (fedora)            Requires: glibc = 2.15-37.fc17            Installed: glibc-2.15-56.fc17.i686 (@updates)                glibc = 2.15-56.fc17            Available: glibc-2.15-37.fc17.i686 (fedora)                glibc = 2.15-37.fc17     Error: Package: glibc-devel-2.15-37.fc17.x86_64 (fedora)            Requires: glibc = 2.15-37.fc17            Installed: glibc-2.15-56.fc17.i686 (@updates)                glibc = 2.15-56.fc17            Available: glibc-2.15-37.fc17.i686 (fedora)                glibc = 2.15-37.fc17      You could try using --skip-broken to work around the problem     ** Found 141 pre-existing rpmdb problem(s), 'yum check' output follows:     1:NetworkManager-0.9.4.0-9.git20120521.fc17.x86_64 is a duplicate with 1:NetworkManager-    0.9.4.0-7.git20120403.fc17.x86_64     1:NetworkManager-glib-0.9.4.0-9.git20120521.fc17.x86_64 is a duplicate with     1:NetworkManager-glib-0.9.4.0-7.git20120403.fc17.x86_64     PackageKit-0.7.5-1.fc17.x86_64 is a duplicate with PackageKit-0.7.4-3.fc17.x86_64     PackageKit-glib-0.7.5-1.fc17.x86_64 is a duplicate with PackageKit-glib-0.7.4-    3.fc17.x86_64     PackageKit-yum-0.7.5-1.fc17.x86_64 is a duplicate with PackageKit-yum-0.7.4-3.fc17.x86_64     abrt-2.0.10-4.fc17.x86_64 is a duplicate with abrt-2.0.10-3.fc17.x86_64     abrt-addon-ccpp-2.0.10-4.fc17.x86_64 is a duplicate with abrt-addon-ccpp-2.0.10-3.fc17.x86_64     abrt-addon-kerneloops-2.0.10-4.fc17.x86_64 is a duplicate with abrt-addon-kerneloops-2.0.10-3.fc17.x86_64     abrt-addon-python-2.0.10-4.fc17.x86_64 is a duplicate with abrt-addon-python-2.0.10-3.fc17.x86_64     abrt-addon-vmcore-2.0.10-4.fc17.x86_64 is a duplicate with abrt-addon-vmcore-2.0.10-3.fc17.x86_64................      Currently my `/etc/yum.repos.d/` folder has only one file `fedora.repo`. Contents of `fedora.repo`.Contents of this file looks ok to me.Is there any other location I should check ?               [fedora]     name=Fedora $releasever - $basearch     failovermethod=priority         #baseurl=http://download.fedoraproject.org/pub/fedora/linux/releases/$releasever/Everything/    $basearch/os/     mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=fedora-    $releasever&arch=$basearch     enabled=1     metadata_expire=7d     gpgcheck=1     gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-$basearch          [fedora-debuginfo]     name=Fedora $releasever - $basearch - Debug     failovermethod=priority     #baseurl=http://download.fedoraproject.org/pub/fedora/linux/releases/$releasever/Everything/    $basearch/debug/     mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=fedora-debug-    $releasever&arch=$basearch     enabled=0     metadata_expire=7d     gpgcheck=1     gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-$basearch          [fedora-source]     name=Fedora $releasever - Source     failovermethod=priority     #baseurl=http://download.fedoraproject.org/pub/fedora/linux/releases/$releasever/Everything/    source/SRPMS/     mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=fedora-source-  $releasever&arch=$basearch     enabled=0     metadata_expire=7d     gpgcheck=1     gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-$basearch


title: How do I remove login password for Centos6.5?

text: ## Question 1 On `Centos 6.5`, I have a username called `admin`. How can I make it so the system logs in automatically? ## Question 2 How can I configure system to login as `root` user when there are other users on the system? Please don't bother me with security risks as this is a testbed station. There is no sensitive information that I need to worry about. Thank you.


title: How to backup entire xen dom0 (on debian)

text: How do you go about creating a bootable backup ISO of my computer (dom0)? I have tried `remastersys` and this backs up everything but Xen does not work properly. LiveCDs also do not work. Does anyone have any ideas for how I could? Would a simple `cat /dev/sda > /dev/sdb` work ?