I used http://www.pendrivelinux.com to build an installation of Linux Mint on a USB stick, so I could have a portable OS (mainly for work emergencies). It's installed, and works fine, but it's only used 5.8GB of space whereas the USB stick itself is 14.7GB. (when I say GB here, I mean 10^9 bytes).
When i'm inside the OS in question, and run df -h
, i see this:
Filesystem Size Used Avail Use% Mounted on
/cow 3.9G 3.7G 31M 100% /
udev 3.9G 4.0K 3.9G 1% /dev
tmpfs 784M 1.5M 783M 1% /run
/dev/sdb1 15G 5.5G 9.2G 38% /cdrom
/dev/loop0 1.5G 1.5G 0 100% /rofs
none 4.0K 0 4.0K 0% /sys/fs/cgroup
tmpfs 3.9G 4.0K 3.9G 1% /tmp
none 5.0M 0 5.0M 0% /run/lock
none 3.9G 76K 3.9G 1% /run/shm
none 100M 28K 100M 1% /run/user
I get warning messages like "This machine only has 20MB remaining", suggesting that it's the /cow partition (or whatever it is) at the top which is being used.
And when i run df -h
on a different machine, with the usb stick plugged in, i see this for the usb stick:
/dev/sdc1 15G 5.5G 9.2G 38% /media/UUI
Same as in the /dev/sdb1
partition listed in the results of df
in the problem OS (the 5.5 vs 5.8 difference is because df reports sizes in blocks of 1024 bytes).
If i run fdisk -l
from within the problem OS, i get this:
Disk /dev/sda: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders, total 976773168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk identifier: 0x3d7d91ef
Device Boot Start End Blocks Id System
/dev/sda1 2048 3074047 1536000 7 HPFS/NTFS/exFAT
/dev/sda2 * 3074048 313377829 155151891 7 HPFS/NTFS/exFAT
/dev/sda3 313378814 948099071 317360129 5 Extended
Partition 3 does not start on physical sector boundary.
/dev/sda4 948099072 976771071 14336000 7 HPFS/NTFS/exFAT
/dev/sda5 931889152 948099071 8104960 82 Linux swap / Solaris
/dev/sda6 519759872 931889151 206064640 83 Linux
/dev/sda7 313378816 519757823 103189504 83 Linux
Partition table entries are not in disk order
Disk /dev/sdb: 15.7 GB, 15724707840 bytes
74 heads, 10 sectors/track, 41503 cylinders, total 30712320 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0xc3072e18
Device Boot Start End Blocks Id System
/dev/sdb1 * 8064 30712319 15352128 c W95 FAT32 (LBA)
(the 500GB listed at the top is the size of the hard disk in the host machine that the usb stick is plugged into)
And when I run fdisk -l
on a different machine, with the usb stick plugged in, I see the following for the USB stick:
Disk /dev/sdc: 15.7 GB, 15724707840 bytes
74 heads, 10 sectors/track, 41503 cylinders, total 30712320 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0xc3072e18
Device Boot Start End Blocks Id System
/dev/sdc1 * 8064 30712319 15352128 c W95 FAT32 (LBA)
So, it looks like it's FAT32. Is this the reason for the size limit? Is there any way I can expand this "partition" or whatever it is to use up the entire USB stick? My install is unusable as is because I need to install about 5GB of files on there, and leave a couple of GB for swap etc, in order for it to be any use for my work.
EDIT: in my original question it wasn't obvious that i was running the commands in my question on a DIFFERENT OS, with the usb stick plugged into it as an external drive, rather than running them INSIDE the problem OS install. I've added the results of running the commands inside the install as well, and more clearly denoted which is which. Sorry for any confusion caused.
EDIT2 - i've reformatted the drive to ext4 but looking at it in the Disk Utility it says that the format is ext4 but the partition type is W95 FAT32. (see attached png) Is this ok? It'd be a pita to install all the stuff again and then find out i still didn't format the usb drive correctly.
df
output tells, 9.2 GB are free (only 38% of the 15G are in use). The file size limit for FAT32 however is 2GB, leading to your problems. If the system is not meant to be mountable by a Windows system but rather to only run in live mode, reinstall the linux and make sure to format the drive to ext3 (better ext4). – FelixJN Jul 28 '15 at 9:00df
shows. Is there actually a problem here? – terdon♦ Jul 28 '15 at 9:23