Score:2

Allocate more space for copying files via live CD

pk flag

Using the version of ubuntu server 20.04 I would like to copy some files in the RAM memory from a usb stick and then transcribe them again in a second usb memory.

I currently have 32GB of RAM installed, but it looks like I can only use 16GB. enter image description here

I understand that the system to work needs a slice of memory to work, but would it be possible to repartition the ram memory in order to allocate 5GB of RAM and another 27GB of "HDD"?

I have already read that it is possible to extend this space using a USB memory, but they are not solutions for me.

UPDATE 1: the result of free-h is the following: enter image description here

The goal was to avoid that the USB stick A can transmit information on the USB stick B due to some computer virus or other.

So the idea was as follows:

  • Copy the contents of memory B to RAM.
  • Replace USB memory B with memory A.
  • Write the data in memory A

UPDATE 2: I found this: https://ostechnix.com/adjust-size-root-partition-live-arch-linux/

is it possible to replicate this in ubuntu?

Alternatively, using Arch, how can you quickly set the screen resolution via the terminal?

As the system boots, a resolution or frequency not supported by the display appears to be used!

I know that xrandr exists, but without a video output it seems a bit difficult to understand what is broken.

Soren A avatar
mx flag
What is the output of `free -h` ?
sudodus avatar
jp flag
Can you connect both USB drives at the same time, or can you only connect one of them each time? Why are you running Ubuntu Server *live*? Is there an internal drive? What kind of drive and how big is it, the drive that your Ubuntu Server is booting from? - I think it would nicer to run [Xubuntu Core](https://unit193.net/xubuntu/core/) live or persistent live instead of Ubuntu Server. Xubuntu Core is small.
Pinguto avatar
pk flag
I have updated the question .. I hope I have answered both of them. :)
sudodus avatar
jp flag
Most virus will reside in files, and I don't think your strategy will protect against such virus. I think you can have two USB drives connected at the same time, and make the transfer directly.
Pinguto avatar
pk flag
I understand, but I'd like to get a computer that is literally impossible for you to access without my permission to use as a "digital safe". As you well know, despite the continuous updates, there will always be some exploitable bugs, so I aimed at a hardware procedure with which it is possible to avoid data leakage.
ofirule avatar
th flag
I don't understand your logic, Please see: https://security.stackexchange.com/questions/123872/safe-to-connect-a-usb-to-linux and https://askubuntu.com/questions/4508/how-do-i-safely-use-a-virus-infected-usb-drive-in-ubuntu
sancho.s ReinstateMonicaCellio avatar
I found no answers for this interesting question... https://www.linuxquestions.org/questions/ubuntu-63/change-the-size-of-the-ramdisk-used-by-ubuntu-12-04-live-cd-4175435393/, https://unix.stackexchange.com/questions/393973/define-ram-disk-size-of-a-custom-built-kali-iso-when-booted-live
Pinguto avatar
pk flag
I have updated my application again. I understand that for some my purpose may not make any sense, but I often have to work using live CD distributions and often a few more gigs is not that I would mind that much!
Score:2
in flag

You can try to resize the memory partition size using:

sudo mount -o remount,size=10G none /
  • none - doesn't matter for tmpfs
  • / - mountpoint

Example:

# mkdir /mnt/test 
# mount -t tmpfs -o size=1G none /mnt/test
# df -h |grep test
none                 1,0G     0  1,0G   0% /mnt/test
# mount -o remount,size=10G none /mnt/test
# df -h |grep test
none                  10G     0   10G   0% /mnt/test
# mount -o remount,size=1000G none /mnt/test
# df -h |grep test
none                1000G     0 1000G   0% /mnt/test

Second, If you can resize it fine, you could even set it way more that your available memory, BUT keep in mind, that those files are stored in memory, and your PC will slow down event into standstill if you run out of free memory.

If you really need more than available memory you can:

  • setup a swap file/partition on some hard drive (including usb) - but keep in mind that it will not be encrypted by default
  • just create/mount some drive like normal and use it (same, you can always encrypt it)
Pinguto avatar
pk flag
Your solution works, but before accepting it I believe that some corrections need to be made: in ubuntu the folder for mounting devices is **media** and not **mnt** and if you don't create the folder in which to mount the partition dummy with **mkdir / media / test** the command will fail!
in flag
Path was just as an more visual example. Personally I use /mnt/ for manually created mountpoints, because /media/ is a lot of times managed by OS subsystem, so I avoid any potential problems. But added the mkdir.
Pinguto avatar
pk flag
OK thank you! I happily accept your answer! :)
Score:0
th flag

Here is a guide on how to adapt GRUB2 and mount a LiveISO and maybe this guide for a TAILS distribution is also interesting for achieving your goals. This starts a virtual system which enables you to mount USB flash drive A and B. Here you can do everything, zip packages or encrypt folders and files.

Pinguto avatar
pk flag
Not bad tool, but I don't think it's for me. Anyway thanks for your answer!
lemrm avatar
th flag
@Pinguto I'm very interested in your solution. Please, post it here.
Pinguto avatar
pk flag
For the moment I have not yet found a definitive solution. I'm doing some tests with Manjaro's linux distribution or I'll try to get the 16GB offered by ubuntu enough.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.