0

I was in Live USB session.. i needed to download some files for work but there wasn't that much space in my storage then i noticed that /dev/sda3 is really big than the other 2 partitions and it's absolutely empty. my pendrive is 16GB and it shows that there are three partitions, one is around 3GB, which is /dev/sda1 (it's the main OS i think), one is 4.4MB EFI partition, which is /dev/sda2 and the last one is 13GB writable partition, which is /dev/sda3 and it's only 2.5% full and it is located in /var/log . so i downloaded some files in there, and before shutting down my pc i forgot to delete those files but after that when i opened my pc again i noticed that the file isn't there anymore but the storage is the same when the file was there.

So, I have 3 questions-

  1. Can i make the storage the same as it was before downloading the files in /var/log ?
  2. Is there a way to increase the storage in /dev/sda1 by reducing the storage of /dev/sda3 ?
  3. My USB has not persistent storage (and i don't have another PC/LAPTOP/USB Drives to make it persistent), can i save the files in dev/sda3 so that even after i restart my pc the files remain there ?

Note- I didn't had permission to save files to /var/log but i changed it to everyone and created a folder there, after i restarted my pc the folder was gone but the storage was the same as when the folder was there. And i'm actually really new to Linux/Ubuntu so i don't know much.

NAME    SIZE FSTYPE
loop0     2G squashfs
sda    14.7G iso9660
├─sda1  2.7G iso9660
├─sda2  4.2M vfat
└─sda3 12.1G ext4
sr0    1024M
MrDuck
  • 81
  • 1
  • 7
  • 1
    Does this answer your question? [How to resize partitions?](https://askubuntu.com/questions/126153/how-to-resize-partitions) – Pilot6 Jul 30 '22 at 10:54
  • i'm actually in a live usb session from the same usb which i want to resize.. it doesn't seems to work or maybe i can't do it. – MrDuck Jul 30 '22 at 11:47
  • @MrDuck, What is the file system in the partition with size around 3 GB? ISO9660 or FAT32 (or something else)? You can check with the command `lsblk -f -o name,size,fstype` in a terminal window and post the output in your original question. Indent each line 4 spaces to render it as `code`. – sudodus Jul 30 '22 at 12:44
  • it is ISO 9660 @sudodus – MrDuck Jul 30 '22 at 14:40
  • 1
    This is a cloned drive with the read-only file system ISO 9660. If you want to make the drive persistent live, you should start from the beginning and make a fresh system. But as said in your other thread, if your only working operating system is in the USB drive, it is too risky to overwrite it. Because if you fail you have no operating system. What you can do is to change the label of the ext4 file system in `/dev/sda3` to `usbdata` (not 'writable', not 'casper-rw'). This would turn it into a partition for storage. As long as you only touch `/dev/sda3`, the live system will survive. – sudodus Jul 30 '22 at 14:58
  • I will check if/how this can be done, and after that I can write an answer ... – sudodus Jul 30 '22 at 14:59
  • that would be really helpful... thanks man – MrDuck Jul 30 '22 at 15:00
  • 1
    @MrDuck, I have written an answer now at your other thread, and there is also a useful answer by C.S.Cameron over there (since you know how to start again, if the conversion fails). – sudodus Jul 30 '22 at 16:21
  • 1
    i do have ways to fix it if i made any mess but as i said i'm new to linux and i can't really understand their answers.. but your answer really helped me.. it works, thank you so much – MrDuck Jul 30 '22 at 16:24

0 Answers0