0

I am attempting to transfer a new Linux image, and corresponding files, between 2 boxes. Only my Controller has USB support containing my newly built kernel. I want to transfer the kernel from my Controller and get it running on the Guest but the only connection between the 2 is through /dev/pts/2. The Guest has no services (ftpd, sshd, etc.). I do have busybox so microcom is available but I have no idea what I'm doing there.

Can anyone tell me how I can get my new bzImage from my Controller to my Guest over /dev/pts/2?

Thanks.

Okay - a little more detail: The Guest and Host are 32-bit linux systems running Xen on OpenXT. So far only dom0 can mount my USB drive which has the new kernel image I'm trying to install. dom0 has used 86% of it's allocated 562M (i.e. 457M). I'm trying to get the kernel to a Guest machine which doesn't have any services running which also has 84% of it's disk space used up.

The Guest is prebuilt and currently I cannot change it the image. I do have the Guest .vhd on dom0 and may be able to work with the .vhd to modify the kernel there but I don't have the space on dom0 to do the work.

jiveturkey
  • 153
  • 1
  • 9
  • Can you be a little more specific? Most importantly, is this a hypervisor with a terminal connection to a guest? If it is, how are you providing storage to this guest? You can likely simply mount that storage directly on the hypervisor and transfer your files that way. Then unmount / detach and start your guest. – Spooler Jan 31 '17 at 15:25
  • Yes it is a hypervisor guest. Currently, the only thing that has visibilty to the mounted USB stick is the Controller. I do not have the capability to mount the drive through the hypervisor. Or at least I have no clue how that could be done. – jiveturkey Jan 31 '17 at 15:43
  • 2
    Well, there are many ways to do this reasonably. However, we'd need to know more about your systems. What hypervisor is it? What OS are you running on the guest and the host? Where are things stored? Why can't you temporarily add SSH? In its current state, this question isn't exactly answerable, so provide as much specific data as you can. – Spooler Jan 31 '17 at 16:02

2 Answers2

1

The traditional way to transfer files over serial lines is to use ZMODEM protocol or something similar.

But working with VMs and having access to the storage from another OS could simplify the work.

IMHO, instead of focusing on how to use pts to transfer a file, you should describe the entire problem so that people could give you a better answer.

Mircea Vutcovici
  • 17,619
  • 4
  • 56
  • 83
  • +1 for zmodem. I still use zmodem today (sz and rz) all the time for much more than serial lines. It is handy when there isn't an easy way to transfer files that only root have access to. It is also useful in lossy networks, as it adds additional error correction on top of tcp/ip which has limits. – Aaron Feb 08 '17 at 16:05
1

Well a lot of this problem was due to my misunderstanding of Xen. I am able to mount the USB device using Xen's tap-ctl. But in case anyone is looking for an actual answer to this question - copying a file over /dev/pts can be done using screen. There is a nice write-up on StackOverflow. Is it possible to send file contents to GNU screen session?

jiveturkey
  • 153
  • 1
  • 9