0

I want to use a swap file instead of partition.

I don't have any experience in using partition manager. I don't want to lose my current data on disk.

I tried Wubi before and got a bad experience.

Korkel
  • 1,158
  • 1
  • 10
  • 26
  • sorry, It's me again. http://askubuntu.com/questions/483455/error-while-resizing-partition-before-installation-of-ubuntu-how-can-i-get-my-d New username obviously. – user293649 Jun 15 '14 at 03:54

1 Answers1

1

If you don't want to use swap partition, just don't create it during installation. Choose manual partitioning in Ubuntu installer, create partition for / file system with ext4 and that's it. Ubuntu will run without swap partition, and you can add swap file then.

You can create a swap file of two gigabytes by doing the following commands:

$ sudo fallocate -l 2048M /myswap

$ sudo chmod 600 /myswap

$ sudo mkswap /myswap

$ sudo swapon /myswap

Add swap entry to /etc/fstab file:

/myswap none swap defaults 0 0

Now you have swap as file /myswap instead of traditional swap partition.

  • 1
    (manual partitioning) Select "something else" during installation. If you have only one for windows, right click on the windows partition, select resize. Then, rightclick available space select "new", format "ext4", and mount point "/". Click to apply changes and accept to continue installation. – mchid Jun 12 '14 at 07:32