I think I figured out what is the best way.
Firstly I used tweak tool. Tweak tool used xdg
thing. I just don't like it so much. Then I used symbolic links for all of my old directories from /home/can
to /media/DataNtfs
.
For example; ln -s /media/DataNtfs/Music ~/Music
.
It was simple and useful until I wanted to sync my Documents directory with Ubuntu One. Ubuntu One syncs directories only in the home folder and don't work with links.
Then I create empty directories in home like Documents, Downloads, Pictures etc.. and used fstab file to bind my old NTFS directories to the empty directories.
This is part of the fstab file:
# binds
/media/DataNtfs/Music /home/can/Music none rw,bind
/media/DataNtfs/Pictures /home/can/Pictures none rw,bind
/media/DataNtfs/Downloads /home/can/Downloads none rw,bind
/media/DataNtfs/Documents /home/can/Documents none rw,bind
/media/DataNtfs/Backups /home/can/Backups none rw,bind
/media/DataNtfs/Notes /home/can/Notes none rw,bind
/media/DataNtfs/Other /home/can/Other none rw,bind
/media/DataNtfs/Packages /home/can/Packages none rw,bind
/media/DataNtfs/Photos /home/can/Photos none rw,bind
/media/DataNtfs/Videos /home/can/Videos none rw,bind
/media/DataNtfs/WorkSpace /home/can/WorkSpace none rw,bind
Bind works well. Now I can sync some of data directories with Ubuntu One. As if data directories are actually in the home directory. So I think 'the best way' is bind.
By the way; DataNtfs partition is always mounted by fstab and I never unmount it.
This answer is only for BIOS (not UEFI) and Windows 7
Note to Others:
Those with Windows 8 and above trying UEFI install on two separate drives see Dual Booting win 10 and Ubuntu 18.04 on two separate physical ssds
End of Note to Others
I assume you will be installing the latest version of Ubuntu Studio 20.04. Since Windows is installed in BIOS (Legacy) mode, I recommend you install Ubuntu in the same mode. I will answer your questions first and then give some pointers about Legacy boot install.
Questions and Answers:
The question is this:
1) What are the partition requirements to run Ubuntu Studio on the
hard drive? Do I need separate partition for each of the following and
what settings and size should I use?
Modern Ubuntu (and therefore Ubuntu Studio) can use only one partition as the system partition /
and does not need any other partitions.
1.1) Primary Partition with largest space for the main installation ext4 format. I assume Primary?
Since this will be a dedicated drive for Ubuntu Studio. A single primary partition formatted ext4
and with the mountpoint /
is what you need. You can use all of the space in the drive to make this single partition at the time of installation.
1.2) EFI partition, size? Logical or Primary?
Since Windows 7 does not use UEFI, you should install Ubuntu in Legacy (BIOS) mode. This mode of Ubuntu installation does not need (and will not create) an EFI partition.
1.3) Swap partition, size? Format?
Ubuntu 20.04 uses a swap file by default. You don't need a swap partition unless you want to hibernate your computer to disk when Ubuntu is running. The swap partition is not formatted. You select Linux-Swap
from the drop down menu.
Hibernating does not work on all computers and is disabled in Ubuntu by default. Only if you plan to enable and use hibernate, you will want a swap partition. The swap partition size should be 1.5 ties the size of RAM your computer has.
2) I assume the device for boot loader will be the same hard drive as
A) above?
Since you will be using BIOS (Legacy) and not UEFI, and you are using Windows 7, the boot loader can go to either Drive 0 (Windows) or Drive 3.
If you put the bootoader in Drive 0, then you will not need to make any changes in BIOS.
However, putting the Ubuntu bootloader in Drive 0 (Windows) this is not recommended especially if you plan to upgrade Windows to a more recent version in the future. Thanks oldfred for extensive comments. Among other things, an upgrade (sometimes just an update) of Windows will overwrite the Ubuntu bootloader with the Windows bootloader and make Ubuntu unbootable.
If you put the bootloader in Drive 3, you will need to make Drive 3 the first boot drive in the BIOS settings.
In this case the first time you boot after connecting all the drives and changing the boot order to boot from Drive 3, the computer will boot straight to Ubuntu and won't show grub with a choice to boot Windows 7. This is normal.
After booting into Ubuntu from Drive 3 for the first time, open a terminal by pressing Ctrl+Alt+T and enter the command:
sudo update-grub
Enter your Ubuntu password when prompted and press enter. The cursor won't move and you won't see any *****
. This is normal.
Next time you boot the computer you should see the option to choose between Windows and Ubuntu.
Note: always select the whole drive in the bootloader drive selection menu. For example it may be /dev/sda
(for Drive 0) or /dev/sdd
(for Drive 3), never /dev/sda1
or /dev/sdd
.
3) I have read that it is best to disconnect the other hard drives
when installing Ubuntu?
Disconnecting all the hard drives (other than 3) will allow you to use the default installation of Ubuntu. This also eliminates the possibility of you making a mistake and installing Ubuntu in the wrong drive and thus, deleting everything that was there in that drive for ever.
You don't have to choose:
- "Something Else..."
- Partition and format the hard drive yourself. (You just select the option to use the whole drive and erase everything.)
- Decide where to put the Ubuntu bootloader. (The installer will automatically put it on Drive 3, the only connected drive)
You have two options:
- You can choose "Erase Disk and Install Ubuntu". This will use the whole Drive 3 and put the Ubuntu bootloader in Drive 3.
Once you click Install Now button you will be shown how the Drive 3 will be used, as below:
Note: Since only the drive for Ubuntu installation is connected it is designated as /dev/sda
in the above picture.
The above picture is interpreted as, installer will create an extended partition /dev/sda1
, and a single logical partition /dev/sda5
formatted ext4
inside it.
- You can choose "Something Else..." and select and setup mountpoint, partition types, and remember to format the partition(s) etc.
Here the simplest option would be to create a single primary partition /dev/sda1
spanning the whole Drive 3, assign it the mountpoint /
and format it ext4
.
Keeping the drives connected while installing Ubuntu is also possible. You may want to do this if you have never opened a computer case and don't want to unplug and plug cables inside the computer.
- You can choose "Install alongside Windows 7" if drive 3 (Ubuntu) has MBR (GPT should work too) but has only unallocated space. That is, all existing partitions are removed before installation. Thanks NMath for the comments.
Once you click Install Now button you will be shown how the Drive 3 will be used, as below:
Note: Since both the drive with Window (Windows 10 in my case) and new drive for Ubuntu installation are connected the Ubuntu Drive is designated as /dev/sdb
in the above picture. Yours may be different.
Warning: If you see the option to resize the the Windows partition in Drive 0, then abort installation as Drive 3 was not detected properly.
Note: If you use this easy option you won't get a chance to select where to put the Ubuntu bootloader.
- You can choose "Something Else..." and select the correct drive and setup mountpoint, partition types, and remember to format the partition etc.
This will also allow you to put the bootloader in the drive 0 or Drive 3. See question 2.
Install Ubuntu in Legacy Mode
Whether Ubuntu will install in UEFI mode or in Legacy mode depends on how you boot from the Live installation USB.
You typically press a key to get to the boot menu when the computer boots with the USB plugged in. The menu may give you two options:
- USB something UEFI or UEFI something USB
- USB something BIOS/Legacy/CSM or BIOS/Legacy/CSM something USB
Choose the one that does not say UEFI.
If you boot from the USB in the BIOS/Legacy mode you will see:
(Note: these images are from an older version of standard Ubuntu installation. Yours may look different.)
Immediately followed by:
If you see something like this, you have booted in UEFI mode. Reboot and try again:
Hope this helps
Best Answer
You can simply link to it:
Move the
/opt
directory:Create a symlink to the new location:
You will now have:
As Rinzwind correctly pointed out in the comments, this can break your system if you move a directory containing files needed during boot. For example, you certainly don't want to do this for
/bin
./opt
should be fine though.