Forums

John
John
Offline
Resolved
0 votes
Hi all,

I have access to a standalone COS box that I got from work, but for unknown reasons I am only able to boot it in emergency mode.
This might be basics for the average developer, but I need to copy a file from it and I have no idea where to start.
I was able to browse to the file locally and I found it, but I could use some help with copying it.
I cannot access this box with WinSCP or PuTTy, because I am unable to boot it up normally and make the changes so I could access it from my home network.
I only have FAT32 USB sticks and NTFS external USB drives.

Please advice,

John

Ps.
I would have liked to boot it up normally so I could copy some more settings from it, but I gave up on that.
Saturday, June 12 2021, 10:49 AM
Share this post:

Accepted Answer

John
John
Offline
Saturday, June 12 2021, 02:54 PM - #Permalink
Resolved
0 votes
The following commands solved it for me:
sudo fdisk -l
mkdir /mnt/usb
mount /dev/sdh /mnt/usb
cd /etc
ls
cp exports /mnt/usb
umount /mnt/usb

Greetings,

John
The reply is currently minimized Show
Responses (3)
  • Accepted Answer

    Saturday, June 12 2021, 11:07 AM - #Permalink
    Resolved
    0 votes
    You'll just have to use classic command line stuff. If you don't have ntfs-3g installed, you can forget the NTFS disk.
    Plug in the USB stick and then run the command "dmesg". You will see the device name you have just plugged in. Something like /dev/sdb. You now need to mount it somewhere. Typically you do this under /mnt but you can do it anywhere.:
    mkdir /mnt/usb # or call the folder anything you want.
    mount /dev/sdX /mnt/usb # for sdX use the device name from dmesg. There may be a number after the X. Check with "fdisk -l"
    You can now use the cp command to copy files and the -R switch will copy files recursively. After you have finished you have to unmount the drive before removing it:
    umount /mnt/usb
    Any mount done like this will be temporary and will have to be redone if you reboot.

    There are heaps of tutorials on the internet for mounting USB sticks.
    The reply is currently minimized Show
  • Accepted Answer

    John
    John
    Offline
    Saturday, June 12 2021, 01:17 PM - #Permalink
    Resolved
    0 votes
    Thanks, but I get into trouble with the first step.
    dmesg|more results in 14 pages of feedback that I don't know how to read.

    Please advice,

    John
    The reply is currently minimized Show
  • Accepted Answer

    Saturday, June 12 2021, 07:44 PM - #Permalink
    Resolved
    0 votes
    When you plugged the device in, it showed at the end of the dmesg command in the last few lines. There are other ways as well such as looking at "blkid" and "fdisk -l".
    The reply is currently minimized Show
Your Reply