manufacturer's tool found bad blocks, but smartctl doesn't show any

Description of my problem is quite large, so first I will give a short summary, then I will precisely describe the situation. Short summary: manufacturer's diagnostic tools found and repaired some errors on my hard disk. As far as I understand tool's manual, these errors were bad blocks. However, smartctl (Linux tool to do SMART on hard disk) doesn't show any reallocated sectors and says that hard disk is good. First question: how is it possible? Reparation of bad blocks means reallocating sectors, right? So why don't smartctl report any reallocated sectors? Second question: I bought this disk a few months ago and I still have warranty for it. Should I demand that seller replace it for a new one or is this disk good and I could continue using it? And now precise description: I have Western Digital hard disk, model WDC WD5000AAKX-001CA0. Recently I noticed that sometimes my computer hangs for a few seconds (something like up to one minute). After such hangs dmesg shows errors like this:               knoppix@Microknoppix:~$ dmesg     (...)     [  504.003363] ata1.00: exception Emask 0x0 SAct 0x0 SErr 0x0 action 0x6 frozen     [  504.003374] ata1.00: failed command: READ DMA EXT     [  504.003383] ata1.00: cmd 25/00:00:80:07:01/00:02:00:00:00/e0 tag 0 dma 262144 in     [  504.003385]          res 40/00:00:09:4f:c2/00:00:00:00:00/00 Emask 0x4 (timeout)     [  504.003389] ata1.00: status: { DRDY }     [  509.016652] ata1: link is slow to respond, please be patient (ready=0)     [  514.030002] ata1: soft resetting link     [  514.200386] ata1.00: configured for UDMA/133     [  514.200420] ata1: EH complete     [  546.003333] ata1: lost interrupt (Status 0x50)     [  546.003364] ata1.00: exception Emask 0x0 SAct 0x0 SErr 0x0 action 0x6 frozen     [  546.003371] ata1.00: failed command: READ DMA EXT     [  546.003380] ata1.00: cmd 25/00:00:80:15:06/00:02:00:00:00/e0 tag 0 dma 262144 in     [  546.003381]          res 40/00:00:09:4f:c2/00:00:00:00:00/00 Emask 0x4 (timeout)     [  546.003386] ata1.00: status: { DRDY }     [  546.003401] ata1: soft resetting link     [  546.181205] ata1.00: configured for UDMA/133     [  546.181234] ata1: EH complete      However, smartctl says that "SMART overall-health self-assessment test result: PASSED" (I will paste complete output of smartctl few paragraphs later). Whenever I tried to make smartctl self test (with smartctl -t short or smartctl -t long) such tests were reported as aborted by host. So I downloaded bootable CD diagnostic tool for my hd - this one: http://support.wdc.com/product/download.asp?groupid=606&sid=2&lang=en Using this tool first I did quick test and it showed error (unfortunately, I don't remember what was the error code). As far as I understand this tool performs just SMART quick self test (http://wdc.custhelp.com/app/answers/detail/search/1/a_id/940/c/130/p/227,295 says "QUICK TEST - performs SMART drive quick self-test to gather and verify the Data Lifeguard information contained on the drive.") Then I did extended test. As far as I understand, this extended test looks for bad sectors (http://wdc.custhelp.com/app/answers/detail/search/1/a_id/940/c/130/p/227,295 says "EXTENDED TEST - performs a Full Media Scan to detect bad sectors"). After some time the tool told that it found and repaired some errors. Now I booted machine with knoppix and did "smartctl --all". Here is its output:               root@Microknoppix:/home/knoppix# smartctl --all /dev/sda     smartctl 5.43 2012-06-05 r3561 [i686-linux-3.4.9] (local build)     Copyright (C) 2002-12 by Bruce Allen, http://smartmontools.sourceforge.net          === START OF INFORMATION SECTION ===     Model Family:     Western Digital Caviar Blue Serial ATA     Device Model:     WDC WD5000AAKX-001CA0     Serial Number:    WD-WMAYUW952768     LU WWN Device Id: 5 0014ee 6ad1d9ef1     Firmware Version: 15.01H15     User Capacity:    500,107,862,016 bytes [500 GB]     Sector Size:      512 bytes logical/physical     Device is:        In smartctl database [for details use: -P show]     ATA Version is:   8     ATA Standard is:  Exact ATA specification draft version not indicated     Local Time is:    Wed Dec 12 03:34:39 2012 UTC     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          General SMART Values:     Offline data collection status:  (0x82) Offline data collection activity                         was completed without error.                         Auto Offline Data Collection: Enabled.     Self-test execution status:      (   0) The previous self-test routine completed                         without error or no self-test has ever                          been run.     Total time to complete Offline      data collection:        ( 8160) seconds.     Offline data collection     capabilities:            (0x7b) SMART execute Offline immediate.                         Auto Offline data collection on/off support.                         Suspend Offline collection upon new                         command.                         Offline surface scan supported.                         Self-test supported.                         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:    (  83) minutes.     Conveyance self-test routine     recommended polling time:    (   5) minutes.     SCT capabilities:          (0x3037) SCT Status 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     0x002f   200   200   051    Pre-fail  Always       -       486       3 Spin_Up_Time            0x0027   189   141   021    Pre-fail  Always       -       1525       4 Start_Stop_Count        0x0032   100   100   000    Old_age   Always       -       587       5 Reallocated_Sector_Ct   0x0033   200   200   140    Pre-fail  Always       -       0       7 Seek_Error_Rate         0x002e   200   200   000    Old_age   Always       -       0       9 Power_On_Hours          0x0032   098   098   000    Old_age   Always       -       1553      10 Spin_Retry_Count        0x0032   100   100   000    Old_age   Always       -       0      11 Calibration_Retry_Count 0x0032   100   100   000    Old_age   Always       -       0      12 Power_Cycle_Count       0x0032   100   100   000    Old_age   Always       -       578     192 Power-Off_Retract_Count 0x0032   200   200   000    Old_age   Always       -       173     193 Load_Cycle_Count        0x0032   200   200   000    Old_age   Always       -       413     194 Temperature_Celsius     0x0022   097   093   000    Old_age   Always       -       46     196 Reallocated_Event_Count 0x0032   200   200   000    Old_age   Always       -       0     197 Current_Pending_Sector  0x0032   200   200   000    Old_age   Always       -       0     198 Offline_Uncorrectable   0x0030   200   200   000    Old_age   Offline      -       5     199 UDMA_CRC_Error_Count    0x0032   200   200   000    Old_age   Always       -       0     200 Multi_Zone_Error_Rate   0x0008   200   200   000    Old_age   Offline      -       5          SMART Error Log Version: 1     ATA Error Count: 2         CR = Command Register [HEX]         FR = Features Register [HEX]         SC = Sector Count Register [HEX]         SN = Sector Number Register [HEX]         CL = Cylinder Low Register [HEX]         CH = Cylinder High Register [HEX]         DH = Device/Head Register [HEX]         DC = Device Command Register [HEX]         ER = Error register [HEX]         ST = Status register [HEX]     Powered_Up_Time is measured from power on, and printed as     DDd+hh:mm:SS.sss where DD=days, hh=hours, mm=minutes,     SS=sec, and sss=millisec. It "wraps" after 49.710 days.          Error 2 occurred at disk power-on lifetime: 1548 hours (64 days + 12 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       -- -- -- -- -- -- --       04 51 01 30 4f c2 a0  Error: ABRT            Commands leading to the command that caused the error were:       CR FR SC SN CL CH DH DC   Powered_Up_Time  Command/Feature_Name       -- -- -- -- -- -- -- --  ----------------  --------------------       b0 d6 01 be 4f c2 a0 02      00:02:58.316  SMART WRITE LOG       b0 da 01 00 4f c2 a0 02      00:02:58.259  SMART RETURN STATUS       80 44 00 00 44 57 a0 02      00:02:58.259  [VENDOR SPECIFIC]       b0 d6 01 be 4f c2 a0 02      00:02:58.241  SMART WRITE LOG       80 45 00 01 44 57 a0 02      00:02:58.241  [VENDOR SPECIFIC]          Error 1 occurred at disk power-on lifetime: 1515 hours (63 days + 3 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       -- -- -- -- -- -- --       04 51 01 30 4f c2 a0  Error: ABRT            Commands leading to the command that caused the error were:       CR FR SC SN CL CH DH DC   Powered_Up_Time  Command/Feature_Name       -- -- -- -- -- -- -- --  ----------------  --------------------       b0 d6 01 be 4f c2 a0 02      00:02:21.841  SMART WRITE LOG       b0 da 01 00 4f c2 a0 02      00:02:21.784  SMART RETURN STATUS       80 44 00 00 44 57 a0 02      00:02:21.784  [VENDOR SPECIFIC]       b0 d6 01 be 4f c2 a0 02      00:02:21.768  SMART WRITE LOG       80 45 00 01 44 57 a0 02      00:02:21.768  [VENDOR SPECIFIC]          SMART Self-test log structure revision number 1     Num  Test_Description    Status                  Remaining  LifeTime(hours)  LBA_of_first_error     # 1  Conveyance offline  Completed without error       00%      1552         -     # 2  Conveyance offline  Completed: read failure       90%      1548         787927349     # 3  Conveyance offline  Completed: read failure       90%      1515         883391611     # 4  Short offline       Completed without error       00%      1503         -     # 5  Short offline       Completed without error       00%      1503         -     # 6  Short offline       Aborted by host               80%      1502         -     # 7  Extended offline    Completed without error       00%         9         -     # 8  Short offline       Completed without error       00%         6         -     # 9  Short offline       Aborted by host               90%         6         -          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.      As you can see, on one hand one conveyance offline was completed with read failure. But, on the other hand, all attributes seems good - for instance, Reallocated_Sector_Ct is 0. I also tried once again to cat the whole disk to /dev/null - and again I have errors in dmesg:               root@Microknoppix:/home/knoppix# nice -n 20 ionice -c 3 cat /dev/sda > /dev/null     During this cat dmesg shows such errors:     knoppix@Microknoppix:~$ dmesg     (...)     [  504.003363] ata1.00: exception Emask 0x0 SAct 0x0 SErr 0x0 action 0x6 frozen     [  504.003374] ata1.00: failed command: READ DMA EXT     [  504.003383] ata1.00: cmd 25/00:00:80:07:01/00:02:00:00:00/e0 tag 0 dma 262144 in     [  504.003385]          res 40/00:00:09:4f:c2/00:00:00:00:00/00 Emask 0x4 (timeout)     [  504.003389] ata1.00: status: { DRDY }     [  509.016652] ata1: link is slow to respond, please be patient (ready=0)     [  514.030002] ata1: soft resetting link     [  514.200386] ata1.00: configured for UDMA/133     [  514.200420] ata1: EH complete     [  546.003333] ata1: lost interrupt (Status 0x50)     [  546.003364] ata1.00: exception Emask 0x0 SAct 0x0 SErr 0x0 action 0x6 frozen     [  546.003371] ata1.00: failed command: READ DMA EXT     [  546.003380] ata1.00: cmd 25/00:00:80:15:06/00:02:00:00:00/e0 tag 0 dma 262144 in     [  546.003381]          res 40/00:00:09:4f:c2/00:00:00:00:00/00 Emask 0x4 (timeout)     [  546.003386] ata1.00: status: { DRDY }     [  546.003401] ata1: soft resetting link     [  546.181205] ata1.00: configured for UDMA/133     [  546.181234] ata1: EH complete      I thought it can be fault of motherboard or data cable that connects disk to motherboard. So I connected another disk to my motherboard using the same cable and slot and cated it to /dev/null. It succedeed without dmesg showing any errors.


how to solve postfix errors?

After following several tutorials on setting up postfix at basic level on CentOs for my VPS, continue to get the following:               -bash-4.1# postfix start     /usr/libexec/postfix/postfix-script: line 317: cmp: command not found     postfix/postfix-script: warning: /usr/lib/sendmail and /usr/sbin/sendmail differ     postfix/postfix-script: warning: Replace one by a symbolic link to the other     postfix/postfix-script: starting the Postfix mail system      In the `main.cf` below are my edits:               myhostname = myservername.sub.mysite.net     mydomain = sub.mysite.net     myorigin = $myhostname     myorigin = $mydomain      inet_interfaces = all     inet_interfaces = $myhostname     inet_interfaces = localhost     mydestination = $myhostname, localhost.$mydomain, localhost     mynetworks = 192.168.0.0/16, 127.0.0.0/8      Also removed sendmail but haven't yet set up db, just trying to get postfix to start without errors. Is this the problem? why are two files in red? ![usr/sbin](http://i.stack.imgur.com/vqsKE.jpg)


Mac OS X find/grep generating "unknown --devices option"

I am entering a command I have done often with Linux, Unix perfectly fine but with Apple Mac OS X 10.8 (and probably before) I get a `grep: unknown --devices option` when I attempt to run the following command:               find . -type f -name '*.sql' 2>/dev/null | xargs grep -i 'texttolookfor'      I checked the results of the `find` command and they all appear to be just standard `.sql` files. And I should add that the problem occurs with other file searches not just `.sql` files. In searching the Apple site and Google I cannot seem to find any indication of what is going on here. Does anyone have a suggestion?


What sets a child's STDERR, STDOUT, and STDIN?

If a program runs `fork()` what sets standard streams `STDOUT`, `STDIN` and `STDERR`?


New harddrive does not show up in /dev

I am trying to add a second (unformatted) IDE hard drive to a QNX 6.4.1 VM (hosted through vmware's vSphere). Unfortunately, there is no entry for the drive in `/dev` (I think this is called an enumeration... is that correct?) I would have expected an entry named `/dev/hd1` that I could then put a QNX6 filesystem on, partition, and mount. But all I see is `/dev/hd0`. `devb-eide` is running. I tried moving it from Primary Slave to Secondary Master in the BIOS, but it didn't seem to help. This has always worked for me on my local VMs before, but now that we are hosted in vSphere, I don't know. Can someone please point me in the right direction? ![BIOS screenshot](http://i.stack.imgur.com/aaHxY.png) ![/dev screenshot](http://i.stack.imgur.com/PY61K.png) Update: So it looks like QNX calls /dev/hd0 a "Hard Disk Block Device" Link > /dev/hdn Hard disk block devices; data representing an entire drive, > spanning all partitions; see devb-* in the Utilities Reference. Is the term "Hard Disk Block Device" standard across many *nix? Update: For what it's worth, I also do not get a `/etc/fstab` showing up.


Piping to the command substitution of a string containing pipes

This works—               $ x='grep a'     $ echo ab | $x     ab      This doesn't—               $ x='grep a | grep b'     $ echo ab | $x     grep: |: No such file or directory     grep: grep: No such file or directory     grep: b: No such file or directory      It appears in the latter case, `grep a | grep b` is seen as a single command, _i.e._ `grep a \| grep b`. How do I get the second example to work without modifying `x`?


Correct use of TZ, date, and hwclock?

I'm working on an Buildroot developed ARM/ulibc Linux distribution for a custom board. I'm trying to understand the relationship between If I do this, as I've seen on a few examples online:               # date --set "2013-04-09 15:06:30"     Tue Apr  9 15:06:30 CDT 2013     # hwclock --systohc --utc     # hwclock     Tue Apr  9 15:06:39 2013  -0.351552 seconds      and reboot, I get:               .... boot messages ...     ... setting system clock to 2013-04-09 20:07:31 UTC (1365538051)     .... boot messages ...     #     # date; hwclock;     Tue Apr  9 15:08:24 CDT 2013     Tue Apr  9 15:08:25 2013  -0.473164 seconds     #     # date -u; hwclock -u;     Tue Apr  9 20:08:44 UTC 2013     Tue Apr  9 15:08:45 2013  -0.397120 seconds     #     # date; hwclock --localtime     Tue Apr  9 15:09:07 CDT 2013     Tue Apr  9 20:09:08 2013  -0.686601 seconds     #      So, it seems that the hwclock thinks that localtime **is** UTC? And for some reason, when applying `-u` it actually **applies** the timezone instead? I'm a bit confused. Can anyone suggest how I should be going about this? **EDIT:** I should note that being an ARM + Busybox + uclibc, slimmed down system, I don't have a lot of the typical directories and files, like sysconfig and zoneinfo.


/: is a directory issue in bash

I'm quite new to bash scripting and have been going reasonably well but have run into an issue. I am trying to create a script that uses a forward slash (/), however, I keep getting the error message `/: is a directory.` So basically what I need is to pass the command `test/(hello)` to a program in the terminal. So I have added backslashes to make it work: `test\/\(hello\)`, however, I get this error. What is wrong here?


Is SAMBA routable?

We have a SAMBA share on a centos 6 machine. **Question** : Can we mount this SAMBA 3 share over the internet? (without VPN/SSH tunnel, so directly!)


Is this command safe to run from / as root

find . * -depth -print0 | xargs -0 rmdir      It finds and removes all empty folders (including hidden ones) recursively. **I only tired it on my home folder and a pendrive in Linux PC and it worked but I dont know if it is safe to run from / as root** I once nuked my OS by running some command off the internet (which I didnt understand) like that


remove particular characters from a variable using bash

I want to parse a **variable** (in my case it's development kit version) to make it dot(`.`) free. If `version='2.3.3'`, desired output is `233`. I tried as below, but it requires `.` to be replaced with another character giving me `2_3_3`. It would have been fine if `tr . ''` would have worked.                 1 VERSION='2.3.3'        2 echo "2.3.3" | tr . _


Restrict emails to system users in postfix?

I am running postfix, and it seems it is willing to accept emails for system users, such as `man`, `sshd`, `daemon`, `www-data`, ... Is desirable (probably not)? and what I can do to disable this?


firefox launch failed: X11 connection rejected because of wrong authentication

I logged into a Linux server (RHEL) from an linux desktop. There is not any error message at login, but I failed to launch firefox and see the following error emessage:               [myname@myserver ~]$ firefox &     [1] 8806     [myname@myserver ~]$ X11 connection rejected because of wrong authentication.     X11 connection rejected because of wrong authentication.     The application 'firefox' lost its connection to the display localhost:11.0;     most likely the X server was shut down or you killed/destroyed     the application.      I tried to run the following command               [myname@myserver ~]$ xhost +      but get the following error message:               X11 connection rejected because of wrong authentication.     X connection to localhost:11.0 broken (explicit kill or server shutdown).      I also tried to run               [myname@myserver ~]$ echo $DISPLAY      and got the following result               localhost:11.0      I tried to search this problem from SO but I had no luck. What is the problem and how can I make the firefox work? It seems that the X window cannot be opened.


How to change login screen in CrunchBang?

I am on SLiM, and I don't like the default login screen. I want a login screen like the one shown below: ![enter image description here](http://i.stack.imgur.com/t9Jgs.png) But instead I have a pretty minimal one which has just one textbox and nothing else on the screen. I can't find a screenshot of it, but that is what I got when I am done installing. Is changing to GDM the only way to get a login screen like this? Is there any other way?


Move qcow2 image to physical hard drive

I have a qcow2 image that I use to boot an installation of linux using QEMU; I would like to place the contents of that image directly onto a physical hard drive so that I can boot to that linux installation directly from my desktop. I would like to do something like `dd if=my-qcow2.img of=/dev/sdb`. However, this will clearly not work since qcow2 does not store the contents of the virtual disk in logical order within the qcow2 file. Any suggestions?


Is it normal that a restart is required to mount USB after a kernel upgrade?

Sometimes I see the Linux kernel being mentioned in the list of upgrades, when running `pacman -Syu` (updating my packages in Arch Linux). Whenever this happens, after installation of the packages, I can not mount USB drives anymore until I restart. I would just like to know if this is something that is common and expected (and if so, why, do I wonder), or if this is something not expected that I should investigate.


CentOS 6.5 sound permissions

I am trying to configure ALSA for a CentOS 6.5 minimal install, my problem is non-root users do not have permission to access the sound devices in /dev/snd because the files are missing access control lists:               dispcentos:~$ ls -l /dev/snd     total 0     drwxr-xr-x 2 root root      60 Jan  7 02:21 by-path/     crw-rw---- 1 root audio 116, 8 Jan  7 02:21 controlC0     crw-rw---- 1 root audio 116, 4 Jan  7 02:21 midiC0D0     crw-rw---- 1 root audio 116, 7 Jan  7 02:21 pcmC0D0c     crw-rw---- 1 root audio 116, 6 Jan  7 02:21 pcmC0D0p     crw-rw---- 1 root audio 116, 5 Jan  7 02:21 pcmC0D1p     crw-rw---- 1 root audio 116, 3 Jan  7 02:21 seq     crw-rw---- 1 root audio 116, 2 Jan  7 02:21 timer      Previous suggestions have been to add the users to the audio group but this should not be necessary. The output of udevadm info shows that the ACL_MANAGE property is present as a result of /lib/udev/rules.d/70-acl.rules:               dispcentos:~$ udevadm info --query=all --name=/dev/snd/pcmC0D0c     P: /devices/pci0000:00/0000:00:11.0/0000:02:02.0/sound/card0/pcmC0D0c     N: snd/pcmC0D0c     S: char/116:7     E: UDEV_LOG=3     E: DEVPATH=/devices/pci0000:00/0000:00:11.0/0000:02:02.0/sound/card0/pcmC0D0c     E: MAJOR=116     E: MINOR=7     E: DEVNAME=/dev/snd/pcmC0D0c     E: SUBSYSTEM=sound     E: ACL_MANAGE=1     E: DEVLINKS=/dev/char/116:7      But the output of udevadm test shows that udev-acl is not run for the device:               dispcentos:~$ udevadm test /devices/pci0000:00/0000:00:11.0/0000:02:02.0/sound/card0/pcmC0D0c     run_command: calling: test     udevadm_test: version 147     This program is for debugging only, it does not run any program,     specified by a RUN key. It may show incorrect results, because     some values may be different, or not available at a simulation run.          parse_file: reading '/lib/udev/rules.d/01-log-block.rules' as rules file     parse_file: reading '/lib/udev/rules.d/10-console.rules' as rules file     parse_file: reading '/lib/udev/rules.d/10-dm.rules' as rules file     parse_file: reading '/lib/udev/rules.d/11-dm-lvm.rules' as rules file     parse_file: reading '/lib/udev/rules.d/13-dm-disk.rules' as rules file     parse_file: reading '/lib/udev/rules.d/40-isdn.rules' as rules file     parse_file: reading '/lib/udev/rules.d/40-multipath.rules' as rules file     parse_file: reading '/lib/udev/rules.d/40-redhat.rules' as rules file     parse_file: reading '/lib/udev/rules.d/42-qemu-usb.rules' as rules file     parse_file: reading '/lib/udev/rules.d/50-firmware.rules' as rules file     parse_file: reading '/lib/udev/rules.d/50-udev-default.rules' as rules file     parse_file: reading '/lib/udev/rules.d/60-alias-kmsg.rules' as rules file     parse_file: reading '/lib/udev/rules.d/60-cdrom_id.rules' as rules file     parse_file: reading '/lib/udev/rules.d/60-net.rules' as rules file     parse_file: reading '/lib/udev/rules.d/60-persistent-alsa.rules' as rules file     parse_file: reading '/lib/udev/rules.d/60-persistent-input.rules' as rules file     parse_file: reading '/lib/udev/rules.d/60-persistent-serial.rules' as rules file     parse_file: reading '/lib/udev/rules.d/60-persistent-storage-tape.rules' as rules file     parse_file: reading '/lib/udev/rules.d/60-persistent-storage.rules' as rules file     parse_file: reading '/lib/udev/rules.d/60-persistent-v4l.rules' as rules file     parse_file: reading '/etc/udev/rules.d/60-raw.rules' as rules file     parse_file: reading '/lib/udev/rules.d/61-mobile-action.rules' as rules file     parse_file: reading '/lib/udev/rules.d/61-option-modem-modeswitch.rules' as rules file     parse_file: reading '/lib/udev/rules.d/61-persistent-storage-edd.rules' as rules file     parse_file: reading '/lib/udev/rules.d/64-device-mapper.rules' as rules file     parse_file: reading '/lib/udev/rules.d/64-md-raid.rules' as rules file     parse_file: reading '/lib/udev/rules.d/65-md-incremental.rules' as rules file     parse_file: reading '/lib/udev/rules.d/69-dm-lvm-metad.rules' as rules file     parse_file: reading '/lib/udev/rules.d/70-acl.rules' as rules file     parse_file: reading '/lib/udev/rules.d/70-hid2hci.rules' as rules file     parse_file: reading '/etc/udev/rules.d/70-persistent-cd.rules' as rules file     parse_file: reading '/etc/udev/rules.d/70-persistent-net.rules' as rules file     parse_file: reading '/lib/udev/rules.d/75-cd-aliases-generator.rules' as rules file     parse_file: reading '/lib/udev/rules.d/75-net-description.rules' as rules file     parse_file: reading '/lib/udev/rules.d/75-persistent-net-generator.rules' as rules file     parse_file: reading '/lib/udev/rules.d/75-tty-description.rules' as rules file     parse_file: reading '/lib/udev/rules.d/78-sound-card.rules' as rules file     parse_file: reading '/lib/udev/rules.d/79-fstab_import.rules' as rules file     parse_file: reading '/lib/udev/rules.d/80-drivers.rules' as rules file     parse_file: reading '/lib/udev/rules.d/80-iosched.rules' as rules file     parse_file: reading '/lib/udev/rules.d/80-mpath-iosched.rules' as rules file     parse_file: reading '/lib/udev/rules.d/81-kvm-rhel.rules' as rules file     parse_file: reading '/lib/udev/rules.d/88-clock.rules' as rules file     parse_file: reading '/etc/udev/rules.d/90-alsa.rules' as rules file     parse_file: reading '/lib/udev/rules.d/91-drm-modeset.rules' as rules file     parse_file: reading '/lib/udev/rules.d/95-dm-notify.rules' as rules file     parse_file: reading '/lib/udev/rules.d/95-keyboard-force-release.rules' as rules file     parse_file: reading '/lib/udev/rules.d/95-keymap.rules' as rules file     parse_file: reading '/lib/udev/rules.d/95-udev-late.rules' as rules file     parse_file: reading '/etc/udev/rules.d/99-fuse.rules' as rules file     parse_file: reading '/dev/.udev/rules.d/99-root.rules' as rules file     parse_file: reading '/etc/udev/rules.d/99-tty.rules' as rules file     udev_rules_new: rules use 30936 bytes tokens (2578 * 12 bytes), 18240 bytes buffer     udev_rules_new: temporary index used 18460 bytes (923 * 20 bytes)     udev_device_new_from_syspath: device 0x1671c38 has devpath '/devices/pci0000:00/0000:00:11.0/0000:02:02.0/sound/card0/pcmC0D0c'     udev_device_new_from_syspath: device 0x16620a8 has devpath '/devices/pci0000:00/0000:00:11.0/0000:02:02.0/sound/card0/pcmC0D0c'     udev_device_read_db: device 0x16620a8 filled with db file data     udev_rules_apply_to_event: LINK 'char/116:7' /lib/udev/rules.d/50-udev-default.rules:4     udev_rules_apply_to_event: GROUP 63 /lib/udev/rules.d/50-udev-default.rules:46     udev_event_execute_rules: no node name set, will use kernel supplied name 'snd/pcmC0D0c'     udev_device_update_db: unable to create db file '/dev/.udev/db/sound:pcmC0D0c': Permission denied     udev_node_add: creating device node '/dev/snd/pcmC0D0c', devnum=116:7, mode=0660, uid=0, gid=63     udev_node_mknod: preserve file '/dev/snd/pcmC0D0c', because it has correct dev_t     udev_node_mknod: preserve permissions /dev/snd/pcmC0D0c, 020660, uid=0, gid=63     node_symlink: preserve already existing symlink '/dev/char/116:7' to '../snd/pcmC0D0c'     udevadm_test: UDEV_LOG=6     udevadm_test: DEVPATH=/devices/pci0000:00/0000:00:11.0/0000:02:02.0/sound/card0/pcmC0D0c     udevadm_test: MAJOR=116     udevadm_test: MINOR=7     udevadm_test: DEVNAME=/dev/snd/pcmC0D0c     udevadm_test: ACTION=add     udevadm_test: SUBSYSTEM=sound     udevadm_test: DEVLINKS=/dev/char/116:7     udevadm_test: ACL_MANAGE=1      Here is the output from a previous release (6.4) for comparison:               dispcentos:mms$ ls -l /dev/snd     total 0     drwxr-xr-x  2 root root      60 Jan  7 07:13 by-path/     crw-rw----+ 1 root audio 116, 8 Jan  7 07:13 controlC0     crw-rw----+ 1 root audio 116, 4 Jan  7 07:13 midiC0D0     crw-rw----+ 1 root audio 116, 7 Jan  7 07:14 pcmC0D0c     crw-rw----+ 1 root audio 116, 6 Jan  7 07:16 pcmC0D0p     crw-rw----+ 1 root audio 116, 5 Jan  7 07:13 pcmC0D1p     crw-rw----+ 1 root audio 116, 3 Jan  7 07:13 seq     crw-rw----+ 1 root audio 116, 2 Jan  7 07:13 timer          dispcentos:mms$ getfacl /dev/snd/pcmC0D0c      getfacl: Removing leading '/' from absolute path names     # file: dev/snd/pcmC0D0c     # owner: root     # group: audio     user::rw-     user:mms:rw-     group::rw-     mask::rw-     other::---      * * *               dispcentos:mms$ udevadm info --query=all --name=/dev/snd/pcmC0D0c     P: /devices/pci0000:00/0000:00:11.0/0000:02:02.0/sound/card0/pcmC0D0c     N: snd/pcmC0D0c     S: char/116:7     E: UDEV_LOG=3     E: DEVPATH=/devices/pci0000:00/0000:00:11.0/0000:02:02.0/sound/card0/pcmC0D0c     E: MAJOR=116     E: MINOR=7     E: DEVNAME=/dev/snd/pcmC0D0c     E: SUBSYSTEM=sound     E: ACL_MANAGE=1     E: DEVLINKS=/dev/char/116:7      * * *               dispcentos:mms$ udevadm test /devices/pci0000:00/0000:00:11.0/0000:02:02.0/sound/card0/pcmC0D0c     run_command: calling: test     udevadm_test: version 147     This program is for debugging only, it does not run any program,     specified by a RUN key. It may show incorrect results, because     some values may be different, or not available at a simulation run.          parse_file: reading '/lib/udev/rules.d/10-console.rules' as rules file     parse_file: reading '/lib/udev/rules.d/10-dm.rules' as rules file     parse_file: reading '/lib/udev/rules.d/11-dm-lvm.rules' as rules file     parse_file: reading '/lib/udev/rules.d/13-dm-disk.rules' as rules file     parse_file: reading '/lib/udev/rules.d/40-isdn.rules' as rules file     parse_file: reading '/lib/udev/rules.d/40-libgphoto2.rules' as rules file     parse_file: reading '/lib/udev/rules.d/40-redhat.rules' as rules file     parse_file: reading '/lib/udev/rules.d/40-usb-media-players.rules' as rules file     parse_file: reading '/lib/udev/rules.d/42-qemu-usb.rules' as rules file     parse_file: reading '/lib/udev/rules.d/50-firmware.rules' as rules file     parse_file: reading '/lib/udev/rules.d/50-udev-default.rules' as rules file     parse_file: reading '/lib/udev/rules.d/60-alias-kmsg.rules' as rules file     parse_file: reading '/lib/udev/rules.d/60-cdrom_id.rules' as rules file     parse_file: reading '/etc/udev/rules.d/60-fprint-autosuspend.rules' as rules file     parse_file: reading '/lib/udev/rules.d/60-libmtp.rules' as rules file     parse_file: reading '/lib/udev/rules.d/60-net.rules' as rules file     parse_file: reading '/etc/udev/rules.d/60-pcmcia.rules' as rules file     parse_file: reading '/lib/udev/rules.d/60-persistent-alsa.rules' as rules file     parse_file: reading '/lib/udev/rules.d/60-persistent-input.rules' as rules file     parse_file: reading '/lib/udev/rules.d/60-persistent-serial.rules' as rules file     parse_file: reading '/lib/udev/rules.d/60-persistent-storage-tape.rules' as rules file     parse_file: reading '/lib/udev/rules.d/60-persistent-storage.rules' as rules file     parse_file: reading '/lib/udev/rules.d/60-persistent-v4l.rules' as rules file     parse_file: reading '/etc/udev/rules.d/60-raw.rules' as rules file     parse_file: reading '/lib/udev/rules.d/60-wacom.rules' as rules file     parse_file: reading '/lib/udev/rules.d/61-gnome-bluetooth-rfkill.rules' as rules file     parse_file: reading '/lib/udev/rules.d/61-mobile-action.rules' as rules file     parse_file: reading '/lib/udev/rules.d/61-option-modem-modeswitch.rules' as rules file     parse_file: reading '/lib/udev/rules.d/61-persistent-storage-edd.rules' as rules file     parse_file: reading '/lib/udev/rules.d/61-uinput-stddev.rules' as rules file     parse_file: reading '/lib/udev/rules.d/61-uinput-wacom.rules' as rules file     parse_file: reading '/lib/udev/rules.d/64-device-mapper.rules' as rules file     parse_file: reading '/lib/udev/rules.d/64-md-raid.rules' as rules file     parse_file: reading '/lib/udev/rules.d/65-libsane.rules' as rules file     parse_file: reading '/lib/udev/rules.d/65-libwacom.rules' as rules file     parse_file: reading '/lib/udev/rules.d/65-md-incremental.rules' as rules file     parse_file: reading '/lib/udev/rules.d/69-dm-lvm-metad.rules' as rules file     parse_file: reading '/lib/udev/rules.d/69-pilot-link.rules' as rules file     parse_file: reading '/lib/udev/rules.d/70-acl.rules' as rules file     parse_file: reading '/lib/udev/rules.d/70-cups-libusb.rules' as rules file     parse_file: reading '/lib/udev/rules.d/70-hid2hci.rules' as rules file     parse_file: reading '/etc/udev/rules.d/70-persistent-cd.rules' as rules file     parse_file: reading '/etc/udev/rules.d/70-persistent-net.rules' as rules file     parse_file: reading '/lib/udev/rules.d/70-printers.rules' as rules file     parse_file: reading '/lib/udev/rules.d/71-biosdevname.rules' as rules file     parse_file: reading '/lib/udev/rules.d/75-cd-aliases-generator.rules' as rules file     parse_file: reading '/lib/udev/rules.d/75-net-description.rules' as rules file     parse_file: reading '/lib/udev/rules.d/75-persistent-net-generator.rules' as rules file     parse_file: reading '/lib/udev/rules.d/75-tty-description.rules' as rules file     parse_file: reading '/lib/udev/rules.d/77-mm-ericsson-mbm.rules' as rules file     parse_file: reading '/lib/udev/rules.d/77-mm-longcheer-port-types.rules' as rules file     parse_file: reading '/lib/udev/rules.d/77-mm-pcmcia-device-blacklist.rules' as rules file     parse_file: reading '/lib/udev/rules.d/77-mm-platform-serial-whitelist.rules' as rules file     parse_file: reading '/lib/udev/rules.d/77-mm-simtech-port-types.rules' as rules file     parse_file: reading '/lib/udev/rules.d/77-mm-usb-device-blacklist.rules' as rules file     parse_file: reading '/lib/udev/rules.d/77-mm-zte-port-types.rules' as rules file     parse_file: reading '/lib/udev/rules.d/77-nm-olpc-mesh.rules' as rules file     parse_file: reading '/lib/udev/rules.d/78-sound-card.rules' as rules file     parse_file: reading '/lib/udev/rules.d/79-fstab_import.rules' as rules file     parse_file: reading '/lib/udev/rules.d/80-drivers.rules' as rules file     parse_file: reading '/lib/udev/rules.d/80-iosched.rules' as rules file     parse_file: reading '/lib/udev/rules.d/80-mpath-iosched.rules' as rules file     parse_file: reading '/lib/udev/rules.d/80-udisks.rules' as rules file     parse_file: reading '/lib/udev/rules.d/85-regulatory.rules' as rules file     parse_file: reading '/lib/udev/rules.d/85-usbmuxd.rules' as rules file     parse_file: reading '/lib/udev/rules.d/88-clock.rules' as rules file     parse_file: reading '/lib/udev/rules.d/89-microcode.rules' as rules file     parse_file: reading '/etc/udev/rules.d/90-alsa.rules' as rules file     parse_file: reading '/etc/udev/rules.d/90-hal.rules' as rules file     parse_file: reading '/lib/udev/rules.d/90-pulseaudio.rules' as rules file     parse_file: reading '/lib/udev/rules.d/91-drm-modeset.rules' as rules file     parse_file: reading '/lib/udev/rules.d/95-devkit-power-battery-recall-dell.rules' as rules file     parse_file: reading '/lib/udev/rules.d/95-devkit-power-battery-recall-fujitsu.rules' as rules file     parse_file: reading '/lib/udev/rules.d/95-devkit-power-battery-recall-gateway.rules' as rules file     parse_file: reading '/lib/udev/rules.d/95-devkit-power-battery-recall-ibm.rules' as rules file     parse_file: reading '/lib/udev/rules.d/95-devkit-power-battery-recall-lenovo.rules' as rules file     parse_file: reading '/lib/udev/rules.d/95-devkit-power-battery-recall-toshiba.rules' as rules file     parse_file: reading '/lib/udev/rules.d/95-devkit-power-csr.rules' as rules file     parse_file: reading '/lib/udev/rules.d/95-devkit-power-hid.rules' as rules file     parse_file: reading '/lib/udev/rules.d/95-devkit-power-wup.rules' as rules file     parse_file: reading '/lib/udev/rules.d/95-dm-notify.rules' as rules file     parse_file: reading '/lib/udev/rules.d/95-keyboard-force-release.rules' as rules file     parse_file: reading '/lib/udev/rules.d/95-keymap.rules' as rules file     parse_file: reading '/lib/udev/rules.d/95-udev-late.rules' as rules file     parse_file: reading '/etc/udev/rules.d/97-bluetooth-serial.rules' as rules file     parse_file: reading '/lib/udev/rules.d/97-bluetooth.rules' as rules file     parse_file: reading '/etc/udev/rules.d/98-kexec.rules' as rules file     parse_file: reading '/etc/udev/rules.d/99-fuse.rules' as rules file     parse_file: reading '/dev/.udev/rules.d/99-root.rules' as rules file     parse_file: reading '/etc/udev/rules.d/99-tty.rules' as rules file     parse_file: reading '/etc/udev/rules.d/99-vmware-scsi-udev.rules' as rules file     udev_rules_new: rules use 187884 bytes tokens (15657 * 12 bytes), 39574 bytes buffer     udev_rules_new: temporary index used 59740 bytes (2987 * 20 bytes)     udev_device_new_from_syspath: device 0x218d3e0 has devpath '/devices/pci0000:00/0000:00:11.0/0000:02:02.0/sound/card0/pcmC0D0c'     udev_device_new_from_syspath: device 0x2175148 has devpath '/devices/pci0000:00/0000:00:11.0/0000:02:02.0/sound/card0/pcmC0D0c'     udev_device_read_db: device 0x2175148 filled with db file data     udev_rules_apply_to_event: LINK 'char/116:7' /lib/udev/rules.d/50-udev-default.rules:4     udev_rules_apply_to_event: GROUP 63 /lib/udev/rules.d/50-udev-default.rules:46     udev_device_new_from_syspath: device 0x218d590 has devpath '/devices/pci0000:00/0000:00:11.0/0000:02:02.0/sound/card0'     udev_device_new_from_syspath: device 0x218d858 has devpath '/devices/pci0000:00/0000:00:11.0/0000:02:02.0'     udev_device_new_from_syspath: device 0x218da30 has devpath '/devices/pci0000:00/0000:00:11.0'     udev_device_new_from_syspath: device 0x218dbf0 has devpath '/devices/pci0000:00'     udev_rules_apply_to_event: RUN 'udev-acl --action=$env{ACTION} --device=$env{DEVNAME}' /lib/udev/rules.d/70-acl.rules:53     udev_rules_apply_to_event: RUN 'socket:@/org/freedesktop/hal/udev_event' /etc/udev/rules.d/90-hal.rules:2     udev_event_execute_rules: no node name set, will use kernel supplied name 'snd/pcmC0D0c'     udev_device_update_db: unable to create db file '/dev/.udev/db/sound:pcmC0D0c': Permission denied     udev_node_add: creating device node '/dev/snd/pcmC0D0c', devnum=116:7, mode=0660, uid=0, gid=63     udev_node_mknod: preserve file '/dev/snd/pcmC0D0c', because it has correct dev_t     udev_node_mknod: preserve permissions /dev/snd/pcmC0D0c, 020660, uid=0, gid=63     node_symlink: preserve already existing symlink '/dev/char/116:7' to '../snd/pcmC0D0c'     udevadm_test: UDEV_LOG=6     udevadm_test: DEVPATH=/devices/pci0000:00/0000:00:11.0/0000:02:02.0/sound/card0/pcmC0D0c     udevadm_test: MAJOR=116     udevadm_test: MINOR=7     udevadm_test: DEVNAME=/dev/snd/pcmC0D0c     udevadm_test: ACTION=add     udevadm_test: SUBSYSTEM=sound     udevadm_test: DEVLINKS=/dev/char/116:7     udevadm_test: ACL_MANAGE=1     udevadm_test: run: 'udev-acl --action=add --device=/dev/snd/pcmC0D0c'     udevadm_test: run: 'socket:@/org/freedesktop/hal/udev_event'      You will see the following two lines from udevadm test that are missing from the CentOS 6.5 minimal installation:               udev_rules_apply_to_event: RUN 'udev-acl --action=$env{ACTION} --device=$env{DEVNAME}' /lib/udev/rules.d/70-acl.rules:53     udevadm_test: run: 'udev-acl --action=add --device=/dev/snd/pcmC0D0c'      Any ideas why?


Bash - Multidimensional Arrays and Extracting variables from output

I am trying to do something simple however I'm not sure how to achieve my goal here. I am trying to extract the: USER, TTY and FROM values that are given by the `w` command on the console. In bash I am trying to take this output and get these values into a multidimensional array (or just an array with a space delimiter).               #!/bin/bash     w|awk '{if(NR > 2) print $1,$2,$3}' | while read line     do          USERS+=("$line")          echo ${#USERS[@]}     done     echo ${#USERS[@]}      I have found my way to the point of reading in the values by line in a single array however I cannot seem to get the USERS array value out of the scope of the while loop. It prints the values 1,2,3,4 and then 0 after the loop. Every example I read they use the variable outside the scope perfectly fine but I cannot seem to.


Using sed to find and replace complex string (preferrably with regex)

I have a file with the following contents:               <username><![CDATA[name]]></username>     <password><![CDATA[password]]></password>     <dbname><![CDATA[name]]></dbname>      and I need to make a script that changes the "name" in the first line to "something", the "password" on the second line to "somethingelse", and the "name" in the third line to "somethingdifferent". I can't rely on the order of these occurring in the file, so I can't simply replace the first occurance of "name" with "something" and the second occurrence of "name" with "somethingdifferent". I actually need to do a search for the surrounding strings to make sure I'm finding and replacing the correct thing. So far I have tried this command to find and replace the first "name" occurance:               sed -i "s/<username><![CDATA[name]]><\/username>/something/g" file.xml      however it's not working so I'm thinking some of these characters might need escaping, etc. Ideally, I'd love to be able to use regex to just match the two "username" occurrences and replace only the "name". Something like this but with sed:               <username>.+?(name).+?</username>      and replace the contents in the brackets with "something". Is this possible?


What could cause the clock to jump by 5 minutes?

I have a (physical) box running a stripped down Ubuntu; every now and then (6 times in 3 months), the clock jumps backwards by exactly 300 seconds (+- 0.01 seconds; always exactly 300 seconds). It happens from one minute to the next (I have an external machine polling it once per minute). The box is running 2.6.26-generic (custom compiled kernel), Ubuntu 9.04 (I know, I'm trying to get it updated, but it's semi-embedded). There is nothing in the logs which indicates what happened, and I have a large selection of pool.ntp.org ntp servers, which correct the problem after a while. Does anyone know what might cause this? Additional 1: I also have a number of other boxes running the same kernel (binary identical), and minor variations of the same software, which do not have this problem. I have also swapped out the hardware. Additional 2 (summary of my individual comments):   * I know 9.04 is out of date, I agree it should be updated, and this decision is out of my control. Because management.   * I have tried a large number of ntp servers, and a small number. It still happens in both cases; if I have a large number of ntp servers, then it fixes itself more quickly.   * I have swapped out the hardware   * I am using the same kernel/operating system on another box (with identical hardware), which is not showing the issue.   * Rebooting has not helped. (this problem has been ongoing for about 6 months)   * Uptime is about 3 months. The box is "always on", running a PBX (asterisk).   * Right now, the hwclock matches the software clock exactly - 0.000000 seconds   * I have not been able to find any cron jobs that reads the hardware clock.   * There is no load-related pattern (though the load is quite low anyway).    * It happens during the day and night.    * It does not happen at regular intervals. Of the ones in the last 3 months, half have happened in the last 9 days.   * This is not "drift" - 99% of the time, it is within a tiny fraction of a second, then from one minute to the next, it jumps EXACTLY 300 seconds, backwards. So, one minute it might say it's 3:07:03, matching my other computer to within 1 microsecond, 60 seconds later, it says 3:04:03.   * I can find nothing in the logs.


Windows 7 to Linux: install without CD/DVD or USB drive

Update Sorry, Question has multiple parts see below for details: I have been using Windows for many years and only used Linux from the command line, but want to shift after realizing Windows is sloowww. Following http://mightydreams.blogspot.in/2007/09/i-am-describing-here-method- to-install.html and http://www.instantfundas.com/2007/08/install-any-linux- distro-directly-from.html Is there a better set of instructions? (I do not have a USB or CD/DVD) Have got "debian-7.0.0-amd64-DVD-1.iso" and disks 2 & 3 and renamed 1 to `d1.iso`. Step 2 says to copy `vmlinuz` and `initrd.gz` to the \C drive But I found these files in 3 places (I did a `7z.exe l -path-to-iso- >files.list`)               install.amd\gtk\vmlinuz     install.amd\vmlinuz (update plan on using this but stuck at grub see below)     install.amd\xen\vmlinuz And similarly:               install.amd\initrd.gz      install.amd\xen\initrd.gz     install.amd\gtk\initrd.gz Which one to use? * * * Stuck at grub ... Made the entry using bcdedit but it says grub is not valid. downloaded grub from the sourceforge site, copied it and pointed to it               bcdedit /create /d Linux /application  OSLOADER     bcdedit /set  {c1e718e7-3d90-11e1-a4c8-b5a356ae5e29} device partition=c:      bcdedit /set   {c1e718e7-3d90-11e1-a4c8-b5a356ae5e29}  path \grub\grub.exe          bcdedit -v      Gives me               Windows Boot Manager     --------------------     identifier              {9dea862c-5cdd-4e70-acc1-f32b344d4795}     device                  partition=\Device\HarddiskVolume2     description             Windows Boot Manager     locale                  en-US     inherit                 {7ea2e1ac-2e61-4728-aaa3-896d9d0a9f0e}     default                 {c1e718e2-3d90-11e1-a4c8-b5a356ae5e29}     resumeobject            {c1e718e1-3d90-11e1-a4c8-b5a356ae5e29}     displayorder            {c1e718e2-3d90-11e1-a4c8-b5a356ae5e29}                 {c1e718e7-3d90-11e1-a4c8-b5a356ae5e29}     toolsdisplayorder       {b2721d73-1db4-4c62-bf78-c548a880142d}     timeout                 30          Windows Boot Loader     -------------------     identifier              {c1e718e2-3d90-11e1-a4c8-b5a356ae5e29}     device                  partition=C:     path                    \Windows\system32\winload.exe     description             Windows 7     locale                  en-US     inherit                 {6efb52bf-1766-41db-a6b3-0ee5eff72bd7}     recoverysequence        {c1e718e3-3d90-11e1-a4c8-b5a356ae5e29}     recoveryenabled         Yes     osdevice                partition=C:     systemroot              \Windows     resumeobject            {c1e718e1-3d90-11e1-a4c8-b5a356ae5e29}     nx                      OptIn          Windows Boot Loader     -------------------     identifier              {c1e718e7-3d90-11e1-a4c8-b5a356ae5e29}     device                  partition=C:     path                    \grub\grub.exe     description             Linux


Fonts of some applications get confused

I am running Debian Testing with LXDE. After some time of work, some applications begin to show confused fonts, as shown in the following screenshot (the pdf specific area is good): ![enter image description here](http://i.stack.imgur.com/83ac8.png) This happens with `evince` and with notification (sent from `wicd`, `clementine`, etc., I suppose through `notify-send`). Cannot say what other applications show the problem, but almost all other applications work good, for example `iceweasel` (firefox), `icedove` (thunderbird), `xchat`, `lxterminal`, etc. How to diagnose the problem?


Where is 'kernel panic' used?

Is the name kernel panic being used outside of Linux-based systems?


Enable .Net 4 Mono on OpenSuse

I have an OpenSuse Linux server and want to run an ASP.net web project. I have installed the `apache2` module `mod-mono`, but when I try to access the ASP web pages it looks as if it is attempting to use .Net 2 when the project is built under .Net 4. How can I change it to use .Net 4? Thanks for any help you can provide.


truncating file names

I have a folder that has a number of files all of a similar form as:               Dropkick Murphys - 01 - Walk Away.mp3     Dropkick Murphys - 02 - Workers Song.mp3      And so forth... I want to convert them all so that they appear as:               01 - Walk Away.mp3     02 - Workers Song.mp3      How can I do this?


What is the meaning “MAC MISSMATCH”?

I have every day in the log the few lines start with:               MAC MISSMATCH:IN=vlanXX OUT= MAC=ff:ff:ff:ff:ff:ff:bc:ae:c5:da:70:a6:08:00:45:00:00:4e SRC=xx.xx.xx.xx DST=xx.xx.255.255 LEN=78 TOS=0x00 PREC=0x00 TTL=128 ID=23172 PROTO=UDP SPT=137 DPT=137 LEN=58      I know what this is the line written firewalls (netfilter). But what exactly does - "MAC MISSMATCH"?


Moving through history of commands on command line?

I used to use `Up`/`Down` to move through the history of commands. Then, a few days later it changed to `Ctrl`-`p`/`Ctrl`-`n`. Now this also doesn't work to move through the history of commands entered. How can I view all these settings or change it? I tried to see the terminal setting by giving the command `stty` but it was of no help. I searched through Google and found something called `bindkey`. I hope I am moving in the right direction. I am not the root user, anyway I would like to know more about this even if could do nothing about it. **KORN SHELL**               **OS Info :**     rcihp145 :/home/msingh2> uname -a     HP-UX rcihp145 B.11.23 U 9000/800 3683851961 unlimited-user license


Understanding character device (or character special) files

I am trying to understand character special files. From wikipedia, I understand that these files "provide an interface" for devices that transmit data one character at a time. My understanding is that the system somehow calls the character device instead of calling the device driver directly. But how does the file provide this interface? Is it an executable that translates the system call? Can someone explain what's up.


How may I distinguish encryption algorithm of htpasswd?

I have an apache web server running on Debian Linux and I secure a certain directory with htaccess. I have no history or knowledge how the .htpasswd file was created. Apache documentations says that crypt() encryption was used to encrypt passwords until version 2.2.17 and MD5 encryption is used since 2.2.18. How may I distinguish which encryption my .htpasswd file uses?


error using "du" command

I am on the university machine trying to estimate the disk usage I have on my space I do               du -csh ./      from the begining of my account, but an error is given that ./Yesterday/Yesterday is not a device, so I do               du -csh --exclude="Yes*" ./      and the error is stopped. But is there a more elegant way, and why is this error emerging? I can image how the Yesterday of Yesterday gets removed but whats the concepts behind the error. Best, 1) **using stat:**               [ratz]s0128943: stat Yesterday      File: `Yesterday'      Size: 12288 Blocks: 24 IO Block: 4096 directory      Device: 1dh/29d      Inode: 714342402      Links: 90 Access: (0745/drwxr--r-x)      Uid: (35559/s0128943)      Gid: (28065/ UNKNOWN)      Access: 2010-10-15 13:06:07.000000000 +0100      Modify: 2010-10-15 13:06:07.000000000 +0100      Change: 2010-10-15 13:06:07.000000000 +0100      2) **using stat on Yesterday/Yesterday**               stat ./Yesterday/Yesterday      stat: cannot stat `./Yesterday/Yesterday': No such device       3) **using uname for details**               [ratz]s0128943: uname -srv      Linux 2.6.18-194.3.1.el5.inf.1 #1 SMP Fri May 21 12:59:58 BST 2010       4) **using df on Yesterday/**               [ratz]s0128943: df Yesterday/     Filesystem           1K-blocks      Used Available Use% Mounted on     AFS                    9000000         0   9000000   0% /afs      5) **using df on Yesterday/Yesterday**               df Yesterday/Yesterday      df: `Yesterday/Yesterday': No such device      6) `mount | grep Yesterday` produces nothing


How to run “sudo apt-get update” through proxy in commandline?

In my office I want to update and download through `wget` and here they are using a proxy. How can I get `wget` to use the proxy from the command-line?


Mangled history

In gui mode, when a user has more than one terminal open, how do the terminals rewrite the history file of that user? the reason I ask is because, it is quite possible that in each of the terminals the user ends up executing different commands. So, does the history file end up saving the commands from all the terminals or only from the first one to be opened? Or is there some other kind of scheme that is employed to tackle this situation?


How does cached memory work for executables?

I always understood cached memory in Linux (as in free -m) as pages of memory that can be reused if they are needed again, or quickly freed if more memory is needed by new applications (I found this article to be helpful a few years ago). It seems that both executables (e.g., a program like thunderbird) and data (e.g., the content of a log file) can be cached. In fact, I don't think there is a distinction between text and executable files on *nix. I can see how it could work for data that does not change much (e.g., a text file), but how does it work for programs that are dynamic by nature? Surely, the cached memory cannot restore objects that were dynamically allocated? Is it only the bytecode (or instructions in the case of scripts) that is cached then? **EDIT 1** By cached memory, I mean the memory under the column "cached" when I run "free":               $ free -m                  total       used       free     shared    buffers     cached     Mem:          7985       6650       1334          0        150       3201     -/+ buffers/cache:       3298       4686     Swap:        13178          2      13176      **EDIT 2** Thanks to ls-lrt who gave me the hint I was missing. As this response on SE clearly mentions (should have searched there first), "The cached memory is the **disk cache** used by the VFS". This means that for executables, only the instructions (bytecode, script lines, etc.) are represented under this column and it has nothing to do with things that are dynamically allocated. I was under the impression that entire pages of memory (including dynamically created objects) were "cached". **EDIT 3** Nice examples about using the disk cache.


How should I deal with Fedora's short life cycle?

I have been using Fedora as my primary distribution since very long. One thing that _"bothers"_ me is its relatively short life cycle. I install its latest release, restore my backup, customize the applications, take a sigh of relief but by then the new release is just around the corner. > Fedora has a comparatively short life cycle: version X is maintained until > one month after version X+2 is released. With 6 months between releases, the > maintenance period is a very short 13 months for each version. Wikipedia Once I used pre-upgrade when moving from Fedora 9 to 10. It didn't work smoothly. The new upgraded Fedora was using the old kernel images of Fedora 9. Took me long to figure it out and I had to use live usb to fix it. Since then I decided not to use `pre-upgrade` or `Upgrade an existing installation` option. I had some hiccups with applications too. Using `fresh install` seems safer. But now I have to backup all data, along with my scripts and rc files and restore it again. This takes time along with installing apps that are not installed by default and removing not-required apps. Main problem is customization settings of each application. From Firefox only, I would have to export saved passwords, bookmarks, saved sessions, preferences of different extensions, etc. Some other applications do not provide option of save/export settings at all. So I have to configure each one manually. All in all, upgrading to latest release takes time, even longer if my net connection goes down for some reason. Each time I upgrade, I cannot take it out my mind that within few months a new release will be knocking my door, and I will have to repeat the whole exercise again.   1. What could be a painless and easy procedure to take backups of all data and to restore it? I would prefer a command line solution.   2. How can I preserve settings of applications, if they do not provide an option to export settings?   3. If you are Fedora user, what do you do to keep up with its frequent releases?   4. How can I make this whole procedure faster and less painful? Its the amount of time and efforts that an upgrade takes altogether which made me post this question. How can I make my life easier? Any help, suggestions and ideas would be greatly appreciated. Thanks for your time.


Mixed-source drivers for Linux

I am making a research on drivers for Linux that may integrate both open and proprietary source code. I am very new to to the field of driver research and not sure how to look for a comprehensive list of such drivers. Any help is appreciated. Thanks


Why is this RPM "uninstallable"?

Sometimes when I ask Zypper to install something, I will get a message similar to this:               Problem: foo-tools requires foo-lib, but this requirement cannot be provided          Problem: foo-tools requires foo-lib, but this requirement cannot be provided       uninstallable providers: foo-lib.7.31.13.x86_64     Solution 1: do not install foo-tools     Solution 2: break foo-tools by ignoring some of its dependencies      Why the hell does Zypper think that the RPM which I purposely gave it for this exact reason is an "uninstallable provider"? What does this message _mean_? Is the RPM file unreadable? Wrong arch? Wrong version? _What is it upset about??_


pulseaudio suddenly stopped working?

I am using arch linux and i was using pulseaudio suddenly today pulseaudio stopped working and no sound is coming in both my speaker and headphone. I can see pulseaudio is running properly and I am able to hear the beep sound from my computer but not any other sound??? any suggestions please I had already read the wiki page. I run pulseaudio as root and I had added my root in audio group


Is there any X windows system, which is HTML, CSS, Javascript? Such as Web Browser?

For dacades X windows system is either BASH, C or etc. But is there any X windows system or any wrapper which can interpret HTML, CSS, Javascript to general Windows system? I would like to build this: http://www.google.com/tv/features.html (everything comes from my web server, and get render as UI) What is the best way to do so?


Create bootable ubuntu usb for mac, or any pc

I've used Ubuntu live and the start up disk creator tool to create a bootable usb with ubuntu. I used the start up disk tool and I first clicked erase, to clear the contents of the usb, and then create disk. It completed successfully, but I cannot get my mac to recognize it as a bootable device. It does not show up in the startup disk list (in system preferences). I cannot get it see the device using 'option' or 'c' while rebooting. How do I get mac to see it as a bootable device? Thanks, -N


Kodak still camera udev problem

My still camera is not includev in udev list. lsusb stands:               Bus 007 Device 016: ID 040a:058b Kodak Co. Digital Camera      So I add to /usr/lib/udev/rules.d/40-libgphoto2.rules               ATTRS{idVendor}=="040a", ATTRS{idProduct}=="058b", ENV{ID_GPHOTO2}="1", ENV{GPHOTO2_DRIVER}="proprietary"      according to the entry for similar unit from the same vendor but different idProduct "058a" But my camera is not available from any photo app including gwenview or even from any filemanager. Simply can not be mounted as a storage. Any idea how to correct my entry in udev?


How do I install unetbootin on an E1 Vision AMD processor?

I'm on Ubuntu on an E1 Vision AMD (64 bit) processor. The available binaries for Unetbootin do not work on this architecture. Is there any way that I can get Unetbootin working on this system?


How to disable USB autosuspend on kernel 3.7.10 or above?

I've updated my HTPC from kernel **3.7.10** to **3.10.7** and it seems **CONFIG_USB_SUSPEND** is now gone from the kernel options and included in PM. The main problem I'm facing is that I have an external HDD and when suspending and waking up the HTPC, it isn't available to the system. The HDD wakes up (you can hear it spin up again), but when you try to access the mount point you get the following error:               ZOTAC ~ # ls /media     ls: reading directory /media: Input/output error      And on dmesg:               [  253.278260] EXT4-fs warning (device sdb1): __ext4_read_dirblock:908: error reading   directory block (ino 2, block 0)      In previous kernels, setting CONFIG_USB_SUSPEND=N would solve the problem, as the HDD would handle its hibernation by itself and the mount point was always accesible. When the HDD was on sleep and the HTPC needed something from the HDD's mount point, the HDD itself would wake up and operate without issues. Right now I've tried the following without success:   1. Manually change **/sys/bus/usb/devices/usb*/power/control** to _"on"_ instead of _"auto"_.    2. Manually change **/sys/bus/usb/devices/usb*/power/autosuspend** to _"-1"_ instead of _"0"_.  But when waking up again the HTPC, the mount point is again inaccesible. As workarround I can unmount and remount the mount point and it works again without problems, but I'm sure there should be a way to avoid having the OS handle the usb autosuspend. Any idea how to disable usb autosuspend on kernel 3.7.10 or above?


Mounting an old floppy image file (.ima format) - how hard can it be?

I'm trying to `mount` and access a floppy image file in the .ima format (raw dump to floppy, similar to .img) on ArchLinux. This file is part of a set of 30. It is not bootable, but rather a continuation of a set. The purpose is not manipulation for the sake of installation or cloning. I'm interested in the documentation contained with other data on the disk. ## Image file information Here is some info about this image file:               # file U19.IMA     U19.IMA: PC formatted floppy with no filesystem          # fdisk -lu U19.IMA     Disk U19.IMA: 1.4 MiB, 1474560 bytes, 2880 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          (parted) print     Error: /home/meh/Downloads/U19.IMA: unrecognised disk label     Model: (file)     Disk /home/meh/Downloads/U19.IMA: 1475kB     Sector size (logical/physical): 512B/512B     Partition Table: unknown     Disk Flags:      ## Mount fail Here's the generic error message:               mount -o ro,loop U19.IMA /mnt/cd/     mount: wrong fs type, bad option, bad superblock on /dev/loop0,     missing codepage or helper program, or other error      I've tried many combinations trying to specify a type with -t i.e. ntfs, msdos, iso9660, vfat, and always getting that same error. I thought it's maybe some kind of ntfs file format but ntfs-3G doesn't do much better so no it's not:               # ntfs-3g -o loop U19.IMA /mnt     NTFS signature is missing.     Failed to mount '/home/meh/Downloads/U19.IMA': Invalid argument     The device '/home/meh/Downloads/U19.IMA' doesn't seem to have a valid NTFS.     Maybe the wrong device is used? Or the whole disk instead of a     partition (e.g. /dev/sda, not /dev/sda1)? Or the other way around?          # ntfsclone -r -o file.img U19.IMA     ntfsclone v2013.1.13 (libntfs-3g)     ERROR: Input file is not an image! (invalid magic)      Someone suggested maybe a Minix fs. While it is not clear if I can really mount such a filesystem with my current configuration I tried:               mount -t minix -o loop U19.IMA /mnt/cd     which gave the generic error but there was this at the bottom of the log:     VFS: Can't find a Minix filesystem V1 | V2 | V3 on device loop0.      It seems this is not conclusive, as when you specify a specific type of filesystem you will have a specific type of error in the log. Also tried `[fuseiso][2]`:               # fuseiso U19.IMA /mnt/cd     init: wrong standard identifier in volume descriptor 0, skipping..     init: wrong standard identifier in volume descriptor 1, skipping..     init: wrong standard identifier in volume descriptor 2, skipping..     init: wrong standard identifier in volume descriptor 3, skipping..     init: wrong standard identifier in volume descriptor 4, skipping..     init: wrong standard identifier in volume descriptor 5, skipping..     init: wrong standard identifier in volume descriptor 6, skipping..     init: wrong standard identifier in volume descriptor 7, skipping..     init: wrong standard identifier in volume descriptor 8, skipping..     init: wrong standard identifier in volume descriptor 9, skipping..     init: wrong standard identifier in volume descriptor 10, skipping..     init: wrong standard identifier in volume descriptor 11, skipping..     init: wrong standard identifier in volume descriptor 12, skipping..     init: wrong standard identifier in volume descriptor 13, skipping..     init: wrong standard identifier in volume descriptor 14, skipping..     init: wrong standard identifier in volume descriptor 15, skipping..     init: wrong standard identifier in volume descriptor 16, skipping..     init: wrong standard identifier in volume descriptor 17, exiting..      Where I can see such things with `dmesg`:               [ 5316.082629] FAT-fs (loop0): invalid media value (0xf6)     [ 5316.082644] FAT-fs (loop0): Can't find a valid FAT filesystem      Also, `lsmod | grep loop` gives               loop 18511 0      There is no alternate superblock of any kind:               # mkfs -n U19.IMA     mke2fs 1.42.8 (20-Jun-2013)     U19.IMA is not a block special device.     Proceed anyway? (y,n) y     Filesystem label=     OS type: Linux     Block size=1024 (log=0)     Fragment size=1024 (log=0)     Stride=0 blocks, Stripe width=0 blocks     184 inodes, 1440 blocks     72 blocks (5.00%) reserved for the super user     First data block=1     Maximum filesystem blocks=1572864     1 block group     8192 blocks per group, 8192 fragments per group     184 inodes per group      Contrary to many cases I read about, there seems to be no need to specify any offset here as there are no partition built in the image. In such cases, sometimes the `dd` command is used to transfer the content to a similar image using an offset value which allows mounting. This seems the same as specifying an offset to the `mount` command directly. But this should be easy, like in this other case where a simple `losetup` is used and then the loop device is mounted. I can link the .ima file with losetup but when I try to mount the loop device I end up with my initial error message. ## Data integrity Finally, `safecopy --stage1` doesn't report any issue with the data and the output up to stage 3 remains the same and yields the same error:               # safecopy U19.IMA test.img --stage1     Low level device calls enabled mode: 2     Reported hw blocksize: 4096     Reported low level blocksize: 4096     File size: 1474560     Blocksize: 4096     Fault skip blocksize: 147456     Resolution: 147456     Min read attempts: 1     Head moves on read error: 0     Badblocks output: stage1.badblocks     Marker string: BaDbLoCk     Starting block: 0     Source: U19.IMA     Destination: test.img     . ;-} 100%     Done!     Recovered bad blocks: 0     Unrecoverable bad blocks (bytes): 0 (0)     Blocks (bytes) copied: 360 (1474560)      Here's the top of the file and the content seems to be intact:               dd if=U19.IMA | hexdump -C | head -n 10     00000000 f6 f6 f6 f6 f6 f6 f6 f6 f6 f6 f6 f6 f6 f6 f6 f6 |................|     *     00004600 34 2e 30 2e 32 20 33 38 36 75 6e 69 78 20 46 6e |4.0.2 386unix Fn|     00004610 64 20 53 65 74 20 35 20 6f 66 20 31 30 0a 00 00 |d Set 5 of 10...|     00004620 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|      * * * ## "Forensics" > Since a raw image consists of a sector-by-sector binary copy of the source > medium, the actual format of the file contents will depend on the file > system of the disk from which the image was created (such as a version of > FAT).[...] Since IMG files hold no additional data beyond the disk contents, > these files can only be handled by programs that can detect their file > systems. Following suggestions, I proceeded to analyze some of the other image files in the set(30):               fdisk -lu U14.IMA     Disk U14.IMA: 1.4 MiB, 1474560 bytes, 2880 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     Disklabel type: dos     Disk identifier: 0x00000000     This doesn't look like a partition table. Probably you selected the wrong device.          Device Boot Start End Blocks Id System     U14.IMA1   3840       11519      3840       0  Empty     U14.IMA2   2425393152 4850786447 1212696648 0  Empty     U14.IMA3 ? 2425393296 4850786591 1212696648 90 Unknown     U14.IMA4 ? 2425393296 4850786591 1212696648 90 Unknown      Sorry but it does look like a partition table but it is unusual. It includes the _id 90_ property:               90h     MBR, EBR    CHS, LBA    x86, 68000, 8080/Z80    Hidden, Filesystem  FreeDOS     Free FDISK  Hidden FAT16 (corresponds with 04h i.e. MS Fat16 DOS 3.0+ < 65536 sectors)      So trying to mount the image I get:               # mount -t auto U14.IMA /mnt/cd     mount: unknown filesystem type 'sysv'  <-----      As someone hinted, you need to have something specific like ' _System V and Coherent filesystem support_ ' compiled in the kernel in order to use something like `mount -t sysv`. The sysv string is not so suprising, since this is part of AT&T UNIX System V/386 Release 4 Version 2.1 install media - a port which was supported by Sun until 2006 \- and these images ended up in the wild in 2007. Actually a text file bundled with the images indicates that they are required for installation because of the nature of the boot sector and the format in use. There is an indication that the material was originally in Teledisk (TD0) format. I want to stress here that this is not original material. In any case I can't actually calculate the offsets like explained in the question - either I don't end up with integers when dividing by 512, and even if I try it seems I can't find the proper offset - `dd: cannot skip to specified offset, 0 writes` etc. So at this point the answer is about forensics, and no longer about an image file. ## Quick historical image source OS emulation with qemu AT&T UNIX System V Release 4 Version 2.1                                         LABEL             Version         X of X       AT&T UNIX SVR4.0 2.1 --------------------------------------------------            U01.IMA                 Maintanace Disk1  2.1             2 of 2       U02.IMA                 Remote Terminal   2.1             1 of 1                               Package       U03.IMA                 BSD Comp. Pkg.    2.1             1 of 2       U04.IMA                 BSD Comp. Pkg.    2.1             2 of 2       U05.IMA                 Networking Supp.  2.1             1 of 1                               Util. Pkg.       U06.IMA                 Xenix Comp. Pkg   2.1             1 of 1       U07.IMA                 FACE Pkg.         2.1             1 of 1       U08.IMA                 FMLI Pkg.         2.1             1 of 1       U09.IMA                 Editing Utils.    2.1             1 of 1       U10.IMA                 OA&M Basic & Ext. 2.1             1 of 3       U11.IMA                 OA&M Basic & Ext. 2.1             2 of 3       U12.IMA                 OA&M Basic & Ext. 2.1             3 of 3       U13.IMA                 Foundation Set    2.1             1 of 10                               Base System Pkg.                               2 User System       U14.IMA                 Base              2.1a            1 of 10       U15.IMA                 Base              2.1             2 of 10       U16.IMA                 Base              2.1a            2 of 10       U17.IMA                 Base              2.1             3 of 10       U18.IMA                 Base              2.1             4 of 10       U19.IMA                 Base              2.1             5 of 10       U20.IMA                 Base              2.1             6 of 10       U21.IMA                 Base              2.1             7 of 10       U22.IMA                 Base              2.1             8 of 10       U23.IMA                 Base              2.1             10 of 10       U24.IMA                 Maintanance 1     2.1             1 of 2       U25.IMA                 Base              2.1             9 of 10       U26.IMA                 Printer Pkg       2.1             3 of 3       U27.IMA                 Printer Pkg       2.1             2 of 3       U28.IMA                 Printer Pkg       2.1             1 of 3       U29.IMA                 16 to unlimited   2.1             1 of 1                               User License       U30.IMA                 2 to 16 User      2.1             1 of 1                               License      As was suggested, I installed from a prior image in the set. It involves using `qemu` like explained here basically starting with image 14 (first `losetup /dev/loop0 U14.IMA` then a simple `qemu-system-x86_64 -m 256 -hda test.img -fda /dev/loop0 -boot a`), as U19 is not bootable. What is nice here is that you don't have to mount/umount images in the OS itself, you just use `ctrl- alt-2` or 1 with qemu to access or leave the monitor and you use `list blocks` to see what is mounted and `change floppy0 imagename` in that interface to change the image file i.e. during install for instance. I had to supply U19.IMA (disk 5) during installation (for a textual log of the install, see this \- a highlight is the reference to MS-DOS!), and I ended up with this i.e. a properly installed AT&T UNIX Sys V 386 OS, so this pretty much confirms U19.IMA is a working disk image: ![enter image description here](http://i.stack.imgur.com/QXtwh.jpg) By default /dev/fd is mounted on /dev/fd and there is also floppy access through a block (/dev/dsk/f0) and raw (/dev/dsk/f0) device. Changing directory to the floppy just shows files numbered from 1 to 23 (this is just the structure of the character device I guess). You can also `cat` the raw and block devices and see the floppy data is there but that's as close as it gets. I've noticed that in that OS, you don't install stuff from floppies by launching some script from a directory on them like you do with decompressed binary files for instance - here you use `pkgadd -d diskette1` (surely that last word is some alias, but I found a reference to the -d switch in the SCO stuff for pkgadd(1M) and generally it appears often in commercial Unix (Oracle, HP share pkgadd(1M) ). Issuing the command launches a routine where you supply floppies and you have no control, except saying "no" after the routine finds out what's in the drive. In the case of disks which begin an installation sequence (U03, U05 etc.), this will install then ask for the next floppy etc until the package install is complete. If you put a floppy that isn't the beginning of a set, it finds basically nothing but tells you maybe you have to use the `installpkg` command instead. Will I be installing a physical floppy drive to my rig to access the data in that image file?


Two "Audio codecs" have 100% power usage in PowerTOP - what does this mean?

Should I be worried?   My battery power doesn't last long (~1hr), could this be the reason?   How can I fix this (if it has to be fixed at all)? ![enter image description here](http://i.stack.imgur.com/YLxPd.png)


Copy all dotfiles except for `.git` and `..`

I am aware of using `.[!.]*` to refer to all dotfiles in a directory with the exception of `..`, but how might one refer to all dotfiles except for `..` and `.git`? I have tried several variations on `.[!.||.git]*` and `.[!.][!.git]*` and the like, but none refer to the intended files.


Bandwith Usage in PAM Authentication

Is there any way to check how much bandwidth a user used in `OpenVPN` (using `PAM` Authentication)


DMA errors on OpenWrt router

I have a WRT160NL router with OpenWrt Backfire (10.03.1, r29592), and there is a 3,5" WD Green 1,5TB HDD attached to it. In the recent time if I read the logs on it with "logread" I can see these messages:               Dec 12 17:07:16 OWRTROUTER user.err kernel: ath: DMA failed to stop in 10 ms AR_CR=0x00000024 AR_DIAG_SW=0x42000020 DMADBG_7=0x00024020     Dec 12 17:07:16 OWRTROUTER user.err kernel: ath: Could not stop RX, we could be confusing the DMA engine when we start RX up     Dec 12 17:07:16 OWRTROUTER user.err kernel: ath: DMA failed to stop in 10 ms AR_CR=0x00000024 AR_DIAG_SW=0x42000020 DMADBG_7=0x00024020     Dec 12 17:07:16 OWRTROUTER user.err kernel: ath: Could not stop RX, we could be confusing the DMA engine when we start RX up     Dec 12 17:07:17 OWRTROUTER user.err kernel: ath: DMA failed to stop in 10 ms AR_CR=0x00000024 AR_DIAG_SW=0x42000020 DMADBG_7=0x00024020     Dec 12 17:07:17 OWRTROUTER user.err kernel: ath: Could not stop RX, we could be confusing the DMA engine when we start RX up      What are these messages? Are there a sign of a future problem? How to handle them?


Creating a Live Kernel with u-boot

I want to create a live kernel with u-boot. I have a ARM board that has a 4GB nand flash memory. I used manufacturing tools from the freescale website for the i.mx6 chip. I have read that you can use u-boot on a separate computer to connect to the embedded device via IP and extract the files needed to create an image of the kernel with all downloaded files and packages. I need help with this process. My research led me into a dead end. Has anyone done this before or can anyone suggest any well written guides to do this?


understand the designation of symbolic links

I have a number of files in `/etc/rc3.d/` directory which all are symbolic links and point to files in `/etc/init.d/` directory using `../init.d/` designation. For example file `S18rsyslog` in `/etc/rc3.d/` directory is a symbolic link to file `/etc/init.d/rsyslog`, but according to `ls -l`, `/etc/rc3.d/S18rsyslog` does not point to `/etc/init.d/rsyslog` but `../init.d/rsyslog` instead:               # ls -l /etc/rc3.d/S18rsyslog     lrwxrwxrwx 1 root root 17 30. jun 15:05 /etc/rc3.d/S18rsyslog -> ../init.d/rsyslog     #       What is the advantage to keep symbolic links relative to directory? Because this allows one to move the direcoty itself without breaking the symbolic links? In addition, is it possible to create a symbolic link with `..`(parent directory) in the path without being in the directory? `ln -sv '/etc/init.d/rsyslog' '/etc/rc3.d/../init.d/rsyslog'` obviously does not work as symlink is created into `/etc/init.d/` directory while I would like to have symlink named `../init.d/rsyslog` in the `/etc/rc3.d/` directory.


Changing my default primary GID for every login session

I read the following about `newgrp`:               The newgrp command is used to change the current group ID during a            login session.       This made me think, how can I change my default's primary group **permanently**? I imagine I can have a `newgrp` line in my startup files for my shell, but is there a way to change my primary ID for every login session without resorting to `newgrp`? I am interested in a generic solution, but in case it depends on the distribution, I am interested in solutions for **Ubuntu 11.10** and for **Red Hat Enterprise Linux Server** (I have administrator priviledges in the former, but not in the latter). ### Addendum: From the great answer @Shawn provided below to the these questions, I read "I won't be able to do this without root privileges". This made me wonder: **why?** Assuming that I have privileges to run `newgrp` immiediately after login, wouldn't this be the same as changing my default primary GUID for all practical purposes?


How to read a hexdump byte by byte in bash or awk?

This is the hexadecimal output of an IPv6 TCP packet captured with `tcpdump`:                6000 0000 0018 0620 0000 0000      0000 0000 0000 0000 0000 0001 0000 0000      0000 0000 0000 0000 0000 0002 *0026 0026      0000 0001 0000 0002 {5}412 0065 0034 0000*      6162 6364          The packet itself is between the `*`s above. The `{5}` represents the packet length in 32-bit words (so it's 5 words long -- 20 bytes). I need to extract tcp header from this info using a bash/awk script, so the script needs to find the length byte and use it to know how much further to read. How can I do that in bash or awk?


Differences between man pages

I often find myself reading man pages **online** instead of from the command line on my system. Part of the reason is because I find it easier to browse this information on a browser on the Internet than on the command line. However, this also means that I often end up reading information from "generic" man pages (e.g. from http://linuxmanpages.com/), or from a different distribution or tool version, and not from the actual specific tool/version I have on my system. So I always wondered if I am missing something by not reading the man pages installed on my machine. I presume that for the most-commonly used and stable tools (and parameters), the differences are negligible, but I would like to know to what extent this is a safe assumption. More specifically:   1. Is it common for different distributions to come with different man pages? Is this true even for the **same version of the tools** provided by the distro?    2. What man pages can vary most significantly across distributions?


Where to find the downloaded file after dragging a FTP URL to the terminal?

Usually, when I drag a link to the terminal, the link target is pasted in the terminal. However, when I just dragged a FTP link from Chromium to my Terminal (first result on Google for "ftp pdf", ftp://ftp.ipswitch.com/ipswitch/manuals/ftpserv.pdf), a file download was immediately initiated (I knew because a desktop notification appeared). I tried to locate the downloaded file using `find ~ -iname '*.pdf'` (also in `/tmp`), but I didn't find any traces. When I tried to reproduce the problem by dragging the ftp-URL again, the download completed much faster than before, from which I infer that the file is still cached, somewhere. So, my question are:   * Why is the ftp resource being downloaded after I drag the link to my Terminal?   (instead of being pasted as text, like http-URLs)   * Where can I find the downloaded file? (I want to delete it)


Broken link/launch behaviour on Kubuntu 11.10 desktop after rekonq uninstalled

Since I removed rekonq from my system, numerous apps which launch links, e.g. Stackapplet and Thunderbird are not correctly launching links with Firefox, which I am using now as my primary browser. I need a global way of telling Kubuntu to automatically launch links inside apps with Firefox, I have tried changing file associations but that appears to be irrelevant. ![enter image description here](http://i.stack.imgur.com/rA0e9.png) System Kubuntu 11.10 64-bit @rozcietrzewiacz - your suggested solution can be found here: ![enter image description here](http://i.stack.imgur.com/PQy7E.png)


How can I add autocomplete for "gem which" with rbenv?

I am using `rbenv` on Mac OS X. I have autocomplete functionality already for the `gem` command:               $ gem      build           environment     lock            query           stale     cert            fetch           mirror          rdoc            uninstall     check           generate_index  outdated        search          unpack     cleanup         help            owner           server          update     contents        install         pristine        sources         which     dependency      list            push            specification   yank      But I often use `gem which` in order to get the location of an installed gem in order to browse the source. Something like:               gem which sp[tab]     spork-1.0.0rc4        spork-rails-4.0.0     sprockets-2.10.1      sprockets-rails-2.0.1      Mapping directories shouldn't be that hard, but I think that having existing autocomplete functionality may complicate things. I've tried writing custom bash completion functions before but I always get really frustrated with it. This one is also going to have to check the current ruby version with something like `rbenv version` before picking the directory to check.   * Is it possible to "tack on" this "sub-command" functionality with bash completion? I recently learned about Thor which seems to make building command-line programs pretty easy by mapping arguments to classes and methods (just a tangentially related example not a solution for this), but   * Are there any good resources or frameworks for creating custom bash completion functions? ...or, if there is no such framework, how can I set up the bash completion function as a script so that I can run it and have it output the results? ( Perhaps using something like `inotifywait` to run the script when it is changed, passing input like "sp" and using the console to debug the output until it works correctly? ) Just hoping there is an easier way to do it because trying to write bash completion is probably one of the most aggravating things I've worked on.


Only met by a tty "login" prompt when booting Mint

I've installed Linux Mint 11 Katya (dual-booting with Win7) on my PC. After some problems with booting, I decided to use NeoGrub to add a Grub-based bootloader, configurable from within Windows, to the standard Windows boot manager. Fine. However, when I boot Mint from there, I don't get any GUI. I only get a tty prompt, saying > Linux Mint Katya kapok login: Kapok is my hostname. This shouldn't show up, right? And what am I supposed to type in there, really? The password I chose during installation? The username? Both? Whatever I type seems to return a message like this > tty1 Main Process ( _a number_ ) killed by SEGV signal Followed by the same login prompt as before. If I switch tty with Alt+Ctrl+F? I get the same prompt, except on F7 (which should be the GUI?) where it only shows some kind of log text but no prompt. Is there actually some problem here, or is it just me who's stupid and don't get what to do? (never used Linux before) Also, here's the Grub code I use to boot Mint:               title Linux Mint 11 Katya     find --set-root /boot/vmlinuz-2.6.38-8-generic     kernel /boot/vmlinuz-2.6.38-8-generic ro root=/dev/sda5     initrd /boot/initrd.img-2.6.38-8-generic


Must the filesystem be unmounted while extending an LVM logical volume?

I have seen some tutorials on extending an LVM2 logical volume. None of them instruct you to unmount the filesystem. They claim that you can extend an LVM volume while it is in use. Is this right?


Why is permission denied for npm start using node-dev?

I am trying to start a node.js application with on a low permissions user. All the files I know of are owned by the correct user and have permissions set reasonably well. I'm trying to use a script file to do this. I invoke the script with this command               sudo su - nodejs ./start-apps.sh      The shell script runs this command to start the app               cd "/home/nodejs/my-app"     npm start      `npm start` is documented here. It basically pulls the command to use out of the package.json file, which in our app looks like this:               // snip     "scripts": {         "start": "node-dev app"       },      And it spits out the error:               > my-app@0.1.0-build.100 start /home/nodejs/my-app     > node-dev app          sh: 1: node-dev: Permission denied          npm ERR! spicoli-authorization@0.1.0-build.100 start: `node-dev app`     npm ERR! Exit status 126      That `sh` seems to be saying that it's reporting errors from the shell command. I don't think the problem is accessing the `npm` command itself, because if it were, the permission denied would be raised before any output from the npm command. But just to rule it out, here are the permissions for the npm command itself:               $ sudo find / ! \( -type d \) -name npm -exec ls -lah {} \;     -rwxr-xr-x 1 root root 274 Nov 12 20:22 /usr/local/src/node-v0.10.22/deps/npm/bin/npm     -rwxr-xr-x 1 root root 274 Nov 12 20:22 /usr/local/lib/node_modules/npm/bin/npm     lrwxrwxrwx 1 root root 38 Jan 14 07:49 /usr/local/bin/npm -> ../lib/node_modules/npm/bin/npm-cli.js      It looks like everyone should be able to execute it. The permissions for `node-dev` look like this:               $ sudo find / ! \( -type d \) -name node-dev -exec ls -lah {} \;     -rwxr-xr-x 1 nodejs nodejs 193 Mar  3  2013 /home/nodejs/.npm/node-dev/2.1.4/package/bin/node-dev     -rw-r--r-- 1 nodejs nodejs 193 Mar  3  2013 /home/nodejs/spicoli-authorization/node_modules/node-dev/bin/node-dev     lrwxrwxrwx 1 root root 24 Jan 14 07:50 /home/nodejs/spicoli-authorization/node_modules/.bin/node-dev -> ../node-dev/bin/node-dev      I've already tried `chown`ing the link to `nodejs:nodejs`, but the scrip experiences the same error. Is there some file permissions problem I'm not seeing with the binary files? Or is this an `npm`/`node-dev` specific error?


Multiple VPN connetions, routing based on country

I want to set up a couple of VPN connections to two different countries, A and B, on my Ubuntu Server. Then I would like to set up rules based on GeoIP to determine which VPN connection should be used when I surf the internet. If the website I browse is in country A then I should use VPN connection A, if it is in country B then I should use connection B, and if it is in neither A nor B then I shouldn't use either of the VPN connections (default should be my DSL connection). Is this possible to set up?


How do you detach the 2nd screen from within another screen?

I've accidentally attached to a 2nd GNU screen session from within an existing screen session and cannot detach or issue commands to the inner screen. I remember figuring out how to do that before but completely forgot and would like to keep it as reference. One way is to detach the inner screen by doing `screen -dr` from shell, but what is the key combination to do that from within screen itself?


Why does command substitution fails in ssh remote call?

I have this script:               exportFile(){         file=$1         skippedBytes=$2         exportCommandString=$3              #This works:         #dd if=$file bs=1 skip=$skippedBytes | ssh sshConnection 'cat - >> /remote/dir/myTarget.txt.output' > export.output 2>&1              #This does not work:         dd if=$file bs=1 skip=$skippedBytes | $($exportCommandString $file) > export.output 2>&1              cat export.output     }          sshExportCommand(){         userAtServer=$1         targetDir=$2         filename=$3         echo 'ssh '$userAtServer' '\''cat - >> '$targetDir'/'$filename'.output'\'         #Same result with this:         #echo "ssh $userAtServer 'cat - >> $targetDir/$filename.output'"      }          exportFile mySource.txt 9 "sshExportCommand sshConnection /remote/dir myTarget.txt"      When invoking it, I obtain the following output:               85+0 records in     85+0 records out     85 bytes (85 B) copied, 0.00080048 s, 106 kB/s     Read bytes: 85     ovh_ssh: cat - >> /remote/dir/myTarget.txt.output: No such file or directory      What does prevent this from working ? Is this command substitution ? Anything else I missed ?


x11vnc : how to have the login screen?

I use x11vnc since long, to connect from my office to my home. My goal is to access to my computer exactly as if I were in front of it. So when I return to home I can continue was I started remotly, and vice-versa.   The problem is I must leave my X session open before going to work, because x11vnc don't allow me to see any login screen. So I can't reboot remotly, I can't log as another user, etc. I did something wrongly ?   Or any way to have this login screen ?


How can I know if IP Multicast is enabled

I have scripts that run IP multicast tests; however, my scripts are failing on a particular linux machine. I know that I can look at `CONFIG_IP_MULTICAST` in the kernel configuration file to determine whether the kernel was compiled with this. However, it would be easier to flag missing requirements in my script if I could look at `/proc` or `sysctl` and get the answer. Is there a way to find if IP Multicast was compiled into the kernel without looking at `CONFIG_IP_MULTICAST`?


Linux Mint 14.1 not bootable because of "secure boot"

I'm trying to install Linux Mint 14.1 on my Lenovo B570, but when I try to boot the thumb drive, it displays a message: "Secure boot is not enabled" and then goes black screen. I read lots of posts on the subject, but there is one difference from other people's problems. I have Windows 7 installed (since over a year ago) and around 5 months ago I installed Kubuntu 12.10 without any problem (it was even the same flash drive). Now I'm facing the secure boot problem and I don't know what to do.


touchpad scrolling lost when switching between physical and virtual tty

I have setup touchpad scrolling by running the following script in .xsession               $ cat ~/bin/enablescrolling      # enable two finger scroll     synclient VertTwoFingerScroll=1     synclient HorizTwoFingerScroll=1     synclient EmulateTwoFingerMinW=5     synclient EmulateTwoFingerMinZ=48      .xsession               $ cat ~/.xsession     ....     enablescrolling     ....     gnome-session --session cinnamon      when i switch to /dev/tty6 and come back to /dev/tty8, I lose scrolling. I have captured a few logs. Can someone please point out why this happens? /var/log/syslog               Mar 10 19:15:00 rag-tos-laptop acpid: client 1411[0:0] has disconnected     Mar 10 19:15:00 rag-tos-laptop acpid: client connected from 1411[0:0]     Mar 10 19:15:00 rag-tos-laptop acpid: 1 client rule loaded      /var/log/ConsoleKit/history               1362942899.557 type=SEAT_ACTIVE_SESSION_CHANGED : seat-id='Seat1' session-id=''     1362942900.367 type=SEAT_ACTIVE_SESSION_CHANGED : seat-id='Seat1' session-id='Session1'      /var/log/Xorg.0.log                18561.016] (II) XKB: reuse xkmfile /var/lib/xkb/server-20D7C92BD55EB53CEBBE18F981CB2A77F469F038.xkm     [ 18812.499] (II) AIGLX: Suspending AIGLX clients for VT switch     [ 18814.442] (II) Open ACPI successful (/var/run/acpid.socket)     [ 18814.442] (II) AIGLX: Resuming AIGLX clients after VT switch     [ 18814.953] (--) synaptics: SynPS/2 Synaptics TouchPad: touchpad found     [ 18819.746] (II) XKB: reuse xkmfile /var/lib/xkb/server-20D7C92BD55EB53CEBBE18F981CB2A77F469F038.x


How do I start a gui framebuffer (no X) application on startup instead of console login prompt?

I have a python application that uses pygame to access the framebuffer directly without using X. I want to start this application on startup instead of showing the console login prompt. I haven't found any good resources which explains how I would do it. Just the same way gdm is started instead of showing a console login prompt. Bonus question: What would happen if said application crashed? Would the console login prompt be shown? **Edit: I have been reading up on runlevels and startup. More specific question below** Will it be enough to create a `/etc/init.d` script which starts my python program, update rc.d with `update-rc.d` and setting priority to 99 so that it runs last and setting it to run under runlevel 5 (Which is for gui applications I heard). Then changing the default runlevel 5 in `/etc/inittab`? Or do I have to do something special since the program uses framebuffer?


tcsh shortcut to move the cursor back to previous space

I'm looking for a keyboard shortcut in `tcsh` to move the cursor back to the previous blank: not `ESC`+`B` which takes me back one word (for instance, in a path argument, to the previous path component) - I want to get to previous space or start of current path.


How can I set Conkeror as my default brower?

I use the latest Archlinux and stumpwm as my window manager with some Gnome goodies on the side (gnome-power-manager, gnome-settings-daemon and networkmanager applet). I tried to make Conkeror my default browser. I tried gconftool-2 and changed the `/desktop/gnome/url-handlers/http(s)` to `conkeror %s` with no luck. From what I understand Gconf is migrating to GSettings in Gnome 3 but I am completely lost as to how to configure it. I logged in to a gnome-shell session and tried to change the preferred applications but the only available choices are FireFox and Epiphany. I've being googling for the past 2 hours without luck and resorted to the hardcore solution of symlinking `/usr/bin/firefox` to `/usr/bin/conkeror`. Can anyone point me in the right direction?