LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 04-27-2017, 04:47 PM   #1
hokie1999
Member
 
Registered: Feb 2011
Posts: 52

Rep: Reputation: 0
Copying file from server in rescue mode


Hello,

I am in rescue mode on a Centos 7 server. On this server, I created a file "mbr.gz" How would I copy this file to another server?

 
Old 04-27-2017, 06:00 PM   #2
r3sistance
Senior Member
 
Registered: Mar 2004
Location: UK
Distribution: CentOS 6/7
Posts: 1,375

Rep: Reputation: 217Reputation: 217Reputation: 217
you haven't told us what access you have to the servers. You could use a USB stick, or you could bring up networking manually and SCP/SFTP/RSYNC it across /etc. Do you have physical access or is it remote?
 
Old 04-27-2017, 07:33 PM   #3
hokie1999
Member
 
Registered: Feb 2011
Posts: 52

Original Poster
Rep: Reputation: 0
remote, no usb possible.

ifconfig eth0 ip netmask gw .. not work

Does networking work in rescue mode? Ambiguous answers internet-wide. if so, how? Thanks.
 
Old 04-27-2017, 07:43 PM   #4
r3sistance
Senior Member
 
Registered: Mar 2004
Location: UK
Distribution: CentOS 6/7
Posts: 1,375

Rep: Reputation: 217Reputation: 217Reputation: 217
CentOS 7, should be able to do:

Code:
systemctl start network
if that doesn't work then you'd need to manually devices up with ifup.

You would need to ensure that your partitions are mounted first tho, so makesure the correct partitions appears in /proc/mounts. In Example:

Code:
$ grep "^/" /proc/mounts
/dev/mapper/centos-root / xfs rw,seclabel,relatime,attr2,inode64,noquota 0 0
/dev/vda1 /boot xfs rw,seclabel,relatime,attr2,inode64,noquota 0 0
/dev/mapper/centos-var /var xfs rw,seclabel,noatime,attr2,inode64,noquota 0 0
/dev/mapper/centos-tmp /tmp xfs rw,seclabel,nosuid,nodev,noexec,noatime,attr2,inode64,noquota 0 0
/dev/mapper/centos-tmp /var/tmp xfs rw,seclabel,nosuid,nodev,noexec,noatime,attr2,inode64,noquota 0 0
/dev/mapper/centos-home /home xfs rw,seclabel,relatime,attr2,inode64,noquota 0 0
/dev/mapper/centos-var_log /var/log xfs rw,seclabel,relatime,attr2,inode64,noquota 0 0
Naturally this won't match what you have.
 
Old 04-27-2017, 07:49 PM   #5
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 20,953

Rep: Reputation: 4073Reputation: 4073Reputation: 4073Reputation: 4073Reputation: 4073Reputation: 4073Reputation: 4073Reputation: 4073Reputation: 4073Reputation: 4073Reputation: 4073
If you are logged in to a remote server I'd be betting the network is already up.
How you ship the file depends on what you have - and what impediments are in place (thinking PAM here). scp might work.

Giving more detail rather than terse responses will allow to to get better help.
 
Old 04-27-2017, 07:53 PM   #6
hokie1999
Member
 
Registered: Feb 2011
Posts: 52

Original Poster
Rep: Reputation: 0
ok i'll try again, tx
 
Old 04-27-2017, 08:56 PM   #7
hokie1999
Member
 
Registered: Feb 2011
Posts: 52

Original Poster
Rep: Reputation: 0
I see enoX-ifcfg in network-scripts. X is number > 0. can one of these be configured in rescue mode? Would i use DEVICE, IP, NETMASK, GATEWAY then a systemctl start for the network?

Get "Connection actiavation failed: No available devices found"

ifcfg-eth0 doesn't work. This is rescue mode now.

Last edited by hokie1999; 04-27-2017 at 09:20 PM.
 
Old 04-28-2017, 01:38 AM   #8
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872
Blog Entries: 12

Rep: Reputation: 6051Reputation: 6051Reputation: 6051Reputation: 6051Reputation: 6051Reputation: 6051Reputation: 6051Reputation: 6051Reputation: 6051Reputation: 6051Reputation: 6051
if you are able to work on the remote server, that means you're "in" already, no?
have you tried scp?
how are you "getting into" the server?
what is the host machine? linux? windows with putty? something else?

and possibly more info required. without it, Ambiguous answers internet-wide.
 
Old 04-28-2017, 07:51 AM   #9
hokie1999
Member
 
Registered: Feb 2011
Posts: 52

Original Poster
Rep: Reputation: 0
In remote server via ILO. In rescue mode, booted to CentOS iso. Set interface file ifcfg-ino1 with IP, netmask, gateway, etc. Created mbr. Need to get mbr file to another server. systemctl restart network.service give error described above. scp does not work. Ifconfig shows the interface ino1 is set with IP, netmask. Cannot ping gateway. Brand new server with no OS.

What else can I tell you?

May have to have tech at remote site put usb in and copy to that. Slow.
 
Old 04-28-2017, 09:40 AM   #10
hokie1999
Member
 
Registered: Feb 2011
Posts: 52

Original Poster
Rep: Reputation: 0
I would say disregard this question. Doesn't appear do-able with iso being used here CentOS7-x86_64-DVD-1511.iso Thanks for your inputs on this.
 
Old 04-28-2017, 09:56 AM   #11
r3sistance
Senior Member
 
Registered: Mar 2004
Location: UK
Distribution: CentOS 6/7
Posts: 1,375

Rep: Reputation: 217Reputation: 217Reputation: 217
Have you mounted the disks/partitions as I recommended earlier? After that you should then do a chroot to partition containing / to do the "systemctl start network".
 
Old 04-28-2017, 12:41 PM   #12
hokie1999
Member
 
Registered: Feb 2011
Posts: 52

Original Poster
Rep: Reputation: 0
Yes, r3sistance, have done all of those items, no luck.
 
Old 04-28-2017, 06:38 PM   #13
AwesomeMachine
LQ Guru
 
Registered: Jan 2005
Location: USA and Italy
Distribution: Debian testing/sid; OpenSuSE; Fedora; Mint
Posts: 5,524

Rep: Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015
Rescue mode on the install CD/DVD is good for a very few things, such as reinstalling the boot loader, or working in a chroot environment. If you just want to copy a file, use a live CD, like Knoppix.

The rescue shell is primitive. But it is indispensable for certain tasks. In this instance you want to use a live CD/DVD.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Server Data Recovery Via Rescue Mode seth.cannon Linux - Server 25 09-03-2015 05:00 PM
Edit file from Rescue Mode? tdog Linux - General 3 10-29-2005 01:59 PM
mounting '/ ' file system on linux rescue mode ?? bipinkdas Red Hat 2 01-25-2005 10:16 AM
Edit file in rescue mode DanielTan Linux - Newbie 1 09-19-2004 11:44 AM
Copying file in text mode? HadesThunder Linux - Newbie 5 03-30-2004 06:03 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 06:14 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration