Find the answer to your Linux question:
Page 1 of 3 1 2 3 LastLast
Results 1 to 10 of 21
Hello Forum, I mistakenly executed a command that renamed the /etc folder to a file.rpm, and now i'm not able to boot normally my server. I'm looking for a solution ...
  1. #1
    Just Joined!
    Join Date
    Jun 2010
    Posts
    10

    [SOLVED] /etc renamed mistakenly -- Verry Urgent

    Hello Forum,

    I mistakenly executed a command that renamed the /etc folder to a file.rpm, and now i'm not able to boot normally my server.

    I'm looking for a solution that can permit to recover m /etc folder, i tried to boot on single mode to rename it back but the file system is read only mounted .

    Is there any solution to my problem?

    Best regards.

  2. #2
    Linux Guru Irithori's Avatar
    Join Date
    May 2009
    Location
    Munich
    Posts
    2,100
    - Boot a liveCD such as Knoppix, ubuntu, <whatever>
    - mount the device
    - rename the directory back to /etc
    You must always face the curtain with a bow.

  3. #3
    Just Joined!
    Join Date
    Jun 2010
    Posts
    10
    I can't see the partition under Knoppix, under /dev i can see an sda2 file, i think this is my partition but when i try to mount but i'm not able to do it, i got error msg.

    Do you have any idea?

    Regards.

  4. #4
    Super Moderator MikeTbob's Avatar
    Join Date
    Apr 2006
    Location
    Texas
    Posts
    7,145
    Boot Knoppix and post the output of these commands please.
    Code:
    fdisk -l
    Code:
    mount
    I do not respond to private messages asking for Linux help, Please keep it on the forums only.
    All new users please read this.** Forum FAQS. ** Adopt an unanswered post.

  5. #5
    Just Joined!
    Join Date
    Jun 2010
    Posts
    10
    Here is the requested outputs

    root@Microknoppix:~#
    root@Microknoppix:~# fdisk -l

    Disk /dev/sda: 78.4 GB, 78381957120 bytes
    255 heads, 63 sectors/track, 9529 cylinders
    Units = cylinders of 16065 * 512 = 8225280 bytes
    Disk identifier: 0x0003cc21

    Device Boot Start End Blocks Id System
    /dev/sda1 * 1 13 104391 83 Linux
    /dev/sda2 14 9529 76437270 8e Linux LVM
    root@Microknoppix:~# mount
    rootfs on / type rootfs (rw,relatime)
    proc on /proc type proc (rw,relatime)
    sysfs on /sys type sysfs (rw,relatime)
    /dev/sr0 on /mnt-system type iso9660 (ro,relatime)
    tmpfs on /ramdisk type tmpfs (rw,relatime,size=1048576k)
    /dev/cloop on /KNOPPIX type iso9660 (ro,relatime)
    unionfs on /UNIONFS type aufs (rw,relatime,si=d7613ccc,noplink)
    unionfs on /home type aufs (rw,relatime,si=d7613ccc,noplink)
    usbfs on /proc/bus/usb type usbfs (rw,relatime)
    tmpfs on /UNIONFS/var/run type tmpfs (rw,relatime,size=10240k)
    tmpfs on /UNIONFS/var/lock type tmpfs (rw,relatime,size=10240k)
    tmpfs on /UNIONFS/var/log type tmpfs (rw,relatime,size=102400k)
    tmpfs on /tmp type tmpfs (rw,relatime,size=1048576k)
    udev on /dev type tmpfs (rw,relatime,size=20480k)
    tmpfs on /dev/shm type tmpfs (rw,relatime,size=1048576k)
    devpts on /dev/pts type devpts (rw,relatime,mode=1777)
    root@Microknoppix:~#

  6. #6
    Just Joined!
    Join Date
    Jun 2010
    Posts
    10
    Is there any update please?

    Thank you

  7. #7
    Linux Guru
    Join Date
    Oct 2007
    Location
    Tucson AZ
    Posts
    1,943
    Your first need to create the mount point, example: mkdir /mnt/sda2 (you don't need to call it sda2, use whatever you wish)

    Then mount: mount -t ext3 /dev/sda2 /mnt/sda2 (I used ext3 for filesystem type, if that is not correct, change it)

    You should then be able to access. I see you are using LVM which I am totally unfamiliar with so I'm not sure this will work?

  8. #8
    Just Joined!
    Join Date
    Jun 2010
    Posts
    10
    Thank you

    I just tried what you posted and i got the result bellow:


    root@Microknoppix:~# mkdir /mnt/sda2
    root@Microknoppix:~# mount -t ext3 /dev/sda2 /mnt/sda2
    mount: /dev/sda2 already mounted or /mnt/sda2 busy
    root@Microknoppix:~#

    Any proposition?

    Thank you

  9. #9
    Just Joined!
    Join Date
    Jun 2010
    Posts
    10
    Any update?

    Sorry for the stress

  10. #10
    Linux Guru
    Join Date
    Oct 2007
    Location
    Tucson AZ
    Posts
    1,943
    Your output shows /mnt/sda2 is already mounted. Can you navigate to the /mnt/sda2 directory and see if you are able to view directories/files? I don't really have any other suggestions, not that familiar with mount command or LVM.

Page 1 of 3 1 2 3 LastLast

Posting Permissions

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