Announcement

Collapse
No announcement yet.

Moving to SSD and partition aligment

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Moving to SSD and partition aligment

    First of all I want to say hi to all,

    I'm about to migrate my Kubuntu 12.04.2 LTS "Precise" from two separate HDD's to my brand new SSD. I have laptop with two HDD's and one will became an external storage repleced by SSD and one will stay. This is how my partition table looks like:

    Code:
    Disk /dev/sda: 320.1 GB, 320072933376 bytes
    /dev/sda1   *          63    24579449    12289693+   c  W95 FAT32 (LBA)
    /dev/sda2        24579450   276848144   126134347+   7  HPFS/NTFS/exFAT
    /dev/sda3       276848638   625141759   174146561    5  Rozszerzona
    /dev/sda5       577070928   616140944    19535008+  83  Linux
    /dev/sda6       624640000   625141759      250880   83  Linux
    /dev/sda7       616141008   624639329     4249161   82  Linux swap / Solaris
    
    Disk /dev/sdb: 320.1 GB, 320072933376 bytes
    /dev/sdb1   *          63   625137344   312568641   83  Linux
    Whole second disk is /home partition. First is divided into /, /boot and swap. Now I have went through several pages and blogs about partition aligment on SSD's trying to find the answer whether should I create manually (using e.g. Gparted) all the partitions or does the latest Kubuntu installer supports "automagic" with SSD disk partition aligment and erase block size? Most of those articles and tips ware very old and I was wondering that it should be included into installer by now. I managed to find some info that latest LinuxMint installer does that and also supports GPT if user wishes to use it.

    So the question is should I just use the installer or first use some software to prepare m SSD for install? (I do not have my disk yet, it should be next week in my hands so no chance to test the installer for now).

    #2
    The mint installer is iirc the ubuntu installer underneath, as is Kubuntu's, if that matters.


    http://tombuntu.com/index.php/2012/0...ntu-on-an-ssd/ has some info and links to more in depth stuff if you wish to get in that deep.

    Comment


      #3
      Basically, if you use fdisk, set heads and sectors at 32 and then start your first partition at 2.

      sudo fdisk -H 32 -S 32 /dev/sda

      Please Read Me

      Comment


        #4
        Originally posted by oshunluvr View Post
        Basically, if you use fdisk, set heads and sectors at 32 and then start your first partition at 2.

        sudo fdisk -H 32 -S 32 /dev/sda
        Or use gdisk to create a gpt partition table and not have to worry about it.

        Comment


          #5
          Originally posted by claydoh View Post
          The mint installer is iirc the ubuntu installer underneath, as is Kubuntu's, if that matters.


          http://tombuntu.com/index.php/2012/0...ntu-on-an-ssd/ has some info and links to more in depth stuff if you wish to get in that deep.
          So if it is like you wrote this means that latest Kubuntu installer does the thing also, will test it. Thaks for the article it is very good and the links aspecially to Arch Linux wiki is good all-in-place how to.

          Originally posted by oshunluvr View Post
          Basically, if you use fdisk, set heads and sectors at 32 and then start your first partition at 2.

          sudo fdisk -H 32 -S 32 /dev/sda
          This is good solution but I have found an article that says it does not work properly with the newest fdisk version. Method A, Note 1 in this article: http://www.siduction.org/index.php?m...sid=78&lang=en
          Does it ?

          Originally posted by james147 View Post
          Or use gdisk to create a gpt partition table and not have to worry about it.
          I'm considering using the GPT (although I have very little knowledge about it and differences to MBR). Will it work with my HDD with /boot partition using MBR (which I do not want to touch right now) and GPT on SSD with e.g. / and /home partitions?

          I have also few more questions about how to move my data. A couple years ago I migrated my Debian installation from old machine to new one using dd (disk dump of each partitions) and then dd again to a new ones. I remember that in some cases the target partions ware bigger and I had to use tune2fs to extend its size after dumping smoller one on it. This was tricky one but I had exacly the same system on both machines which saved me lots of installation and configuration effort. Is it possible to do such thing with HDD and SSD configuration (or in MBR vs GPT case only reinstallation is an option?). Mayby there is some backup tool like in OS X case when fresh system installation can be supplied from a backup and all progs, data and configs are in the place?

          Comment


            #6
            This is good solution but I have found an article that says it does not work properly with the newest fdisk version. Method A, Note 1 in this article: http://www.siduction.org/index.php?m...sid=78&lang=en
            Does it ?
            Don't forget to check the date of articles when you quote them. It's over a year old and refers to fdisk versions 2.17-2.19. We're currently of fdisk v2.20.1.

            BTW: Samsung (maybe others?) SSD's may be incompatible with GPT formatting when using TRIM and the Manufacturer recommends using MBR formatting. Either way, you can mix GPT and MBR drives but I don't think you can't boot to the MBR disk in that configuration. If it were up to me, I'd try it and migrate to the newer format for the SSD.

            AFAIK, dd will work in the scenario you've suggested, although I haven't tried it.

            Please Read Me

            Comment


              #7
              Originally posted by glossy View Post
              I'm considering using the GPT (although I have very little knowledge about it and differences to MBR). Will it work with my HDD with /boot partition using MBR (which I do not want to touch right now) and GPT on SSD with e.g. / and /home partitions?
              It does not matter the the partition table on different drives differs so you are free to mix GPT and MBR on different drives. The only thing to note is how booting happens as GPT and MBR have slightly different ways to configure the boot (GPT on non UEFI systems needs a small partition to house the MBR record for BIOS systems).

              I am not sure what kubuntu does in its installer, I only have experience with Archlinux and GPT but it is quite easy to set up manually if needed and I would suggest reading: https://wiki.archlinux.org/index.php...artition_Table and https://wiki.archlinux.org/index.php...c_instructions but the gist of it is create a small (about 2MB) partition near the start of the disk and mark the partition type as "EF02" (can be done in gdisk or cgdisk) then install grub the same way you would normally do.

              I have also few more questions about how to move my data. A couple years ago I migrated my Debian installation from old machine to new one using dd (disk dump of each partitions) and then dd again to a new ones. I remember that in some cases the target partions ware bigger and I had to use tune2fs to extend its size after dumping smoller one on it. This was tricky one but I had exacly the same system on both machines which saved me lots of installation and configuration effort. Is it possible to do such thing with HDD and SSD configuration (or in MBR vs GPT case only reinstallation is an option?). Mayby there is some backup tool like in OS X case when fresh system installation can be supplied from a backup and all progs, data and configs are in the place?

              Moving data to a smaller hdd (doesn't matter if it is ssd or not, dd and copy utils do not care) is harder to do then moving data to a larger disk. You cannot simply dd the data as you will lose anything that is after the end of the smaller disk so you would ahve to shrink the partitions on the first disk (and make sure they are all within the size of the second disk) then dd only that first part of the disk and expand the partitions back after again.

              Considering the ssd has nothing on it I would recommend experimenting with it to find the setup you most like. I would also recommend doing a clean install rather then trying to migrate the install across (you can pull a list of installed packages off the current install and reinstall them if needed). This is what I would do:

              Install kubuntu to the ssd to see what happens (all your current data will remain in tact as you are only touching the new ssd), check if it created a GPT or MBR partition table (I would be interested to know which it picks for a new install on a SSD). If it install a MBR table I would be tempted to reinstall it and manually partition the disk before hand to create the layout I wanted (ie, one small 2MB partition for the MBR record, then the rest of the disk how you want it). Then use the kubuntu installer to install to these partitions (you still install grub to the drive and not a partition so /dev/sdX not /dev/sdXY). I would go for GPT as it is better designed with SSDs in mind and is generally a better partition table (supports 128ish partitions rather then the 4 primary partitions that MBR supports).

              As for swap, you can put it on the ssd, the hdd or both. Some people have concerns about swap and other things reducing the life of a ssd but I do not think it matters that much (It is more likely to outlast the life time of the computer you put it in either way).

              Comment


                #8
                +1 on the swap comment. Most of the internet info on SSD wear is outdated. Besides, what's the point of having an SSD if you don't use it at the moment of most need - when swapping to disk?

                Please Read Me

                Comment


                  #9
                  Originally posted by oshunluvr View Post
                  +1 on the swap comment. Most of the internet info on SSD wear is outdated. Besides, what's the point of having an SSD if you don't use it at the moment of most need - when swapping to disk?
                  I don't have swap on my ssd... but then with 18G of ram I don't have swap on my hhd either

                  Comment


                    #10
                    Bragger!

                    I have (only) 8GB RAM but I set tmpfs to reside in RAM too so I keep a swap partition just in case. I don't think I've ever hit it though.

                    Please Read Me

                    Comment


                      #11
                      Originally posted by oshunluvr View Post
                      Don't forget to check the date of articles when you quote them. It's over a year old and refers to fdisk versions 2.17-2.19. We're currently of fdisk v2.20.1.

                      BTW: Samsung (maybe others?) SSD's may be incompatible with GPT formatting when using TRIM and the Manufacturer recommends using MBR formatting. Either way, you can mix GPT and MBR drives but I don't think you can't boot to the MBR disk in that configuration. If it were up to me, I'd try it and migrate to the newer format for the SSD.
                      ...
                      This I didn't know but made some research on the net and seems you are right. I did purchased Samsung 830 series SSD, although some people have problems with GPT on this drives some does not. Maby it depends on firmware, I will report after I try it by my self.

                      Originally posted by james147 View Post
                      It does not matter the the partition table on different drives differs so you are free to mix GPT and MBR on different drives. The only thing to note is how booting happens as GPT and MBR have slightly different ways to configure the boot (GPT on non UEFI systems needs a small partition to house the MBR record for BIOS systems).

                      (...)
                      I will try do it this way: /boot and swap partitions will reside on HDD like is now the rest I will install on SSD.
                      Originally posted by james147 View Post
                      This is what I would do:

                      Install kubuntu to the ssd to see what happens (all your current data will remain in tact as you are only touching the new ssd), check if it created a GPT or MBR partition table (I would be interested to know which it picks for a new install on a SSD). If it install a MBR table I would be tempted to reinstall it and manually partition the disk before hand to create the layout I wanted (ie, one small 2MB partition for the MBR record, then the rest of the disk how you want it). Then use the kubuntu installer to install to these partitions (you still install grub to the drive and not a partition so /dev/sdX not /dev/sdXY). I would go for GPT as it is better designed with SSDs in mind and is generally a better partition table (supports 128ish partitions rather then the 4 primary partitions that MBR supports).
                      If my SSD won't have any issues with GPT partitioning, since 830 serieshave had, this will be my choice.

                      Originally posted by james147 View Post
                      As for swap, you can put it on the ssd, the hdd or both. Some people have concerns about swap and other things reducing the life of a ssd but I do not think it matters that much (It is more likely to outlast the life time of the computer you put it in either way).
                      I think swap will go to HDD. Why, explanation below:

                      Originally posted by oshunluvr View Post
                      +1 on the swap comment. Most of the internet info on SSD wear is outdated. Besides, what's the point of having an SSD if you don't use it at the moment of most need - when swapping to disk?
                      Originally posted by oshunluvr View Post
                      Bragger!

                      I have (only) 8GB RAM but I set tmpfs to reside in RAM too so I keep a swap partition just in case. I don't think I've ever hit it though.
                      I have only 4GB RAM on my Asus M70VN laptop and Asus guide says that this is max but chipset serves 8GB (this happened to me on my previous desktop machine with Gigabyte MB and after bios update it saw 8GB but this is not the issue), mayby it will serve 8GB. But since I'm software developer and now I'm heavily using this machine running databese on VirtualBox with CentOS, application server, IDE and some more stuff swap always hit the disk with avarage of 1,5GB. So my conclusion for now is swap goes on HDD.
                      Thanks for info.
                      Now I will wait for my new SSD and after it arrive use your suggestions to make it work perfectly. I will also post a message what were my conclusions after installation.

                      Comment

                      Working...
                      X