1

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?

  • Could you paste the content of /etc/fstab too ? – Pierre-Alain TORET Dec 17 '18 at 8:27
  • I added ! that too – paypaytr Dec 17 '18 at 13:10
  • Can anyone help ? – paypaytr Dec 19 '18 at 17:20
2

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.