![]() |
Installing linux on a remote machine
Shoot me but I've been burning to know this one....
OK so what if I'm a lazy **** and can't be asked to goto the datacentre to do manual installs. Here goes thanks to this forum I've decided to try some of the newest distros and have been quite impressed to say the least. Think my last installs were in 2001 LOL what the hell if the machines are running who needs an upgrade ? :) So now I do want to upgrade but how ? Example machine 1 in DC : Runnning Redhat 8 some are on 6.2 :o What I was thinking was to extract the ubuntu server filesystem onto a spare disk in the machine make all the devices and kernel and then temporarily point LILO to the new disk and filesystem.(LILO without save reverts back to last bootloader if things fail : a power cycle off the power bar will restore the machine to the old disk ie rh 8) . Is this worth a shot ? Can I do it from a livecd ISO ? or maybe it's safer to create a virtual PC with the live disk and then build a kernel that can boot the created fs ? I'm open to suggestion other than getting my a$$ down to the DC :) ---- FYI I'm going down the VMWARE route so far good. I just hope ubuntu writes the bootloader to the correct disk :) I'll take a back up of the boot headers just in case :) |
Re: Installing linux on a remote machine
-------------------
phew - heart is fluttering at the moment ..... The moment of truth has arrived and am doing the reboot should know if all this has worked or else I'll have to jump in a car grrrrrrrrrrrrrr and go fix borked machine |
Re: Installing linux on a remote machine
Hahaha, good luck dude!
|
Re: Installing linux on a remote machine
Feck not a good time to be trying this daylight saving hour have just changed what time is it on your clock ?
My lappy is showing 1:07 |
Re: Installing linux on a remote machine
1:11am why?
|
Re: Installing linux on a remote machine
Quote:
But not to worry it seems to have semi worked but not as well as I wanted :o Going for another reboot as I write |
Re: Installing linux on a remote machine
Nice, so i take it it's not broken then? :p:
|
Re: Installing linux on a remote machine
Quote:
Installing a new distro on a Remote Machine Disclaimer : If you **** up your machine the author takes no responsibility nor does he give out charity. It's your own fault for being too smart and too lazy to do the install in front of the the computer in question. BEFORE STARTING ENSURE YOU HAVE ACCESS TO A REMOTE POWERBAR SO THAT YOU CAN POWER CYCLE YOUR MACHINE IF IT HANGS Instructions [0] Background : My setup /dev/hda1 original OS /dev/hda2 swap /dev/hdc1 empty partition /dev/hdc2 swap [1] Find or create a partition or select a disk for the new OS [2] Install Vmware : download ISO of the distro of your choice. [3] Create a virtual machine using a physical disk mounting the distro and carefully install onto the new partition / disk ensure that a new boot loader from the installer is not written to the disk (especially if your new OS partion is going to reside on the same disk as the old OS), Dont worry if the install process has written a boot loader overwritting the current bootloader of your default OS - If it has just run lilo from outside the Virtual Machine ie natively on the running OS to restore your default bootloader. [4] Trying to boot the new OS : If it was installed on a new disk and the bootloader was written to that disk then you can boot it simply within Vmware. If not then use tomsbootroot disk as a mounted floppt within Vmware to boot the new OS sending the parameters bz2bzImage root=/dev/hdc1 ro (single : single user mode if you got problems you need to fix with the new OS) etc etc. Once up and running configure networking and write some debug scripts to write a logfile to fs and within that script send it for reboot immediately(optional). Remember to change /etc/fstab so that root / points to the new / fs in my instance : /dev/hda1 / ext3 defaults 1 1 now becomes /dev/hdc1 / ext3 defaults 1 1 The usage of LABEL=/ did not work for me if you know how to make that work let me know e2label didnt hack it for me - couldn't be ar$d to play with it. That should be it from the vmware side of things [5] Trying to boot the OS natively : Now this is where it gets tricky. Even though there may be a bootloader on the new disk YOU MUST REMEMBER THAT THIS LOADER CAN ONLY BE READ BY THE BIOS and BIOS is this case is that of the Virtual machine, (ie Vmware) therfore trying to boot the new OS natively will not work as your native BIOS will not have the correct references to know where /boot/kernel is. So we use the old kernel from your existing install to boot the new OS. Modify /etc/lilo.conf default=default image=/boot/vmlinuz-2.4.20t label=default read-only root=/dev/hda1 image=/boot/vmlinuz-2.4.20t label=mirrorindirect read-only root=/dev/hdc1 Here's mine I made the addition of mirrorindirect. IMPORTANT do not change default to the new entry unless you're a mega big head and are confident that its gonna work first time ! Lets instead instruct LILO to *TRY* the new kernel/config if it fails then a powercyle of the machine will revert back and load the default profile : KOOOL lilo -d 0 -R 'mirrorindirect'; reboot Your machine should come back up using the new OS of not power cycle and your old OS will be booted. [6] Icing on the cake stuff... Boot into the new OS and write a new lilo bootloader to a free partion or disk (MAKE SURE YOU DON'T OVERWRITE THE OLD OS BOOTLOADER) lets say you write it to /dev/hdc Once thats done reboot back into the old OS and write a new boot entry into lilo.conf other=/dev/hdc label=mirrordirect Now you should be able to boot into the new OS with its kernel via : lilo -d 0 -R 'mirrordirect'; reboot Once in the new OS you will know that if you reboot you'll be going back to the old OS..... Sweet |
Re: Installing linux on a remote machine
Nice one... gonna store this for future reference :tu:
|
| All times are GMT +1. The time now is 03:14. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
All Posts and Content are © Cable Forum