LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Enterprise (https://www.linuxquestions.org/questions/linux-enterprise-47/)
-   -   rescue cd for pxe with fixed ip? (https://www.linuxquestions.org/questions/linux-enterprise-47/rescue-cd-for-pxe-with-fixed-ip-4175621722/)

goorooj 01-16-2018 05:17 AM

rescue cd for pxe with fixed ip?
 
Hi Swarm Intelligence,

Following Environment: remote Datacenter, rented rack, nobody there. I dont want to drive there, a day would be gone.

Pure Linux / VMware environment. almost all is virtual and HA, except the 2 database servers with a 1.1TB database running, second as hot standby.

now one of these [removed] up. i can contact the OOB card www server, and pipe the console via terminal emu to ssh. tried all well known grub recovery and kernel options

it does not help much in this case, i would have to edit some files in the filesystem as it turned out. so normally i would just start a rescue CD and do that, but i am not there.

the environment is safe and stripped of everything not needed. so there is for example no dhcp server.

now i did set up a pxe boot server, with dhcp. i need an image now that boots up with a certain ip address and ssh access, so i can boot that from the faulty machine, ssh to it and repair the file system... how do i do that? take an existing image and do what? can somebody point me in the right direction, my brain seems to fade out by now the longer i think about it.

TB0ne 01-16-2018 07:25 AM

Quote:

Originally Posted by goorooj (Post 5807053)
Hi Swarm Intelligence,
Following Environment: remote Datacenter, rented rack, nobody there. I dont want to drive there, a day would be gone. Pure Linux / VMware environment. almost all is virtual and HA, except the 2 database servers with a 1.1TB database running, second as hot standby.

now one of these [removed] up. i can contact the OOB card www server, and pipe the console via terminal emu to ssh. tried all well known grub recovery and kernel options

it does not help much in this case, i would have to edit some files in the filesystem as it turned out. so normally i would just start a rescue CD and do that, but i am not there. the environment is safe and stripped of everything not needed. so there is for example no dhcp server.

now i did set up a pxe boot server, with dhcp. i need an image now that boots up with a certain ip address and ssh access, so i can boot that from the faulty machine, ssh to it and repair the file system... how do i do that? take an existing image and do what? can somebody point me in the right direction, my brain seems to fade out by now the longer i think about it.

You don't. While there may exist some options depending on your hardware (for example, **SOME** blade servers do have the ability to put an address in BIOS), PXE has no way of knowing or configuring any address-type stuff. Far simplest way to go is to set up a DHCP server with an address range of ONE, since you only need one machine, and let it do its thing. Or use any existing DHCP server and have it dole out the correct address based on the MAC address of the card.

goorooj 01-16-2018 08:04 AM

Thanks for the hint. i already thought of the MAC but i cannot read it out from serverview, cannot look on the switch and cannot find any documentation. so i will take the IP range of one adress solution. joy of inherited infrastructure.
thanks, sometimes you need a hit with a blunt object on the head to get thinking going again.

goorooj 01-22-2018 03:40 AM

Just for everybody that comes here on a search:

i got it going. PXE was not much of a help either, important mistake i made was that i appended the kernel options in order "... rw init=/bin/bash console=ttyS0,115200 console=tty0" because it was already in the original grub entry like that.
and this does not work because sterr/stdout goes only to the LAST console in this entry. so the shell was there, just i did not see it. i think this goes for every serial console.
reversing the console entries gave me the prompt.

so for Fujitsu RX300 S6 the way to go with ServerView Console to see the terminal is appending these kernel option on the linux line in Grub: rw init=/bin/bash console=ttyS0,115200
and just omitting the console=tty0 entry, I did not have a monitor anyway.


All times are GMT -5. The time now is 06:44 PM.