1

I have 256gb ssd and 1 tb hdd. I want to dual boot windows 10 and ubuntu 20.04 in ssd, putting all the downloads, documents and media files in hdd. I will create 2 partitions for each os in hdd and another one combined for both.

As I have read that separate /home partition is not required and it will be installed in /root so i wont create a /home partition. I am a beginner in linux so correct me if I'm wrong, /home partition or folder contains all the programs, downloads and documents. So I would like to have the downloads and documents in HDD. Also reading other threads it seems that making /home seperately in a hdd partitions will slow down booting or program loading.

I read this article https://itsfoss.com/dual-boot-hdd-ssd/ and the 4th option given there to "keep root as well as home on SSD. And you make a partition on the HDD and then soft link it to your Music, Videos and Downloads folder. This way, application-specific files like browser caching utilize the SSD and other big files stay on HDD." seems the best to me. But it mentions some problems "But this could be complicated to set specially with fast boot enabled on Windows which would mean special efforts to auto-mount the partitions." So how can it be done?

xenos
  • 105
  • I probably wouldn't symbolic link, but just mount directories on your HDD to those locations... but do whatever works best for you. – guiverc Mar 19 '21 at 08:47
  • /home doesn’t house programs so I wouldn’t worry about performance for that reason. It does house configuration files so reading those could be slightly slower. If performance is your goal just mount HDD directory’s within home as suggested by @guiverc – PonJar Mar 19 '21 at 09:03
  • can you tell how to mount hdd directories? – xenos Mar 19 '21 at 10:18
  • I have multiple installs & link same set of folders into each so they all have same data. Details: https://askubuntu.com/questions/1013677/storing-data-on-second-hdd-mounting & https://askubuntu.com/questions/1058756/installing-all-applications-on-a-ssd-disk-and-putting-all-files-on-hdd-disk & https://ubuntuforums.org/showthread.php?t=2315714 – oldfred Mar 19 '21 at 14:24

1 Answers1

0

The approach of using symlinks in a dual boot setup, to seamlessly make data on an ntfs formatted drive that is shared with Windows available to the user is a very valid approach. Symlinks for practical purposes act and feel like folders. You can create them easily as a normal user without needing root permissions.

Creating a symbolic link is easy using the graphical file manager "Files", and of course can also be done with the terminal.

Graphical way with "Files" (nautilus)

Method 1

  • Open two Files windows, one where the folder is that you want to link, and the other where you want to create the link.
  • Drag the file or window for which you want to create a link to the other window *while keeping Ctrl+Shift pressed.

You can of course rename the link if you want.

Method 2

For this method, you need to enable the option to create links using the right-click menu. In "Preferences", "Behaviour" tab, make sure to check "Show action to create symbolic links". Once this option is set:

  • Right-click the file/folder you want to create a link for, then select "Create Link".
  • Move the link to the destination, and optionally rename it to remove the "Link to " prefix.

Method 3

Once the right-click menu is enabled, a shortcut key that does the same is also enabled. So when a file/folder is selected, hitting Ctrl+Shift+m immediately will create a shortcut, that you then can move and rename.

Terminal

The command is

ln -s <target> <link name>

for example, to link a folder Documents on a separate hard drive in the user's home folder:

ln -s /media/user/mounted_drive/Documents /home/user/Documents

This assumes that there is a folder Documents on a drive mounted under /media/user/mounted_drive, and that the login of the user is user.

Benefit of the terminal approach

The approach using the terminal is more powerful, because you can create links with a relative path. For example, if you have a project folder /home/user/Documents/Project containing Folder1/Report.odt, then you could create a link to the report in the home folder of the Project as:

ln -s ./Folder1/Report.odt Report.odt

This link will still work even when the folder "Project" is moved elsewhere, for example to an archive folder.

A link created using the file manager will refer to the other file by the full absolute path, and thus would break if the folder "Project" is moved.

vanadium
  • 88,010