0

I've made a typo while doing:

$ sudo dd if=/dev/zero bs=1MiB of=/host/ubuntu/disks/root.disk conv=notrunc oflag=append count=2048
$ sudo losetup -c /dev/loop0/
$ sudo resize2fs /dev/loop0

In first command, so the rest couldn't execute. I'm new to Ubuntu and I don't know what happened to that 2GB's. Apparently they are lost. How can I return them?

Here is my df:

Filesystem     1K-blocks      Used Available Use% Mounted on
/dev/loop0      17996772  12940340   4239864  76% /
udev             1665928         4   1665924   1% /dev
tmpfs             335100       876    334224   1% /run
none                5120         0      5120   0% /run/lock
none             1675496       376   1675120   1% /run/shm
/dev/sda1      110697468 102797320   7900148  93% /host

While the last one should have 2 GB's more

4
  • What typeo did you make?
    – psusi
    Apr 4, 2014 at 21:58
  • "sudo dd if=/dev/zero bs=1MiB of=/host/ubuntu/disks/root.diskconv=notrunc oflag=append count=2048" Apr 5, 2014 at 15:43
  • Then you created a file named /home/ubuntu/disks/root.diskconv=notrunc instead of appending to /home/ubuntu/disks/root.disk. Just delete that file.
    – psusi
    Apr 5, 2014 at 18:51
  • Thanks a lot. Please add this as an answer. I will check it as correct answer. Apr 5, 2014 at 20:47

1 Answer 1

2

Then you created a file named /home/ubuntu/disks/root.diskconv=notrunc instead of appending to /home/ubuntu/disks/root.disk. Just delete that file.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .