1

I got a new machine:

  • 8GB RAM
  • 512GB SSD
  • 1TB HD

And I want to dual boot with Windows 10, I will be spending most of the time in Ubuntu doing software development + personal use, and will use Windows only for gaming or Mathematica. I also want to encrypt the drives, following the tutorial Encrypting disks on Ubuntu 19.04.

However, I understand that Windows 10 uses the bitlocker type encryption while Ubuntu would use the LUKS+LVM type so I wouldn't be able to access Windows files from Ubuntu or vice versa. Therefore, I won't encrypt Windows drives (since I'm not storing any sensitive data there) and am thinking of the following scheme:

SSD:

  • EFI system partition (from Windows), whatever the size on the SSD
  • Windows 10 system 250GB
  • /boot 500MB (necessary for encryption)
  • / 150GB (*encrypted)
  • /home 100GB (*encrypted)
  • /swap 4GB (*encrypted)

HDD:

  • sdb1 NTFS shrunk windows data partition
  • sdb2 NTFS shared data partition
  • sdb3 (*encrypted) private data partition

Now I have the following questions:

  1. I am not sure if I need a separate /home partition. I don't use other distros and I usually stay with one Ubuntu version (LTS) until the end of support (stability is an important feature for me). On the other hand, with the encrypted / and /home, they may be more reliable as separate partitions so that if one is corrupted the other stays OK. What do you advise? Also note that my / is much larger than /home, that's because most of the files will be on the shared HDD partition and I will symlink ~/Downloads and other folders. On my previous machine, after installing many packages (the python ecosystem is huge) I found that / fills up pretty quickly. Does that make sense?

  2. Should I get rid of the shared data partition and just mount the Windows drives? On my previous machine, I used to just mount the Windows drives in Ubuntu and copy files to/from there. But sometimes it wouldn't mount because of the way Windows shut down.

  3. The reason for a separate encrypted private data partition is that I want to be able to access files from Windows and I don't really care to encrypt movies or music files, only important stuff like tax docs or private data. I am also not sure if encrypting movies harms performance. Like, if I have a 10GB 4K movie that doesn't fit in RAM, will it stutter if the CPU has to decrypt it on the fly?

1

1 Answer 1

1

1) Splitting /home and / is useful if you want to reinstall your system (for example, 18.04 instead of 16.04) and don't want to backup all your data to external storage. However, it's still better to delete dot-files, because of package incompatibility. As for reliability, if your /home gets corrupted, alive / will not help you. Anyway, save LUKS headers to external secure storage for this case. On the other hand, splitting limits your / and /home, if you had a single partition on your previous setup, your python packages were on the same partition and could use a space which is shared between system and user. If you upgrade once in 2 years and your data is on external HDD, I think you don't need to split.

2) I have disks C: and D: on Windows, because system disk (C:) contains many windows system files which are unused on linux, but it looks not ok, So I have shared D: between systems, on which I store large files (I have only 256Gb SSD and 750Gb HDD) and C: is only for Windows system.

3) On the fly LUKS decryption is fast enough and doesn't need to decrypt a whole file, but is still has some overhead, for example, if you read from SSD with max speed (~500Mb/s), on LUKS it will noticeably use CPU. The main reason not to encrypt movies/music/unsensitive data is that it's hard to mount LUKS on Windows (not even sure, it's possible).

3
  • Thanks for the answer. Do you get a speedup by having /home be a separate partition when compiling or doing heavy numerical computations? since you get a separate buffer for /home files and for /? Also, are you just mounting the Windows data D: drive on ubuntu startup for shared files?
    – teagut
    Dec 6, 2019 at 13:04
  • I can't get any speedups because /home and / are on one physical SSD, and it's bandwidth is shared. Also, the bottleneck is usually not in disk IO, but in CPU. Yes, I mount it to /media on startup using /etc/fstab Dec 6, 2019 at 13:07
  • To speed up disk IO intensive computations, you just need ot have your data on SSD, no matter if it is /home, / or single partition, or even another SSD shared data partition Dec 6, 2019 at 13:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.