Find the answer to your Linux question:
Page 1 of 2 1 2 LastLast
Results 1 to 10 of 14
Hello everybody, I'll try to make this as simple as I can, but please be pacient with me, I never used Linux before and everything I know so far it's ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Nov 2013
    Posts
    6

    Error running Linux CentOS in dedicated server


    Hello everybody, I'll try to make this as simple as I can, but please be pacient with me, I never used Linux before and everything I know so far it's from Google's search and personal experience with the famous "trial and error".

    Last week I was experiencing some issues with MySQL server and one of my dedicated server's hard disk partition. The main partition (where I have MySQL and Linux OS installed) was full, and I tried to free space moving some folders to another partition.

    Because of my luck, and negligence, I move the folder "sbin" with another folders (can't remember the name of them) to the "home" partition. For my surprise, when I finished, I tried to access through SSH to my dedicated server (using PuTTY) and when I enter the root password, it says "wrong password". So I freaked out. I restarted the dedicated server, and I receive this error:
    IMAGE > img18.imageshack.us/img18/781/bs3l.png

    I immediately contacted the company that gives me the server but they told me the only thing they can do is restore the server and, of course, format (erase) everything on it.
    I really freaked out x1000000, because I use it for work purposes and I didn't make a backup, because I started using it a few weeks ago.

    Anyway, this people won't help me to solve my problems, but I started to think a few things about this:

    1. Is there any way to format just ONE partition (the server has THREE), install Linux OS in that partition and then fix the issue in the partition where Linux OS corrupted is installed?
    #### IN CASE IT IS POSSIBLE ####
    How can I do this? Is like Windows like booting a CD and everything else? Can I do this with an external hard disk through USB?

    2. Another ideas? Like solving this OS issue without formating and that stuff.

    ------

    As I said, I'm using this server for work purposes and I have tons of clients' files in there, I can't afford such a loss like that, and I refuse to accept that it's the only "possible solution" to format an entire hard disk.

    ------

    LAST ERROR I RECEIVE WHEN INITIATING SERVER:
    IMAGE > img802.imageshack.us/img802/1484/61r4.png

    ## SOME INFO ABOUT THE DEDICATED SERVER
    Intel Xeon - Linux CentOS 6
    Don't know if it has optical drives like CD-RW.
    Don-t know if it has USB ports, I think it should.
    I have physical access for a limited amount of time, because it's in a private datacenter.

    ______________________________


    I really appreciate your time and help with this.
    Thanks a lot.

    Hope you can help me.


    Bye bye,
    Alan.

  2. #2
    Super Moderator Roxoff's Avatar
    Join Date
    Aug 2005
    Location
    Nottingham, England
    Posts
    3,885
    Oh dear. This is bad.

    Normally, it's easy to reformat a partition, you just unmount it reformat it, and mount it again - updating /etc/fstab if you've changed the UUID or partition name. Unfortunately you've trashed your system partition, which means you can't actually get your system booted and active using it's own resources - so you'd need to boot from another resource, a rescue disk or similar. This is very very difficult for servers hosted by 3rd parties, they wouldn't normally allow you physical access.

    I also can't see your server host wanting to do a special Linux install onto one small part of the trashed machine. They'd normally install these servers by a simple script which creates a copy of a standard install of the operating system on the server hard disk. They don't actually install the operating system again. Perhaps they'd make exceptions if you were paying lots for a support contract, so asking them might help.

    The best and correct solution to this situation is to re-install the system. Even if you could get the machine to boot up, you might be able to move back the files you moved. It's just so easy to do something wrong and break things in a way that's even worse if you attempt this. I wouldn't do it on one of my servers.

    If you just want your data back, then your hosting company might be persuaded to tar up the contents of a data partition (if it has one) and upload it or send it to you. Again, their willingness to do that might be coloured by the size of the support contract you have with them, but it might be the easiest option. You'd then need a Linux machine of your own to forensically recover your data.

    I don't think you need anyone to tell you now about how important backups are. The data you're on the verge of losing is _your_ valuable data, nobody else cares if you have a copy of it or not, only you. Once you recover from this mess, you should set up a proper backup process, and then test that the backups are usable it by doing a restore from one of your backups onto another system before you need to do it for real.
    Linux user #126863 - see http://linuxcounter.net/

  3. #3
    Just Joined!
    Join Date
    Nov 2013
    Posts
    6
    Quote Originally Posted by Roxoff View Post
    Oh dear. This is bad.

    Normally, it's easy to reformat a partition, you just unmount it reformat it, and mount it again - updating /etc/fstab if you've changed the UUID or partition name. Unfortunately you've trashed your system partition, which means you can't actually get your system booted and active using it's own resources - so you'd need to boot from another resource, a rescue disk or similar. This is very very difficult for servers hosted by 3rd parties, they wouldn't normally allow you physical access.

    I also can't see your server host wanting to do a special Linux install onto one small part of the trashed machine. They'd normally install these servers by a simple script which creates a copy of a standard install of the operating system on the server hard disk. They don't actually install the operating system again. Perhaps they'd make exceptions if you were paying lots for a support contract, so asking them might help.

    The best and correct solution to this situation is to re-install the system. Even if you could get the machine to boot up, you might be able to move back the files you moved. It's just so easy to do something wrong and break things in a way that's even worse if you attempt this. I wouldn't do it on one of my servers.

    If you just want your data back, then your hosting company might be persuaded to tar up the contents of a data partition (if it has one) and upload it or send it to you. Again, their willingness to do that might be coloured by the size of the support contract you have with them, but it might be the easiest option. You'd then need a Linux machine of your own to forensically recover your data.

    I don't think you need anyone to tell you now about how important backups are. The data you're on the verge of losing is _your_ valuable data, nobody else cares if you have a copy of it or not, only you. Once you recover from this mess, you should set up a proper backup process, and then test that the backups are usable it by doing a restore from one of your backups onto another system before you need to do it for real.
    Someone told me that if I boot the Linux CentOS install CD/DVD I should be able to run the OS without any trouble, because he told me Linux works properly without installing it directly on the server. So this way, I can move the files I moved the first time and thats all.
    Another thing he told me is that the Linux install CD/DVD has an app that allows modify the partitions size of the hard disk.

    Anyway, you already told me that this is something "dangerous", but I think it's my last option, because it's recover the data or not, and I have to take the risk because I already lost the data.

    Thanks a lot buddy, your answer help me a lot.

  4. #4
    Trusted Penguin Irithori's Avatar
    Join Date
    May 2009
    Location
    Munich
    Posts
    3,392
    Depending on the setup of this server (physical, vm, chroot, cloud), the ILO and the available tools of your provider,
    you might be able to boot your server via a virtual/remote device (ISO) or via a pxe boot menu.

    If that is possible, then you can access the disks of your server as if you would have booted a liveCD.
    From a liveCD (e.g. Knoppix) you can then mount your disks and copy the data out.
    You must always face the curtain with a bow.

  5. #5
    Just Joined!
    Join Date
    Nov 2013
    Posts
    6
    Quote Originally Posted by Irithori View Post
    Depending on the setup of this server (physical, vm, chroot, cloud), the ILO and the available tools of your provider,
    you might be able to boot your server via a virtual/remote device (ISO) or via a pxe boot menu.

    If that is possible, then you can access the disks of your server as if you would have booted a liveCD.
    From a liveCD (e.g. Knoppix) you can then mount your disks and copy the data out.
    I'll have physical access in a few hours.
    I have the CentOS iso DVD and the GpartedLiveCD so I will try to boot them and see what happens.

  6. #6
    Super Moderator Roxoff's Avatar
    Join Date
    Aug 2005
    Location
    Nottingham, England
    Posts
    3,885
    Quote Originally Posted by alanps View Post
    I'll have physical access in a few hours.
    I have the CentOS iso DVD and the GpartedLiveCD so I will try to boot them and see what happens.
    Physical access is king - boot up off the CentOS DVD, and remember that your ideal solution is to recover the data and then re-install the operating system. You might want to look at recovering the whole config for the machine, not just your own data. If you have a large USB memory stick, or a portable hard disk then these will be better for carrying any backed up data in this scenario (better than trying to burn data to DVD, for instance).
    Linux user #126863 - see http://linuxcounter.net/

  7. #7
    Trusted Penguin Irithori's Avatar
    Join Date
    May 2009
    Location
    Munich
    Posts
    3,392
    ok, these commands are your friends:
    Code:
    cfdisk -l
    mount -o ro <DEVICE> /mnt
    For the future, ask/demand a server with out-of-band management (ilo).
    You want to be able to access your machine, even if the OS/network is down or during BIOS/BootUp (for now obvious reasons).
    You must always face the curtain with a bow.

  8. #8
    Just Joined!
    Join Date
    Nov 2013
    Posts
    6
    Quote Originally Posted by Roxoff View Post
    Physical access is king - boot up off the CentOS DVD, and remember that your ideal solution is to recover the data and then re-install the operating system. You might want to look at recovering the whole config for the machine, not just your own data. If you have a large USB memory stick, or a portable hard disk then these will be better for carrying any backed up data in this scenario (better than trying to burn data to DVD, for instance).
    Quote Originally Posted by Irithori View Post
    ok, these commands are your friends:
    Code:
    cfdisk -l
    mount -o ro <DEVICE> /mnt
    For the future, ask/demand a server with out-of-band management (ilo).
    You want to be able to access your machine, even if the OS/network is down or during BIOS/BootUp (for now obvious reasons).
    Thank you both. You really save my ass.

    One last question, Irithori, what should I put in "<DEVICE>" ? =P

    Thanks!

  9. #9
    Trusted Penguin Irithori's Avatar
    Join Date
    May 2009
    Location
    Munich
    Posts
    3,392
    <DEVICE> depends on the output of cfdisk, aka: the setup of your disk/partitions.
    You must always face the curtain with a bow.

  10. #10
    Just Joined!
    Join Date
    Nov 2013
    Posts
    6
    Quote Originally Posted by Irithori View Post
    <DEVICE> depends on the output of cfdisk, aka: the setup of your disk/partitions.
    Ok I don't understand too much right now but I think I will when I boot the DVD =P.

    This is the really last question for real:

    What would you recommend me to do?
    OPTION 1: Boot the CentOS DVD, make a backup of the data and then re-install the OS.
    OPTION 2: Boot the CentOS DVD, make a backup of the data and then try to move the folders where it belongs.
    OPTION 3: Boot the CentOS DVD, make a backup of the data, try to move the folders, then boot Gparted and resize the partition size.

    I would like to try the option 3 because that way it wouldn't be necessary to re-install the OS, that scare me.

Page 1 of 2 1 2 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
  •