Forum Articles
  Welcome back Join CF
You are here You are here: Home | Forum | Installing linux on a remote machine

You are currently viewing our boards as a guest which gives you limited access to view most of the discussions, articles and other free features. By joining our Virgin Media community you will have full access to all discussions, be able to view and post threads, communicate privately with other members (PM), respond to polls, upload your own images/photos, and access many other special features. Registration is fast, simple and absolutely free so please join our community today.


Welcome to Cable Forum
Go Back   Cable Forum > Computers & IT > General IT Discussion
Register FAQ Community Calendar

Installing linux on a remote machine
Reply
 
Thread Tools
Old 28-10-2006, 03:45   #1
The Jackal
Inactive
 
Join Date: Oct 2006
Posts: 1,604
The Jackal has a bronzed appealThe Jackal has a bronzed appeal
The Jackal has a bronzed appealThe Jackal has a bronzed appealThe Jackal has a bronzed appealThe Jackal has a bronzed appealThe Jackal has a bronzed appealThe Jackal has a bronzed appealThe Jackal has a bronzed appealThe Jackal has a bronzed appealThe Jackal has a bronzed appeal
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
The Jackal is offline   Reply With Quote
Advertisement
Old 29-10-2006, 02:00   #2
The Jackal
Inactive
 
Join Date: Oct 2006
Posts: 1,604
The Jackal has a bronzed appealThe Jackal has a bronzed appeal
The Jackal has a bronzed appealThe Jackal has a bronzed appealThe Jackal has a bronzed appealThe Jackal has a bronzed appealThe Jackal has a bronzed appealThe Jackal has a bronzed appealThe Jackal has a bronzed appealThe Jackal has a bronzed appealThe Jackal has a bronzed appeal
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
The Jackal is offline   Reply With Quote
Old 29-10-2006, 02:05   #3
Druchii
cf.mega poster
 
Druchii's Avatar
 
Join Date: Mar 2006
Location: Oslo, Norway.
Age: 36
Services: Canal Digital: 50/10
Posts: 7,577
Druchii has a nice shiny star
Druchii has a nice shiny starDruchii has a nice shiny starDruchii has a nice shiny starDruchii has a nice shiny starDruchii has a nice shiny starDruchii has a nice shiny starDruchii has a nice shiny starDruchii has a nice shiny starDruchii has a nice shiny starDruchii has a nice shiny starDruchii has a nice shiny starDruchii has a nice shiny starDruchii has a nice shiny starDruchii has a nice shiny starDruchii has a nice shiny starDruchii has a nice shiny starDruchii has a nice shiny starDruchii has a nice shiny star
Re: Installing linux on a remote machine

Hahaha, good luck dude!
Druchii is offline   Reply With Quote
Old 29-10-2006, 02:08   #4
The Jackal
Inactive
 
Join Date: Oct 2006
Posts: 1,604
The Jackal has a bronzed appealThe Jackal has a bronzed appeal
The Jackal has a bronzed appealThe Jackal has a bronzed appealThe Jackal has a bronzed appealThe Jackal has a bronzed appealThe Jackal has a bronzed appealThe Jackal has a bronzed appealThe Jackal has a bronzed appealThe Jackal has a bronzed appealThe Jackal has a bronzed appeal
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
The Jackal is offline   Reply With Quote
Old 29-10-2006, 02:12   #5
Druchii
cf.mega poster
 
Druchii's Avatar
 
Join Date: Mar 2006
Location: Oslo, Norway.
Age: 36
Services: Canal Digital: 50/10
Posts: 7,577
Druchii has a nice shiny star
Druchii has a nice shiny starDruchii has a nice shiny starDruchii has a nice shiny starDruchii has a nice shiny starDruchii has a nice shiny starDruchii has a nice shiny starDruchii has a nice shiny starDruchii has a nice shiny starDruchii has a nice shiny starDruchii has a nice shiny starDruchii has a nice shiny starDruchii has a nice shiny starDruchii has a nice shiny starDruchii has a nice shiny starDruchii has a nice shiny starDruchii has a nice shiny starDruchii has a nice shiny starDruchii has a nice shiny star
Re: Installing linux on a remote machine

1:11am why?
Druchii is offline   Reply With Quote
Old 29-10-2006, 02:19   #6
The Jackal
Inactive
 
Join Date: Oct 2006
Posts: 1,604
The Jackal has a bronzed appealThe Jackal has a bronzed appeal
The Jackal has a bronzed appealThe Jackal has a bronzed appealThe Jackal has a bronzed appealThe Jackal has a bronzed appealThe Jackal has a bronzed appealThe Jackal has a bronzed appealThe Jackal has a bronzed appealThe Jackal has a bronzed appealThe Jackal has a bronzed appeal
Re: Installing linux on a remote machine

Quote:
Originally Posted by Druchii View Post
1:11am why?
Some apps will b0rk at a change of time...

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
The Jackal is offline   Reply With Quote
Old 29-10-2006, 02:23   #7
Druchii
cf.mega poster
 
Druchii's Avatar
 
Join Date: Mar 2006
Location: Oslo, Norway.
Age: 36
Services: Canal Digital: 50/10
Posts: 7,577
Druchii has a nice shiny star
Druchii has a nice shiny starDruchii has a nice shiny starDruchii has a nice shiny starDruchii has a nice shiny starDruchii has a nice shiny starDruchii has a nice shiny starDruchii has a nice shiny starDruchii has a nice shiny starDruchii has a nice shiny starDruchii has a nice shiny starDruchii has a nice shiny starDruchii has a nice shiny starDruchii has a nice shiny starDruchii has a nice shiny starDruchii has a nice shiny starDruchii has a nice shiny starDruchii has a nice shiny starDruchii has a nice shiny star
Re: Installing linux on a remote machine

Nice, so i take it it's not broken then?
Druchii is offline   Reply With Quote
Old 29-10-2006, 03:04   #8
The Jackal
Inactive
 
Join Date: Oct 2006
Posts: 1,604
The Jackal has a bronzed appealThe Jackal has a bronzed appeal
The Jackal has a bronzed appealThe Jackal has a bronzed appealThe Jackal has a bronzed appealThe Jackal has a bronzed appealThe Jackal has a bronzed appealThe Jackal has a bronzed appealThe Jackal has a bronzed appealThe Jackal has a bronzed appealThe Jackal has a bronzed appeal
Re: Installing linux on a remote machine

Quote:
Originally Posted by Druchii View Post
Nice, so i take it it's not broken then?
Nope but I made a fatal error which could have cost me anyway heres a mini HOWTO

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
The Jackal is offline   Reply With Quote
Old 29-10-2006, 03:24   #9
Gareth
cf.mega poster
 
Gareth's Avatar
 
Join Date: Dec 2003
Age: 50
Posts: 7,101
Gareth has a pair of shiny starsGareth has a pair of shiny starsGareth has a pair of shiny starsGareth has a pair of shiny starsGareth has a pair of shiny starsGareth has a pair of shiny stars
Gareth has a pair of shiny starsGareth has a pair of shiny starsGareth has a pair of shiny starsGareth has a pair of shiny starsGareth has a pair of shiny starsGareth has a pair of shiny starsGareth has a pair of shiny stars
Re: Installing linux on a remote machine

Nice one... gonna store this for future reference
Gareth is offline   Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 03:16.


Server: osmium.zmnt.uk
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
All Posts and Content are © Cable Forum