FedoraForum.org - Fedora Support Forums and Community
Page 1 of 2 1 2 LastLast
Results 1 to 15 of 16
  1. #1
    Join Date
    Dec 2015
    Location
    India
    Posts
    84

    Need help transferring to SSD.

    Hi,

    I have a 250GB WD Blue SSD, I want to transfer my Fedora and Windows 7 to it. My Fedora 26 KDE is on one 1TB HDD and my Windows 7 is on another 1TB HDD. I don't know where the boot file for GRUB2 is.

    How would I go about transferring these to SSD and make it bootable? I also heard that to increase the longevity of SSD, I have to keep the swap on HDD, my Fedora is in a LVM, how can I do it?

    Thanks
    Last edited by noviceFedora; 18th August 2017 at 05:28 PM.

  2. #2
    Join Date
    Dec 2004
    Location
    DK
    Posts
    45

    Re: Need help transferring to SSD.

    Try to search:
    moving to SSD
    move LVM to SSD

    Posts:
    https://forums.fedoraforum.org/showthread.php?t=260600
    https://forums.fedoraforum.org/showthread.php?t=73119
    https://forums.fedoraforum.org/showthread.php?t=303771
    https://www.reddit.com/r/Fedora/comm...ora_21_to_ssd/

    Non LVM way (fedora/linux only, no Windows):
    Get a live CD with gParted

    1. back up everything
    2. Set BIOS to boot from CD-ROM
    3. Power down the system and hook up the new hard drive. Leave the existing hard drive in place.
    4. Boot from the CD (gparted, g4l, systemrescuecd, ...)

    Copy/sync to the new disk (rsync, grsync. ...)

    Changes in /etc/fstab
    Backup the old /etc/fstab.
    Change /etc/fstab to the new UUID's and paths (/ and /boot/efi and /home)

    Changes in /boot/grub2/grub.cfg
    Backup /boot/grub2/grub.cfg
    Changes in /boot/grub2/grub.cfg
    change
    set root='hd0,gpt6'
    to the new adress.
    Change old UUID ... to the new UUID.
    Or you might want to create a new menuentry:
    Copy the old one (maybe with the newest kernel) and change all the UUID's to the new UUID.
    Advantage: You could still switch back to the old HDD during boot.

    Change initramfs
    mkinitrd --force /boot/initramfs-4.11.12-200.fc25.x86_64.img 4.11.12-200.fc25.x86_64)
    grub2-mkconfig -o /boot/grub2/grub.cfg

    It is easier with the installer. I would reinstall the system correctly.
    Last edited by thom12; 22nd August 2017 at 06:24 AM. Reason: additional information

  3. #3
    Join Date
    Dec 2015
    Location
    India
    Posts
    84

    Re: Need help transferring to SSD.

    Thanks I shall search along the lines you suggested.

    If I were to re-install, is there a way I can backup and restore the programs and files on the newly installed OS?

  4. #4
    Join Date
    Aug 2007
    Posts
    161

    Re: Need help transferring to SSD.

    I have a 250GB WD Blue SSD, I want to transfer my Fedora and Windows 7 to it. My Fedora 26 KDE is on one 1TB HDD and my Windows 7 is on another 1TB HDD. I don't know where the boot file for GRUB2 is.
    Since your Fedora is on lvm you will have a separate /boot partition which will have your GRUB2 installation. As you have Windows 7 you likely use old style MBR partitioning and BIOS/CSM. The boot code in the 512 byte MBR will point to the grub second stage usually located in the "MBR gap" and will use the grub files in /boot partition.

    You will need to partition your new SSD manually with GParted and then copy the OS contents from the two HDDs to the new partitions on the SSD. Windows expects to be on the first primary partition.

    my Fedora is in a LVM, how can I do it?
    There is no problem at all with your current Fedora being inside a LVM. You can easily copy the contents of these logical volumes to the new partitions with rsync. Your only question will be whether you want to use LVM partitions on the SSD or regular partitions.

    To get it to boot you would have to generate a new initramfs with dracut and install GRUB to the MBR. You would add a custom entry to chainload your Windows installation from grub.

    I also heard that to increase the longevity of SSD, I have to keep the swap on HDD
    This is a good idea.

    It is easier with the installer. I would reinstall the system correctly.
    The OP wants to dual boot with Windows 7. You don't consider that at all except to say.(fedora/linux only, no Windows). At the very least you would have to partition in advance to create a large NTFS partition as the first primary partition and copy the Windows installation over. If you simply ran the Fedora installer it would grab the whole disk and leave no room for Windows. Then you could get the installer to use the remaining non partitioned space at the end of the SSD and setup the GRUB bootloader. You would install Windows first as it would overwrite the GRUB second stage in the MBR gap if installed after Linux.

    Change /etc/fstab to the new UUID's and paths (/ and /boot/efi and /home)
    As they would be using BIOS/CSM they wouldn't have /boot/efi just /boot.
    Last edited by amiga; 24th August 2017 at 08:03 AM. Reason: improved accuracy

  5. #5
    Join Date
    Dec 2015
    Location
    India
    Posts
    84

    Re: Need help transferring to SSD.

    I was thinking disabling swap on my present Fedora LVM, then use DD or some other software to clone to SSD and use a live media to install GRUB2, boot into the cloned Fedora LVM, and create a swap from it on HDD.

    Can this be possible?

  6. #6
    Join Date
    Aug 2007
    Posts
    161

    Re: Need help transferring to SSD.

    I was thinking disabling swap on my present Fedora LVM, then use DD or some other software to clone to SSD and use a live media to install GRUB2, boot into the cloned Fedora LVM, and create a swap from it on HDD.
    First of all since your Fedora is on a 1TB HDD it wouldn't of course fit on a 250 GB SSD so disk cloning wouldn't work anyway even if you weren't trying to dual boot with Windows.

    In your first post you are talking about dual booting Fedora 26 KDE and Windows 7.

    I have a 250GB WD Blue SSD, I want to transfer my Fedora and Windows 7 to it. My Fedora 26 KDE is on one 1TB HDD and my Windows 7 is on another 1TB HDD.
    How would I go about transferring these to SSD and make it bootable?
    In order to dual boot Fedora and Windows 7 you would need to reserve the first partition on the new SSD, large enough to hold Windows 7 and then install Fedora in the remaining space. Disk cloning with DD wouldn't work as you need to reserve the first partition for Windows in addition to the 1 TB to 250 GB size difference.

    You would need to partition the new SSD manually with GParted first and then copy both installations over using rsync.

    In your latest message you only mention Fedora and swap, you don't mention Windows 7 at all. Weren't you trying to dual boot on the new SSD ?
    Last edited by amiga; 1st September 2017 at 07:46 PM.

  7. #7
    Join Date
    Dec 2015
    Location
    India
    Posts
    84

    Re: Need help transferring to SSD.

    Hi amiga, thanks for replying and trying to help.

    I'm sorry I wasn't clear, I'm still dual booting Windows 7 and Fedora. I have already copied Windows 7 onto the SSD and there is 100MB before the Windows 7 partition on the SSD.

    The Fedora partition only takes up around 57GB on the 1TB HDD, so I was thinking I can copy it onto the free space after Windows 7 partition. My Windows 7 partition is around 60GB, do you think I should resize it a bit more for newer Windows in case I ever need to?

    The reason I didn't mention because I thought it would have been clear from preceding replies. Sorry for lack of clarity.

  8. #8
    Join Date
    Aug 2007
    Posts
    161

    Re: Need help transferring to SSD.

    I'm sorry I wasn't clear, I'm still dual booting Windows 7 and Fedora. I have already copied Windows 7 onto the SSD and there is 100MB before the Windows 7 partition on the SSD.
    What is the 100MB space for ? It is too small for a /boot partition. The recommended size is now 500 MB and at least 300 MB is needed. What is the size of your /boot partition on your existing 1 TB drive ? Since you are using lvm I assume that you have a separate /boot partition.

    As a side note I don't use Windows but I thought Windows expected to be the first partition.

    The Fedora partition only takes up around 57GB on the 1TB HDD, so I was thinking I can copy it onto the free space after Windows 7 partition.
    Is the 57 GB for the whole lvm pv ? Could you please post the output of the following in your existing Fedora 26 ?

    Code:
    sudo pvs
    sudo vgs
    sudo lvs
    If the whole LVM PV partition is only 60 GB then you could use dd to clone the contents of this partition to an empty one on the new SSD.

    My Windows 7 partition is around 60GB, do you think I should resize it a bit more for newer Windows in case I ever need to?
    If you are planning on upgrading to Windows 8 then yes. Do a search on the recommended size of a Windows 8 ntfs partition.

    I was thinking disabling swap on my present Fedora LVM, then use DD or some other software to clone to SSD and use a live media to install GRUB2, boot into the cloned Fedora LVM, and create a swap from it on HDD.
    I don't know what you mean by 'disabling swap', you could always delete the swap lv later. In your case you don't need a live media at all to do this as you have a working F26 installation.

    However one problem you will run into is if you clone an lvm pv partition then you will have two LVM VGs with the same name. You will have to rename one. This can be a tricky operation.

    The reason I didn't mention because I thought it would have been clear from preceding replies. Sorry for lack of clarity.
    In none of your replies did you actually state that you did what I suggested. You should have stated that you had already cloned your Windows 7 partition.

  9. #9
    Join Date
    Dec 2013
    Location
    United Kingdom
    Posts
    5,275

    Re: Need help transferring to SSD.

    In GPT layout it is possible to install other OS before the Windows partition (W7 onwards, earlier versions are not GPT compliant) as long as the EFI partition comes first. That is usually 100MB, as for /boot the default size (also default for RHEL/CentOS 7) is now 1GB because the boot images are larger than they used to be historically. RHEL and CentOS 7 advise if you have upgraded from version 6 to reduce the number of retained kernels because a 500MB partition is no longer big enough. Their limit is not 3 though like Fedora's, it is higher at 5.

    anaconda if left to auto partition already creates a 1GB /boot partition in line with this.

    W8 will fit onto a 60GB partition but there won't be much space for user data. those cheap windows netbooks come with 32GB or 64GB SSD and you really need to use the cloud storage or external storage with those or you're stuffed fairly quickly.

  10. #10
    Join Date
    Nov 2004
    Location
    MT USA
    Posts
    872

    Re: Need help transferring to SSD.

    Just a suggestion. I'd setup the SDD with Windows and Fedora and make sure it works as you wish. Then worry about moving data. After your satisfied, then in Fedora, I'd just mount the old drive and use it 'as your data drive' (you have 1TB of space I believe you said), or copy over what you need at that point to the SSD. I like this, as I can wipe my SSD at any time with a new OS and still keep all my data. I don't use LVM, so makes it easy. On the Windoze side, your on your own, ... but I would think you could mount the old drive over there and get the data off it.

  11. #11
    Join Date
    Aug 2007
    Posts
    161

    Re: Need help transferring to SSD.

    In GPT layout it is possible to install other OS before the Windows partition (W7 onwards, earlier versions are not GPT compliant) as long as the EFI partition comes first. That is usually 100MB
    The OP never mentioned what type of partitioning they were using so as they were talking about Windows 7 I assumed it was legacy MBR. I never considered that it could be Windows 7 with GPT/UEFI. I thought Windows 7 and earlier used only legacy MBR.

    If they are using UEFI and GPT then Fedora 26 would have its own /EFI partition on the 1 TB HDD. It would need to be copied over as well.

    As for the 1 GB recommended size of /boot there was a thread on this forum as to whether that was overkill. I run Centos 7 with a 500 MB /boot. I have four kernels and my disk usage on /boot is under 60% .even with four extra x86_64kdump.img files wasting space. This means I have space for 6 or 7 kernels/initrds. As I don't need that many for me 500 MB is quite large.

    Just a suggestion. I'd setup the SDD with Windows and Fedora and make sure it works as you wish.
    What is an SDD ?

    HDD = Hard Disk Drive (as opposed to floppy)
    SSD = Solid State Drive

  12. #12
    Join Date
    Dec 2013
    Location
    United Kingdom
    Posts
    5,275

    Re: Need help transferring to SSD.

    fedora can share an /EFI created by windows as long as you custom partition and specify not to reformat it. while it is possible to have more than one /EFI partition it isn't actually necessary and it does no harm to the windows boot loader either.

    vice versa, setup custom partitions using GParted for example to have Fedora partitions before the windows partition(s) and Windows will use the /EFI partition you add the boot, esp flags for.

    I have Windows and CentOS sharing an /EFI. out of the 100MB only 28MB is used, plenty of room for more there too.

    I recall that thread about /boot and participated in it myself, posting pretty much the same results for partition usage as you just reported.

    There must be a reason they now stipulate 1GB. maybe the extra space is required temporarily each time we install another kernel? It seems excessive but at the same time it's not something I've monitored and quite frankly don't intend to start as I'm happy to allocate 0.001% of a 1TB drive to /boot.

  13. #13
    Join Date
    Aug 2007
    Posts
    161

    Re: Need help transferring to SSD.

    fedora can share an /EFI created by windows as long as you custom partition and specify not to reformat it. while it is possible to have more than one /EFI partition it isn't actually necessary and it does no harm to the windows boot loader either.
    This sharing is done by the Anaconda installer for new Fedora installations. The OP is trying to copy an existing Fedora 26 installation to the new SSD. This installation must have its own /EFI partition and Fedora likes to create a 500 MB ESP where it places all kernels and initramfs. Considering they have plenty of space available it might be easier to just copy the existing /EFI partition and have two ESPs than try to reverse engineer sharing of the one 100 MB /EFI partition that doesn't have room for the kernels and initramfs.

    I have Windows and CentOS sharing an /EFI. out of the 100MB only 28MB is used, plenty of room for more there too.
    In this case where are the actual kernels and initramfs's placed. Each kernel and initramfs needs about 40 MB. Do you have a separate /boot partition in addition to /boot/efi or is /boot just a directory in your / ?

    as I'm happy to allocate 0.001% of a 1TB drive to /boot.
    Your math is off by a factor of 100. 1 GB would be 0.1% of a 1 TB (1000 GB) drive. The percent % symbol already signifies parts of 100. 1% of a 1 TB drive would be 10 GB so 1 GB would be 0.1%. 1 GB would be a 0.001 fraction of the 1 TB capacity or 0.1%.
    Last edited by amiga; 2nd September 2017 at 09:41 PM. Reason: clarified post

  14. #14
    Join Date
    Dec 2013
    Location
    United Kingdom
    Posts
    5,275

    Re: Need help transferring to SSD.

    In this case where are the actual kernels and initramfs's placed. Each kernel and initramfs needs about 40 MB. Do you have a separate /boot partition in addition to /boot/efi or is /boot just a directory in your / ?

    kernel and initramfs are in the /boot partition


    sda1 - EFI partition (Linux mount point /boot/efi) 100MB FAT16*, boot, esp flags
    sda2 - /boot - 1GB, ext4


    the remaining Linux partitions are encrypted


    *FAT16 if anaconda formats the partition, if created by Windows it is FAT32 as per the official specification for EFI but it will work with FAT16 just as well


    yes I realise my decimals were out so thanks for correcting, slap round the duly self administered

  15. #15
    Join Date
    Jun 2005
    Location
    Montreal, Que, Canada
    Posts
    4,494

    Re: Need help transferring to SSD.

    Here is a hint about how proceeded to do what you are attempting. It applies when there is no windows partition. This could still work if there is a pair of windows partitions.

    My method is cheating a bit by using Fedora utilities and some "au piff" values.
    1) I start by installing the unformatted SSD.
    2) After installing the unformatted SSD use gparted to force the SSD to be a gpt type device.
    3) Use gparted to set aside your windows partitions.
    Create an unassigned partition the total combined size of "/, home and swap" at the beginning of the area following the windows partition(s) blockout the rest of the unassigned partition with a temporary assignment.
    It will appear something like the following

    www.WWWWWWW[UNASSIGNED REGION ]][reserved tmp space formatted ext4]

    Leave around 20gigs for / . Typically I use about 8 gigs as an estimate for swap.


    4) start a Fedora xx installation.
    5) Let anaconda create the Linux partitions within that unassigned region. Do not use lvm, but standard, and either ext4 or xfs partition formats.

    6) When anaconda starts the downloads, cancel anaconda. For the area you set aside, anaconda will have created the /, the /home, the /boot and the swap. You can deal with the swap later.

    7 I usually rerun gparted and reformat and label those partitions that anaconda created within that unassigned area. (I use sdxSlash for the /, /sdxHome for /home, etc. where x is one of a, b, c or whatever drive the SSD will end up being.

    8) Now do your copying as described by the previous responses.

    After copying ...

    To create the /etc/fstab entries, here is my easy method

    After your copy of / to the / of the SSD.

    from the existing system run sudo blkid /dev/ssd* > SSD/etc/fstab The /etc/fstab will be the one on the SSD The /etc/fstab that you copied over will be overwritten. It was not valid for the SSD. You must create a new /etc/fstab as follows.


    with vi, or your favourite editor, for each partition that is on the SSD, within that blkid listing you will have a UUID, a /dev/xxx and/or a LABEL

    Delete from the blkid's /etc/fstab above, the unwanted lines.
    Your must reformat fstab lines formatted created by the blkid program to something similar to one or more of the following.

    I recommend reformatting each per tenant blkid line to the format UUID=uuuuuuuuuuuuuuuuuuuuuuuuu

    Code:
    Sample formats
    UUID=bdf0d983-0430-4b8b-8dd1-474769e797dd   /scratch    xfs     defaults,noatime    1  2  
    /dev/sdb2                                   /backup     ext4     defaults            0  0   
    tmpfs                                       /tmp        tmpfs   nodev,nosuid,size=1G  0  0     #/dev/tmpfs ramdisk
    LABEL=sdb2backup                        /backup     ext4    defaults,noatime  0 0
    UUID=xxxxxxxxxxxxxxxx swap swap defaults,noatime 0 0

    sudo blkid /dev/xxx* is a very very useful tool for (re)constructing a /etc/fstab

    Since in the earlier step I assigned labels and names to each partition, I can easily tell which blkid generated fstab entry belongs to /, or to /home or /boot...

    I listed step-by-step what I do to go harddisk to SSD. Follow the logic. Try a walk through and follow.
    Don't forget, your target device is the SSD. If you make mistakes, just recreate the SSD as a gpt format SSD and go through it again.

    Swap is likely to be on one of the blkid lines, do include it for now, until you create your swap file on another device. Thereafter, you delete the swap and with gparted, increase the size of the preceding partition. (Or keep it around incase you want to reinstall Fedora, but want to keep the same areas.

    Since you are concerned about SSD's
    Here is a small script to initiate fstrim.
    Its titled fstrim.timer

    cat fstimer.sh
    Code:
    systemctl enable fstrim.timer
    systemctl list-unit-files | grep fstrim
    I also insert the following line into the root logon's crontab
    Code:
    @reboot                                  /usr/sbin/fstrim -a && echo "$(date)"  > /root/fstrim.log
    Just so I know when the last time fstrim was run.
    Leslie in Montreal

    Interesting web sites list
    http://forums.fedoraforum.org/showth...40#post1697840

Page 1 of 2 1 2 LastLast

Similar Threads

  1. Transferring to a new machine
    By Henry2630 in forum Installation, Upgrades and Live Media
    Replies: 24
    Last Post: 17th May 2007, 02:13 PM
  2. transferring over a router?
    By o-ren in forum Servers & Networking
    Replies: 1
    Last Post: 24th August 2005, 07:49 PM
  3. transferring mp3's
    By theprez98 in forum Using Fedora
    Replies: 5
    Last Post: 10th January 2005, 04:10 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •