Page 2 of 2 FirstFirst 12
Results 11 to 18 of 18

Thread: Migrating existing partitions to SSD + HDD

  1. #11
    Join Date
    Mar 2007
    Location
    Wenatchee, WA
    Beans
    Hidden!
    Distro
    Ubuntu

    Re: Migrating existing partitions to SSD + HDD

    Well... its done... but there are some residual problems.

    They don't stem from the SSD itself, but some of the gyrations I had to go thru to get the partitions shrunk and then copied over to the new drive - had to use some Windows software (Macrium Reflect) as things didn't seem to end up bootable when using clonezilla). Now I have the 256GB SSD as /dev/sda, booting Win7 and Ubuntu 12.10 as planned, with the 500GB 7200 rpm HDD mounted in an UltraBay drive caddy as /dev/sdb - formatted as ntfs (so I can access files stored there from either OS) and mounted under /srv/data in Linux. After shrinking partitions and cloning them to the SSD, I deleted some other (linux) partitions I had on there, with the intention of expanding the Ubuntu '/' partition (carefully, using a bootable live USB image rescue 'disc')... but now I'm having issues even seeing any partitions on the SSD inside gparted, and sfdisk -l complains about overlapping partitions.

    So now it looks like I'm back to the point of having to back up the partitions to an external drive, reformat the disk and set up the partitions from scratch, and then restore the partitions from the external storage. Kind of a bummer since things 'seem' to be working otherwise.

    The question going thru my mind now is... will backing up and restoring the disk partition by partition (as opposed to a whole-disk image) using clonezilla work, or will the partitions end up overlapping once again after restoration?

  2. #12
    Join Date
    Jun 2009
    Location
    Chicago Suburbs
    Beans
    Hidden!
    Distro
    Ubuntu 14.04 Trusty Tahr

    Re: Migrating existing partitions to SSD + HDD

    What is the overlapping partition issue. Is it sectors in multiple partitions which is a major issue or one we see where partition labels are wrong and cause issues.
    You cannot have a primary partition sda1 thru sda4 inside the extended partition. If that is just the case use fixparts to relabel partitions around. Only if mounting something by device like /dev/sda1 will you require a repair CD to fix fstab or grub.

    Fixparts - Repair broken partition tables (not overlapping issues) & delete Stray gpt data from MBR drives
    http://ubuntuforums.org/showthread.php?t=1705325
    http://www.rodsbooks.com/fixparts/
    First backup partition table, use your drive for sdX or sda, sdb etc.
    sudo sfdisk -d /dev/sdX > parts.txt
    Oldfred on vacation. Back Sept 9. Will not have much if any Internet access.
    For info on UEFI boot install & repair:
    http://ubuntuforums.org/showthread.php?t=2147295
    Please use Thread Tools above first post to close thread when/if answered completely.







  3. #13
    Join Date
    Mar 2007
    Location
    Wenatchee, WA
    Beans
    Hidden!
    Distro
    Ubuntu

    Re: Migrating existing partitions to SSD + HDD

    Originally I had three windows 7 partitions (one for system boot - /dev/sda1, one for the OS - /dev/sda2, and one for recovery - /dev/sda4), which is the way the system was shipped from the OEM. When I added Linux to the mix, I used an extended partition (/dev/sda4) to contain three 20GB ext4 partitions, one common swap partition, and an ext4 data partition.

    I haven't used the other two linux OS installs for a while, so they got deleted as a part of the migration to the SSD. I also shrunk the data partition considerably. Both were contained inside the extended partition.

    Part of the 'migration' process using Macrium Reflect mandated that I let it resize the partitions on the SSD proportionally to the available space... which made most of them slightly bigger than originally intended. I really didn't want to do that, but the software wouldn't clone them otherwise.

    I moved the remaining data from the old data partition to the new one on /dev/sdb2, and was making the necessary adjustments in /etc/fstab when I noticed that the swap partition entry was completely commented out, with a note that the swap partition wasn't where it had been previously (true, other partitions had been removed which affected the numbering).

    I tried getting swap to work, but kept getting errors about not being able to use the partition desired. So I planned to delete the swap partition in gparted, and re-create it. Since I no longer need the info on the old data partition, I was going to delete that as well. gparted wouldn't even recognize or display *any* info for /dev/sda (the SSD). cfdisk gives the following error:

    Code:
    Fatal error:  Bad primary partition 4
    sda4 is the extended partition that has *all* my Linux partitions in it - root, swap, and data. Everything.

    sfdisk gives the following picture:

    Code:
    monte@machin-shin:~$ sudo sfdisk -l
    
    
    Disk /dev/sda: 31130 cylinders, 255 heads, 63 sectors/track
    Warning: extended partition does not start at a cylinder boundary.
    DOS and Linux will interpret the contents differently.
    Units = cylinders of 8225280 bytes, blocks of 1024 bytes, counting from 0
    
    
       Device Boot Start     End   #cyls    #blocks   Id  System
    /dev/sda1   *      0+    191-    192-   1536000    7  HPFS/NTFS/exFAT
    		end: (c,h,s) expected (191,89,26) found (1023,254,63)
    /dev/sda2        191+  16800-  16610- 133411840    7  HPFS/NTFS/exFAT
    /dev/sda3      28859+  31130-   2272-  18244608    7  HPFS/NTFS/exFAT
    		start: (c,h,s) expected (1023,254,63) found (1023,134,12)
    /dev/sda4      16800+  28859-  12060-  96865280+   5  Extended
    		start: (c,h,s) expected (1023,254,63) found (1023,90,59)
    /dev/sda5      16800+  20044-   3244-  26056704   83  Linux
    		start: (c,h,s) expected (1023,254,63) found (1023,123,28)
    /dev/sda6      20554+  28859-   8305-  66709504   83  Linux
    		start: (c,h,s) expected (1023,254,63) found (1023,147,10)
    
    
    Disk /dev/sdb: 60801 cylinders, 255 heads, 63 sectors/track
    Units = cylinders of 8225280 bytes, blocks of 1024 bytes, counting from 0
    
    
       Device Boot Start     End   #cyls    #blocks   Id  System
    /dev/sdb1          0+   5100-   5101-  40968192   8e  Linux LVM
    /dev/sdb2      12449+  60801-  48352- 388385534   83  Linux
    /dev/sdb3          0       -       0          0    0  Empty
    /dev/sdb4          0       -       0          0    0  Empty
    monte@machin-shin:~$
    So at this point it looks like nearly every partition on that disk is messed up... and specifically the extended partition.

  4. #14
    Join Date
    Jun 2009
    Location
    Chicago Suburbs
    Beans
    Hidden!
    Distro
    Ubuntu 14.04 Trusty Tahr

    Re: Migrating existing partitions to SSD + HDD

    I do not see overlap.

    What does this say as it is down to sectors not cylinders (which are not used anymore)

    sudo fdisk -lu
    Oldfred on vacation. Back Sept 9. Will not have much if any Internet access.
    For info on UEFI boot install & repair:
    http://ubuntuforums.org/showthread.php?t=2147295
    Please use Thread Tools above first post to close thread when/if answered completely.







  5. #15
    Join Date
    Mar 2007
    Location
    Wenatchee, WA
    Beans
    Hidden!
    Distro
    Ubuntu

    Re: Migrating existing partitions to SSD + HDD

    Code:
    monte@machin-shin:~$ sudo fdisk -lu[sudo] password for monte: 
    
    
    Disk /dev/sda: 256.1 GB, 256060514304 bytes
    255 heads, 63 sectors/track, 31130 cylinders, total 500118192 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 identifier: 0xf80edfa0
    
    
       Device Boot      Start         End      Blocks   Id  System
    /dev/sda1   *        2048     3074047     1536000    7  HPFS/NTFS/exFAT
    /dev/sda2         3074048   269897727   133411840    7  HPFS/NTFS/exFAT
    /dev/sda3       463628288   500117503    18244608    7  HPFS/NTFS/exFAT
    /dev/sda4       269897728   463628288    96865280+   5  Extended
    /dev/sda5       269899776   322013183    26056704   83  Linux
    /dev/sda6       330209280   463628287    66709504   83  Linux
    
    
    Partition table entries are not in disk order
    
    
    Disk /dev/sdb: 500.1 GB, 500107862016 bytes
    255 heads, 63 sectors/track, 60801 cylinders, total 976773168 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 identifier: 0x14a19a9e
    
    
       Device Boot      Start         End      Blocks   Id  System
    /dev/sdb1            2048    81938431    40968192   8e  Linux LVM
    /dev/sdb2       200002048   976773115   388385534   83  Linux
    monte@machin-shin:~$

  6. #16
    Join Date
    Jun 2009
    Location
    Chicago Suburbs
    Beans
    Hidden!
    Distro
    Ubuntu 14.04 Trusty Tahr

    Re: Migrating existing partitions to SSD + HDD

    I know it is recommended to have some gap between partitions. The only thing I possibly see is that sda4, the extended ends on the same sector as the sda3 starts. Not 100% sure that is an issue, but if it is complaining then that may be it.

    You could make sda6 & the extended a sector or two smaller. If gparted will not open it you may have to export with sfdisk, edit test file and reimport.
    GParted's partition-recovery tool.
    Device -> Attempt Data Rescue in GParted

    First backup partition table.
    sudo sfdisk -d /dev/sda > parts_sda.txt

    Using sfdisk to fix partition table problems - not without risk
    http://ubuntuforums.org/showthread.php?t=1192598
    Equivalent sfdisk values would keep the start point and convert the end point via the formula size = end - start + 1.
    Also fdisk -lu shows start & blocks, blocks * 2 also equals size in sectors
    Oldfred on vacation. Back Sept 9. Will not have much if any Internet access.
    For info on UEFI boot install & repair:
    http://ubuntuforums.org/showthread.php?t=2147295
    Please use Thread Tools above first post to close thread when/if answered completely.







  7. #17
    Join Date
    Mar 2007
    Location
    Wenatchee, WA
    Beans
    Hidden!
    Distro
    Ubuntu

    Re: Migrating existing partitions to SSD + HDD

    Looking thru things... by my math, the end of the extended partition sda4, @ 423628288, overlaps the start of sda3 @ 423628289... which I guess is what is giving the system grief.

    So... looking at that other article I dumped the partition table to a text file, and I'm currently just using it for a scratch pad to check numbers - I'll dump it again for a fresh copy to back up, and then another to edit when I get to that point.

    Code:
    /dev/sda1 : start=     2048, size=  3072000, Id= 7, bootable    3074048
    /dev/sda2 : start=  3074048, size=266823680, Id= 7              269897728
    /dev/sda4 : start=269897728, size=193730561, Id= 5              463628289
    /dev/sda5 : start=269899776, size= 52113408, Id=83              322013184
    /dev/sda6 : start=330209280, size=133419008, Id=83              463628288
    /dev/sda3 : start=463628288, size= 36489216, Id= 7              499871504
    I'm thinking that since sda6 is a partition that I want to delete any way, it *hopefully* shouldn't b0rk things too much if I adust the end of that partition and then move the end of the parent extended partition sda4 so it doesn't overlap the start of sda3.

    Does that sound about right?

  8. #18
    Join Date
    Feb 2005
    Location
    Melbourne, Australia
    Beans
    13,505
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: Migrating existing partitions to SSD + HDD

    Quote Originally Posted by oldfred View Post
    There is disagreement on swap. I find with 4GB of RAM I never use it, so the whole issue is moot. But I have swap on my rotating drive and my installs find it. Someone said having some swap is good for a slightly faster boot. Booting looks for swap and has to time out or not find it, so if it finds it, it may boot very slightly faster.
    .........
    Discussion of swap on SSD - best not to)
    http://ubuntuforums.org/showthread.php?t=1937251
    .............
    It says no such thing, SSD support for Swap is built into the kernel and modern SSD devices should be able to deal with the load.

    Overuse of Swap is a generic problem of insufficient RAM for the memory load you are putting on the system, a SSD will actually mitigate it because of the superior IO rate in comparison to rotational drives.
    Regards, David.
    Please use the Forum search and Wiki search for immediate help
    Please mark your thread as Solved when appropriate
    New to technical forums?: How To Ask Questions The Smart Way

Page 2 of 2 FirstFirst 12

Tags for this Thread

Bookmarks

Posting Permissions

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