Allocate more space for copying files via live CD
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.
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:
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.
Solution 1:
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)