Remote installing a Linux OS

Discussion in 'Computer Science & Culture' started by Stryder, May 1, 2004.

Thread Status:
Not open for further replies.
  1. Stryder Keeper of "good" ideas. Valued Senior Member

    I've currently got this problem with a system that is on a dedicated server, simply put I botched an update so I've decided the system needs a clean reinstallation.

    However, I can't place boot diskettes into the system since it's miles away, or a bootable CDROM for that matter.

    I think it's possible to do a remote install none the less, Although the current Kernel is mildly corrupt, it's still functioning enough to allow remote connections, it basically means the current system has all the network information, drivers and peripherals running, but what I need to do in theory is generate a partition within the folder structure with the new Bootup kernel in, and then hijack the current bootloader to load the new kernel in place of the current one.

    (Basically I need a minimum install mounted folder structure that I can silently boot with the network options filled in automatically and a SSH server run for me to connect from remote)

    However currently I can't find any information on doing this sort of thing with a FreeBSD installation, anyone have an idea of how to go about it?
  2. Google AdSense Guest Advertisement

    to hide all adverts.
  3. Redrover Registered Senior Member

    I think that Debian has an option for a network install where a bootdisk (or, in your case, a boot partition you wrote yourself) makes the computer access another computer to install linux. I never used it myself but I read about it somewhere. Free BSD might have the same setup.
  4. Google AdSense Guest Advertisement

    to hide all adverts.
  5. Stryder Keeper of "good" ideas. Valued Senior Member

    Well it's easy enough to get the FreeBSD install to got to a filestructure and update files, however as mentioned it's the kernel that needs a rebuild.

    The current convention is, to install the OS you have to run a Kernel, if the Kernel is 4.9 and you want to install 5.2 then in practice it won't work unless you know what you are doing (which I don't lol)

    So my intension is to do an install on my box at home as a test. I'm going to do a Mini-install of 4.8. Once it's complete, I'm going to work out how to use the sysinstall command to split the Filesystem (Since sysinstall allows installation of the currently run Kernel and system over itself)

    I'm then going to attempt to place a 5.2 bootup kernel in the partition, then somehow I've got to parse the network settings from the current installation across to the "soon to be attempted" installation, then hopefully a reboot will mean the new "beyond mini-install" kernel is run, which should then allow for the OS to be installed as 5.2

    If it all goes to plan, I'll do a full writeup, walkthru/howto on how it's done. If it doesn't work, then some lucky admin is going to be £50 richer by the end of the night.
  6. Google AdSense Guest Advertisement

    to hide all adverts.
  7. okinrus Registered Senior Member

    Are you sure that you need a new install? You should be able to replace the kernel remotely as long as you don't cause a kernel panic or something, and then reboot.

    If all your doing is compiling and installing a new kernel, then the network settings will be preserved. You only must make sure that you have the correct network drivers installed with the kernel and the like.

    It will most likely work. I've found in the past that it was necessary to update the modprobe utilities, but I think this will probably work.
  8. Stryder Keeper of "good" ideas. Valued Senior Member

    Actually I did kind of do that, The main problem was that the FTP sites didn't have the version OS in (since it was a little old) so I had to hunt round for a mirror that hadn't updated in a millenia to get the OS.

    I think basically install the components and the Kernel that was the same version as the one I was trying to update from. It fixed all the problems except for a few lost users (in fact I intended to get rid of a few user accounts so that worked out)

    However the whole aspect of generating a remote install version of an OS sounds like a good project to try and find out about. Since there are a few posts on the net about the same setup, usually one OS on a dedicated that someone wants to replace with something else but can't use Bootdisks at the location.

    [If any Linux Developers are out there, you might want to look at that angle]
  9. Xerxes asdfghjkl Valued Senior Member

    Thats a pickle...

    With linux, I heard it was possible to mount a partition on your own computer that contains the images, then to boot to a partition on the server that contains the bootdisk image on /dev/hda1 (or whatever it is,) across the network. But if you need ssh, wow...

    I'm sure its possible, but its above my head. Wish I could help :m:
  10. okinrus Registered Senior Member

    I think you are confusing the vender version number with the kernel version number. Do a uname -a to get the kernel version number and then find the kernel at They have source code to very very early kernels.

    Sun has a automatic utility to do the mirroring, but on Linux I think you have to do it manually with dd. The problem with dd is that if the disk is churning you will get erroneous result. So to it you would have to have your operating system and usr on a partition that is not being modified while the dd command is being used. You would not have to go through a reinstall of the operating system because it does a complete disk copy of everything on the partition. I have not attempted this, however.
  11. Stryder Keeper of "good" ideas. Valued Senior Member

    Well as I mentioned the problem was a Userland Kernel sync problem. (Version number of the kernel was different from the programs that accompany it)

    I did manage to fix it, I managed to find, which has some of the older distro's still kicking about on it. Basically the install didn't replace the Kernel or it's settings, just the programs that accompany it.

    However I'm still intrigued if there is a method to do a remote install, the idea is this:

    Say your Running Kernel 4.9, you want to upgrade to 5.2 which can be tricky, you've decided the only option is really a clean install so as to deal with the issues it kicks.

    So you use /stand/sysinstall you either use upgrade or normal install, to alter your FS to some new settings.

    Basically you delete the current partition, and then split the partition in two. (Admittedly the new partition you'd want a size to hold the Barebones system for a higher Kernel version boot.)

    You then download to that new FS the barebones bootup kernel.

    Now the tricky part, You have to take the current information from the current kernel that contains your systems resources, driver info, hardware and network settings, and parse them across to the new file system, so the Bootup kernel there can use that information in the new barebones kernel.

    Then you have to rig the bootloader, to boot via the new FS Higher kernel bootup.

    Then a reboot command should start the system up (either you can relog in, or you going to need an admin to clean your system up), loading a new kernel with the network settings that you need to be able to continue a remote installation of a higher kernel.

    The Philosophy of how it's done suggests it can be done, however it needs work on dealing with splitting your FS in two and parsing data to a barebones kernel etc
    Admittedly it would have to be coded in a way so that the current distro's only need a few changes to make a remote install work.
Thread Status:
Not open for further replies.

Share This Page