How to move my Linux installation /boot/ and other important parts to SSD












0














i was using dual boot system with mint and windows 10(on separate SSD). I simply dont want Windows anymore and deleted all windows related boot and data from my SSD with gparted. Now it sits unallocated. What i want to do is that move my Linux boot data to SSD.(my linux partition is 150 gb while SSD is 120 gb)



Here's my disks structure.



enter image description here



enter image description here



edit: etc/fstab info
enter image description here



What should i do?










share|improve this question
























  • Could you paste the content of /etc/fstab too ?
    – Pierre-Alain TORET
    Dec 17 at 8:27










  • I added ! that too
    – paypaytr
    Dec 17 at 13:10










  • Can anyone help ?
    – paypaytr
    Dec 19 at 17:20
















0














i was using dual boot system with mint and windows 10(on separate SSD). I simply dont want Windows anymore and deleted all windows related boot and data from my SSD with gparted. Now it sits unallocated. What i want to do is that move my Linux boot data to SSD.(my linux partition is 150 gb while SSD is 120 gb)



Here's my disks structure.



enter image description here



enter image description here



edit: etc/fstab info
enter image description here



What should i do?










share|improve this question
























  • Could you paste the content of /etc/fstab too ?
    – Pierre-Alain TORET
    Dec 17 at 8:27










  • I added ! that too
    – paypaytr
    Dec 17 at 13:10










  • Can anyone help ?
    – paypaytr
    Dec 19 at 17:20














0












0








0







i was using dual boot system with mint and windows 10(on separate SSD). I simply dont want Windows anymore and deleted all windows related boot and data from my SSD with gparted. Now it sits unallocated. What i want to do is that move my Linux boot data to SSD.(my linux partition is 150 gb while SSD is 120 gb)



Here's my disks structure.



enter image description here



enter image description here



edit: etc/fstab info
enter image description here



What should i do?










share|improve this question















i was using dual boot system with mint and windows 10(on separate SSD). I simply dont want Windows anymore and deleted all windows related boot and data from my SSD with gparted. Now it sits unallocated. What i want to do is that move my Linux boot data to SSD.(my linux partition is 150 gb while SSD is 120 gb)



Here's my disks structure.



enter image description here



enter image description here



edit: etc/fstab info
enter image description here



What should i do?







linux linux-mint partition grub2 ssd






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Dec 17 at 13:10

























asked Dec 16 at 17:35









paypaytr

111




111












  • Could you paste the content of /etc/fstab too ?
    – Pierre-Alain TORET
    Dec 17 at 8:27










  • I added ! that too
    – paypaytr
    Dec 17 at 13:10










  • Can anyone help ?
    – paypaytr
    Dec 19 at 17:20


















  • Could you paste the content of /etc/fstab too ?
    – Pierre-Alain TORET
    Dec 17 at 8:27










  • I added ! that too
    – paypaytr
    Dec 17 at 13:10










  • Can anyone help ?
    – paypaytr
    Dec 19 at 17:20
















Could you paste the content of /etc/fstab too ?
– Pierre-Alain TORET
Dec 17 at 8:27




Could you paste the content of /etc/fstab too ?
– Pierre-Alain TORET
Dec 17 at 8:27












I added ! that too
– paypaytr
Dec 17 at 13:10




I added ! that too
– paypaytr
Dec 17 at 13:10












Can anyone help ?
– paypaytr
Dec 19 at 17:20




Can anyone help ?
– paypaytr
Dec 19 at 17:20










1 Answer
1






active

oldest

votes


















1














You might need to reduce the number of files in the sda5 containing 123Gb to fit into the sdb with 111G capacity. Is that a problem?



Create a new partition on sdb for your Linux and maybe a swap partition. If your computer has a UEFI BIOS then you would need a ESP partiton. I imagine the 123Gb have some files that could be deleted or moved to a USB drive. Are you using sysrescuecd on USB? That makes partitoning and copying easier.



So if you want to copy the Linux on sda5 to say sdb2 then do this:




  1. Create partition sdb2 with gparted

  2. Format partition sdb2 maybe ext4

  3. Create mount points /mnt/sdb2 and /mnt/sda5

  4. Mount /dev/sdb2 to /mnt/sdb2


  5. Mount /dev/sda5 to /mnt/sda5



    cd /mnt/sda5
    cp -a bin sbin etc usr var lib boot tmp root home /mnt/sdb2/



Do not copy the /dev /proc /sys or /mnt directories!!! That might not be a problem if using the sysrescuecd and your sda5 is not running. If running from sda5 then trying to copy those directories will cause recursive loops and fill an infinite disk very rapidly.



    cd /mnt/sdb2
mkdir /dev /proc /sys /mnt


These empty directories get filled by the kernel when booting.



The boot directory depends on if you are using a EFI or not as that can need the ESP partition mounted at /boot/efi with EFI. You should copy the contents of /boot from the old linux to the new linux if the ESP partition is not currently mounted to /boot/efi in the old linux or make sure the /boot/efi is empty and put the ESP directory in the fstab to be mounted to the new /boot/efi.



Then edit the /etc/fstab to properly mount the new partitions. You can use /dev/sdb2 type labels instead of UUFI codes to get started. Try to update-grub in your old installation and see if it can create a Grub menu for the sdb2. If so then boot to the new sdb2.



Maybe just reinstalling your linux to the new SSD would be easier then you can copy the files you want from your old home to the new home. If your old linux is customized then the old setup files can be copied to the new linux.



EDIT1: Added /lib directory.



EDIT2: Tried to clarify the /boot directory and ESP partition.






share|improve this answer























    Your Answer








    StackExchange.ready(function() {
    var channelOptions = {
    tags: "".split(" "),
    id: "106"
    };
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function() {
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled) {
    StackExchange.using("snippets", function() {
    createEditor();
    });
    }
    else {
    createEditor();
    }
    });

    function createEditor() {
    StackExchange.prepareEditor({
    heartbeatType: 'answer',
    autoActivateHeartbeat: false,
    convertImagesToLinks: false,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: null,
    bindNavPrevention: true,
    postfix: "",
    imageUploader: {
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    },
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    });


    }
    });














    draft saved

    draft discarded


















    StackExchange.ready(
    function () {
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f489352%2fhow-to-move-my-linux-installation-boot-and-other-important-parts-to-ssd%23new-answer', 'question_page');
    }
    );

    Post as a guest















    Required, but never shown

























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    1














    You might need to reduce the number of files in the sda5 containing 123Gb to fit into the sdb with 111G capacity. Is that a problem?



    Create a new partition on sdb for your Linux and maybe a swap partition. If your computer has a UEFI BIOS then you would need a ESP partiton. I imagine the 123Gb have some files that could be deleted or moved to a USB drive. Are you using sysrescuecd on USB? That makes partitoning and copying easier.



    So if you want to copy the Linux on sda5 to say sdb2 then do this:




    1. Create partition sdb2 with gparted

    2. Format partition sdb2 maybe ext4

    3. Create mount points /mnt/sdb2 and /mnt/sda5

    4. Mount /dev/sdb2 to /mnt/sdb2


    5. Mount /dev/sda5 to /mnt/sda5



      cd /mnt/sda5
      cp -a bin sbin etc usr var lib boot tmp root home /mnt/sdb2/



    Do not copy the /dev /proc /sys or /mnt directories!!! That might not be a problem if using the sysrescuecd and your sda5 is not running. If running from sda5 then trying to copy those directories will cause recursive loops and fill an infinite disk very rapidly.



        cd /mnt/sdb2
    mkdir /dev /proc /sys /mnt


    These empty directories get filled by the kernel when booting.



    The boot directory depends on if you are using a EFI or not as that can need the ESP partition mounted at /boot/efi with EFI. You should copy the contents of /boot from the old linux to the new linux if the ESP partition is not currently mounted to /boot/efi in the old linux or make sure the /boot/efi is empty and put the ESP directory in the fstab to be mounted to the new /boot/efi.



    Then edit the /etc/fstab to properly mount the new partitions. You can use /dev/sdb2 type labels instead of UUFI codes to get started. Try to update-grub in your old installation and see if it can create a Grub menu for the sdb2. If so then boot to the new sdb2.



    Maybe just reinstalling your linux to the new SSD would be easier then you can copy the files you want from your old home to the new home. If your old linux is customized then the old setup files can be copied to the new linux.



    EDIT1: Added /lib directory.



    EDIT2: Tried to clarify the /boot directory and ESP partition.






    share|improve this answer




























      1














      You might need to reduce the number of files in the sda5 containing 123Gb to fit into the sdb with 111G capacity. Is that a problem?



      Create a new partition on sdb for your Linux and maybe a swap partition. If your computer has a UEFI BIOS then you would need a ESP partiton. I imagine the 123Gb have some files that could be deleted or moved to a USB drive. Are you using sysrescuecd on USB? That makes partitoning and copying easier.



      So if you want to copy the Linux on sda5 to say sdb2 then do this:




      1. Create partition sdb2 with gparted

      2. Format partition sdb2 maybe ext4

      3. Create mount points /mnt/sdb2 and /mnt/sda5

      4. Mount /dev/sdb2 to /mnt/sdb2


      5. Mount /dev/sda5 to /mnt/sda5



        cd /mnt/sda5
        cp -a bin sbin etc usr var lib boot tmp root home /mnt/sdb2/



      Do not copy the /dev /proc /sys or /mnt directories!!! That might not be a problem if using the sysrescuecd and your sda5 is not running. If running from sda5 then trying to copy those directories will cause recursive loops and fill an infinite disk very rapidly.



          cd /mnt/sdb2
      mkdir /dev /proc /sys /mnt


      These empty directories get filled by the kernel when booting.



      The boot directory depends on if you are using a EFI or not as that can need the ESP partition mounted at /boot/efi with EFI. You should copy the contents of /boot from the old linux to the new linux if the ESP partition is not currently mounted to /boot/efi in the old linux or make sure the /boot/efi is empty and put the ESP directory in the fstab to be mounted to the new /boot/efi.



      Then edit the /etc/fstab to properly mount the new partitions. You can use /dev/sdb2 type labels instead of UUFI codes to get started. Try to update-grub in your old installation and see if it can create a Grub menu for the sdb2. If so then boot to the new sdb2.



      Maybe just reinstalling your linux to the new SSD would be easier then you can copy the files you want from your old home to the new home. If your old linux is customized then the old setup files can be copied to the new linux.



      EDIT1: Added /lib directory.



      EDIT2: Tried to clarify the /boot directory and ESP partition.






      share|improve this answer


























        1












        1








        1






        You might need to reduce the number of files in the sda5 containing 123Gb to fit into the sdb with 111G capacity. Is that a problem?



        Create a new partition on sdb for your Linux and maybe a swap partition. If your computer has a UEFI BIOS then you would need a ESP partiton. I imagine the 123Gb have some files that could be deleted or moved to a USB drive. Are you using sysrescuecd on USB? That makes partitoning and copying easier.



        So if you want to copy the Linux on sda5 to say sdb2 then do this:




        1. Create partition sdb2 with gparted

        2. Format partition sdb2 maybe ext4

        3. Create mount points /mnt/sdb2 and /mnt/sda5

        4. Mount /dev/sdb2 to /mnt/sdb2


        5. Mount /dev/sda5 to /mnt/sda5



          cd /mnt/sda5
          cp -a bin sbin etc usr var lib boot tmp root home /mnt/sdb2/



        Do not copy the /dev /proc /sys or /mnt directories!!! That might not be a problem if using the sysrescuecd and your sda5 is not running. If running from sda5 then trying to copy those directories will cause recursive loops and fill an infinite disk very rapidly.



            cd /mnt/sdb2
        mkdir /dev /proc /sys /mnt


        These empty directories get filled by the kernel when booting.



        The boot directory depends on if you are using a EFI or not as that can need the ESP partition mounted at /boot/efi with EFI. You should copy the contents of /boot from the old linux to the new linux if the ESP partition is not currently mounted to /boot/efi in the old linux or make sure the /boot/efi is empty and put the ESP directory in the fstab to be mounted to the new /boot/efi.



        Then edit the /etc/fstab to properly mount the new partitions. You can use /dev/sdb2 type labels instead of UUFI codes to get started. Try to update-grub in your old installation and see if it can create a Grub menu for the sdb2. If so then boot to the new sdb2.



        Maybe just reinstalling your linux to the new SSD would be easier then you can copy the files you want from your old home to the new home. If your old linux is customized then the old setup files can be copied to the new linux.



        EDIT1: Added /lib directory.



        EDIT2: Tried to clarify the /boot directory and ESP partition.






        share|improve this answer














        You might need to reduce the number of files in the sda5 containing 123Gb to fit into the sdb with 111G capacity. Is that a problem?



        Create a new partition on sdb for your Linux and maybe a swap partition. If your computer has a UEFI BIOS then you would need a ESP partiton. I imagine the 123Gb have some files that could be deleted or moved to a USB drive. Are you using sysrescuecd on USB? That makes partitoning and copying easier.



        So if you want to copy the Linux on sda5 to say sdb2 then do this:




        1. Create partition sdb2 with gparted

        2. Format partition sdb2 maybe ext4

        3. Create mount points /mnt/sdb2 and /mnt/sda5

        4. Mount /dev/sdb2 to /mnt/sdb2


        5. Mount /dev/sda5 to /mnt/sda5



          cd /mnt/sda5
          cp -a bin sbin etc usr var lib boot tmp root home /mnt/sdb2/



        Do not copy the /dev /proc /sys or /mnt directories!!! That might not be a problem if using the sysrescuecd and your sda5 is not running. If running from sda5 then trying to copy those directories will cause recursive loops and fill an infinite disk very rapidly.



            cd /mnt/sdb2
        mkdir /dev /proc /sys /mnt


        These empty directories get filled by the kernel when booting.



        The boot directory depends on if you are using a EFI or not as that can need the ESP partition mounted at /boot/efi with EFI. You should copy the contents of /boot from the old linux to the new linux if the ESP partition is not currently mounted to /boot/efi in the old linux or make sure the /boot/efi is empty and put the ESP directory in the fstab to be mounted to the new /boot/efi.



        Then edit the /etc/fstab to properly mount the new partitions. You can use /dev/sdb2 type labels instead of UUFI codes to get started. Try to update-grub in your old installation and see if it can create a Grub menu for the sdb2. If so then boot to the new sdb2.



        Maybe just reinstalling your linux to the new SSD would be easier then you can copy the files you want from your old home to the new home. If your old linux is customized then the old setup files can be copied to the new linux.



        EDIT1: Added /lib directory.



        EDIT2: Tried to clarify the /boot directory and ESP partition.







        share|improve this answer














        share|improve this answer



        share|improve this answer








        edited 23 hours ago

























        answered 2 days ago









        beginner6789

        212




        212






























            draft saved

            draft discarded




















































            Thanks for contributing an answer to Unix & Linux Stack Exchange!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid



            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.


            To learn more, see our tips on writing great answers.





            Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


            Please pay close attention to the following guidance:


            • Please be sure to answer the question. Provide details and share your research!

            But avoid



            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.


            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f489352%2fhow-to-move-my-linux-installation-boot-and-other-important-parts-to-ssd%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            Morgemoulin

            Scott Moir

            Souastre