Tagged: Operating system Toggle Comment Threads | Keyboard Shortcuts

  • K 5:46 PM on April 20, 2013 Permalink
    Tags: , , , Operating system   

    It feels so relieving to get your lost data back!

    After trying multiple file recovery tools like TestDisk/PhotoRec, Recuva, etc. I had ran chkdsk (of course, from Windows) as a last resort on that particular partition last night. Since, Windows doesn’t show protected system files easily I couldn’t see the content of found.000 directory that got created in the said partition. I made a mental note of checking this directory out later from Linux.

    As most of my mental notes go, I forgot about this as well. Just now accidentally visited that partition from Linux and browsed through the dir0000.chk directory inside, and voilà, there it was – my complete home directory backup! 😀

  • K 8:25 PM on April 19, 2013 Permalink
    Tags: , , , Operating system   

    Another strange thing and a big lesson learned today was regarding disk handling by Windows and Linux. I had been observing missing files from my hard disk for a few weeks now, always suspected it was due to bad sectors but tests didn’t turn up anything positive. When I took the backup of my old Ubuntu home directory to an NTFS partition, installed Linux Mint and then tried to access the backup I was left with a shock – the whole backup was gone!

    I investigated a bit and found the possible reason at http://askubuntu.com/a/120540/112542 and quickly recalled that indeed I had booted up Windows after taking the backup. I felt idiotic not knowing this simple fact before that Windows, when booting to a hibernated system, considers any file system change as data corruption and fixes it. In my case, it was deleting all those files, I thought I was saving for opening in Windows. I immediately turned off the default behaviour of Windows which is to hibernate instead of shutdown, so that now no hiber file is generated. I am left wondering how could such a harmful behavior be default!

    Well, huge lesson learned. And I have no idea apart from my home directory backup how much more data I lost all this time.

    • Ankur 9:11 PM on April 19, 2013 Permalink | Reply

      You can now try Recuva or Hiren Boot CD to recover your deleted files if its not been overwritten yet.

      • Kartik 9:16 PM on April 19, 2013 Permalink | Reply

        Thanks, I will try them out. I was able to recover a few using TestDisk & PhotoRec.

    • Jay Aurabind 9:38 PM on April 19, 2013 Permalink | Reply

      So I think you learned a lesson – Keep Windows Away 😛 My laptop is windows free. So I`m tension free 🙂

  • K 9:25 PM on February 6, 2013 Permalink
    Tags: , , , , , , Operating system, , ,   

    Quickly Check Temperature Values of Hardware Components in Ubuntu 

    So, I missed posting yesterday. Hope this doesn’t repeat.

    Today I am sharing a small bash script I wrote to check the temperatures recorded by various sensors in my laptop. Nothing incredibly smart here, just a quick but useful hack.

    I am one of those unhappy Linux users who suffer from lack of driver support for their hardware. Due to some weird kernel bug or messy graphics driver, which led to incredibly high temperatures on my laptop,  I spent about a year using Linux as a VirtualBox guest in Windows; this was before Ubuntu 12.04 got shipped. During those times, my laptop used to shutdown automatically after reaching critical temperatures (100° C!) on simple tasks like watching a HD video on VLC.

    What all do we need? In *buntu systems, install sensors and hddtemp tools. I am using an ATi Radeon card and proprietary driver ships with a utility for reporting temperature for the same. You can modify the script to work with nVidia cards accordingly.

    sudo apt-get install lm-sensors hddtemp

    Next, you need to run sensors-detect to let sensors identify all the hardware monitoring sensors present in your system.

    sudo sensors-detect

    Press enter to accept default options when asked.

    Here is the script; hddtemp requires sudo making this script more than 3 lines:

    aticonfig –odgt
    if [ "$(whoami)" != "root" ]; then
    echo -ne "\n\nDo you want to know hard disk temperature (requires sudo)? (y/N) "
    read answer
    if [ "$answer" == "y" ]; then
    sudo hddtemp /dev/sda
    exit 0
    sudo hddtemp /dev/sda
    exit 0

    view raw
    hosted with ❤ by GitHub

    I have put this script in my local bin folder for quick access. To do the same, follow the steps:

    mkdir ~/bin

    Put this directory in your path by putting the following line at the end of your .bashrc file (replace k4rtik by your username)

    export PATH=$PATH:/home/k4rtik/bin

    mv temp.sh ~/bin/temp

    chmod +x temp

    Now either logout and login or issue the following command to be able to access the script by just entering temp on your terminal.

    source ~/.bashrc

    Here is a sample run from my machine:

    k4rtik: ~ $ temp
    Adapter: Virtual device
    temp1:        +26.8°C  (crit = +127.0°C)
    temp2:        +70.0°C  (crit = +85.0°C)
    Adapter: ISA adapter
    Core 0:       +70.0°C  (high = +84.0°C, crit = +100.0°C)
    Core 1:       +70.0°C  (high = +84.0°C, crit = +100.0°C)
    Core 2:       +70.0°C  (high = +84.0°C, crit = +100.0°C)
    Core 3:       +70.0°C  (high = +84.0°C, crit = +100.0°C)
    Default Adapter - ATI Mobility Radeon HD 4670
                      Sensor 0: Temperature - 74.50 C
    Do you want to know hard disk temperature (requires sudo)? (y/N) y
    [sudo] password for k4rtik: 
    /dev/sda: ST9500420ASG: 51°C

    PS: Didn’t know earlier – embedding Github gists into WordPress is as easy as copy & pasting the URL. 🙂

  • K 2:06 PM on October 13, 2011 Permalink
    Tags: C, , Operating system, , UNIX   

    UNIX is basically a simple operating system, but you have to be a genius to understand the simplicity.

    Dennis Ritchie. Source: http://www.linfo.org/q_unix.html See also Ashik’s post about his death – http://aashiks.in/blog/?p=270
  • K 12:00 AM on June 24, 2011 Permalink
    Tags: Disk Management, , GParted, Hard disk drive, Home directory, , NTFS, Operating system,   

    Recommended Linux Partitioning Scheme 

    Partitioning Basics:

    When we need to install linux on our systems, we need to partition our hard disk as we do for windows. In the case of windows, partitions are called as c: ,d:, e:, etc. But on linux they are represented in the form of following (there are many others, but these are the most essential):

    1. swap:
      This is meant for use by the system when it runs out of memory (RAM); it’s much like virtual memory in windows where the system utilizes that space as extra memory.
    2. /:
      This is called the root partition; the most important partition, where all the system files are stored.
    3. /home:
      This partition is meant for use by the users of the system to store their files and preferences. Although it can be merged with the / partition, but it is advised to have this as different partition so that you can store your files and preferences and reinstall the system (in /).

    You don’t see the partitions as different drives (as in windows) under linux, they are visible as directories inside the root partition (/).

    The Scheme:

    After a lot of searching and reading on the topic. I have decided on the following scheme to be very suitable for most (home desktop) purposes:

    • swap – 1.5 to 2 times [size of RAM] (e.g. I have 1.5 GB RAM so my swap is 3GB)
    • / – 5 to 10 GB (5 GB is sufficient in most cases, but if you have large harddisk, like me, allocate at least 10 for /)
    • /home – Greater than 10 GB or rest of the space (because this is where you will save all your work and downloads, etc; 40 GB in my case). And yes, you can leave other space on your hard disk as a storehouse for games, videos, music or files in the form of NTFS partitions, if you happen to use windows also (else make more room for /home).

    Remember: things are not that complex, we make them complex. So, stick to a simple partition scheme like this and keep things simple.

    Gparted showing my hard disk partition structure

    Gparted showing my hard disk partition structure

    Bonus Tip: Use Gparted instead of the partition editor that comes within the installer of most linux installers to have a complete control over your hard disk’s partitions.

    This article first appeared at http://www.digimantra.com/linux/recommended-linux-partitioning-scheme/

Compose new post
Next post/Next comment
Previous post/Previous comment
Show/Hide comments
Go to top
Go to login
Show/Hide help
shift + esc