I rebooted a compiled kernel 3.1.0, and those are the errors that I am getting:               linux-dopx:/usr/src/linux-3.1.0-1.2 # make install     sh /usr/src/linux-3.1.0-1.2/arch/x86/boot/install.sh 3.1.0 arch/x86/boot/bzImage \                     System.map "/boot"          Kernel image:   /boot/vmlinuz-3.1.0     Initrd image:   /boot/initrd-3.1.0     Root device:    /dev/disk/by-id/ata-ST3250310AS_6RYNQEXY-part2 (/dev/sda2) (mounted on / as ext4)     Resume device:  /dev/disk/by-id/ata-ST3250310AS_6RYNQEXY-part1 (/dev/sda1)     find: `/lib/modules/3.1.0/kernel/drivers/ata': No such file or directory     modprobe: Module ata_generic not found.     WARNING: no dependencies for kernel module 'ata_generic' found.     modprobe: Module ext4 not found.     WARNING: no dependencies for kernel module 'ext4' found.     Features:       block usb resume.userspace resume.kernel     Bootsplash:     openSUSE (1280x1024)     41713 blocks      Rebooting says: `Could not load /lib/modules/3.1.0/modules.dep` ## EDIT1: Here's what I did:               linux-dopx:/usr/src/linux-3.1.0-1.2 # make bzImage       CHK     include/linux/version.h       CHK     include/generated/utsrelease.h       CALL    scripts/checksyscalls.sh       CHK     include/generated/compile.h     Kernel: arch/x86/boot/bzImage is ready  (#1)     linux-dopx:/usr/src/linux-3.1.0-1.2 # make modules       CHK     include/linux/version.h       CHK     include/generated/utsrelease.h       CALL    scripts/checksyscalls.sh       Building modules, stage 2.       MODPOST 3 modules     linux-dopx:/usr/src/linux-3.1.0-1.2 # make modules install       CHK     include/linux/version.h       CHK     include/generated/utsrelease.h       CALL    scripts/checksyscalls.sh       CHK     include/generated/compile.h       Building modules, stage 2.       MODPOST 3 modules     sh /usr/src/linux-3.1.0-1.2/arch/x86/boot/install.sh 3.1.0 arch/x86/boot/bzImage \                     System.map "/boot"          Kernel image:   /boot/vmlinuz-3.1.0     Initrd image:   /boot/initrd-3.1.0     Root device:    /dev/disk/by-id/ata-ST3250310AS_6RYNQEXY-part2 (/dev/sda2) (mounted on / as ext4)     Resume device:  /dev/disk/by-id/ata-ST3250310AS_6RYNQEXY-part1 (/dev/sda1)     find: `/lib/modules/3.1.0/kernel/drivers/ata': No such file or directory     modprobe: Module ata_generic not found.     WARNING: no dependencies for kernel module 'ata_generic' found.     modprobe: Module ext4 not found.     WARNING: no dependencies for kernel module 'ext4' found.     Features:       block usb resume.userspace resume.kernel     Bootsplash:     openSUSE (1280x1024)     41713 blocks     linux-dopx:/usr/src/linux-3.1.0-1.2 # make install     sh /usr/src/linux-3.1.0-1.2/arch/x86/boot/install.sh 3.1.0 arch/x86/boot/bzImage \                     System.map "/boot"          Kernel image:   /boot/vmlinuz-3.1.0     Initrd image:   /boot/initrd-3.1.0     Root device:    /dev/disk/by-id/ata-ST3250310AS_6RYNQEXY-part2 (/dev/sda2) (mounted on / as ext4)     Resume device:  /dev/disk/by-id/ata-ST3250310AS_6RYNQEXY-part1 (/dev/sda1)     find: `/lib/modules/3.1.0/kernel/drivers/ata': No such file or directory     modprobe: Module ata_generic not found.     WARNING: no dependencies for kernel module 'ata_generic' found.     modprobe: Module ext4 not found.     WARNING: no dependencies for kernel module 'ext4' found.     Features:       block usb resume.userspace resume.kernel     Bootsplash:     openSUSE (1280x1024)     41713 blocks      ## EDIT2:               linux-dopx:/usr/src/linux-3.1.0-1.2 # make modules_install install       INSTALL arch/x86/kernel/test_nx.ko       INSTALL drivers/scsi/scsi_wait_scan.ko       INSTALL net/netfilter/xt_mark.ko       DEPMOD  3.1.0     sh /usr/src/linux-3.1.0-1.2/arch/x86/boot/install.sh 3.1.0 arch/x86/boot/bzImage \                     System.map "/boot"          Kernel image:   /boot/vmlinuz-3.1.0     Initrd image:   /boot/initrd-3.1.0     Root device:    /dev/disk/by-id/ata-ST3250310AS_6RYNQEXY-part2 (/dev/sda2) (mounted on / as ext4)     Resume device:  /dev/disk/by-id/ata-ST3250310AS_6RYNQEXY-part1 (/dev/sda1)     find: `/lib/modules/3.1.0/kernel/drivers/ata': No such file or directory     modprobe: Module ata_generic not found.     WARNING: no dependencies for kernel module 'ata_generic' found.     modprobe: Module ext4 not found.     WARNING: no dependencies for kernel module 'ext4' found.     Features:       block usb resume.userspace resume.kernel     Bootsplash:     openSUSE (1280x1024)     41713 blocks      ## EDIT 3: This message is still getting shown after make install: `/lib/modules/2.6.35.13/kernel/drivers/ata': No such file or directory` I set to '[*]' the " **Generic ATA support** " under " **Serial ATA and Parallel ATA driver** ", but that's of no avail.   The kernel version is different this time, but the problem is same. ## EDIT 4:               linux-dopx:~ # lspci -vvv     00:00.0 Host bridge: Intel Corporation 82G33/G31/P35/P31 Express DRAM Controller (rev 10)             Subsystem: ASUSTeK Computer Inc. P5KPL-VM Motherboard             Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-             Status: Cap+ 66MHz- UDF- FastB2B+ ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort+ >SERR- <PERR- INTx-             Latency: 0             Capabilities: [e0] Vendor Specific Information: Len=0b <?>             Kernel driver in use: agpgart-intel          00:02.0 VGA compatible controller: Intel Corporation 82G33/G31 Express Integrated Graphics Controller (rev 10) (prog-if 00 [VGA controller])             Subsystem: ASUSTeK Computer Inc. P5KPL-VM Motherboard             Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx+             Status: Cap+ 66MHz- UDF- FastB2B+ ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-             Latency: 0             Interrupt: pin A routed to IRQ 18             Region 0: Memory at fea80000 (32-bit, non-prefetchable) [size=512K]             Region 1: I/O ports at dc00 [size=8]             Region 2: Memory at e0000000 (32-bit, prefetchable) [size=256M]             Region 3: Memory at fe900000 (32-bit, non-prefetchable) [size=1M]             Expansion ROM at <unassigned> [disabled]             Capabilities: [90] MSI: Enable+ Count=1/1 Maskable- 64bit-                     Address: fee0100c  Data: 4149             Capabilities: [d0] Power Management version 2                     Flags: PMEClk- DSI+ D1- D2- AuxCurrent=0mA PME(D0-,D1-,D2-,D3hot-,D3cold-)                     Status: D0 NoSoftRst- PME-Enable- DSel=0 DScale=0 PME-             Kernel driver in use: i915          00:1b.0 Audio device: Intel Corporation N10/ICH 7 Family High Definition Audio Controller (rev 01)                 Subsystem: ASUSTeK Computer Inc. Device 83a1             Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx+             Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-             Latency: 0, Cache Line Size: 32 bytes             Interrupt: pin A routed to IRQ 20             Region 0: Memory at fea78000 (64-bit, non-prefetchable) [size=16K]             Capabilities: [50] Power Management version 2                     Flags: PMEClk- DSI- D1- D2- AuxCurrent=55mA PME(D0+,D1-,D2-,D3hot+,D3cold+)                     Status: D0 NoSoftRst- PME-Enable- DSel=0 DScale=0 PME-             Capabilities: [60] MSI: Enable+ Count=1/1 Maskable- 64bit+                     Address: 00000000fee0100c  Data: 4159             Capabilities: [70] Express (v1) Root Complex Integrated Endpoint, MSI 00                     DevCap: MaxPayload 128 bytes, PhantFunc 0, Latency L0s <64ns, L1 <1us                             ExtTag- RBE- FLReset-                     DevCtl: Report errors: Correctable- Non-Fatal- Fatal- Unsupported-                             RlxdOrd- ExtTag- PhantFunc- AuxPwr- NoSnoop+                             MaxPayload 128 bytes, MaxReadReq 128 bytes                     DevSta: CorrErr- UncorrErr- FatalErr- UnsuppReq- AuxPwr+ TransPend-                     LnkCap: Port #0, Speed unknown, Width x0, ASPM unknown, Latency L0 <64ns, L1 <1us                             ClockPM- Surprise- LLActRep- BwNot-                     LnkCtl: ASPM Disabled; Disabled- Retrain- CommClk-                             ExtSynch- ClockPM- AutWidDis- BWInt- AutBWInt-                     LnkSta: Speed unknown, Width x0, TrErr- Train- SlotClk- DLActive- BWMgmt- ABWMgmt-             Capabilities: [100 v1] Virtual Channel                     Caps:   LPEVC=0 RefClk=100ns PATEntryBits=1                     Arb:    Fixed- WRR32- WRR64- WRR128-                     Ctrl:   ArbSelect=Fixed                     Status: InProgress-                     VC0:    Caps:   PATOffset=00 MaxTimeSlots=1 RejSnoopTrans-                             Arb:    Fixed- WRR32- WRR64- WRR128- TWRR128- WRR256-                             Ctrl:   Enable+ ID=0 ArbSelect=Fixed TC/VC=01                             Status: NegoPending- InProgress-                     VC1:    Caps:   PATOffset=00 MaxTimeSlots=1 RejSnoopTrans-                             Arb:    Fixed- WRR32- WRR64- WRR128- TWRR128- WRR256-                             Ctrl:   Enable- ID=0 ArbSelect=Fixed TC/VC=00                             Status: NegoPending- InProgress-             Capabilities: [130 v1] Root Complex Link                     Desc:   PortNumber=0f ComponentID=00 EltType=Config                     Link0:  Desc:   TargetPort=00 TargetComponent=00 AssocRCRB- LinkType=MemMapped LinkValid+                             Addr:   00000000fed1c000             Kernel driver in use: snd_hda_intel          00:1c.0 PCI bridge: Intel Corporation N10/ICH 7 Family PCI Express Port 1 (rev 01) (prog-if 00 [Normal decode])             Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR+ FastB2B- DisINTx+             Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-             Latency: 0, Cache Line Size: 32 bytes             Bus: primary=00, secondary=02, subordinate=02, sec-latency=0             I/O behind bridge: 00001000-00001fff             Memory behind bridge: 7f900000-7fafffff             Prefetchable memory behind bridge: 000000007fb00000-000000007fcfffff             Secondary status: 66MHz- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- <SERR- <PERR-             BridgeCtl: Parity- SERR+ NoISA- VGA- MAbort- >Reset- FastB2B-                     PriDiscTmr- SecDiscTmr- DiscTmrStat- DiscTmrSERREn-             Capabilities: [40] Express (v1) Root Port (Slot+), MSI 00                     DevCap: MaxPayload 128 bytes, PhantFunc 0, Latency L0s unlimited, L1 unlimited                             ExtTag- RBE- FLReset-                     DevCtl: Report errors: Correctable- Non-Fatal- Fatal- Unsupported-                             RlxdOrd- ExtTag- PhantFunc- AuxPwr- NoSnoop-                             MaxPayload 128 bytes, MaxReadReq 128 bytes                     DevSta: CorrErr- UncorrErr- FatalErr- UnsuppReq- AuxPwr+ TransPend-                     LnkCap: Port #1, Speed 2.5GT/s, Width x1, ASPM L0s L1, Latency L0 <1us, L1 <4us                             ClockPM- Surprise- LLActRep+ BwNot-                     LnkCtl: ASPM Disabled; RCB 64 bytes Disabled- Retrain- CommClk-                             ExtSynch- ClockPM- AutWidDis- BWInt- AutBWInt-                     LnkSta: Speed 2.5GT/s, Width x0, TrErr- Train- SlotClk+ DLActive- BWMgmt- ABWMgmt-                     SltCap: AttnBtn- PwrCtrl- MRL- AttnInd- PwrInd- HotPlug+ Surprise+                             Slot #4, PowerLimit 25.000W; Interlock- NoCompl-                     SltCtl: Enable: AttnBtn- PwrFlt- MRL- PresDet- CmdCplt- HPIrq- LinkChg-                             Control: AttnInd Unknown, PwrInd Unknown, Power- Interlock-                     SltSta: Status: AttnBtn- PowerFlt- MRL- CmdCplt- PresDet- Interlock-                             Changed: MRL- PresDet- LinkState-                     RootCtl: ErrCorrectable- ErrNon-Fatal- ErrFatal- PMEIntEna- CRSVisible-                     RootCap: CRSVisible-                     RootSta: PME ReqID 0000, PMEStatus- PMEPending-             Capabilities: [80] MSI: Enable+ Count=1/1 Maskable- 64bit-                     Address: fee0100c  Data: 4129             Capabilities: [90] Subsystem: ASUSTeK Computer Inc. Device 8179             Capabilities: [a0] Power Management version 2                     Flags: PMEClk- DSI- D1- D2- AuxCurrent=0mA PME(D0+,D1-,D2-,D3hot+,D3cold+)                     Status: D0 NoSoftRst- PME-Enable- DSel=0 DScale=0 PME-             Capabilities: [100 v1] Virtual Channel                     Caps:   LPEVC=0 RefClk=100ns PATEntryBits=1                     Arb:    Fixed+ WRR32- WRR64- WRR128-                     Ctrl:   ArbSelect=Fixed                     Status: InProgress-                     VC0:    Caps:   PATOffset=00 MaxTimeSlots=1 RejSnoopTrans-                             Arb:    Fixed+ WRR32- WRR64- WRR128- TWRR128- WRR256-                             Ctrl:   Enable+ ID=0 ArbSelect=Fixed TC/VC=01                             Status: NegoPending- InProgress-                     VC1:    Caps:   PATOffset=00 MaxTimeSlots=1 RejSnoopTrans-                             Arb:    Fixed+ WRR32- WRR64- WRR128- TWRR128- WRR256-                             Ctrl:   Enable- ID=0 ArbSelect=Fixed TC/VC=00                             Status: NegoPending- InProgress-             Capabilities: [180 v1] Root Complex Link                     Desc:   PortNumber=01 ComponentID=00 EltType=Config                     Link0:  Desc:   TargetPort=00 TargetComponent=00 AssocRCRB- LinkType=MemMapped LinkValid+                             Addr:   00000000fed1c001             Kernel driver in use: pcieport          00:1c.1 PCI bridge: Intel Corporation N10/ICH 7 Family PCI Express Port 2 (rev 01) (prog-if 00 [Normal decode])             Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR+ FastB2B- DisINTx+             Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-             Latency: 0, Cache Line Size: 32 bytes             Bus: primary=00, secondary=01, subordinate=01, sec-latency=0             I/O behind bridge: 0000e000-0000efff             Memory behind bridge: feb00000-febfffff             Prefetchable memory behind bridge: 000000007f700000-000000007f8fffff             Secondary status: 66MHz- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- <SERR- <PERR-             BridgeCtl: Parity- SERR+ NoISA- VGA- MAbort- >Reset- FastB2B-                     PriDiscTmr- SecDiscTmr- DiscTmrStat- DiscTmrSERREn-             Capabilities: [40] Express (v1) Root Port (Slot+), MSI 00                     DevCap: MaxPayload 128 bytes, PhantFunc 0, Latency L0s unlimited, L1 unlimited                             ExtTag- RBE- FLReset-                     DevCtl: Report errors: Correctable- Non-Fatal- Fatal- Unsupported-                             RlxdOrd- ExtTag- PhantFunc- AuxPwr- NoSnoop-                             MaxPayload 128 bytes, MaxReadReq 128 bytes                     DevSta: CorrErr- UncorrErr- FatalErr- UnsuppReq- AuxPwr+ TransPend-                     LnkCap: Port #2, Speed 2.5GT/s, Width x1, ASPM L0s L1, Latency L0 <1us, L1 <4us                             ClockPM- Surprise- LLActRep+ BwNot-                     LnkCtl: ASPM Disabled; RCB 64 bytes Disabled- Retrain- CommClk-                             ExtSynch- ClockPM- AutWidDis- BWInt- AutBWInt-                     LnkSta: Speed 2.5GT/s, Width x1, TrErr- Train- SlotClk+ DLActive+ BWMgmt- ABWMgmt-                     SltCap: AttnBtn- PwrCtrl- MRL- AttnInd- PwrInd- HotPlug+ Surprise+                             Slot #0, PowerLimit 0.000W; Interlock- NoCompl-                     SltCtl: Enable: AttnBtn- PwrFlt- MRL- PresDet- CmdCplt- HPIrq- LinkChg-                             Control: AttnInd Unknown, PwrInd Unknown, Power- Interlock-                     SltSta: Status: AttnBtn- PowerFlt- MRL- CmdCplt- PresDet+ Interlock-                             Changed: MRL- PresDet+ LinkState+                     RootCtl: ErrCorrectable- ErrNon-Fatal- ErrFatal- PMEIntEna- CRSVisible-                     RootCap: CRSVisible-                     RootSta: PME ReqID 0000, PMEStatus- PMEPending-             Capabilities: [80] MSI: Enable+ Count=1/1 Maskable- 64bit-                     Address: fee0100c  Data: 4141             Capabilities: [90] Subsystem: ASUSTeK Computer Inc. Device 8179             Capabilities: [a0] Power Management version 2                     Flags: PMEClk- DSI- D1- D2- AuxCurrent=0mA PME(D0+,D1-,D2-,D3hot+,D3cold+)                     Status: D0 NoSoftRst- PME-Enable- DSel=0 DScale=0 PME-             Capabilities: [100 v1] Virtual Channel                     Caps:   LPEVC=0 RefClk=100ns PATEntryBits=1                     Arb:    Fixed+ WRR32- WRR64- WRR128-                     Ctrl:   ArbSelect=Fixed                     Status: InProgress-                     VC0:    Caps:   PATOffset=00 MaxTimeSlots=1 RejSnoopTrans-                             Arb:    Fixed+ WRR32- WRR64- WRR128- TWRR128- WRR256-                             Ctrl:   Enable+ ID=0 ArbSelect=Fixed TC/VC=01                             Status: NegoPending- InProgress-                     VC1:    Caps:   PATOffset=00 MaxTimeSlots=1 RejSnoopTrans-                             Arb:    Fixed+ WRR32- WRR64- WRR128- TWRR128- WRR256-                             Ctrl:   Enable- ID=0 ArbSelect=Fixed TC/VC=00                             Status: NegoPending- InProgress-             Capabilities: [180 v1] Root Complex Link                     Desc:   PortNumber=02 ComponentID=00 EltType=Config                     Link0:  Desc:   TargetPort=00 TargetComponent=00 AssocRCRB- LinkType=MemMapped LinkValid+                             Addr:   00000000fed1c001             Kernel driver in use: pcieport          00:1d.0 USB Controller: Intel Corporation N10/ICH 7 Family USB UHCI Controller #1 (rev 01) (prog-if 00 [UHCI])             Subsystem: ASUSTeK Computer Inc. P5KPL-VM,P5LD2-VM Mainboard             Control: I/O+ Mem- BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-             Status: Cap- 66MHz- UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-             Latency: 0             Interrupt: pin A routed to IRQ 5             Region 4: I/O ports at d400 [size=32]             Kernel driver in use: uhci_hcd          00:1d.1 USB Controller: Intel Corporation N10/ICH 7 Family USB UHCI Controller #2 (rev 01) (prog-if 00 [UHCI])             Subsystem: ASUSTeK Computer Inc. P5KPL-VM,P5LD2-VM Mainboard             Control: I/O+ Mem- BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-             Status: Cap- 66MHz- UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-             Latency: 0             Interrupt: pin B routed to IRQ 7             Region 4: I/O ports at d480 [size=32]             Kernel driver in use: uhci_hcd          00:1d.2 USB Controller: Intel Corporation N10/ICH 7 Family USB UHCI Controller #3 (rev 01) (prog-if 00 [UHCI])             Subsystem: ASUSTeK Computer Inc. P5KPL-VM,P5LD2-VM Mainboard             Control: I/O+ Mem- BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-             Status: Cap- 66MHz- UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-             Latency: 0             Interrupt: pin C routed to IRQ 3             Region 4: I/O ports at d800 [size=32]             Kernel driver in use: uhci_hcd          00:1d.3 USB Controller: Intel Corporation N10/ICH 7 Family USB UHCI Controller #4 (rev 01) (prog-if 00 [UHCI])             Subsystem: ASUSTeK Computer Inc. P5KPL-VM,P5LD2-VM Mainboard             Control: I/O+ Mem- BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-             Status: Cap- 66MHz- UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-             Latency: 0             Interrupt: pin D routed to IRQ 10             Region 4: I/O ports at d880 [size=32]             Kernel driver in use: uhci_hcd          00:1d.7 USB Controller: Intel Corporation N10/ICH 7 Family USB2 EHCI Controller (rev 01) (prog-if 20 [EHCI])             Subsystem: ASUSTeK Computer Inc. P5KPL-VM,P5LD2-VM Mainboard             Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-             Status: Cap+ 66MHz- UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-             Latency: 0             Interrupt: pin A routed to IRQ 5             Region 0: Memory at fea77c00 (32-bit, non-prefetchable) [size=1K]             Capabilities: [50] Power Management version 2                     Flags: PMEClk- DSI- D1- D2- AuxCurrent=375mA PME(D0+,D1-,D2-,D3hot+,D3cold+)                     Status: D0 NoSoftRst- PME-Enable- DSel=0 DScale=0 PME-             Capabilities: [58] Debug port: BAR=1 offset=00a0             Kernel driver in use: ehci_hcd          00:1e.0 PCI bridge: Intel Corporation 82801 PCI Bridge (rev e1) (prog-if 01 [Subtractive decode])             Control: I/O+ Mem- BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR+ FastB2B- DisINTx-             Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-             Latency: 0             Bus: primary=00, secondary=03, subordinate=03, sec-latency=32             I/O behind bridge: 0000f000-00000fff             Memory behind bridge: fff00000-000fffff             Prefetchable memory behind bridge: 00000000fff00000-00000000000fffff             Secondary status: 66MHz- FastB2B+ ParErr- DEVSEL=medium >TAbort- <TAbort- <MAbort+ <SERR- <PERR-             BridgeCtl: Parity- SERR+ NoISA- VGA- MAbort- >Reset- FastB2B-                     PriDiscTmr- SecDiscTmr- DiscTmrStat- DiscTmrSERREn-             Capabilities: [50] Subsystem: ASUSTeK Computer Inc. Device 8179          00:1f.0 ISA bridge: Intel Corporation 82801GB/GR (ICH7 Family) LPC Interface Bridge (rev 01)             Subsystem: ASUSTeK Computer Inc. P5KPL-VM Motherboard             Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-             Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=medium >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-             Latency: 0             Capabilities: [e0] Vendor Specific Information: Len=0c <?>          00:1f.1 IDE interface: Intel Corporation 82801G (ICH7 Family) IDE Controller (rev 01) (prog-if 8a [Master SecP PriP])             Subsystem: ASUSTeK Computer Inc. P5KPL-VM Motherboard             Control: I/O+ Mem- BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-             Status: Cap- 66MHz- UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx+             Latency: 0             Interrupt: pin A routed to IRQ 3             Region 0: I/O ports at 01f0 [size=8]             Region 1: I/O ports at 03f4 [size=1]             Region 2: I/O ports at 0170 [size=8]             Region 3: I/O ports at 0374 [size=1]             Region 4: I/O ports at ffa0 [size=16]             Kernel driver in use: ata_piix          00:1f.2 IDE interface: Intel Corporation N10/ICH7 Family SATA IDE Controller (rev 01) (prog-if 8f [Master SecP SecO PriP PriO])             Subsystem: ASUSTeK Computer Inc. P5KPL-VM Motherboard             Control: I/O+ Mem- BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-             Status: Cap+ 66MHz+ UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-             Latency: 0             Interrupt: pin B routed to IRQ 7             Region 0: I/O ports at d080 [size=8]             Region 1: I/O ports at d000 [size=4]             Region 2: I/O ports at cc00 [size=8]             Region 3: I/O ports at c880 [size=4]             Region 4: I/O ports at c800 [size=16]             Capabilities: [70] Power Management version 2                     Flags: PMEClk- DSI- D1- D2- AuxCurrent=0mA PME(D0-,D1-,D2-,D3hot+,D3cold-)                     Status: D0 NoSoftRst- PME-Enable- DSel=0 DScale=0 PME-             Kernel driver in use: ata_piix          00:1f.3 SMBus: Intel Corporation N10/ICH 7 Family SMBus Controller (rev 01)             Subsystem: ASUSTeK Computer Inc. P5KPL-VM Motherboard             Control: I/O+ Mem- BusMaster- SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-             Status: Cap- 66MHz- UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-             Interrupt: pin B routed to IRQ 7                 Region 4: I/O ports at 0400 [size=32]             Kernel driver in use: i801_smbus          01:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8101E/RTL8102E PCI Express Fast Ethernet controller (rev 01)             Subsystem: ASUSTeK Computer Inc. Device 8136             Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx+             Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-             Latency: 0, Cache Line Size: 32 bytes             Interrupt: pin A routed to IRQ 19             Region 0: I/O ports at e800 [size=256]             Region 2: Memory at febff000 (64-bit, non-prefetchable) [size=4K]             Expansion ROM at febc0000 [disabled] [size=128K]             Capabilities: [40] Power Management version 2                     Flags: PMEClk- DSI- D1+ D2+ AuxCurrent=375mA PME(D0-,D1+,D2+,D3hot+,D3cold+)                     Status: D0 NoSoftRst- PME-Enable- DSel=0 DScale=0 PME-             Capabilities: [48] Vital Product Data                     Unknown small resource type 05, will not decode more.             Capabilities: [50] MSI: Enable+ Count=1/2 Maskable- 64bit+                     Address: 00000000fee0100c  Data: 4151             Capabilities: [60] Express (v1) Endpoint, MSI 00                     DevCap: MaxPayload 128 bytes, PhantFunc 0, Latency L0s <128ns, L1 unlimited                             ExtTag+ AttnBtn+ AttnInd+ PwrInd+ RBE- FLReset-                     DevCtl: Report errors: Correctable- Non-Fatal- Fatal- Unsupported-                             RlxdOrd+ ExtTag- PhantFunc- AuxPwr- NoSnoop+                             MaxPayload 128 bytes, MaxReadReq 512 bytes                     DevSta: CorrErr- UncorrErr+ FatalErr- UnsuppReq+ AuxPwr+ TransPend-                     LnkCap: Port #0, Speed 2.5GT/s, Width x1, ASPM L0s, Latency L0 unlimited, L1 unlimited                             ClockPM- Surprise- LLActRep- BwNot-                     LnkCtl: ASPM Disabled; RCB 64 bytes Disabled- Retrain- CommClk-                             ExtSynch- ClockPM- AutWidDis- BWInt- AutBWInt-                     LnkSta: Speed 2.5GT/s, Width x1, TrErr- Train- SlotClk- DLActive- BWMgmt- ABWMgmt-             Capabilities: [84] Vendor Specific Information: Len=4c <?>             Capabilities: [100 v1] Advanced Error Reporting                     UESta:  DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt- RxOF- MalfTLP- ECRC- UnsupReq+ ACSViol-                     UEMsk:  DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt- RxOF- MalfTLP- ECRC- UnsupReq- ACSViol-                     UESvrt: DLP+ SDES- TLP- FCP+ CmpltTO- CmpltAbrt- UnxCmplt- RxOF+ MalfTLP+ ECRC- UnsupReq- ACSViol-                     CESta:  RxErr- BadTLP- BadDLLP- Rollover- Timeout- NonFatalErr-                     CEMsk:  RxErr- BadTLP- BadDLLP- Rollover- Timeout- NonFatalErr-                     AERCap: First Error Pointer: 14, GenCap- CGenEn- ChkCap- ChkEn-             Capabilities: [12c v1] Virtual Channel                     Caps:   LPEVC=0 RefClk=100ns PATEntryBits=1                     Arb:    Fixed- WRR32- WRR64- WRR128-                     Ctrl:   ArbSelect=Fixed                     Status: InProgress-                     VC0:    Caps:   PATOffset=00 MaxTimeSlots=1 RejSnoopTrans-                             Arb:    Fixed- WRR32- WRR64- WRR128- TWRR128- WRR256-                             Ctrl:   Enable+ ID=0 ArbSelect=Fixed TC/VC=01                             Status: NegoPending- InProgress-             Capabilities: [148 v1] Device Serial Number 01-00-00-00-36-4c-e0-00             Capabilities: [154 v1] Power Budgeting <?>             Kernel driver in use: r8169          linux-dopx:~ #


title: Live-migration of a SLES9 DomU?

text: With SLES9 SP4 we managed to set up a XEN PV DomU. We are using SLES10 SP4 as Dom0 and DRBD 8 as disc-backed: a drbd-device corresponds to xvda in the DomU. The DomU uses the xenblk and xennet drivers, so everything seems ok. We applied the last patches (EoL of SLES9 SP4 was on 31th of August). After live-migration to another Dom0 the DomU seems to crash. No reaction to SYSRQ, nothing on the console. DRBD switches from one side (primary) to the other, so the disk-backend does not seem to be a problem here. With CentOS 4/5, SLES 10/11 DomUs we never had an issue with live-migration. Even W2K3 works. After destroy/create of the DomU it comes up without problems, last-log shows a "crash" entry. Any hints are welcome...


title: Linux "rpl" command doesn't replace text

text: I'm using `rpl` program in linux to replace `date(` with `pdate(` in some files.   But it says `A Total of 0 matches replaced in 1 file searched.`   while grep output for `date(` is:               ariyan@ariyan-laptop:/var/www/moodle21$ grep -wR 'date(' admin/uploaduser.php     $today = make_timestamp(date('Y', $today), date('m', $today), date('d', $today), 0, 0, 0);      I'm using `rpl` as this:               rpl -wR 'date(' 'pdate(' admin/uploaduser.php      What is the problem?


title: VLC surround to stereo problem

text: I noticed a problem with certain video files where speech volume component is just too low. I googled a bit and it seems that the problem is that it tries to play surround sound on stereo speakers and it fails to blend everything in as it should. If I play the same video in mplayer, everything is normal. Does anyone else have the same problem? Anyone know how to fix this? I tried changing the output module in vlc audio settings, but the problem would remain no matter what I chose. Thanks. Version of VLC that I am using is 1.1.12 on Arch-Linux (KDE 4.7.2).   If you any additional info is needed, I will provide it.


title: Display Non-Zero Return Status in PS1

text: I want to include the return status in my prompt. (Easy add `'$? '`, right?) However, I only want the status returned (and trailing space) if non-zero. Example:               sd ~ $ false     1 sd ~ $ true     sd ~ $


title: echo vs <<<, or Useless Use of echo in Bash Award?

text: By now the Useless Use of `cat` Award is very well known, and there's also a mention of a Useless Use of `echo` (not relevant for this question). I'm wondering if there should be a "Useless Use of `echo` in Bash Award": Piping seems to be much slower than heredocs and herestrings according to some highly unscientific measurements:   * Heredocs:              for reps in 1 2 3     do         time for i in {1..1000}         do             cat <<'END'     test string     END         done > /dev/null     done          real    0m1.786s     user    0m0.212s     sys     0m0.332s          real    0m1.817s     user    0m0.232s     sys     0m0.332s          real    0m1.846s     user    0m0.256s     sys     0m0.320s        * Herestrings              for reps in 1 2 3     do         time for i in {1..1000}         do             cat <<< 'test string'         done > /dev/null     done          real    0m1.932s     user    0m0.280s     sys     0m0.288s          real    0m1.956s     user    0m0.248s     sys     0m0.348s          real    0m1.968s     user    0m0.268s     sys     0m0.324s        * Redirection              for reps in 1 2 3     do         time for i in {1..1000}         do             echo 'test string' | cat         done > /dev/null     done          real    0m3.562s     user    0m0.416s     sys     0m0.548s          real    0m3.924s     user    0m0.384s     sys     0m0.604s          real    0m3.343s     user    0m0.400s     sys     0m0.552s      In general, heredocs and herestrings are about the same speed (this is just one data set from several tests) while redirection is consistently more than 50% slower. Am I misunderstanding something, or could this be used as a general rule for commands reading standard input in Bash?


title: Getting or cloning the users current terminal?

text: I have to work with a script that forks and launches an instance of xterm in order to display log output in one window and have an interactive interface in the other. Personally I prefer rxvt-unicode and I would like to modify this script so that it is no longer hardcoded to use xterm. Is it possible to either figure out the users preferred terminal in a desktop- agnostic way or to get the parent terminal. The parent terminal might not be the next parent in the process tree since it's possible that the script in question can in term be called by another script or application. Since the script is written in Perl a solution written in Perl is good enough as long as it doesn't have weird dependencies (I can't control the global environment).


title: Virtualbox seamless mode in Bodhi Linux

text: I just created a Bodhi virtual machine (Win 7 Host) and installed virtualbox- guest-additions but I'm still not able to activate seamless mode in virtualbox. Is this mode even supported for Bodhi Linux and what do I need to add to my guest system? My goal is to integrate Bodhi terminal sessions into my Windows Desktop without the Bodhi Desktop. The seamless mode isn't available means I'm not able to click on that tab. `/etc/init.d/vboxadd` isn't on my machine, only `/etc/init.d/virtualbox`


title: Why ssh-copy-id prompts for the local user password three times?

text: Noticed from my previous question that when trying to copy an SSH public key to a remote host via `ssh-copy-id`, I am prompted for the local user password three times:               ssh-copy-id myuser@myserver     Password:     Password:     Password:     myuser@myserver's password:      Why am I being prompted three times for the local user's password? Is that an expected behavior? Also, what is going on under the hood?? **EDIT** : when using `ssh`, it doesn't prompt for the local user password.. And my local password is an ordinary Linux password of my laptop, and the remote machine is an Ubuntu box (11.10) joined to an Active Directory Domain via likewise-open. So `myuser` is actually `mydomain\myuser` or `myuser@mydomain.com`, escaping the `\` character as in my previous question.. The remote machine `/etc/ssh/sshd_config` file is as follows:               # Package generated configuration file     # See the sshd_config(5) manpage for details          # What ports, IPs and protocols we listen for     Port 22     # Use these options to restrict which interfaces/protocols sshd will bind to     #ListenAddress ::     #ListenAddress 0.0.0.0     Protocol 2     # HostKeys for protocol version 2     HostKey /etc/ssh/ssh_host_rsa_key     HostKey /etc/ssh/ssh_host_dsa_key     HostKey /etc/ssh/ssh_host_ecdsa_key     #Privilege Separation is turned on for security     UsePrivilegeSeparation yes          # Lifetime and size of ephemeral version 1 server key     KeyRegenerationInterval 3600     ServerKeyBits 768          # Logging     SyslogFacility AUTH     LogLevel INFO          # Authentication:     LoginGraceTime 120     PermitRootLogin yes     StrictModes yes          RSAAuthentication yes     PubkeyAuthentication yes     #AuthorizedKeysFile %h/.ssh/authorized_keys          # Don't read the user's ~/.rhosts and ~/.shosts files     IgnoreRhosts yes     # For this to work you will also need host keys in /etc/ssh_known_hosts     RhostsRSAAuthentication no     # similar for protocol version 2     HostbasedAuthentication no     # Uncomment if you don't trust ~/.ssh/known_hosts for RhostsRSAAuthentication     #IgnoreUserKnownHosts yes          # To enable empty passwords, change to yes (NOT RECOMMENDED)     PermitEmptyPasswords no          # Change to yes to enable challenge-response passwords (beware issues with     # some PAM modules and threads)     #Overwritten by lwidentity: ChallengeResponseAuthentication no     ChallengeResponseAuthentication yes          # Change to no to disable tunnelled clear text passwords     #PasswordAuthentication yes          # Kerberos options     #KerberosAuthentication no     #KerberosGetAFSToken no     #KerberosOrLocalPasswd yes     #KerberosTicketCleanup yes          # GSSAPI options     #GSSAPIAuthentication no     GSSAPIAuthentication yes     #GSSAPICleanupCredentials yes     GSSAPICleanupCredentials yes          X11Forwarding yes     X11DisplayOffset 10     PrintMotd no     PrintLastLog yes     TCPKeepAlive yes     #UseLogin no          #MaxStartups 10:30:60     #Banner /etc/issue.net          # Allow client to pass locale environment variables     AcceptEnv LANG LC_*          Subsystem sftp /usr/lib/openssh/sftp-server          # Set this to 'yes' to enable PAM authentication, account processing,     # and session processing. If this is enabled, PAM authentication will     # be allowed through the ChallengeResponseAuthentication and     # PasswordAuthentication.  Depending on your PAM configuration,     # PAM authentication via ChallengeResponseAuthentication may bypass     # the setting of "PermitRootLogin without-password".     # If you just want the PAM account and session checks to run without     # PAM authentication, then enable this but set PasswordAuthentication     # and ChallengeResponseAuthentication to 'no'.     UsePAM yes     KbdInteractiveAuthentication yes


title: required output not achieved by bash script

text: I am new to bash script and want to create bash script that moves some days old files between source and destination as per days defined in script.               #!/bin/bash          echo "Enter Your Source Directory"     read soure          echo "Enter Your Destination Directory"     read destination           echo "Enter Days"     read days          find $soure -mtime -$days -exec mv {} $destination \;     echo "Files which were $days Days old moved from $soure to $destination"      my script runs without error, but I am not getting required output. When I run to move 30 day old files of /home/ketan/maxi folder to /home/ketan/google, it moves whole maxi folder to google rather than files. I need to be able to move files that meet the age criteria as per the script. What is wrong with this script?


title: Do mplayer's audio filters contain the opposite of "Karaoke" Mode?

text: A friend showed me mplayer's Karaoke mode (`-af karaoke`), and I was blown away by how good it is on the majority of the tracks I threw at it. Instead of tweaking the 10-band EQ, is there an audio filter for the opposite of Karaoke Mode? Specifically, is there an audio filter that would allow me to "extract the vocals" and filter out the music?


title: ZFS adding new device to RAIDZ

text: I wondering about problem with adding new device to ZFS RAIDZ. I'm thinking about it only theoretically: After destroying ZFS pool with only RAIDZ in it. The data should be still there on the disks. Is there a way to create new RAIDZ with old disks? If so, it should be almost the same way to add a new extra hard drive (or more) to the new RAIDZ. Only extra thing in this case is recalculate all parity. Am I wrong? So for now the **_main_** question is: **Is there some way to create new RAIDZ with old disks (from old RAIDZ) without adding new extra disk?**


title: How can you trim files using the command line?

text: What is the console equivalent of the following Python code:               target = file("disk", "w")    # create a file     target.seek(2*1024*1024*1024) # skip to 2 GB     target.write("\0")     target.close()      Maybe some dd incantation? The idea is making a file with the apparent size of 2 GB for use e.g. in virtualization.               kvm disk -cd whatever.iso #Only allocate space as necessary


title: Blocking visitors that access by server IP address

text: My Apache Server IP address is 192.168.1.100 and the Domain Name is `test.local`.   * If a user types in the URL, say "http://test.local", then they should be allowed.   * If a user tries to access "http:// 192.168.1.100" then they should be denied.  How can I accomplish this?


title: What is the difference between start-stop-daemon and running with &?

text: I am setting up a service in /etc/init.d. I am looking at various scripts in there, some are implemented with `start-stop-daemon ...` and some with `/path/to/script &`. All of them save the pid in a file and do some checks. What is the best practice, what are the differences, what is important to know here ... ? (in general) In my particular case I have a simple lightweight localhost http server in java that an application will call once every hour or so and it just gives a stupid random number (no more details here, I just mean it doesn't use the file system or threads or anything complicated in case this matter in my question) Thanks


title: How to cd automatically after git clone?

text: I want to automatically `cd` to the directory created by the `clone` command after I `git clone`d something. Shell: ZSH if that matters.


title: optimizing Debian wheezy for an embedded board

text: I have Debian 7.1 on an embedded board that I just use WiFi interface, openVPN, and run a C code. The code uses UDP socket to transfer data, and do some calculations and output some signal on GPIO. I noticed that there are too many unnecessary tasks are running on the background like `apache2` that consumes memory and CPU. I already disable it. Could anybody tell me what else would be safe to disable/remove from the Wheezy that would not be needed on an embedded board? (unnecessary documentations etc.?)


title: Can't reliably create a directory on startup after ec2 instance mounts its ephemeral drives

text: This particular instance type mounts two ephemeral drives, in `/dev/` and `/mnt/`. I have to create working directories for one of my services in these paths at startup or the services won't launch. Sometimes the script below works, sometimes it does not. I suspect it's a race between the folder being mounted, and my rc.local script kicking off. Is there a more reliable place I can create these directories? The last time I booted up, the `/mnt/mongodb` dir did get created, but the `/dev/` one did not. I'm running the 12.04 HVM ubuntu instance from amazon. Here is my rc.local file:               cd /mnt/     sudo mkdir mongodb     sudo chown -R mongodb mongodb     sudo chgrp -R mongodb mongodb     cd /dev/     sudo mkdir mongodb     sudo chown -R mongodb mongodb     sudo chgrp -R mongodb mongodb     sudo service mongodb start     exit 0


title: Inherit environment variables in systemd Docker container

text: I have a Docker container running systemd. I want to pass environment variables to applications under it. When I start systemd from within Docker (`/sbin/init` as command line), Docker exposes variables to systemd, but _does not expose to child services_. If I add `systemd.setenv=...` to the cmdline, the variables are passed. I am looking for a cleaner solution. How do I expose environment variables passed to `/sbin/init` to applications started by it?               % docker run -v /sys/fs/cgroup:/sys/fs/cgroup:ro --privileged -ti \                  -e VAR1=1 motiejus/systemd_fedora20 \                  init systemd.setenv=VAR2=2     ...     Welcome to Fedora 20 (Heisenbug)!     ...     [  OK  ] Reached target Multi-User System.     [root@740690365eb0 ~]# env | grep VAR     VAR2=2      I expect to see `VAR1=1` while running my command. In other words, can systemd pass variables passed to it to children it starts? For Dockerfile, see github repository.


title: Why do these 2 find commands give differnt results?

text: I wanted to see all files modified within the last 10 days and who owned them, so i entered the following to give me an idea how many results would be returned;               find . -maxdepth 1 -mtime -10      I then issued the command;               find . -maxdepth 1 -mtime -10 -exec ls -lh {} \;      Both commands give very different result, but i dont understand why, can someone explain what is going on and why they produce different results?


title: How to change user with authentication inside shell script

text: It is possible to change the user within a shell script by `su - newuser`; but what if the newuser needs authentication. How can I provide the password within the shell script? None of the users is root.


title: Assistance wanted in removing the "No mail." notification in MOTD for Ubuntu 10.10

text: How do I remove the `No mail.` notification on Ubuntu 10.10 Server?   This occurs when I log in, and is located underneath the message of the day I have a separate script which uses a different messaging system than the default one


title: Subversion on Ubuntu server - setup issues

text: I have followed a guide for setting up a Subversion server and I cannot seem to access any repositories that I have created and imported from a Windows based SVN repository. In the past, I installed a Windows app called Visual SVN that allows me to run a SVN server on a Windows machine. I had lots of repositories I made for it with many projects in it and now I want to migrate all these into my Ubuntu server. I followed this guide, and successfully installed SVN, added a user and configured the Apache 2 config file as such:               <Location /svn>       DAV svn       SVNPath /windows/mediahdd1/Repositories/Spring       AuthType Basic       AuthName Spring projects       AuthUserFile /etc/subversion/passwd       <LimitExcept GET PROPFIND OPTIONS REPORT>       Require valid-user       </LimitExcept>       </Location>      I also simply moved my repository (from my Windows machine) folder into that SVN path of `/windows/mediahdd1`. I first created a dummy repository using the same guide I linked above and it creates exactly the same folders and files that I saw inside my own Windows repository, so I assumed that I could easily import my previous repository folder and it should work. Anyways, the main issue I am having is that I can't access my SVN server from another machine using the HTTP or HTTPS protocol. I am able to boot up a putty session and access it using `SVN co file:///windows/mediahdd1/Repositories/Spring` and it returns me what appears to be a list of files related to my project. How can I access this remotely? Do i need to run SVN or is it running? The guide doesn't explain how to run the SVN server, all it states is how to install, create a repository, create users and different protocols you can use to access it but how do you access it remotely from say TortoiseSVN? The HTTP link doesn't work and that's what I normally use to access a SVN repo from TortoiseSVN or another SVN client. Any advice? Do I need to change port? What is the default port for SVN?


title: How to change the hostname of a linux machine using terminal?

text: I logged in for the first time, opened terminal, and typed in ‘hostname’. It returned ‘localhost.localdomain.com’. Then I logged as the root user in terminal using the command, ‘su –‘, provided the password for the root user and used the command ‘hostname etest’ where etest is the hostname I’d like my machine to have. To test if I got my hostname changed correctly, I typed ‘hostname’ again at terminal and it returned etest. However, when I restart my machine, the hostname reverts back to ‘localhost.localdomain.com’. Here are the entire series of commands I used in terminal.                   [thomasm@localhost ~]$ hostname           localhost.localdomain           [thomasm@localhost ~]$ su -           Password:            [root@localhost ~]# hostname etest           [root@localhost ~]# hostname           etest      I had run into the same problem when I set up RHEL and Ubuntu OS’s with VMPlayer.


title: possible to load kernel module that "disagrees about version of symbol"

text: I downloaded the sources for my kernel, applied a patch and rebuilt it and now I have a kernel module that, when I try to `insmod`, complains "Unknown symbol in module" with `dmesg` giving the error "disagrees about the version of symbol ...". Without having to hunt down the source for this module and rebuild it against my kernel is it possible to somehow force the kernel to accept this module? I realise this would be dangerous but I'll to take the risk if its possible.


title: All my superblocks are corrupt!

text: I am having a problem with my ubuntu ext3 filesystem. I can't boot from it or mount the volume when running live CD. When I try e2fsck I get: "Bad magic number in super-block while trying to open /dev/sda5". I have tried all the alternative superblocks with the same result. I have heard you can delete the journaling system and mount as ext2, but the suggestions on how to do this (eg this one) all require a valid superblock. Is it credible that all the backup superblocks are corrupted or is there something else going on? The filesystem seemed fine before I rebooted, so pretty sure it's recoverable. What else can I try? * * * ### Output from `fdisk`               Disk /dev/sda: 320.1 GB, 320072933376 bytes     255 heads, 63 sectors/track, 38913 cylinders     Units = cylinders of 16065 * 512 = 8225280 bytes     Sector size (logical/physical): 512 bytes / 512 bytes     I/O size (minimum/optimal): 512 bytes / 512 bytes     Disk identifier: 0xa4e507fa          /dev/sda1              26        8903    71303168    7  HPFS/NTFS     /dev/sda2            8903       38914   241061889    5  Extended     /dev/sda5            8904       13159    34186320   83  Linux     /dev/sda6           38167       38914     5999616   82  Linux swap / Solaris     /dev/sda7           13160       38166   200868696    7  HPFS/NTFS      ### Output from `sudo file - `</dev/sda5``               bash: /dev/sda5: Permission denied      (What was this supposed to show?) ### Output from `sudo file -s `/dev/sda5``               /dev/sda5: data


title: Setting up Samba to use AD server for authentication?

text: I am looking for howtos or instructions on setting up Samba to use an AD server for authentication instead of using a Samba password file. Pointers to documentation helpful, especially the right document to look at on http://samba.org/samba/docs/ .


title: Unable to handle kernel paging request?

text: [Disclaimer: I was initially a little nervous about posting this here, so I asked on Meta if discussing homebrew / modding was acceptable. Based on the response I've gotten from several veteran members, I've gone ahead and posted this thread. Here is the link on Meta.] I'm currently trying to mod my original Xbox using xboxhdm and ndure 3.0. xboxhdm is built around a small bootable Linux distro, and it's giving me fits, so I figured that I'd ask here and see if anybody could give me a hand. (Note: Before anybody suggests a different board, xboxhdm boots from CD on a PC - the Xbox hardware is completely uninvolved in the process, so that's why I'm asking here.) The PC I'm using is relatively old - it's an old Compaq desktop with about 512mb RAM and a 2.5ghz processor (likely a P IV). I'm using it because it has 2 IDE ports on the motherboard. The age of the computer shouldn't be an issue, performance-wise - the xboxhdm + ndure hack has been around for years - it was designed to run on such hardware. Anyway - at one point in the process, I have to copy some files from the CD to the Xbox hard drive (which is a standard Seagate IDE drive, powered by a Molex). About halfway through the copy, everything just dies... I get an `unable to handle kernel paging request` error, and eventually a kernel panic. I couldn't find anything about this error and how it specifically relates to Xbox modding, but what information I could find suggested that I might have a bad stick of RAM. I've not been able to test this yet, but I'm going to run MEMTEST as soon as I get home. I don't have the setup with me - I'm at work, and it's at home - but if anybody's interested in lending a hand, I'll take pictures tonight and post them up. The only reason that I'm asking here is because I'm still a fairly new *nix convert, and I'm not quite sure how it all works. I'm assuming that `unable to handle kernel paging request` is a fairly standard error message, too... correct me if I'm wrong.


title: tcpdump command works only on local ip

text: I am trying to capture some IP packets in my personal LAN with tcpdump, through the command               tcpdump -A -i eth0 'tcp and (((ip[2:2] - ((ip[0]&0xf)<<2)) - ((tcp[12]&0xf0)>>2)) != 0) and host 192.168.1.x'      where 192.168.1.x is the target host in the network. But it works only if the target host is my ip, that is the IP of the machine where tcpdump runs. With any other IP in the network it doesn't record anything. I have an unmanaged switch. The simpler command               tcpdump -A 'host 192.168.1.x'      detects only some igmp packets periodically sent to a broadcasting address, 224.0.0.251, from the host 192.168.1.x. But how could the IP capture be performed? Thank you anyway!


title: Remove by date in Shell Script

text: I have a shell script that creates a backup of a database. I would like to keep the last 7 days for files. What is the syntax I need to remove files in a directory by date or can I keep the newest 7 files in a directory? Script runs via cron EDIT: something like this?               find -type f -mtime +7 -maxdepth 1 -exec rm -f {} \;


title: How to install Kali Linux without CD and flash drive?

text: I have download Kali Linux. But the size is too large for my flash drive, my flash drive is 1.8gb and the Kali Linux iso is 2.3gb. I use an Asus eeepc 1215p which has no CD/DVD drive. My machine was installed with Ubuntu 12.04, and I've an empty partition. I want to install Kali Linux onto that partition, but I don't understand how? Can anyone here tell me how to install Kali Linux without a CD/DVD drive and flash drive ? I heard about poor man, I was searching for it, but I only found a lot for PCLinux OS.


title: How to tell yum that a package is installed when it thinks it isn't?

text: I accidentally deleted all my RPM data (I removed `/var/lib/rpm/*` instead of `/var/lib/rpm/__*`), and then ran `rpm --rebuilddb`. Now when I try to run `yum update` I get:               Could not parse metalink https://mirrors.fedoraproject.org     /metalink?repo=fedora-$releasever&arch=i386 error was     No repomd file     Error: File /var/cache/yum/i386/$releasever/fedora/metalink.xml does      not exist      I found that I don't even have the `/var/cache/yum/i386` folder anymore after the previous operation. I downloaded the fedora-release RPM of Fedora 18 and locally installed and rebuilt my yum cache (is that what i did?):               rpm -Uvh --replacefiles --replacepkgs /$MYPATH_TO_Fedorareles/fedorarelease-18-0.8.noarch.rpm      This made a new rpmdb where only one package is installed: `fedora-release`. Since yum thinks that's the only package installed, if I try to install anything it resolves the dependencies and queues lots of packages for install that I actually already have installed. How do I make yum aware of all the packages that are already installed? I don't want to reinstall anything, and I don't want to download 500MB of RPMs.


title: Yum user temp files (/var/tmp/yum*) fills up with repo data

text: On my rhel6 system, non-sudo users can do yum check-update. Files are then placed in `/var/tmp/yum[user]*/` . The repodata there gets quite large. Can I:   1. Configure the location?   2. Configure yum so it removes old files? My /var/tmp/yum-nrpe*/x86_64/6Server looks contains the following: > >     28M > el-6-epel/5f32b55aa431745fe8b48deb2e0083a6507d19abbc29562a2e2b01b70ef93ada- > primary.sqlite >     29M > el-6-epel/89f1177c1b9f003409e2f5a91f7f3074a4b8e162376ffab286a35b8221e0a308-primary.sqlite >     29M > el-6-epel/b98f6809469e5de3a13a5b251c5d35c622baecb9f3c593804245c443ace9a224-primary.sqlite >     29M > el-6-epel/c79dd64a4e4aa8fb160353e9cd9d8e10120f5402a18aca730ae860d07f52bda3-primary.sqlite >     29M > el-6-epel/e4b306d444fcfb361f7f2aace64a3ef67c8bd7fd1cbd251e64f150096f2f1ba9-primary.sqlite >     1.2M    el-6-comp- > extra/6c04e2f2f68bc085d529d857dd6c0539ff23d5139d2be21565dac3d8e586bae0-primary.sqlite >     15M     rhel-6-server-optional- > rpms/2469dd815fb83f3667f043cf3098a487a13ac6955ea36b2349bdc3a2ee1e20d2-primary.sqlite >     15M     rhel-6-server-optional- > rpms/bf8ce73943e4c78fc4205924fbfaf20ec4bcb72757f03366ec1245ffe2e0803e-primary.sqlite >     15M     rhel-6-server-optional- > rpms/e4f6cad281229297c712f8dd828c2062f8fbc02c6be215ea0df35059e98b4a5d-primary.sqlite >     124M    rhel-6-server- > rpms/5a411e3bf6a743656636e6baaec1680eec3480cf69acb79aad11c535862f2787-primary.sqlite >     124M    rhel-6-server- > rpms/60daa8229ca2386d6c7f319ce1fd819a46109e0b7a42c90e48acde23c3b200f6-primary.sqlite >     124M    rhel-6-server- > rpms/8592d0cd0b2e358c7850dee130497cb8969a72b9ac28cddc13a054caccee6d65-primary.sqlite >     124M    rhel-6-server- > rpms/f5798fe075da31815c5e43356a10c208af55a972b61fea37d63ea6edb3a78cae- > primary.sqlite >


title: How is the loopback device traffic allowed?

text: How can I allow the traffic to be sent on the loopback device (lo)? What is the iptables command for it?


title: How do I connect and send data to a bluetooth serial port on Linux?

text: I'm trying to setup a virtual serial port though a USB-Bluetooth adapter on Linux and send a message to it through an Android device. I'm on kernel 3.6. I'm able to pair to the device successfully using gnome-bluetooth and also able to send files to it. To set up the serial port I first add a channel with an SP profile to my adapter:               sdptool add --channel=22 SP      Then I call 'listen' with rfcomm:               rfcomm listen /dev/rfcomm0 22      which blocks on               Waiting for connection on channel 22      Apparently rfcomm will create /dev/rfcomm0 upon a successful connection. Once that happens, I'd like to use something like cutecom to send messages back and forth to the connected device. On my Android device I open up a Bluetooth SPP terminal (there are several out there, I tried a few different ones) and try to connect. They all fail. Given that I can pair successfully and send files without any issues, I know that bluetooth pairing and communication works. I'm not too sure what else I can try. I used 'sdptool browse' on my local device and the Android device to ensure that there aren't any RFCOMM channel conflicts.


title: While Linux is rebooting which directory is used to search for the executable system binaries?

text: While Linux is rebooting which `sbin` directory is used to execute the system binaries. As per my knowledge it used to load the binaries in the directory `sbin` directory . But in my system I find so many `sbin` diretories , like `/sbin` , `/usr/sbin` , `/var/usr/sbin`. Which file takes precedence?


title: Search for specified keywords in files and copy to a new filename based on the keyword

text: I'm trying to create an .sh script where if any keyword is found in a file then copy that file to the directory `/pathtofolder/keywords/$thefirstkeywordfound` (overwrite the file if it already exists). Any help would be appreciated with the copy code ( `cp -rf filename /pathtofolder/keywords/$thefirstkeywordfound` ) which is incorrect. It probably also needs a line of code to exclude the path it copies to (/pathtofolder/keywords/) Note that I want to copy the file into a directory called `/pathtofolder/keywords/$keyword`, creating it if necessary.


title: Why does't stopping the nginx server kill the processes associated with it?

text: When I stop nginx like this on ubuntu 12.04, I get the following errors:               $ sudo service nginx stop     Stopping nginx: nginx.     $sudo service nginx start     Starting nginx: nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)      I have to use this to fix it. Why does't stopping the service kill the nginx process? That is confusing!


title: Wireless constantly reconnecting on Ideapad running Arch

text: I just bought a new laptop, a Lenovo IdeaPad U330 touch, and after some struggle (with the Secure Boot stupidity) I have managed to install Arch Linux. I have configured my system, installed all the drivers (I think), but I have a problem with my wireless disconnecting from the network. I have noticed that my `dmesg` is being spammed with the               ideapad_laptop: Unknown event: 1      Also, somewhere in the flood of all those messages, there appears               mce: [Hardware Error]: Machine check events logged      but searching for the latter, there was a known bug and it's supposed to be fixed in the 3.14 version of the kernel. I don't know if those messages are related to my wireless issues but I thought they might be relevant. I'm pasting the last few lines of dmesg with wireless reconnecting, hope it helps someone explain to me what's happening:               [ 2513.577794] ideapad_laptop: Unknown event: 1     [ 2534.762183] ideapad_laptop: Unknown event: 1     [ 2555.958244] ideapad_laptop: Unknown event: 1     [ 2577.159613] ideapad_laptop: Unknown event: 1     [ 2580.083918] cfg80211: Calling CRDA to update world regulatory domain     [ 2580.918208] wlp2s0: authenticate with 10:fe:ed:65:58:c0     [ 2580.920015] wlp2s0: send auth to 10:fe:ed:65:58:c0 (try 1/3)     [ 2580.924404] wlp2s0: authenticated     [ 2580.931245] wlp2s0: associate with 10:fe:ed:65:58:c0 (try 1/3)     [ 2580.957371] wlp2s0: RX AssocResp from 10:fe:ed:65:58:c0 (capab=0x431 status=0 aid=10)     [ 2580.968632] wlp2s0: associated     [ 2598.361115] ideapad_laptop: Unknown event: 1     [ 2619.550989] ideapad_laptop: Unknown event: 1     [ 2621.534185] cfg80211: Calling CRDA to update world regulatory domain     [ 2622.369409] wlp2s0: authenticate with 10:fe:ed:65:58:c0     [ 2622.371192] wlp2s0: send auth to 10:fe:ed:65:58:c0 (try 1/3)     [ 2622.375724] wlp2s0: authenticated     [ 2622.378073] wlp2s0: associate with 10:fe:ed:65:58:c0 (try 1/3)     [ 2622.426904] wlp2s0: RX AssocResp from 10:fe:ed:65:58:c0 (capab=0x431 status=0 aid=10)     [ 2622.428139] wlp2s0: associated     [ 2624.830025] cfg80211: Calling CRDA to update world regulatory domain     [ 2625.652178] wlp2s0: authenticate with 10:fe:ed:65:58:c0     [ 2625.653835] wlp2s0: send auth to 10:fe:ed:65:58:c0 (try 1/3)     [ 2625.679633] wlp2s0: authenticated     [ 2625.680707] wlp2s0: associate with 10:fe:ed:65:58:c0 (try 1/3)     [ 2625.800834] wlp2s0: associate with 10:fe:ed:65:58:c0 (try 2/3)     [ 2625.858120] wlp2s0: RX AssocResp from 10:fe:ed:65:58:c0 (capab=0x431 status=0 aid=10)     [ 2625.874661] wlp2s0: associated     [ 2640.757569] ideapad_laptop: Unknown event: 1     [ 2661.948093] ideapad_laptop: Unknown event: 1     [ 2683.154343] ideapad_laptop: Unknown event: 1     [ 2704.340696] ideapad_laptop: Unknown event: 1      Here is also the output of `iwconfig`:               wlp2s0    IEEE 802.11bgn  ESSID:"Krizred2"             Mode:Managed  Frequency:2.427 GHz  Access Point: 10:FE:ED:65:58:C0              Bit Rate=90 Mb/s   Tx-Power=16 dBm              Retry  long limit:7   RTS thr:off   Fragment thr:off           Power Management:on           Link Quality=54/70  Signal level=-56 dBm             Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0           Tx excessive retries:380  Invalid misc:627   Missed beacon:0          lo        no wireless extensions.      and `lspci | grep Net`:               02:00.0 Network controller: Intel Corporation Wireless 7260 (rev 73)      Kernel: Linux 3.13.6-1-ARCH **EDIT** If anyone still cares about this... I didn't had much time to deal with my problem, and some things I tried didn't work either. But just now I noticed this, while trying to update my system, just in case, since I don't have much to lose. I tried to update my system with providing network connection with USB tethering over my mobile phone. There I noticed that my phone gets disconnecting in a similar way than my wifi! Even with USB tethering turned off. I also tried with an USB flash key, but that seems to be working...I think I now have a prety good reason to completely freak out :P


title: How does Menumaker select categories?

text: I am using Gentoo with Openbox and would like to switch which categories the mmaker (Menumaker) program puts programs into for my menu. But I am unsure of how/where Menumaker pulls this data from, and my Google skills seem to be failing me on this one.


title: How can I disable IPv6 in custom built embedded setup

text: I have an embedded system built using buildroot. I have had a number of network issues, one of which is that my machine cannot see its gateway despite it being on the same subnet. I have tried using wireshark to analyse what is going on without success so as a last resort, I am considering trying to turn off support for IPv6 as I do not need it (my device doesn't need DNS or anything similar, simply needs to be able to communicate with other local machines on its subnet). I have read that I can turn off IPv6 by editing `/etc/modprobe.conf` but this file does not exist on my setup. Is there anything else I can do to disable IPv6 or is the only option to build the kernel from scratch without IPv6 support?


title: Network Manager doesn't show Wireless connection

text: I've just installed on my Debian Sid with XFCE4 network manager, but I have a problem, no wireless connection are shown. What Should I do? I used to use wicd but I had problems to connect to free wifi :S I don' t know why. However now I'm connected from terminal, but I don't know why connections aren't shown in network manager.. Sameone can help me? Thank you. **EDIT:** Now is showing but network manager gives me this error: ![enter image description here](http://i.stack.imgur.com/HnYJl.jpg) **EDIT2:** My `/etc/network/interfaces`               auto lo     iface lo inet loopback


title: Color coding html color sequeces in vim

text: It it possible to setup syntax highlighting in vim so that a html color sequence is colored in that color, e.g. #FF0000 would show up as red. I'd also be ok with it underlining the text that color like Visual Studio does. So basically I'd be looking for the pattern `\\#([0-9a-fA-F]{3}){1,2}` and then want to get the color for that and make that text that color.


title: How do I get the solarized colour scheme working with gnome-terminal, tmux and vim?

text: There's a lot of questions around this, but it's because there are so many variables. I had to piece together instructions from many sites before I got this working. First, I could not easily set up the 16 solarized colour definitions in gnome- terminal (I did it by hand/clicking only to realise that I'd not got the order/mapping correct). Once I fixed that I moved on... Then I had solarized colours working in vim OK-ish, but there was some odd black backgrounds appearing in certain highlighting. Once I fixed that, I moved on... Then I realised vim went v. wonky once running inside tmux. This is massively debated, but very few of the answers (which mostly say about setting `TERM` to `xterm-256colors`) worked for me. I eventually fixed that too. Solarized is a very nice palette (although I darkened the darkest base colour and lightened the lightest as I prefer the higher contrast and found tmux's 'white' far far too yellow on my calibrated screen - prob fine on a typical uncalibrated laptop screen as they're usually way too blue!), so I'm posting this question with its answer to share the results of my learning.


title: exclude particular file from bash_completion

text: I have a simple `bash_completion` code. The only thing it does, is when I type `grcat` and then `Tab`, it offers to complete filenames from `/etc/grcat`.               _grcat() {         local word         COMPREPLY=()         if [ 1 -eq "$COMP_CWORD" ]; then           pushd /etc/grcat &>/dev/null || return 1           word="${COMP_WORDS[COMP_CWORD]}"           COMPREPLY=($(compgen -f "$word"))           popd &>/dev/null         fi     }      complete -F _grcat grcat      I need to modify it so that it lists all files from `/etc/grcat`, except `/etc/grcat/README`. How can I make `bash_completion` ignore one particular file ?


title: How to estimate loops/time for completion of GNU ddrescue (1.18.1) using current status?

text: ## Background/Context: I am currently running GNU ddrescue 1.18.1 to recover data from a USB that experienced a cable disconnect while I was writing a virtual disk image onto the disk2s1 partition. Initially I am recovering my second partition (disk2s2) and notice that I have reached the third phase (Splitting). I am placing the image onto a network storage. **Question:** I have noticed that this phase loops. Is there a way to calculate the number of loops I am likely to experience, given my current status information (I am only showing two errors)? **Status:** ![status](http://i.stack.imgur.com/bFdJg.png) **Update/Edit:** So I am still very much interested in how one might estimate the loops/time for completion using the ddrescue tool. Per the comments, I am adding an evaluation of a log file for my disk2s1 partition as that is currently running (the disk2s2 has completed after 14.5 hours, with one user interruption for about 6 hours). ![part1-log](http://i.stack.imgur.com/F7zNu.png) **Completed Partition Log** For the partition which just completed, here is the result of the log inspection. ![photo-log](http://i.stack.imgur.com/2jYiB.png) **Reference (ddrescue algorithm notes):** 4 Algorithm * * * GNU ddrescue is not a derivative of dd, nor is related to dd in any way except in that both can be used for copying data from one device to another. The key difference is that ddrescue uses a sophisticated algorithm to copy data from failing drives causing them as little additional damage as possible. Ddrescue manages efficiently the status of the rescue in progress and tries to rescue the good parts first, scheduling reads inside bad (or slow) areas for later. This maximizes the amount of data that can be finally recovered from a failing drive. The standard dd utility can be used to save data from a failing drive, but it reads the data sequentially, which may wear out the drive without rescuing anything if the errors are at the beginning of the drive. Other programs read the data sequentially but switch to small size reads when they find errors. This is a bad idea because it means spending more time at error areas, damaging the surface, the heads and the drive mechanics, instead of getting out of them as fast as possible. This behavior reduces the chances of rescuing the remaining good data. The algorithm of ddrescue is as follows (the user may interrupt the process at any point, but be aware that a bad drive can block ddrescue for a long time until the kernel gives up): 1) Optionally read a logfile describing the status of a multi-part or previously interrupted rescue. If no logfile is specified or is empty or does not exist, mark all the rescue domain as non-tried. 2) (First phase; Copying) Read the non-tried parts of the input file, marking the failed blocks as non-trimmed and skipping beyond them. Skip also beyond slow areas. The skipped areas are tried later in two additional passes (before trimming), reversing the direction after each pass until all the rescue domain is tried. The third pass is a sweeping pass, with skipping disabled. (The purpose is to delimit large errors fast, keep the logfile small, and produce good starting points for trimming). Only non-tried areas are read in large blocks. Trimming, splitting and retrying are done sector by sector. Each sector is tried at most two times; the first in this step (usually as part of a large block read, but sometimes as a single sector read), the second in one of the steps below as a single sector read. 3) (Second phase; Trimming) Read forwards one sector at a time from the leading edge of the smallest non-trimmed block, until a bad sector is found. Then read backwards one sector at a time from the trailing edge of the same block, until a bad sector is found. For each non-trimmed block, mark the bad sectors found as bad-sector and mark the rest of that block as non-split without trying to read it. Repeat until there are no more non-trimmed blocks. (Large non-trimmed blocks are produced by concatenation of smaller ones, and its fraction of good data at the edges is therefore smaller). 4) (Third phase; Splitting) Read forwards one sector at a time from the center of the largest non-split block, until a bad sector is found. Then, if the bad sector found is not the first one tried, read backwards one sector at a time from the center of the same block, until a bad sector is found. If the logfile is larger than '--logfile-size', read sequentially the largest non-split blocks until the number of entries in the logfile drops below '--logfile- size'. Repeat until all remaining non-split blocks have less than 7 sectors. Then read the remaining non-split blocks sequentially. 5) (Fourth phase; Retrying) Optionally try to read again the bad sectors until the specified number of retry passes is reached. Every bad sector is tried only once in each pass. Ddrescue can't know if a bad sector is unrecoverable or if it will be eventually read after some retries. 6) Optionally write a logfile for later use. The total error size ('errsize') is sum of the sizes of all the non-trimmed, non-split and bad-sector blocks. It increases during the copying phase and may decrease during trimming, splitting and retrying. Note that as ddrescue splits the failed blocks, making them smaller, the total error size may decrease while the number of errors increases. The logfile is periodically saved to disc, as well as when ddrescue finishes or is interrupted. So in case of a crash you can resume the rescue with little recopying. The interval between saves varies from 30 seconds to 5 minutes depending on logfile size (larger logfiles are saved at longer intervals). Also, the same logfile can be used for multiple commands that copy different areas of the input file, and for multiple recovery attempts over different subsets. See this example: Rescue the most important part of the disc first. ddrescue -i0 -s50MiB /dev/hdc hdimage logfile ddrescue -i0 -s1MiB -d -r3 /dev/hdc hdimage logfile Then rescue some key disc areas. ddrescue -i30GiB -s10GiB /dev/hdc hdimage logfile ddrescue -i230GiB -s5GiB /dev/hdc hdimage logfile Now rescue the rest (does not recopy what is already done). ddrescue /dev/hdc hdimage logfile ddrescue -d -r3 /dev/hdc hdimage logfile


title: What is the different bash per terminal session for Konsole?

text: I am using `Konsole` in Kubuntu.   I was wondering what is the difference between a profile in Konsole and the profiles in our bash?   I am reading that we can create different profiles per Konsole session and use different bash per session.   What is meant by using different bash per session here?   I thought that the default bash is the one defined in the `/etc/passwd` for a user


title: I can't login to the graphical interface after a fresh installation of Debian?

text: I installed Debian 7.3 along with Windows 7, on my Acer Travelmate 2480 (1.73-GHz Intel Celeron M, 80GB HDD, 1GB RAM, Mobile Intel 945GM/GU Express graphics). I downloaded Debian CD-1 and checked its MD5 hash,then I created a bootable USB using Unetbootin. When I chose to boot Debian the execution was stopping at a line that says `pcspkr already registered ... aborting`, and then I get a black screen and I can only reboot with `Alt`+`Ctrl`+`Del`. I searched about this issue, and found a solution to add `nomodeset` at the end of line that starts with `linux` when I edit the boot commands in Grub using `e`, this time it worked but Debian was booting only in text mode. I'm aware that the issue is related to the graphics driver, but I'm new to Linux, so how can I use the text mode to fix this issue? Or is there any other solution?


title: How to do an IF statement from the result of a executed command

text: I am trying to do an IF statement from the output of an executed commmand. Here is how I am trying to do it, but it doesn't work. Does anyone know the right way to do this?               if [ "`netstat -lnp | grep ':8080'`" == *java* ]; then       echo "Found a Tomcat!"     fi


title: CPU locked at lowest frequency, cpufreqd says it won't manage it?

text: I have a Dell Latitude D600 running CrunchBang Statler (Debian Squeeze-based) with a 1.4GHz Pentium M. I noticed in Conky that my CPU freq is stuck at 600MHz, even when doing CPU-intensive things like Flash video. So I installed cpufreqd, ran cpufreq-info, and it returned this:               cpufrequtils 007: cpufreq-info (C) Dominik Brodowski 2004-2009     Report errors and bugs to cpufreq@vger.kernel.org, please.     analyzing CPU 0:       driver: acpi-cpufreq       CPUs which run at the same hardware frequency: 0       CPUs which need to have their frequency coordinated by software: 0       maximum transition latency: 10.0 us.       hardware limits: 600 MHz - 1.40 GHz       available frequency steps: 1.40 GHz, 1.20 GHz, 1000 MHz, 800 MHz, 600 MHz       available cpufreq governors: powersave, userspace, conservative, ondemand, performance       current policy: frequency should be within 600 MHz and 600 MHz.                       The governor "ondemand" may decide which speed to use                       within this range.       current CPU frequency is 600 MHz.       cpufreq stats: 1.40 GHz:0.00%, 1.20 GHz:0.00%, 1000 MHz:0.00%, 800 MHz:0.00%, 600 MHz:100.00%      Notice the part about "CPUs which need to have their frequency coordinated". It seems CPUFreqD is unable to manage my processor frequency, and it also says that it's being kept at a range of 600MHz to 600MHz. I have SpeedStep on, and supposedly 2.6 has full support for that (I have 2.6.39 backported from Wheezy), but I never notice SpeedStep doing anything. If I disable it, the BIOS says I'll be stuck at 600MHz. Power is no issue, as the laptop has no battery; it relies solely on its power cord. How can I enable the full frequency of my processor? Is Linux lying to me about the frequency? I'm decently experienced with Linux, so I'm not afraid to try complex fixes.


title: Unable to access internet if wireless enabled

text: The following is my route output. `eth0` is my wired network and `eth1` is my wireless network. Only wired one has access to internet. If I enable wireless, I am not able to access internet, it tries to access via `eth1` and I get 404 page of the wireless router. Why does `eth1` have higher preference though default is `eth0` (link)?               [balakrishnan@mylap ~]$ route     Kernel IP routing table     Destination     Gateway         Genmask         Flags Metric Ref    Use Iface     default         10.26.0.1       0.0.0.0         UG    0      0        0 eth0     10.26.0.0       *               255.255.192.0   U     1      0        0 eth0     link-local      *               255.255.0.0     U     1000   0        0 eth0     192.168.1.0     *               255.255.255.0   U     9      0        0 eth1               [balakrishnan@mylap ~]$ tracepath -n 8.8.8.8      1:  10.26.21.101                                          0.098ms pmtu 1500      1:  10.26.0.1                                            35.519ms       1:  10.26.0.1                                            29.763ms       2:  113.193.0.209                                        29.718ms       3:  no reply      4:  no reply      5:  no reply      **Edit:** I noticed that some times (rarely) I am able to connect. It looks like it randomly tries on both interfaces. Is there a way to set to use only eth0 ?


title: Is it possible to create a file with the privileges of other users?

text: I am a user of the root account on the server named A. And I also own the accounts of user1 and user2. When I create a file or directory in the account of user1, I want the owner of the file to be user2. Setting the group is possible by using the setuid (http://stackoverflow.com/questions/580584/setting-default-permissions-for- newly-created-files-and-sub-directories-under-a) For the user account, is there any way? Example. Make file - traditional way:               [user1@srv1 tmp]$ id     uid=4001(user1) gid=4001(user1) groups=4001(user1)          [user1@srv1 tmp]$ touch test_user1          [user1@srv1 tmp]$ ls -al test_user1     -rw-rw-r-- 1 user1 user1 0 2014-01-09 15:24 test_user1      Example. Make file - what I want:               [user1@srv1 tmp]$ id     uid=4001(user1) gid=4001(user1) groups=4001(user1)          [user1@srv1 tmp]$ touch test_user1          [user1@srv1 tmp]$ ls -al test_user1     -rw-rw-r-- 1 user2 user1 0 2014-01-09 15:24 test_user1      I **do not** wish to have to change the permissions of the file using the `chown` command.


title: colorize bash_completion

text: When I type `grep` and then press `TAB` twice, `bash_completion` will list files and directories in current directory. It will also complete filenames when I type initial letter. That is all very nice, the only problem is that when the directory contains many files and subdirectories, it can be quite chaotic and disorganized. It would help very much if `bash_completion` could at least color directories differently, similarly to what `ls -lA` does. Is this possible? ## EDIT: this is what my sample `bash_completion` config file looks like:               if [[ ${cur} == -* ]] ; then         COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )         return 0          else         _filedir     fi


title: What is PATH on a Mac OS?

text: What is the `PATH` in a Mac OS? I have used it to install global command-line tools, but the only documentation I have found are tutorials for doing just that, with no real explanation of what is happening under the hood. I also haven't found a relevant page on Wikipedia. So what is the purpose of `PATH` and what is the difference between `/etc/paths` and `~/.bash_profile`**? For example, in my `paths` file, I see this:               /usr/bin     /bin     /usr/sbin     /sbin     /usr/local/bin      But in my `~/.bash_profile`, I see this:               # Setting PATH for Python 2.7     # The orginal version is saved in .bash_profile.pysave     PATH="/Library/Frameworks/Python.framework/Versions/2.7/bin:${PATH}"     export PATH      Is this just a user-specific addition to the `paths` file? What's all that stuff in `paths`, like `/usr/bin`?


title: Rmmod module reappeared after plugging back device

text: I have an arduino that talks to my computer through the serial-usb driver ftdi. I want to use my own module instead when I plug my arduino. I did :   * `sudo rmmod usbserial`   * `sudo rmmod ftdi_sio`   * I wrote a driver that does nothing but logs "init/probe/exit"   * `lsmod` shows my driver and doesnt show usbserial/ftdi_sio   * `sudo depmod -a`   * I plug my arduino   * `lsmod` shows usbserial/ftdi_sio And instead of seeing my logs in dmesg I see that usbserial and ftdi_sio were instanciated. What should I do do override that ? P.S code :               static struct usb_device_id id_table [] = {        { USB_DEVICE(VENDOR_ID, PRODUCT_ID) },       { },     };     MODULE_DEVICE_TABLE (usb, id_table);     ...     static struct usb_driver arduino_driver = {        .name =   "thomasftdi",       .probe =  arduino_probe,       .disconnect = arduino_disconnect,       .id_table = id_table,     };     init...probe...      I didn't use modalias in the code nor in commands, should I add it somewhere to register the module ?


title: zsh completion installations (autojump) - How to use them?

text: I just installed `autojump` and have `oh-my-zsh` installed in my system. I have included the log of the installation at the bottom of this post. Note that at the end it says:               zsh completion has been installed to:     /usr/local/share/zsh/site-functions      What am I supposed to do with this information? How do I notify Zsh of this `zsh completion`? Also, whenever I now login with my Zsh shell, I get:               /usr/local/Cellar/autojump/21.6.9/etc/autojump.bash:13: command not found: complete     /usr/local/Cellar/autojump/21.6.9/etc/autojump.bash:52: = not found      Why? How can I fix this?               $ brew install autojump     ==> Downloading https://github.com/joelthelion/autojump/archive/release-v21.6.9.tar.gz     ############################################################################################################################ 100.0%     ==> Caveats     Add the following line to your ~/.bash_profile or ~/.zshrc file (and remember     to source the file to update your current session):       [[ -s `brew --prefix`/etc/autojump.sh ]] && . `brew --prefix`/etc/autojump.sh          zsh completion has been installed to:       /usr/local/share/zsh/site-functions


title: What does a "< <(...)" redirection mean?

text: I've seen that rvm (ruby version manager) is installed using the following command:               bash < <(curl -s https://raw.github.com/wayneeseguin/rvm/master/binscripts/rvm-installer )      So as I understand we get the script content and pass it to the bash (I believe `< <` and `<<` is the same thing?) I am interested in the `< <` part, found following description on the net: > `<<` token Means use the current input stream as STDIN for the program until > token is seen. This is somehow not clear for me, can someone make an example or explain it in more simple way?


title: Is there a yum or apt-get like system on Solaris?

text: I am aware of the use of `pkg` to install an individual package file, but it does not include a repository infrastructure like other Linux distributions. Is there any solution that behaves like `yum` or `apt on the Solaris 11 Express platform?


title: How can I list the second to last word found in a sequence of statements in awk

text: My file is written like:               apples,oranges,berries,cherries          beer,wine,shots          chocolate,icecream,cake,muffins          cherries,guacamole,lychee      I need to output the second to last word in lines that contain the word cherries using awk:                   I want it to print:      food: berries, guacamole cherries appeared: 0/2 times I currently have:               /cherries/          BEGIN {print "food:";}          {for (NR in a) {          FS=",";          printf($(NF-1));j++;          if((NF-1)=="cherries"){$i++;}          }          }     END {print "cherries appeared" i/j "times"}      What happens is it just prints every line that has cherries in it (the entire line) and $i$ comes out with a value of 0, so here it would print: food: apples,oranges,berries,cherriescherries,guacamole,lychee cherries appeared: nantimes


title: Disabling X server on Fedora 17

text: How can I prevent the X server from starting up on Fedora 17? In older versions the user should edit `/etc/inittab` but in this version (I didn't check this on previous versions) Fedora uses some other mechanisms to do that.


title: Validate Unix Timestamp using BASH

text: My google-fu has failed me so I'm hoping someone here can point me in the right direction. I'm in the middle of doing some data validation efforts and I suspect the system is recording some invalid dates in the unix epoch format (seconds since the epoch). Is there an easy way in bash, given data that looks like `1357853083` (seconds since the unix epoch) to ascertain if it's a valid unix timestamp or not? Ideally I'm looking for timestamps that cannot be converted to a human readable date as well as timestamps that might render to a future date that's greater than the current date. I've compiled this monstrosity which converts things into a human readable date, but I can't figure out how to make it find invalid dates.               $ grep "delimiter" * | grep -v "delimiter2" | awk -F"," '{print $2}' | awk -F":" '{print $2}' | awk -F"*" '{print $1}' | awk '{printf("%s", strftime("%Y.%m.%d ",$1)); printf("%s", strftime("%H:%M:%S \n",$1))}' | sort -V


title: Changing the default shell without chsh or administrator priviledges

text: I saw the following snippet in this thread: How to change from csh to bash as default shell               sleep 2     if (-x /usr/local/bin/bash) then       exec /bin/sh -c '. ~/.profile; exec /usr/local/bin/bash'     endif      My understanding is that if you place this snippet in `~/.login` it will invoke `bash` when you login. I have a similar situation where I would like to use a similar snippet to invoke a version of `zsh` that is different from the default one with which I log in. Part of the reason why I am going through this trouble is because I can't choose my desired version of `zsh` in the options allowed in `chsh`, and I don't have administrator privileges. With this:   * How would I change the snippet above to do this when switching between different versions of zsh?    * Why are two `exec` commands needed in the snippet above? What do they do? Also, why does the snippet above use `sh` **and** `bash` (the user is supposed to login with `csh`)


title: FPATH in zsh: functions and site-functions

text: I noticed I have the following line near the beginning of my `.zshrc` file:               export FPATH=/usr/share/zsh/site-functions:/usr/share/zsh/4.2.6/functions:$FPATH        I can't remember if I typed this myself or if this line was automatically generated by `zsh-newuser-install`. Is it assumed that the user types those paths in `FPATH` in a startup file? What's the difference between `functions` and `site-functions`?


title: Font list not refreshing in apps in debian

text: I copied a bunch of .ttf and otf fonts into ~/.fonts, made sure permissions where set to my user/group and ran `fc-cache ~/.fonts`. Opened up GIMP and Geany but the fonts aren't available. Any idea what's up?


title: How to get the name of the last mounted/unmounted filesystem

text: I'm know I can monitor (using poll, or select) on the files `/proc/mount` or `/etc/mtab` and findout **WHEN** a filesystem is mounted or unmounted. Also I can use getmntent for getting a list of mounted filesystems. My app is intended to monitor the mounted filesystem and report any change (mount or unmount). My solution:   1. Detect some change in `/proc/mounts`.   2. Get all currently mounted filesystem with `getmntent`.   3. Compare the obtained list with some previous list.   4. Process the difference. But I need to know if there are some way to get the last filesystem mounted when polling from `/proc/mounts` or `/etc/mtab`. Just reading the file or polling data into some structure (like `mntent` for instance.)


title: cd to a name-unknown directory in a known path

text: I am trying to automate the deployment of a webapp under development that is frequently updated. The webapp comes in the form of a zip file with unknown name, and this directory structure:               unknown_name.zip       └── unknown_folder_name          └──all_the_application_files      I need a bash script to:   * remove all the contents of /var/www/ [done]   * uncompress the unknown_name.zip archive, in a given tmp path [done]   * cd inside that known tmp path [done]   * cd inside the unknown_folder_name extracted from the unknown_name.zip   * move all_the_application_files to /var/www [easy if we solve previous bullet] * * * Important: inside the tmp directory there will be only one directory, the one I want to go inside. My current bash script:               rm -r /var/www/*     unzip ./\*.zip \* -d /home/lese/tmp-deploy     cd /home/lese/tmp-deploy     # HERE I WOULD cd unknown_folder_name     mv * /var/www/


title: tar: /dev/nst0: Cannot write: Input/output error when taking backup

text: When I try to take backup of data more than 1MB in a tape (LTO3) using tar command it showing me the following error.               xyz@localhost# tar -cvf /dev/nst0 file1.tar     file1.tar     tar: /dev/nst0: Cannot write: Input/output error     tar: Error is not recoverable: exiting now      Output of `mt -f /dev/st0 status`:               SCSI 2 tape drive:     File number=0, block number=0, partition=0.     Tape block size 0 bytes. Density code 0x44 (LTO-3).     Soft error count since last status=0     General status bits on (41010000):     BOT ONLINE IM_REP_EN      Output of `dmesg`:               st0: Sense Key : Aborted Command [current]     st0: Add. Sense: Information unit iuCRC error detected      and               st0: <<vendor>> ASC=0xff ASCQ=0xffASC=0xff <<vendor>> ASCQ=0xff     Errata on LSI53C1030 occurredsc->req_bufflen=0x2800, xfer_cnt=0x00,difftransfer= 0x1400     st0: Sense Key : Medium Error [current]     Info fld=0x1400      Output of `cat /proc/scsi/scsi`:               Attached devices:     Host: scsi1 Channel: 00 Id: 00 Lun: 00     Vendor: NECVMWar Model: VMware IDE CDR10 Rev: 1.00     Type: CD-ROM ANSI SCSI revision: 05     Host: scsi2 Channel: 00 Id: 00 Lun: 00     Vendor: VMware Model: Virtual disk Rev: 1.0     Type: Direct-Access ANSI SCSI revision: 02     Host: scsi2 Channel: 00 Id: 01 Lun: 00     Vendor: HP Model: Ultrium 3-SCSI Rev: G54W     Type: Sequential-Access ANSI SCSI revision: 03     Host: scsi2 Channel: 00 Id: 02 Lun: 00     Vendor: HP Model: 1x8 autoloader Rev: 1.50     Type: Medium Changer ANSI SCSI revision: 03


title: How to add Ip Aliases with Two Gateway on same nic Centos

text: I have 2 allocated address range, example   1. 10.10.12.25/28   2. 10.12.12.24/28 How to add Ip Aliases with Two Gateway on same nic with Centos?


title: vpnc not work on linux backup machine

text: I have a very strange problem with the VPNC ( vpnc cisco client , open source vpn for cisco ) I installed the VPNC on my linux machine **linux_box1** ( red-hat version 6.3 ) this machine is VM ware machine VPNC work well on **linux_box1** We decided to clone the machine linux_box1 and to make from this machine backup – **linux_box2** After we clone the primary machine and create backup machine – **linux_box2** We start up the Linux machine –linux_box2 ( we af coerce change the IP address to avoid duplicate IP ) And try to activate the vpnc on **linux_box2** But vpnc not work properly on **linux_box2** ( in spite linux_box1 and linux_box2 are the same machine exactly ) The problem is when I type vpnc , then I need to answer on the password question No matter what I write in the password , vpnc not read correctly the password proof for that is when I give wrong password , then vpnc not ask me about other password On the primary machine is different When I activate the vpnc and answer wrong password , then vpnc ask me again about other password I really not understand wha happened here Maybe vpnc recognize this backup machine and make problems ? or something else Please advice what could be the problem Why after we clone the Linux machine , vpnc reacted different on the backup machine ? VPNC link - http://www.vpnc.org/


title: user accessing and permission denied

text: I had a user john in fedora 19               usergroup marygroup     useradd -g marygroup mary     usermod -a -G marygroup john      In John terminal:               cd /home/mary      Permission denied               cd /home          ls -l     drwx------. 11 john john     drwx------. 11 mary marygroup     logged into as root     chmod 770 /home/mary     ls -l     drwx------. 11 john john     drwxrwx---. 11 mary marygroup      still cannot do cd Permission denied why?


title: Fedora 17 Grub not finding Windows 8

text: I had Windows 8 installed, shrunk it and installed Fedora 17 using the free space. It now only boots into Fedora. I have these two EFI partitions:               /dev/sda2       /EFI         /Boot/bootx64.efi         /toshiba/Boot           /bootmgfw.efi           /bootmgr.efi           ...         /Microsoft/Boot           /bootmgfw.efi           /bootmgr.efi           ...          /dev/sda6       /EFI/redhat         /device.map         /grub.conf -- this is the config file used         /grub.efi      I've tried all `.efi` files on `sda2`. When one of those options is selected the Grub menu redraws. Nothing happens and no errors are given. grub.conf:               ...     boot=/dev/sda6     ...     title win8       root (hd0,2)       chainloader /EFI/path to one of the .efi files      Using Grub 0.97-93.tc17 Oddly, if I enter the `grub` command-line and enter these two commands I boot up into windows with no problems:               root (hd0,2)     quit      If possible I'd like to have an entry I can just select instead.


title: How can I keep color codes with grep input?

text: It I grep something twice:               ... | grep foo | grep bar      It seems foo is not highlighted. Infact, it seems grep removes colorcodes from its input; Any way to prevent this?


title: Can I launch a process as root without launching root's login shell?

text: I tried to change the login shell. Here's what the first line of `/etc/passwd` looks like (on a Debian Wheezy install):               rootx:0:0:root:/root:/:zsh      When I try to login as `root`:               Cannot execute zsh: No such file or directory      I know `zsh` is available:               $ which zsh     /usr/bin/zsh      Okay, it seems logical to replace `zsh` by its full path. But how can I do it? I have one other user on the system (`user`), however it doesn't have root privileges and `sudo` is not installed on the system. Assume that for whatever reason (encryption, physical access, ...) I cannot boot on a live CD to modify the file. I do know, however, the credentials for the `root` account. My question is: Is there any way, even programatically, to launch a process with the `root` account without launching its login shell first?


title: Install new packages on old unmaintained computer

text: We have an ancien server (Fedora Core 4) installed in 2005. This server had never been updated. It runs a special software allowing to monitor a production line without being connected directly to the outside world. It is out of question to upgrade the system. Some utilities have bugs or missing options. Some other utilities are missing. I have to install some script on this server. The main problem is Bash is really too old and lacks some usefull stuff. I don't like the idea to hack those well tested scripts. Is there a way to run a newer Bash, and install new programs while letting the system untouched ? Maybe something like BusyBox does ? Or within a chroot ? The problem of a chroot is the difficulty to access the real system. For example my backup script won't work.


title: cp hidden files with glob patterns

text: Situation :               $ mkdir foo && touch foo/.test     $ cp foo/* .     zsh: no matches found: test/*     (or bash : cp: cannot stat ‘test/*’: No such file or directory)      I have a directory full of hidden folders and files. What is happening and what is the solution?