I have a lot of linux systems running in places where I can only access them over SSH, the problem is that I need to write over the system harddrive on those systems to update them. I wonder about the best way to do this?

  • There's not a lot of detail in your question. You might find that the amount of work people put into their answers corresponds to the amount of work you put into describing your problem.
    – Norky
    Jun 2 '11 at 9:27

This Debian-centric howto should be helpful, if not exactly what you need.


I would suggest creating a 2. Partition, install everything chrooted to this Partition and configure Grub to try to boot the new system on startup, I would also configure a Fail over so that Grub only tires to boot the new system the next time, and then again boots the old system if it fails and you reboot again. When everything is running fine configure Grub to boot the new system by default, and you can erease the old one. After all is done you can recombine the Partions if you like, but it might be smart to keep them around just in case you are doing something like this again.

  • how will Ola accomplish this over SSH?
    – Patrick R
    Feb 12 '10 at 13:30
  • Well I don't see anything you can't do via SSH, partition creation can bedone via fdisk ie, I don't know from the top of my head wether it can shrik Partitions but there is a way to do this. Configuring Grub is just a Textfile, and issue a reboot command is not a problem, as well as installing a System in a chroot. I guess the only problem would be a 2. reboot if the new system fails to boot, but even a really simple host offers some way to reboot the server. Feb 12 '10 at 14:04
  • I was thinking about something like this, I was also wondering if I could make a ramdisk and chroot to that one and work from there so I don't have to reboot in between only after the work is done. But I don't know if this is possible.
    – Ola
    Feb 12 '10 at 15:51

There are ways with some kickstart trickery, but it shouldn't really be done. Someone has to have physical access to the machine, why can't they do it?

  • This might have nontrivial costs for a VPS, depending on the plan. Feb 12 '10 at 14:49
  • The reason to do this is costs, as I mentioned above I have a lot of these systems (>300) and they are part of a bigger machine and not easy accessible so it will take time to get physical access to all of them. So if I spend 1 week scripting an automated update over ssh I will save a lot of time.
    – Ola
    Feb 12 '10 at 15:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.