0

Running ubuntu 14.04 LTS

How can I extend the size of my root directory?

Filesystem      1K-blocks       Used  Available Use% Mounted on
/cow              2000144    1944256          0 100% /
udev              8173044          8    8173036   1% /dev
tmpfs             1636908       1392    1635516   1% /run
/dev/sdd1         5754872    3096492    2658380  54% /cdrom
/dev/loop1         985344     985344          0 100% /rofs
none                    4          0          4   0% /sys/fs/cgroup
tmpfs             8184536       1236    8183300   1% /tmp
none                 5120          0       5120   0% /run/lock
none              8184536        152    8184384   1% /run/shm
none               102400         40     102360   1% /run/user
/dev/sdd2         1983056      48668    1815604   3% /mnt

Results of sudo lsblk -f

NAME   FSTYPE   LABEL MOUNTPOINT
sda    btrfs    Media
sdb    btrfs    Media
sdc    btrfs    X
sdd
├─sdd1 vfat           /cdrom
└─sdd2 ext4           /home
loop0  ext3
loop1  squashfs       /rofs

Results of sudo lsblk -m

AME     SIZE OWNER GROUP MODE
sda      3.7T root  disk  brw-rw----
sdb      1.8T root  disk  brw-rw----
sdc      5.5T root  disk  brw-rw----
sdd      7.5G root  disk  brw-rw----
├─sdd1   5.5G root  disk  brw-rw----
└─sdd2     2G root  disk  brw-rw----
loop0      2G root  disk  brw-rw----
loop1  962.1M root  disk  brw-rw----

So I am just starting out with Ubuntu and forgot how my installation went. And I understand that my root is on /cow. But the thing is that I cannot find /cow anywhere in GParted (even after booting from a live GParted USB, I could not find it to resize it).

Am trying to increase the usable disk space of it.

how GParted looks

So;

  • Which disk is /cow at?
  • How can I increase the size?
  • What is /cdrom?
  • Please post an image of gparted so we can take a look too, – George Udosen Jan 03 '17 at 11:22
  • Thanks George. I've added a link to the image of GParted. –  Jan 03 '17 at 11:25
  • How could you tell that /cow is in /dev/sdd2? I'm sure the above is not true as /cow is using 2gb at the moment. Also /dev/sdd2 is a partition I created for /home. They are both on an 8gb USB drive. –  Jan 03 '17 at 11:45
  • You are running a live system, and /cow is in RAM. If you click on the button in the top right corner, you might find the other drives (now you are looking at /dev/sdd, and there could be at least /dev/sda, /dev/sdb and /dev/sdc). – sudodus Jan 03 '17 at 11:46
  • Please post the output of sudo lsblk -fand sudo lsblk -m – sudodus Jan 03 '17 at 11:48
  • Your right about /cow's location. Opps – George Udosen Jan 03 '17 at 11:56
  • I didn't look at your /dev/sdd size. – George Udosen Jan 03 '17 at 11:59
  • As @sudodus correctly pointed out. You have to reduce /dev/sdd1 and increase /dev/sdd2, you don't need to work on /cow. – George Udosen Jan 03 '17 at 12:02
  • Added the results requested by @sudodus I also looked at the other drives, but could now find /cow. –  Jan 03 '17 at 12:14
  • @George Sorry I don't understand. /dev/sdd2 was a partition created for my /home. And only 100mb is occupied on it. How will increasing it help with anything? –  Jan 03 '17 at 12:15
  • Looking at your image /dev/sdd1 belongs to boot and takes up most of the disk space, so to get more space you have to reduce /dev/sdd1 so that will now be given to /dev/sdd2. Boot doesn't needed that much space. – George Udosen Jan 03 '17 at 12:23
  • If I may ask what system are you running ? – George Udosen Jan 03 '17 at 12:29

1 Answers1

2

You are running Ubuntu(?) live booted from /dev/sdd. The iso file was extracted to /dev/sdd1 mounted at /cdrom for historical reasons, and you created /dev/sdd2 for /home. The root partition is in RAM (a ramdrive) in a live system, and the RAM allocated is approximately half of the RAM available (automatically).

If you want a bigger root partition, you can create a new partition and give it the label casper-rw. It would also be possible to reconfigure your system and use /dev/sdd2 for that purpose. But I would suggest that you backup whatever you have saved in your home partition to some other location before you do that.

At boot Ubuntu will select the partition labeled casper-rw and use it for an overlay, so that you can store installed programs and tweaks (and you get a persistent live system).

Another option is to start from the beginning and create a persistent live system with mkusb. It will do the configuring for you automatically. See the following links,

help.ubuntu.com/community/mkusb

mkusb/persistent

A third option is to create a partition labeled casper-rw in another drive, one of the internal drives, or in another USB drive or a memory card.

'Simple persistence'

sudodus
  • 46,324
  • 5
  • 88
  • 152
  • This looks promising. Will creating a partition labeled casper-rw have it automatically used as root? And am I able to delete /cdrom? –  Jan 03 '17 at 12:53
  • Yes and no. Yes, a partition labeled casper-rw will automatically be used as root, or more correctly will be overlayed with root. No, if you remove /cdrom, there is nothing to boot from (unless you create a new persistent live system from the iso file). – sudodus Jan 03 '17 at 13:14
  • Thank you for your help. I did the first suggestion but dh -f still includes /cow /cow 2.0G 1.9G 0 100% / but also includes the new partition I created /dev/sdd3 3.3G 5.9M 3.1G 1% /media/alexkwa/casper-rw –  Jan 03 '17 at 13:25
  • Did you reboot? 2. What linux distro are you running, and which version of that distro? 3. How did you create the USB boot drive (with which tool or method)? And what file system is there in /dev/sdd3, the casper-rw partition? - If Ubuntu family or Debian Jessie, I think it will be easier to succeed with mkusb.
  • – sudodus Jan 03 '17 at 13:28
  • Rebooted. 2. Running ubuntu 14.04 LTS 3. Can't remember but with unetbootin I think 4. ext4 for the casper-rw
  • –  Jan 03 '17 at 13:32
  • It used to work to create persistence with Unetbootin, at least with a file for persistence, which limits the size to 4 GB. But I know that it works with the current versions of Ubuntu to create persistence with mkusb, where you can use a partition, and are not limited at 4 GB, but by the remaining size on the drive. – sudodus Jan 03 '17 at 13:35
  • I assume I have to copy/remove the smaller casper-rw (/cow) to the new partition somehow? Will this work; http://askubuntu.com/questions/435320/how-do-i-transfer-a-casper-rw-file-to-a-partition –  Jan 03 '17 at 13:37
  • But you have a partition already - that link is for transfering a casper-rw file to a casper-rw partition. It is probably ten times faster to start from the beginning compared to trying to fix this system. – sudodus Jan 03 '17 at 13:41