Ask Your Question

Moving OS to SSD

asked 2016-10-28 12:49:50 -0600

Najahiri gravatar image

updated 2016-10-30 18:08:12 -0600

Hi, I recently bought a new computer and decided to install Fedora in it. In this computer I have two different hard drive, one 256 GB SSD and one 320 GB hard drive.

I installed Fedora 24, but I didn't modify the standard partition, and now I think it installed the operating system on the normal drive (if I go to gparted it shows that the folder /boot is in the 320 GB disk).

I was wondering if there is any way to move the operating system to the SSD without installing it from scratch and modifying the partitions during the installation.

Furthermore, from gparted it shows that there is a /boot mountpoint in one of the two disks and that there is a fedora mountpoint on the other two, and it seems like it is considering the two parts as one. This could be fine, but I have the impression that this way the system will not distinguish the two disks when accessing the files, is it true?

Thanks in advance for any help!

EDIT: The output from fdisk -l is

Disk /dev/sda: 298,1 GiB, 320072933376 bytes, 625142448 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0xea809697

Dispositivo Avvio   Start      Fine   Settori   Size Id Tipo
/dev/sda1   *        2048   1026047   1024000   500M 83 Linux
/dev/sda2         1026048 625141759 624115712 297,6G 8e Linux LVM

Disk /dev/sdb: 232,9 GiB, 250059350016 bytes, 488397168 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0xe089b1c1

Dispositivo Avvio Start      Fine   Settori   Size Id Tipo
/dev/sdb1          2048 488396799 488394752 232,9G 8e Linux LVM

Disk /dev/mapper/fedora-root: 50 GiB, 53687091200 bytes, 104857600 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes

Disk /dev/mapper/fedora-swap: 5,8 GiB, 6174015488 bytes, 12058624 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes

Disk /dev/mapper/fedora-home: 474,7 GiB, 509733765120 bytes, 995573760 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes

The output from lsblk is

sda               8:0    0 298,1G  0 disk 
├─sda1            8:1    0   500M  0 part /boot
└─sda2            8:2    0 297,6G  0 part 
  ├─fedora-swap 253:1    0   5,8G  0 lvm  [SWAP]
  └─fedora-home 253:2    0 474,7G  0 lvm  /home
sdb               8:16   0 232,9G  0 disk 
└─sdb1            8:17   0 232,9G  0 part 
  ├─fedora-root 253:0    0    50G  0 lvm  /
  └─fedora-home 253:2    0 474,7G  0 lvm  /home
edit retag flag offensive close merge delete


Let do the following first: Those two commands will help you to better understand your partition layout:

fdisk -l (may need to be run as root: sudo fdisk -l)


florian gravatar imageflorian ( 2016-10-28 13:43:28 -0600 )edit

Thank you for the quick answer! I edited my post with the outputs

Najahiri gravatar imageNajahiri ( 2016-10-28 14:17:55 -0600 )edit

Several questions:

  1. Did you configure the disk layout during installation? or was it done automatically by the installer (anaconda)

  2. Is this a Desktop or Laptop and how much RAM does it have?

3 Do you have any user (your own) "data" installed on the computer already? or is it still a clean install?

It looks like you took the installation defaults for disk layout when installing Fedora. The quickest (and very much easiest) way to fix this would be to do a re-install. Fedora only takes about 20-30 mins to install, however it is also likely that moving the OS could be achieved also

snowolfe gravatar imagesnowolfe ( 2016-10-29 07:12:52 -0600 )edit
  1. It was done automatically by the installer
  2. It is a Laptop and it has 6 GB of RAM
  3. I don't have so much data, and probably I will reinstall the Operating system at this point, I was only looking for a better solution, without having to set up all the setting from scratch! :) Anyhow, if that is the case how should I place my partitions to use the ssd for booting and installing the operating system? (should I open another question for that?)
Najahiri gravatar imageNajahiri ( 2016-10-29 09:29:25 -0600 )edit

see Answer for my feedback.

snowolfe gravatar imagesnowolfe ( 2016-10-29 17:55:34 -0600 )edit

1 Answer

Sort by » oldest newest most voted

answered 2016-10-29 18:53:30 -0600

snowolfe gravatar image

Based on the answers to my comment questions - you could move things around, but it involves using various LVM commands (many of them), fdisk to alter the disk partition tables and re-installation of grub2 after editing its configuration. All of these combined would be risky and time consuming; better (and probably quicker) to install Fedora again.

Install again:

Assuming you have a Live DVD/USB or other installation media, I recommend using fdisk in your current install to remove ALL partitions on both disks (start with /dev/sdb) and then reboot into your installation media:

WARNING - ALL data on both disks will be destroyed!

fdisk /dev/sdb; d to delete partition 1 and then w to wrtie to disk and exit. It will issue a warning about needing to run partprobe - DO NOT run it because you will be rebooting into the new install shortly!

Now do the same for sda: fdisk /dev/sda; d to delete partition 2 and d to delete partition 1, finally w to write and exit. Insert your installation media and reboot.

Anaconda (the graphical installer) lets you choose your partition layout, including which disks to use - choose to define your own partition layout. Select only the SSD disk. You should have the choice to select the recommended (default) layout or manually define your own.

If you choose the default, then Anaconda typically defines a /boot partition of 500 MB, SWAP of equivalent size to your RAM, / (root) of 50 GB and the remainder of disk space as /home (on your SSD, that should be about 176 GB).

I asked about RAM because modern Linux usage can often get by without SWAP, but it depends on what applications you plan on using on your laptop. 6GB is on the cusp - I would probably consider keeping SWAP at this level. The other major use for SWAP is if you intend to hibernate your laptop. I prefer suspend because it is significantly quicker and in most cases (particularly if you have adequate battery charge), will survive the time frame from closing lid to opening again. Remove the SWAP partition if you don't feel you need it, which may require you adjust your /home partition to take up the freed space.

edit flag offensive delete link more


In the end I decided to install Fedora again.

Sidenote: I don't know if it's related to my computer, but it seemed like it was not possible to make it boot from the ssd - maybe because it is in /dev/sdb instead of being in the /dev/sda? I have no idea.

In the end the partition table that worked for me is sda1 /boot (500M) sda2 /home (297,6G) sdb1 /swap (5,8G) sdb2 / (50G) sdb3 /var (177 G) and in particular I was able of separate and see distinct now the SSD and the normal disk.

Thank you very much for helping!

Najahiri gravatar imageNajahiri ( 2016-10-30 18:07:10 -0600 )edit

/var: 177 GiB. What are you going to do with that? For good performance, you could have placed both /boot and / (fedora-root)(50 GiB) on your SSD. It doesn't matter where /boot is located. You should be able to boot with /boot on sdb.

florian gravatar imageflorian ( 2016-10-31 04:05:31 -0600 )edit

Question Tools

1 follower


Asked: 2016-10-28 12:49:50 -0600

Seen: 2,160 times

Last updated: Oct 30 '16