Search Results

Search found 1072 results on 43 pages for 'rubber boots'.

Page 29/43 | < Previous Page | 25 26 27 28 29 30 31 32 33 34 35 36  | Next Page >

  • Start daemon after specific samba share is mounted

    - by getack
    I have a homebrew headless NAS running 12.04. In it I have a bunch of disks that are presented as a samba share thanks to Greyhole. If I want to do anything to the files within this share, I must do it through greyhole so that everything is updated properly. Thus, the share must be mounted locally and then accessed from there if I want to work on the files from the local machine. I do this mounting automatically thanks to these instructions. I also have Deluge installed that takes care of all my torrenting needs. Deluge's default download location is in this share, so that all the downloads are immediately available to the rest of the network. Obviously for everything to work, the share must be mounted, otherwise Deluge is going to have a problem downloading to it. The problem is, it seems like Deluge is starting before the shares are mounted when the system boots. So downloading/seeding does not continue automatically after boot. I have to log in and force a manual rescan and start on each torrent otherwise all the torrents just hangs on the error. Is there a way I can make deluge start after the shares got properly mounted? I looked into Upstart's emits functionality but I cannot seem to get it to work properly. Any advice?

    Read the article

  • Auto-mount in fstab no longer working until manually running 'sudo mount -a'

    - by Brett Alton
    I have 3 SMB shared drives I need to connect to for work purposes. I had Ubuntu 10.10 Maverick and had all my drives loaded into fstab to be auto-mounted. Everything worked fine for a while but just before I upgraded to 11.04 Natty, the fstab auto-mount stopped working. Unfortunately I don't know what changed I made to my machine or what update installed that made this occur. /etc/fstab {snip} //192.168.7.3/apache_proj/ /home/brett/Desktop/apache smbfs guest,rw,iocharset=utf8,uid=1000,gid=1000 0 0 //192.168.7.3/apache_54321/ /home/brett/Desktop/54321 smbfs guest,rw,iocharset=utf8,uid=1000,gid=1000 0 0 //freenas.local/shared/ /home/brett/Desktop/shared smbfs guest,rw,iocharset=utf8,uid=1000,gid=1000 0 0 //lamp/www/ /home/brett/Desktop/lamp smbfs username={snip},password={snip},rw,iocharset=utf8,uid=1000,gid=1000 0 0 When the machine boots, I run this command to get them to mount: $ sudo umount /home/brett/Desktop/54321 /home/brett/Desktop/shared /home/brett/Desktop/apache; sudo mount -a [sudo] password for brett: umount: /home/brett/Desktop/54321: not mounted umount: /home/brett/Desktop/shared: not mounted umount: /home/brett/Desktop/apache: not mounted Warning: mapping 'guest' to 'guest,sec=none' Warning: mapping 'guest' to 'guest,sec=none' Warning: mapping 'guest' to 'guest,sec=none' mount error: could not resolve address for lamp: No address associated with hostname (I run that umount as a just-in-case). I looked through dmesg and some error logs and couldn't see why fstab was failing on my mounts. I see that my 'lamp' directive is failing, but that's because the machine is currently down.

    Read the article

  • Boot-repair commands not found in PATH or not executable

    - by Bram Meerten
    I recently had problems with my ubuntu partition (after the battery died), I managed to fix them by running ubuntu from usb and run gparted. It worked I can access my files on the partition by running ubuntu from usb. But when I restart the computer, after selecting ubuntu in Grub, I get a black screen with a white underscore. I googled the problem, and tried to solve it by setting nomodeset, but it didn't work. Next I wanted to try to fix Grub using boot-repair, I clicked on 'Recommended repair', it tells me to type the following commands in the terminal: sudo chroot "/mnt/boot-sav/sda5" apt-get install -fy sudo chroot "/mnt/boot-sav/sda5" dpkg --configure -a sudo chroot "/mnt/boot-sav/sda5" apt-get purge -y --force-yes grub-common But when running the second command, I get this error: dpkg: warning: 'sh' not found in PATH or not executable. dpkg: warning: 'rm' not found in PATH or not executable. dpkg: warning: 'tar' not found in PATH or not executable. dpkg: error: 3 expected programs not found in PATH or not executable. Note: root's PATH should usually contain /usr/local/sbin, /usr/sbin and /sbin. I didn't edit /etc/environment (or any other files), this is what it looks like: PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games" RUNNING_UNDER_GDM="yes" I have no idea how to fix this. I'm running dualboot Ubuntu 12.04 and Windows 7, Windows boots fine.

    Read the article

  • Remote reboot over ssh does not restart

    - by Finn Årup Nielsen
    I would like to remotely reboot my Ubuntu 12.04 LTS server via ssh. I do sudo reboot and I loose connection and the server connection does not reappear. It does not ping. When I go the the physical computer with a screen attached I see a black screen and hear that the server is still on. I do a hard power off (press power on button for a few seconds) and the server halts. After I press power on the server boots with no problem. As far as I remember the remote reboot has previously worked on that server. I wonder if sudo reboot & will help? I suppose I could also try sudo shutdown -r and see if that does any difference. I have listed an excerpt of /etc/log/syslog below. The last thing it records is the stopping of the logging. Oct 24 10:14:49 servername kernel: [1354427.594709] init: cron main process (1060) killed by TERM signal Oct 24 10:14:49 servername kernel: [1354427.594908] init: irqbalance main process (1080) killed by TERM signal Oct 24 10:14:49 servername kernel: [1354427.595299] init: tty1 main process (1424) killed by TERM signal Oct 24 10:14:49 servername kernel: [1354427.637747] init: plymouth-upstart-bridge main process (20873) terminated with status 1 Oct 24 10:14:49 servername kernel: Kernel logging (proc) stopped. Oct 24 10:14:49 servername rsyslogd: [origin software="rsyslogd" swVersion="5.8.6" x-pid="876" x-info="http://www.rsyslog.com"] exiting on signal 15. Oct 24 10:25:34 servername kernel: imklog 5.8.6, log source = /proc/kmsg started. Oct 24 10:25:34 servername rsyslogd: [origin software="rsyslogd" swVersion="5.8.6" x-pid="862" x-info="http://www.rsyslog.com"] start

    Read the article

  • Attempting to dual boot Ubuntu and Windows 7 on Sony Vaio with Insyde H2O BIOS

    - by zach
    My situation is the same that is addressed here Sony VAIO with Insyde H2O EFI bios will not boot into GRUB EFI and here http://www.hackourlife.com/sony-vaio-with-insyde-h2o-efi-bios-ubuntu-12-04-dual-boot I tried to install Ubuntu 12.04 from the Live CD alongside my current Windows 7. I have to switch my BIOS to legacy mode in order to boot from CD. If I were to do a normal installation and remain in legacy mode, the BIOS will display "operating system not found". If I switch back then the BIOS just boots to windows. To solve the problem, I tried following the steps in the previous two articles. My drive is partitioned as: sda1 FAT32 Location of Windows EFI files (flagged as boot in Ubuntu install) sda2 unknown sda3 NFTS Windows C: sda4 ext4 Ubuntu root sda5 swap sda6 ext4 Ubuntu home I was a little confused by the requirement in the second article to "be careful to install Grub bootloader in /dev/sda3" In my case, the relevant partition is sda1. I have tried three things: setting the sda1 mount point as /boot, as /boot/efi, and as the special reserved grub partition. In each install I indicated that grub should be installed in sda1. After each install I reboot to the live CD and look in the sda1. I see EFI/Boot and EFI/Windows, but no EFI/Ubuntu and consequently no grubx64.efi. I understand the recommended procedure of moving grubx64.efi into the EFI/Boot directory and replacing the present bootx64.efi file, but I see no grubx64.efi and I don't know where it should be.

    Read the article

  • Grub doesn't show both Ubuntu installations

    - by jackweirdy
    I have a laptop with Ubuntu 12.04 LTS installed as the main OS. The other day I installed Ubuntu-Studio (version 12.04) into another partition on the machine. The installation went great and when the machine booted, the grub menu popped up and I could see the option for Ubuntu Studio and the vanilla Ubuntu OS'. The problem was that this version of grub, installed by the Studio installer, didn't look great and insisted on putting Studio at the top of the list, and therefore as the main OS to boot. I use the standard Ubuntu more often, so I booted into that and ran sudo grub-install dev/sda. That worked OK and now Ubuntu boots as normal. Only problem is that the Grub menu doesn't show up and doesn't give me a chance to choose the other OS. Running sudo os-prober shows that it can find ubuntu studio, it doesn't give me a chance to boot it. Any ideas as to how I can fix this problem? Cheers in advance. EDIT: followed instructions here and saw the boot menu, but the only boot options present were for the standard installation of Ubuntu.

    Read the article

  • How to zero out a drive?

    - by Mohd Arafat Hossain
    I'm currently running Ubuntu 12.04 and want to completely format my laptop so I can install Windows 7 (replace Ubuntu). When I put in my bootable USB with the OS it just shows a black screen with a white blinking cursor on the top left corner. I wait for hours (to be specific 5 whole hours) waiting for something to happen but I get nothing, so I pull out the USB and my Ubuntu 12.04 loads up. Repeated this several times with putting different boot priority options on top-est that relate to USB but the results are same. I go and visit some sites on the net like this http://www.techspot.com/community/topics/cant-replace-ubuntu-with-windows.175716/ that say I have to zero out my hard drive. My question is how? Note: Erasing out all my data is no problem cause I have nothing important to backup. If I have to lose my primary OS (Ubuntu 12.04) in the process I am ready to as my aim is just to install Windows 7 successfully. Please don't answer that there is something wrong with my USB or my USB reader/port/hardware or the content inside the USB cause they all works fine on my brothers PC as it boots up flawlessly.

    Read the article

  • Rasbperry Pi Mod Offers One Button Audiobook Playback

    - by Jason Fitzpatrick
    How do you design an audiobook player for an elderly book lover who doesn’t want to wrestle with new technology? Simple and with a single button interface is a great place to start. This clever and thoughtful build comes to us courtesy of tinker Michael Clemens. His wife’s grandmother, in her 90s, is visually impaired but still loves to take in books via audiobooks. In an effort to make modern MP3 audiobooks accessible to her, Michael built a dedicated audiobook reader based off Rasbperry Pi and programmed it to use a single button. The system boots, loads the audiobook it finds on the attached USB drive, and loads up its track position from memory. Press the button to resume play or, for a refresher, hold the button for four seconds to start the track over. While you may not be in the market for a one-button audiobook player for an elderly relative, the same simple design could be easily adopted, via new scripts, to another function. Hit up the link below to read more about the build. The One Button Audiobook Player [via Hack A Day] How To Play DVDs on Windows 8 6 Start Menu Replacements for Windows 8 What Is the Purpose of the “Do Not Cover This Hole” Hole on Hard Drives?

    Read the article

  • Windows 8 + Ubuntu dualboot problem - ubuntu does not load after windows updates

    - by Michal Biros
    I have installed Windows 8 64-bit and Ubuntu 14.04 64-bit in dualboot with EFI mode. Everything worked great. I could run Ubuntu or Windows without any problems. Only one little issue was that Windows locked NTFS partitions when I shut it down. When I clicked on restart button in Windows and started Ubuntu, partitions mounted successfully. But today ... I opened windows and downloaded all available updates. When I wanted to come back to Ubuntu I noticed that grub did not count down seconds to automatic start. After choosing Ubuntu option manually, the OS did not load. Just black screen with white underscore in the upper left corner. Windows is accessible always without such issues. Last time I solved it by reinstalling ubuntu but I dont want to do it each time windows downloads some updates. Have you ever meet such problem, or do you know how to solve it? EDIT Ubuntu boots, but it won't start. It ends on loading screen.

    Read the article

  • wubi dual-boot installation of ubuntu 12.04 on Windows 7 fails to boot

    - by Andrew
    I am trying to use the wubi installation process to create a Ubuntu 12.04 / Windows 7 dual boot setup on my Windows 7 machine (Dell Inspiron 17R). The installation initially works fine, and I am able to load Ubuntu several times after selecting it from the boot menu. However, when I boot into Windows 7 it seems to corrupt the Ubuntu boot process, because after running Windows 7, Ubuntu won't boot on the machine. It is still listed as an option in the boot menu, but when it is selected, the machine does one of the following: -hangs at the load-screen and says that Ubuntu is preparing to run for the first time (although it isn't the first time the OS has been loaded) -hangs with a black screen and does nothing I have uninstalled Ubuntu and then reinstalled it (using wubi) three times. Each time Ubuntu initially boots okay (including rebooting the laptop into Ubuntu several times.) However, whenever I switch over and boot into Windows 7 it breaks the Ubuntu installation. Windows 7 continues to boot and work fine without issues. I have successfully installed Ubuntu using wubi onto a different Windows 7 machine before without problems...it seems that there is something different about this laptop configuration. I am not sure how to debug the issue. I see no error messages during the Ubuntu boot process when it hangs and am not sure how to debug this.

    Read the article

  • Installing 10.10+ with Radeon HD 6970 Video Card

    - by Ben Lacy
    I built a new PC that has a Diamond Radeon HD 6970 graphics card, and no on-board graphics. When I boot from the Ubuntu disc, it runs through some initial booting stuff, and then gets to a loading screen that just has the Ubuntu logo and some progress bar/dot thingies. After this screen is finished, it goes black and says it cannot display video mode. I've seen many people that say to simply install the ati drivers. However, I don't believe this is an option, because I can't even get to the boot screen that asks me if I want to run the system off of the LiveCD, boot to hard disk, etc... Is there a way to somehow boot to a CLI before getting to the screen that would normally let me choose that? I'm at a loss as far as what to do. Also: Yes, the CD boots fine on other machines. (I've also burnt a couple discs just to be sure) Yes, the graphics card is fine. I normally dual-boot with Windows 7, and it runs on Windows just fine. Thanks for any help!

    Read the article

  • Apache no longer starts at Windows boot up

    - by w3d
    I have Apache installed as part of XAMPP - local test server. It is configured as a Windows (XP) Service. Startup type is "Automatic". For a long time now it has always started when Windows boots up, but recently this has stopped happening. I now need to start it manually via the XAMPP Control Panel - at which point it appears to start up perfectly OK. The only recent updates to the machine (that I recall) are Windows Updates - none of which appear to have "known issues" that relate to this. And updates to Google Chrome. Any ideas what could prevent Apache from starting automatically at Windows (XP) boot up? EDIT#1 There are 2 related Errors in my system event log regarding the Service Control Manager: Timeout (30000 milliseconds) waiting for the Apache2.2 service to connect. The Apache2.2 service failed to start due to the following error: The service did not respond to the start or control request in a timely fashion. When I manually start the Apache server after boot up there are 2 "information" events stating that it was "sent a start control" and that it "entered the running state". Although I notice it appears to take 19 seconds between the start control being sent and entering a running state - according to the event log. So, maybe 30 seconds during boot up isn't long enough (anymore) for Apache to start??

    Read the article

  • crunchbang: it takes up *how* much memory?!?!

    - by Theo Moore
    I've been trying many distros of Linux lately, trying to find something I like for my netbook. I started out with Ubuntu, and I can tell you I am a big fan. Ubuntu is now fast to install, much simpler to administer, and pretty light resource-wise. My original install was the standard 32 bit version of 9.04. I tried the netbook remix version of this release, but it was very, very slow. Even the full-blown version used only about 200mb. Much better than the almost 800 that the recommended Windows y version took. Once the newest release of Ubuntu was released, I decided to try the netbook remx of 10.04. It used even less RAM; only about 150mb. I thought I'd found my OS. I certainly settled in and prepared to use it forever. Then, someone I know suggested I try cunchbang. It is the most minimalistic UI I've ever seen, using Openbox rather than Gnome or KDE. Very slick, simple and clean. Since I am using the alpha of the most recent version (using Debian Squeeze), the apps provided for you are few...although more will be provided soon. You do have a word processor, etc., although not the OpenOffice you would normally get in Ubuntu. But the best part? 48MB. That's it. 48mb fully loaded, supporting what I can "hotel services". It's fast, boots quick, and believe it or not, I can even do Java-based development....on my netbook! Pretty slick.   More on it as I use it.

    Read the article

  • Ubuntu 13.10 installed and worked, but now not working

    - by San
    I have a HP G7000 laptop. I updated/upgraded from 13.04 to 13.10, after the software updater recommended I upgrade. I have duel booting system with Windows Vista. The system was working for the past two days, but I start getting the errors below, after selecting Ubuntu in Grub Menu on startup and at the splash screen it says "Press S to Skip or M for manual configuration" Pressing S gives a black screen and m takes you the errors below. Windows boots and works fine after selection in the Grub Menu. [ 15.235703] EXT3-fs (sda5): error: unrecognized mount option "discard" or missing value. [ 16.788072] [drm:intel_pipe_config_compare] *ERROR* mismatch in adjusted_mode flags [expected 2, found 0] [ 20.860071] [drm:intel_pipe_config_compare] *ERROR* mismatch in adjusted_mode flags [expected 2, found 0] [ 20.980076] [drm:intel_pipe_config_compare] *ERROR* mismatch in adjusted_mode flags [expected 2, found 0] Root filesystem Check failed root@simamhar:~# Tried boot-repair using the LiveCD method, no luck. System still gives above error. (you can view the boot-repair log here http://paste.ubuntu.com/6287287) When I use the liveCD for 13.04 or 13.10 however, my hard disk is recognized and I can read the files. Why is it that the installation on the hard disk has stopped working and does not recognize my / ? What do the above errors mean and how can i solve them? There was no power failure before, during or after the update/upgrade process from 13.04 to 13.10. I now would like to go back to 13.04 without reinstalling afresh? Any help will be appreciated. Thanks.

    Read the article

  • Add Windows 7 to boot menu

    - by Cumatru
    Device Boot Start End Blocks Id System /dev/sda1 * 1 13 102400 7 HPFS/NTFS - system restore /dev/sda2 13 4674 37436416 7 HPFS/NTFS - Windows 7 /dev/sda3 4674 58843 435116032 7 HPFS/NTFS - data storage /dev/sda4 58843 60802 15728640 83 Linux - Ubuntu 10.10 Initially i´ve installed StartUpManager. This ( i think ) added another 4 instances of Linux + memtest to my boot menu list. Altough, i din´t see any boot menu. It boots into Ubuntu after a few seconds. I´ve tried to add windows 7, but i did not succeed. This is a part of my menu.lst file. title Ubuntu 10.10, kernel 2.6.35-24-generic uuid 1c9748e2-2f11-4a6c-91c0-7310d48c4a7a kernel /boot/vmlinuz-2.6.35-24-generic root=UUID=1c9748e2-2f11-4a6c-91c0-7310d48c4a7a ro quiet splash initrd /boot/initrd.img-2.6.35-24-generic title Chainload into GRUB 2 root 1c9748e2-2f11-4a6c-91c0-7310d48c4a7a kernel /boot/grub/core.img title Ubuntu 10.10, memtest86+ uuid 1c9748e2-2f11-4a6c-91c0-7310d48c4a7a kernel /boot/memtest86+.bin menuentry “Windows 7? { set root=(hd0,2) chainloader +1 } And this is after a upgrade-grub Searching for GRUB installation directory ... found: /boot/grub Searching for default file ... found: /boot/grub/default Testing for an existing GRUB menu.lst file ... found: /boot/grub/menu.lst Searching for splash image ... none found, skipping ... Found kernel: /boot/vmlinuz-2.6.35-24-generic Found kernel: /boot/vmlinuz-2.6.35-22-generic Found GRUB 2: /boot/grub/core.img Found kernel: /boot/memtest86+.bin Updating /boot/grub/menu.lst ... done Later Edit: Ive added the following in 40_custom from /etc/grub.d/ and ive decommented hidden menu line from menu.lst, but i still cant see any boot menu. Ive also tried to press ESC and SHIFT. menuentry "Windows 7 (loader) (on /dev/sda1)" { insmod part_msdos insmod ntfs set root='(hd0,msdos1)' chainloader +1 } menuentry "Windows 7 (loader) (on /dev/sda1)" { insmod part_msdos insmod ntfs set root='(hd0,msdos0)' chainloader +1 } menuentry "Windows 7 (loader) (on /dev/sda1)" { set root= hd(0,0) chainloader +1 } menuentry "!Windows 7 (loader) (on /dev/sda1)" { set root= hd(0,1) chainloader +1 } menuentry "!!Windows 7 (loader) (on /dev/sda1)" { set root= hd(0,2) chainloader +1 }

    Read the article

  • Can't install Ubuntu on my Windows 7 laptop

    - by Ana
    I tried installing Ubuntu in two different ways: First, I tried the Windows Installer, and it goes well until I reboot the system and, when booting on Ubuntu, I get the error: No root file system defined. Second, I uninstalled wubi by going to to Control Panel - Uninstall Programs - Ubuntu. Then, I booted the laptop from the live CD and selected install. It boots okay but in the screen right after the one that says to make sure you have 4.5 GB available, Internet connection, etc, when I click continue it throws me a message saying that Ubuntu had an internal error and asks me if I want to report the error. After that, I just have a black screen and nothing else! No Ubuntu installed, no boot option to go back to Windows. Nothing! My goal is to install Ubuntu alongside Windows 7 (without the hassle of formatting the computer, creating partition, etc). How can I do it (preferable using Windows Installer)? How can I solve the "No root file system defined" that I encountered when I used the Windows Installer?

    Read the article

  • How to dual-boot Windows XP & Ubuntu 12.04

    - by user115554
    When I install Ubuntu 12.04 along side Windows XP, I encountered a choice for "Device for boot loader installation". I selected "Windows XP Professional" Now, when I select Windows XP from the grub, it appeares a black page and Windwos dosent boot. I tried Boot-Repair from Ubuntu but it dosent solve this problem. The only thing that helps me to boot Windwos XP is a Bootable CD of Windows. when I put this CD and boot from CD, it shows some options and when I select "Boot from Hard Drive" , my own Windows boots! Here's is a snippet from the bootinfoscript report: ============================= Boot Info Summary: =============================== => Grub2 (v1.99) is installed in the MBR of /dev/sda and looks at sector 1 of the same hard drive for core.img. core.img is at this location and looks for (,msdos5)/boot/grub on this drive. sda1: __________________________________________________________________________ File system: ntfs Boot sector type: Grub2 (v1.99-2.00) Boot sector info: Grub2 (v1.99-2.00) is installed in the boot sector of sda1 and looks at sector 525709174 of the same hard drive for core.img, but core.img can not be found at this location. No errors found in the Boot Parameter Block. Boot file info: Grub2 (v1.97-1.98) in the file /mbr_backup.log looks at sector 1 of the same hard drive for core.img, but core.img can not be found at this location. Operating System: Windows XP Boot files: /boot.ini /ntldr /NTDETECT.COM

    Read the article

  • Gnome 3 - Multiple Video Cards - Xinerama -- Forced Fallback Mode

    - by Alvin
    Just installed a 2nd nvidia video card -- previously had gnome 3 working perfectly with 2 monitors on a a single video card using twinview tried a number of things thus far twinview on 1 card + xinerama no xinerama no twinview various manual xorg.conf hacks based on random forums (couple references below) xinerama no twinview with and without Extensions Composite The last one is what I'm using now -- it results in a forced fallback mode with Composite Disable set at the end of xorg.conf via nvidia-settings Section "Extensions" Option "Composite" "Disable" EndSection when I disabled that last snippet it boots to gnome 3 full with the left monitor on a black screen and the middle monitor as primary but non-responsive switching to console mode Ctrl+Alt+F1 and then switching back I get 3 black screens with a mouse that can move around but nothing to interact with issue seems related to OpenGL and the multiple video cards -- I can boot into Unity without issue though my Glx-Dock shows up with the black background as barely shows in the screenshot below indicating the OpenGL is not initiated has anyone had any luck with getting Xinerama to work with Multiple NVidia Video Cards with OpenGL support? Found this in the logs while looking a bit further [ 23.208] (II) NVIDIA(1): Setting mode "nvidia-auto-select+0+0" [ 23.254] (WW) NVIDIA(1): The GPU driving screen 1 is incompatible with the rest of the [ 23.254] (WW) NVIDIA(1): GPUs composing the desktop. OpenGL rendering will be [ 23.254] (WW) NVIDIA(1): disabled on screen 1. [ 23.277] (==) NVIDIA(1): Disabling shared memory pixmaps [ 23.277] (==) NVIDIA(1): Backing store disabled [ 23.277] (==) NVIDIA(1): Silken mouse enabled [ 23.277] (==) NVIDIA(1): DPMS enabled According to this page at the NVidia User Docs http://us.download.nvidia.com/XFree86/Linux-x86/173.14.09/README/chapter-14.html I may be out of luck =( Starting this question with the hopes that others may be able to help debug and perhaps gain answers over time as I really want to get the full gnome 3 back.

    Read the article

  • Basic WCF Unit Testing

    - by Brian
    Coming from someone who loves the KISS method, I was surprised to find that I was making something entirely too complicated. I know, shocker right? Now I'm no unit testing ninja, and not really a WCF ninja either, but had a desire to test service calls without a) going to a database, or b) making sure that the entire WCF infrastructure was tip top. Who does? It's not the environment I want to test, just the logic I’ve written to ensure there aren't any side effects. So, for the K.I.S.S. method: Assuming that you're using a WCF service library (you are using service libraries correct?), it's really as easy as referencing the service library, then building out some stubs for bunking up data. The service contract We’ll use a very basic service contract, just for getting and updating an entity. I’ve used the default “CompositeType” that is in the template, handy only for examples like this. I’ve added an Id property and overridden ToString and Equals. [ServiceContract] public interface IMyService { [OperationContract] CompositeType GetCompositeType(int id); [OperationContract] CompositeType SaveCompositeType(CompositeType item); [OperationContract] CompositeTypeCollection GetAllCompositeTypes(); } The implementation When I implement the service, I want to be able to send known data into it so I don’t have to fuss around with database access or the like. To do this, I first have to create an interface for my data access: public interface IMyServiceDataManager { CompositeType GetCompositeType(int id); CompositeType SaveCompositeType(CompositeType item); CompositeTypeCollection GetAllCompositeTypes(); } For the purposes of this we can ignore our implementation of the IMyServiceDataManager interface inside of the service. Pretend it uses LINQ to Entities to map its data, or maybe it goes old school and uses EntLib to talk to SQL. Maybe it talks to a tape spool on a mainframe on the third floor. It really doesn’t matter. That’s the point. So here’s what our service looks like in its most basic form: public CompositeType GetCompositeType(int id) { //sanity checks if (id == 0) throw new ArgumentException("id cannot be zero."); return _dataManager.GetCompositeType(id); } public CompositeType SaveCompositeType(CompositeType item) { return _dataManager.SaveCompositeType(item); } public CompositeTypeCollection GetAllCompositeTypes() { return _dataManager.GetAllCompositeTypes(); } But what about the datamanager? The constructor takes care of that. I don’t want to expose any testing ability in release (or the ability for someone to swap out my datamanager) so this is what we get: IMyServiceDataManager _dataManager; public MyService() { _dataManager = new MyServiceDataManager(); } #if DEBUG public MyService(IMyServiceDataManager dataManager) { _dataManager = dataManager; } #endif The Stub Now it’s time for the rubber to meet the road… Like most guys that ever talk about unit testing here’s a sample that is painting in *very* broad strokes. The important part however is that within the test project, I’ve created a bunk (unit testing purists would say stub I believe) object that implements my IMyServiceDataManager so that I can deal with known data. Here it is: internal class FakeMyServiceDataManager : IMyServiceDataManager { internal FakeMyServiceDataManager() { Collection = new CompositeTypeCollection(); Collection.AddRange(new CompositeTypeCollection { new CompositeType { Id = 1, BoolValue = true, StringValue = "foo 1", }, new CompositeType { Id = 2, BoolValue = false, StringValue = "foo 2", }, new CompositeType { Id = 3, BoolValue = true, StringValue = "foo 3", }, }); } CompositeTypeCollection Collection { get; set; } #region IMyServiceDataManager Members public CompositeType GetCompositeType(int id) { if (id <= 0) return null; return Collection.SingleOrDefault(m => m.Id == id); } public CompositeType SaveCompositeType(CompositeType item) { var existing = Collection.SingleOrDefault(m => m.Id == item.Id); if (null != existing) { Collection.Remove(existing); } if (item.Id == 0) { item.Id = Collection.Count > 0 ? Collection.Max(m => m.Id) + 1 : 1; } Collection.Add(item); return item; } public CompositeTypeCollection GetAllCompositeTypes() { return Collection; } #endregion } So it’s tough to see in this example why any of this is necessary, but in a real world application you would/should/could be applying much more logic within your service implementation. This all serves to ensure that between refactorings etc, that it doesn’t send sparking cogs all about or let the blue smoke out. Here’s a simple test that brings it all home, remember, broad strokes: [TestMethod] public void MyService_GetCompositeType_ExpectedValues() { FakeMyServiceDataManager fake = new FakeMyServiceDataManager(); MyService service = new MyService(fake); CompositeType expected = fake.GetCompositeType(1); CompositeType actual = service.GetCompositeType(2); Assert.AreEqual<CompositeType>(expected, actual, "Objects are not equal. Expected: {0}; Actual: {1};", expected, actual); } Summary That’s really all there is to it. You could use software x or framework y to do the exact same thing, but in my case I just didn’t really feel like it. This speaks volumes to my not yet ninja unit testing prowess.

    Read the article

  • Disk failure is imminent Laptop Hard drive ~5 months old

    - by Drew
    There's another post about this, but I don't have enough 'points' to say anything on that thread. So I'll start my own ... with more details! My computer still boots, but gnome domain reports problems with HDD smart. This has been confirmed in the bios as it makes me press f1 to boot up now. I tried running HDD disk check in the bios, but it fails running the tests. As in, running the tests failed not that the tests themselves indicated a failed drive. Here is what disk utility is reporting as failing: Reallocated Sector Count FAILING Normalized: 132 Worst: 132 Threshold: 140 Value: 544 Current Pending Sector Count WARNING Normalized: 200 Worst: 1 Threshold: 0 Value: 2 Is this related to the insane number of DRDY errors on the drive? kernel: [51345.233069] ata1.00: exception Emask 0x0 SAct 0x0 SErr 0x0 action 0x0 kernel: [51345.233076] ata1.00: BMDMA stat 0x4 kernel: [51345.233081] ata1.00: failed command: READ DMA kernel: [51345.233090] ata1.00: cmd c8/00:00:00:8b:4a/00:00:00:00:00/e0 tag 0 dma 131072 in kernel: [51345.233092] res 51/40:00:a8:8b:4a/10:04:00:00:00/e0 Emask 0x9 (media error) kernel: [51345.233097] ata1.00: status: { DRDY ERR } kernel: [51345.233103] ata1.00: error: { UNC } kernel: [51345.291929] ata1.00: configured for UDMA/100 kernel: [51345.291944] ata1: EH complete kernel: [51347.682748] ata1.00: exception Emask 0x0 SAct 0x0 SErr 0x0 action 0x0 kernel: [51347.682754] ata1.00: BMDMA stat 0x4 kernel: [51347.682759] ata1.00: failed command: READ DMA kernel: [51347.682768] ata1.00: cmd c8/00:00:00:8b:4a/00:00:00:00:00/e0 tag 0 dma 131072 in kernel: [51347.682770] res 51/40:00:a8:8b:4a/10:04:00:00:00/e0 Emask 0x9 (media error) kernel: [51347.682774] ata1.00: status: { DRDY ERR } kernel: [51347.682777] ata1.00: error: { UNC } Did Ubuntu 10.10 and/or EXT4 eat my work laptop? What steps can I take to backup my important information, which is probably the home folder. Please include steps to recover my data on the new hard drive as well. It does me little good to have backups I can't use.

    Read the article

  • Unknown filesystem error

    - by Ben
    My computer has (had) a dual boot of Ubuntu Precise and Windows 7. Recently, when I started the computer, grub gave me an error saying "Unknown filesystem", and sent me to grub rescue. I searched for solutions to this, and found this answer: Unknown filesystem error: grub rescue. I followed the instructions there, but they didn't really help: when I restarted the computer, it went straight to Windows without grub intervening at all (so it boots successfully, just not to the OS I want). This is the log from boot-repair. My Ubuntu partition is sda6. Naturally, I'm a little worried, since the log says "unknown filesystem type ''", which to me looks like the partition might be corrupt somehow. From the Ubuntu Live CD, I started gparted and looked at my partitions, and it also told me that my sda6 is an unknown filesystem. So my questions are basically: Can I restore Ubuntu to the way it was? If not, can I at least rescue the data I had on the partition somehow? Again, if I can't restore Ubuntu, how do I clean everything up so that I can reinstall it without too many complications? Another thing I should mention is that yesterday I had a similar problem where the computer told me there was a problem with the hard drive when it was starting, but it fixed itself by running fsck (that time it got past grub, and managed to start Ubuntu). Between that occasion and me having trouble booting the computer today, I have booted it successfully at least twice. Thanks for any help!

    Read the article

  • mdadm: breaks boot due to "is not ready yet or not present" error

    - by BarsMonster
    This is so damn frustrating :-| I've spent like 20 hours on this nice error, and seems like dozens of people over Internet too, and no clear solution yet. I have non-system RAID-5 of 5 disks, and it's fine. But during boot up it says that "/dev/md0 is not ready yet or not present" and asks to press 'S'. Very nice for Ubuntu Server - I have to bring monitor and keyboard to go next. After this system boots and it's all fine. md0 device works, /proc/mdstat is fine. When I do mount -a - it mounts this array without errors and works fine. As a dumb and shameful workaround I added noauto in /etc/fstab, and did mounting in /etc/rc.local - it works fine then. Any hints how to make it work properly? fstab: UUID=3588dfed-47ae-4c32-9855-2d69df713b86 /var/bigfatdisk ext4 noauto,noatime,data=writeback,barrier=0,nobh,commit=5 0 0 mdadm config: It is autogenerated: # mdadm.conf # # Please refer to mdadm.conf(5) for information about this file. # # by default, scan all partitions (/proc/partitions) for MD superblocks. # alternatively, specify devices to scan, using wildcards if desired. DEVICE partitions # auto-create devices with Debian standard permissions CREATE owner=root group=disk mode=0660 auto=yes # automatically tag new arrays as belonging to the local system HOMEHOST <system> # instruct the monitoring daemon where to send mail alerts MAILADDR CENSORED # definitions of existing MD arrays ARRAY /dev/md/0 metadata=1.2 bitmap=/var/md0_intent UUID=efccbeb6:a0a65cd6:470dcdf3:62781188 name=LBox2:0 # This file was auto-generated on Mon, 10 Jan 2011 04:06:55 +0200 # by mkconf 3.1.2-2

    Read the article

  • Recovering from 'grub rescue>' crash

    - by DocSalvage
    I did a dumb thing... I forgot that Ubuntu 10.04 (Lucid) switched to Grub2 which puts a ton of *.mod files (kernel modules) in /boot/grub. I thought they were soundtrack files put there erroneously and moved them. Needless to say, the next reboot was traumatic. I was presented with something I had no memory of ever seeing... a 'grub rescue' prompt. With the help of how-to-fix-error-unknown-filesystem-grub-rescue however, I was able to recover... Discovered that Grub Rescue does not have 'cd', 'cp' or any other filesystem commands except its own variation of 'ls'. So first I had to find the partition with the /boot directory containing vmlinuz... and other boot image files... (failed attempts not shown) grub rescue> ls (hd0,4) (hd0,3) (hd0,2) (hd0,1) grub rescue> ls (hd0,2)/boot ... grub ... initrd.img-2.6.32-33-generic ... vmlinuz-2.6.32-33-generic Then manually boot from 'grub rescue' prompt (no command history either!)... grub rescue> set root=(hd0,2)/boot grub rescue> insmod linux grub rescue> linux (hd0,2)/boot/vmlinuz-2.6.32-33-generic grub rescue> initrd (hd0,2)/boot/initrd.img-2.6.32-33-generic grub rescue> boot This boots and crashes to the BusyBox prompt which DOES have some rudimentary filesystem commnds. Then I moved the *.mod files back to the /boot/grub directory... busybox> cd /boot busybox> mv mod/* grub busybox> reboot The reboot was successful but that was a lot of work. Is there an easier way?

    Read the article

  • How can create the smallest possible mirror of the archive?

    - by Registered User
    I need to create an http url at my laptop to have a Ubuntu installation begin within my laptop on a Xen environment. This is how the final thing will look like. The host and client are both going to be my laptop, I Googled and came across apt-mirror and some other packages. I do not want to archive entire 15 GB Ubuntu repositories on my machine. It is not possible to use a CD,ISO,loop mounted disk (reason mentioned below). I have tried using netboot image on local machine which failed because if you are attempting to create a virtual machine on a hardware which does not support VT virt-manager installer necessarily needs a URL of this sort http://archive.ubuntu.com/ubuntu/dists/hardy/main/installer-i386/current/images/netboot/ Any other option to create guest OS is simply grayed out. The unfortunate part is my Ethernet connections do not work when I boot with Xen-4.0 and a pv-ops Dom0 kernel from Jeremy's tree. Which is where I have to do this work. So I have to create a URL structure which is similar to Ubuntu mirrors. So how can I do this in bare minimum so that at least the console boots and once the console comes I can do some work.

    Read the article

  • Can't install Ubuntu on Asus Eee 1015pem

    - by Peter
    I'm having trouble to install Ubuntu. I use a ASUS Eee 1015pem netbook. Recently, I my netbook got wet. I had it inside my backback and all my things got wet. The netbook boots up fine but it will not load the OS. I downloaded ubuntu onto my external hard drive and changed the settings in my Bios to boot from a removable device. Nothing happens. When I plug in my external hard drive I'm not able to get to the boot icon. I have to unplug it the external hard drive. Set my boot settings I tried both Removable and CD-Rom. Than I plug my external drive back in and nothing happens on either settings. My Asus never came with a recovery disk and suppose to have a build in recovery by pressing F9 in the Bios. Also I need to disable Boot Booster in Bios and Boot Booster is not even an opition in Bios. My friend told me try installing Ubuntu but now I'm having no luck with Ubuntu. Any suggestions?

    Read the article

< Previous Page | 25 26 27 28 29 30 31 32 33 34 35 36  | Next Page >