Find the answer to your Linux question:
Results 1 to 5 of 5
Hi, I think I have destroyed my whole linux system. I wanted to mount a USB stick, and used the command: mount /dev/sda1 /mnt/usbkey However, /dev/sda1 was not right to ...
  1. #1
    Just Joined!
    Join Date
    Sep 2008
    Posts
    32

    Serious problem: destroying linux

    Hi,

    I think I have destroyed my whole linux system. I wanted to mount a USB stick, and used the command:
    mount /dev/sda1 /mnt/usbkey
    However, /dev/sda1 was not right to use, and after executing the command, I got in /mnt/usbkey all directories, which are in the root directory: bin, mnt, ...etc. I tried to unmount what I have mounted, and used this command:
    umount /mnt/usbkeys
    But nothing happened - these directories were still in /mnt/usbkeys. I thought they are just copies of the real directories, and ... decided to delete them. After that I could not open my console anymore. I restarted, but I cannot start linux anymore, I am getting:
    Warning: unable to open an initial console.

    It seems that nothing could be undone, couldn't it?
    Have I destroyed everything?
    (just wanted to ask you as a last hope)

    I am (was) using Slackware 12.0.0

  2. #2
    Linux Guru Jonathan183's Avatar
    Join Date
    Oct 2007
    Posts
    2,941
    Did you install Linux to /dev/sda1 ?
    Were you logged in as root when you tried to delete information ?

    if the answer to both the above is yes then you have probably wiped your root partition. If you created separate /home and/or other user data partitions you should be able to reinstall but select only root and swap partitions during the install process.

    You could try booting from a live CD, mount the partition an check if there is anything left on it.

  3. #3
    Just Joined!
    Join Date
    Sep 2008
    Posts
    32
    Thank you for the fast reply.

    I think Linux was installed to /dev/sda1 (I am not 100% sure).
    To the second question: yes, I was logged in as root, when I deleted everything.

    On my computer I have (had) two partitions: for Windows, and for Linux. And swap partitions. I think I haven't created any separate /home and/or other user data partitions (I used the computer from my user profile, and as root, when necessary).

    I will try booting from a live CD, as you suggested.

  4. #4
    Linux Guru Irithori's Avatar
    Join Date
    May 2009
    Location
    Munich
    Posts
    2,096
    sorry to say that, but yes.
    You wiped out your root partition.

    What happened is this: you have mounted /dev/sda1 (your root)
    additionaly to another place ( /mnt/usbkey ) .

    And as you were root while issuing the rm, the system was killed.

    Question:
    Did you wait until the deletion ended?
    Or did you shut down the PC in the process?

    In the later case, you _might_ get some data back (i.e. your homedirectory),
    if you
    - boot from a Knoppix (or another live CD)
    - mount /sda1 and
    - see what's left.

    The remains can then be copied to a usb stick, network share, etc

    As for the system: Re-Install

  5. #5
    Linux Guru Jonathan183's Avatar
    Join Date
    Oct 2007
    Posts
    2,941
    If you have lost data you don't have a backup of then something like testdisk may help, otherwise the best approach is a fresh install ... avoid root login unless you really need it - and then use it for the minimum number of commands you can.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
...