1

I plan on installing Ubuntu 19.04 and give it 100 GB of my 256 GB SSD space and leave the rest for Windows as I would primarily be using Ubuntu.

A. Now, as I plan to install a lot of applications in Ubuntu, should I give more space to the / partition than the home partition? (Or maybe even drop the /home altogether?).

B. I have another 128 GB SD card for files like photos, audio and video files. Please suggest me the optimal partitioning for the use case.

C. Also, I have 8 GB of RAM so what should be the optimal swap partition size?

D. How would the distribution be if I choose "install Ubuntu alongside Windows" option?

K7AAY
  • 17,202
  • 1
    Yes, I do have windows installed already. When 19.04 reaches its end of support, will I have to reinstall 18.04 manually? Or will I be provided with an update? – Ayush Goel Jul 23 '19 at 17:38
  • Please note 19.04 reaches End of Life in January 2020, and you must upgrade to a newer version or install anew by then; 18.04 LTS End of Life is April 2023 I would not try to go from 19.04 to 18.04 LTS; instead, go from 19.04 to 19.10 then to 20.04 LTS when those become available, or just install 18.04 for the stability and then consider obtaining the newer kernels for their new features. https://linuxconfig.org/how-to-downgrade-ubuntu-linux-system-to-its-previous-version explains the difficulties in going backwards. – K7AAY Jul 23 '19 at 17:46
  • 1
    Please don't consider using a SD storage card for anything... esp important files like photos/audio/video. Just too slow, and too unreliable. – heynnema Jul 23 '19 at 19:30
  • 1
    With a smallish SSD, don't even consider manually partitioning the space to include things like a separate /home. Just use the standard Ubuntu partitioning with 1 partition. – heynnema Jul 23 '19 at 19:31
  • You should use Ubuntu 20.04 LTS as its the latest Ubuntu release! – jdev082 Jul 17 '20 at 15:30

2 Answers2

0

You are a bit limited on disk space on the SSD so I recommend dropping the /home partition altogether and going with a single partition for everything in your Ubuntu operating system. New installations of Ubuntu 17.04 and later create a swap file instead of a swap partition by default, so a single >= 25GB partition for Ubuntu is all you need. This feature makes more efficient use of valuable disk space on SSDs.

You can also add the 128 GB SD card to /home by following the instructions in How to increase space in /home, by adding an extra hdd? or How can I give space on another drive to my Ubuntu partition?. This will allocate to your Ubuntu installation 100GB on the SSD (plenty of room to install applications) + 128GB on the SD card making a total of 228 GB for Ubuntu and the remaining 156GB of disk space on the SSD will be allocated to Windows 10 by the Install Ubuntu alongside Windows 10 option in the Installation type screen of the Ubuntu installer. You won't need to do any manual partitioning because you will only be making one new partition in the Installation type screen of the Ubuntu installer.

In the general case here is my method for calculating the disk space required for installing Windows on a home computer for personal use. If disk space is not a limiting factor I would allocate at least 100 GB for Windows not including stored files. Let's assume that there is an additional 100 GB that is required for stored files in Windows. Adding the two together gives a recommended disk space of at least 200 GB for this scenario,

karel
  • 114,770
  • What about the swap space? Is 16GB swap required(considering the recommended thumb rule of twice the Physical RAM )? And how will the distribution be if I choose to install ubuntu alongside windows? – Ayush Goel Jul 23 '19 at 17:34
  • New installations of Ubuntu 17.04 and later create a swap file instead of a swap partition by default, so a single partition for Ubuntu is all you need. This feature makes more efficient use of valuable disk space on SSDs. – karel Jul 23 '19 at 17:39
  • @AyushGoel the recommended swap is no longer twice physical RAM. I'd recommend starting with a 4G swap. – heynnema Jul 23 '19 at 19:29
  • Ubuntu supports dynamic swap file sizing, so fresh installations of Ubuntu 17.04 and later don't have to be locked in to 4GB or any other fixed swap file size, – karel Jul 23 '19 at 19:34
  • @karel re: "dynamic swap file sizing"... not in standard Ubuntu. Maybe via some third party utility. You CAN of course, manually add /swapfile1 and /swapfile2, etc as needed... so that's kind of dynamic... :-) – heynnema Jul 23 '19 at 19:40
  • You don't need to install a third-party utility. dphys-swapfile package is available from the default repositories in all currently supported versions of Ubuntu. dphys-swapfile is a utility to autogenerate and use a swap file. This init.d script exists so one does not need to have a fixed size swap partition. – karel Jul 23 '19 at 19:44
  • @karel As I mentioned... "not in standard Ubuntu" and "maybe via some third party utility". re:" dphys-swapfile", according to the description, it is from 2010, and "it creates swapfile twice as big as the present RAM amount with an upper limit of 2 GB". I was recommending 4G to start. – heynnema Jul 23 '19 at 19:51
  • 1
    dphys-swapfile package has been updated several times since 2010. The latest update was for Ubuntu 18.10. It's in the default Ubuntu repos and it's being maintained, so I think dphys-swapfile is safe to use. If you experience issues with dphys-swapfile, you can uninstall the package. – karel Jul 23 '19 at 19:56
  • @karel The version in the repos is from 2010... so it doesn't have the benefits of any updates. – heynnema Jul 23 '19 at 20:22
0

A. Keeping all Ubuntu files in one partition is preferred; when you need to reinstall, you can back up, then verify, all the files under home before reinstallation.

B. I would keep the 128 GB SD Card separate from the root partition of Ubuntu, so you can easily access it from Windows, and remove it if needed. They have a significantly higher failure rate than SSDs or HDDs, and I would not trust a filesystem split between an SD card and another drive.

You can access files for read, write, create, and delete in the Windows NTFS partition if you wish to share files across both operating systems; however, Windows does not access files in Linux filesystems well. Every time I have tried to access a Linux ext4 partition from Windows using drivers, I have ended up with a corrupted filesystem.

C. RedHat says 4 GB or more for swap. Swap partitions are passé in Ubuntu since before 18.04 LTS; the default now is a swap file equal in size to your RAM, so you do not need a separate swap partition, and since Ubuntu is much more efficient in the use of swap. dphys-swapfile allows autogeneration of the swapfile as well as turning it off when no longer needed. Here's a good primer on swap and zswap, an alternative which uses CPU and memory instead of disk space if you've got a fair amount of RAM and processor power available. zram is also worth considering.

D. When you do the dual boot 'alongside' install, the Ubuntu installation app, Ubiquity, will ask you how much space you will take on the SSD for Ubuntu. If it's occupied be a Windows-style NTFS partition, Ubiquity will resize that NTFS partition and make space, whatever you specify, in the SSD for Ubuntu. You can also, later on, reallocate space for either partition, if you boot from the Ubuntu LiveUSB and run gparted.

K7AAY
  • 17,202
  • 1
    re: "Windows does not access files in Linux filesystems well" in fact, if you install a Windows driver to read/write to ext2/3/4 partitions, you WILL corrupt them. Don't do it. – heynnema Jul 23 '19 at 19:33
  • re: "I would try doing without Ubuntu swap entirely" no... every machine needs swap. Period. – heynnema Jul 23 '19 at 19:35