I want to install Ubuntu 18.04 in a new drive (say /dev/sdb
) in a machine that already has one drive (say /dev/sda
) with Ubuntu 16.04 on it, making sure I don't lose any data. I also want to leave the Ubuntu 16.04 in disk sda as it is.
To do that, I have installed the new disk in the machine and run the Ubuntu installation process.
After a couple of steps, I click on Something else, and I reach a disk partition table.
On that screen I create three new partitions for the new drive, sdb, one ext4 with 30gb with a mount point /
, for the operating system itself, one ext4 with 470gb with a mount point /home
, and a 10GB one for swap. I am also specifying the new disk, sdb, as the place to install the boot loader.
The concern I have is that I can't see in the screen anywhere to specify in which drive and partition exactly the operating system needs to be installed, and I worry that could accidentally be installed in some partition of the old drive and destroy data.
How can I specify that the Ubuntu 18.04 should be installed in the 30GB partition of sdb mounted at /
?
If you unplug your 16.04 internal drive before proceeding, you can't do too much damage.
After installing 18.04 to the new disk, plug in the old drive and boot the computer.
If you wish to boot one drive as default, set it as first HDD in BIOS.
After OS boots, run
sudo update-grub
to include both drives in the grub menu.What you have done is correct, regarding the partitioning.
On Linux OS all the system programs, or core programs are installed in the root directory
/
, (.e.g. /bin, /usr, /sbin). A good introduction can be found on this link.From this root directory linux mounts other partitions (take a look at the /etc/fstab file) , which tells linux to include the home directory
/home
.The home directory contains only user specific data and configuration files. Per default this is the only directory the user has write access.The swap is a partition where temporarily memory is stored, in order to free physical memory.
So you should not take much care about it, the installation program will make such things automatically.
As abu_bua says, whatever partition you choose for / is where the OS is going to be installed and all system and OS related files will go.
Reg the bootloader, there is an option to select the specific partition the bootloader should go to. Example - sdb1 or sdb2 etc. I have always created a separate EFI partition of 250 MB as my first partition and assign the bootloader to be installed there.