LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices



Reply
 
Search this Thread
Old 04-14-2014, 12:37 PM   #1
StevenXL
Member
 
Registered: Jan 2014
Posts: 76

Rep: Reputation: Disabled
Upgrading to SSD


Hi guys,

I am upgrading to an SSD, and it would be a pain to have to get all my configuration back on a clean install. I figured I would ask the community how I can make the process as easy as possible.

Here is my current situation:

1 - I am upgrading a laptop
2 - I backed up all my files to an external USB drive; this is a 1TB USB drive so there is still a lot of space on it.
3 - My current disk is partitioned into a swap, home, and root, as well as an NTFS partition for windows.
4 - I don't need the NTFS partition. I will be using virtualization for my Windows needs.
5 - I have a Slackware boot-up USB as well.

Thanks!
 
Old 04-14-2014, 01:19 PM   #2
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Hanover, Germany
Distribution: Main: Gentoo Others: What fits the task
Posts: 15,651
Blog Entries: 2

Rep: Reputation: 4095Reputation: 4095Reputation: 4095Reputation: 4095Reputation: 4095Reputation: 4095Reputation: 4095Reputation: 4095Reputation: 4095Reputation: 4095Reputation: 4095
1. Boot from a live-medium (possibly your Slackware install disk), and create a tar-archive of the files on your root partition on the external disk. I assume here that you don't need to backup the /home partition, but do that also, if you haven't already.
2. Install the SSD, boot the live system again and partition the SSD, either with fdisk or parted, but do not use cfdisk for that.
3. Format the new root partition and untar the backed up root-partition on it.
4. Copy over your backed up personal files.
5. Chroot into the new root and install Lilo.
Done.

If you need help with a specific step just ask.
 
Old 04-14-2014, 01:47 PM   #3
tronayne
Senior Member
 
Registered: Oct 2003
Location: Northeastern Michigan, where Carhartt is a Designer Label
Distribution: Slackware 32- & 64-bit Stable
Posts: 3,119

Rep: Reputation: 818Reputation: 818Reputation: 818Reputation: 818Reputation: 818Reputation: 818Reputation: 818
I did this with a new "spinning" drive -- went from a 250 G to a 500 G -- and, as far as I know, you can partition a SSD just like you can any other drive (could be wrong about that, though). Might want to read the Wikipedia article at http://en.wikipedia.org/wiki/Solid-state_drive (which indicates that partitioning is OK).

Give some thought to partitioning. I have, over a lot of years with Unix and Linux learned that partitioning a drive with a partition map similar to this (your needs may, of course, vary) works quite well:
Code:
Filesystem      Size  Used Avail Use% Mounted on
/dev/sda1        15G  8.1G  5.8G  59% /
/dev/sda3        19G  4.1G   14G  24% /home
/dev/sda5        19G  4.0G   14G  23% /usr/local
/dev/sda6        19G  3.3G   15G  19% /opt
/dev/sda7        19G  663M   17G   4% /var/lib/mysql
/dev/sda8        92G   34G   54G  39% /var/lib/virtual
/dev/sda9        92G   12G   76G  13% /spares
/dev/sda10      173G  129M  164G   1% /var/lib/pgsql
tmpfs           3.9G     0  3.9G   0% /dev/shm
I would be inclined, though, if I add a larger drive, to make the root 20G rather than 15G.

In the above, /home, /usr/local, /opt and /var/lib/mysql are all the same size where /var/lib/virtual and /spares are 92G and /var/lib/pgsql is 173G (they just worked out that way during a a clean install). I have separate data base servers where the MySQL/MariaDB partition is a 250G second drive and another machine where the PostgreSQL partition is the same (one machine is MySQL/MariaDB, the other is PostgreSQL); I do data base development work on this box so they're sized for development, not for production. I use /spares for storing large geographic data files and other stuff that I don't want in /home or any other place (geograph
ic data includes every place name that appears on maps anywhere in the world along with huge image files of the world -- you probably won't be doing that kind of thing).

Virtual machines, depending upon how you're going to use them, will most likely want to be at least 20G each to be useful; e.g., Win7 trips over its own feet at less than 20G with any software installed. You want to set aside a big chunk of space for your virtual machines to live in (otherwise, they'll install in your home directory -- try backing that up, eh?). You generally don't partition guest virtual machines (you do add a swap partition, though, for a Linux guest).

The idea of doing the above is that you can do a clean install when a new version of Slackware is released without having to copy wads of stuff off the system somewhere then copying it back on (I've never had good luck doing an update, so I do a clean install). The "trick" is when you're doing the install and it comes to the partitions, you add the partition to fstab, but you don't format it. That way, Slackware comes up running and all your stuff is there.

I do copy /etc to, well, /spares and copy things from there to the newly installed Slackware: /etc/passwd, /etc/shadow, the local.conf file in /etc/fonts that points to the Adobe Font Library and other fonts I've added to the system. I try to avoid messing with system software and I don't like to install things in the root tree (the fonts in in /usr/local/share/fonts). I install optional software, such as OpenOffice, in /opt, not in the root. I install all my geographic programs and utilities in /opt. VirtualBox installs by default in /opt -- none of that gets wiped out by doing the above, and in a similar way, none of the data bases are wiped out, either.

It works for me, it might work for you, but in any event give partitioning some thought before you go too much further. I've been though a lot of releases over the years and this has served me well.

In your case, new, raw media, you'll be spending some time copying from your back up USB drive (first ones I would copy are /etc/passwd and /etc/shadow, followed by the directories in /home).

Hope this helps some.
 
Old 04-14-2014, 01:58 PM   #4
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Hanover, Germany
Distribution: Main: Gentoo Others: What fits the task
Posts: 15,651
Blog Entries: 2

Rep: Reputation: 4095Reputation: 4095Reputation: 4095Reputation: 4095Reputation: 4095Reputation: 4095Reputation: 4095Reputation: 4095Reputation: 4095Reputation: 4095Reputation: 4095
Quote:
Originally Posted by tronayne View Post
I did this with a new "spinning" drive -- went from a 250 G to a 500 G -- and, as far as I know, you can partition a SSD just like you can any other drive (could be wrong about that, though).
It depends. Of course you can use the same tools, but for SSDs (and newer mechanical disks with 4kb physical sectors size) partitions have to be aligned to the sectors size (and in case of SSDs at best also to the erase-block size). This is automatically the case for older mechanical disks, where the physical and the logical sector size are the same, but for SSDs/newer harddisks you have to look that your partitioning tool does that. While tools like fdisk, parted and GParted and even the Windows partition manager in versions newer than XP automatically align the partitions correctly, cfdisk sadly still defaults to the old starting points of partitions from the XP era, which will end in misaligned partitions.
 
Old 04-14-2014, 02:03 PM   #5
tronayne
Senior Member
 
Registered: Oct 2003
Location: Northeastern Michigan, where Carhartt is a Designer Label
Distribution: Slackware 32- & 64-bit Stable
Posts: 3,119

Rep: Reputation: 818Reputation: 818Reputation: 818Reputation: 818Reputation: 818Reputation: 818Reputation: 818
Thanks for pointing that out (I knew about not using cfdisk) but forgot to mention it.
 
Old 04-14-2014, 02:14 PM   #6
Woodsman
Senior Member
 
Registered: Oct 2005
Distribution: Slackware 14.1
Posts: 3,482

Rep: Reputation: 534Reputation: 534Reputation: 534Reputation: 534Reputation: 534Reputation: 534
I have done this many times. I also use multiple partitions on my systems. My method:

* Boot with a live CD.
* Verify both the source and destination disks are available.
* Use mc, cp, dd, or gparted to copy partitions.

GParted is visually handy and fast for creating and formatting partitions. Very slow to copy large partitions because of all the file system checks both before and after. Most often I do not use gparted to copy large partitions because of the long times.

In the case of NTFS partitions use dd.

In a terminal I manually mount the source and destination partitions. Then most often I use mc to copy the files.

When using a live CD, and copying / and using cp -a or mc, the /home partition is not mounted into the file tree and only the stub for /home is copied, which is what you want. You then have to repeat the process to copy the /home files to the new partition.

Repeat for other partitions.

For a swap partition on mechanical disks, I use the live cd and gparted to manually create and format the partition. There is nothing to copy, just create and format. You probably do not want swap on your SSD anyway.

Of course you can do a lot of this with cfdisk too.

If the boot order of the new second drive is not the same as the original drive, remember to edit /etc/fstab in the new drive before rebooting. If you forget then use the Slackware DVD or CD-1 to boot and update fstab.

Quote:
I don't need the NTFS partition. I will be using virtualization for my Windows needs.
You could retain the Windows partition as-is and use the partition in raw mode in your virtual system.

As a note, I keep all of my virtual machines on a second disk, not the disk with my operating system. Allows for less hard drive thrashing and more efficient operations. Of course, an SSD does not have disk thrashing problems. I don't have an SSD.

Quote:
I would be inclined, though, if I add a larger drive, to make the root 20G rather than 15G.
I have grown comfortable with 20GB / partitions too.
 
Old 04-15-2014, 12:24 AM   #7
StevenXL
Member
 
Registered: Jan 2014
Posts: 76

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by TobiSGD View Post
1. Boot from a live-medium (possibly your Slackware install disk), and create a tar-archive of the files on your root partition on the external disk. I assume here that you don't need to backup the /home partition, but do that also, if you haven't already.
2. Install the SSD, boot the live system again and partition the SSD, either with fdisk or parted, but do not use cfdisk for that.
3. Format the new root partition and untar the backed up root-partition on it.
4. Copy over your backed up personal files.
5. Chroot into the new root and install Lilo.
Done.

If you need help with a specific step just ask.
Thanks TobiSGD!

I was able to follow your directions with a little searching on Google as well.

Working like a charm right now. Not sure I notice a big difference in performance - the machine is much quieter, and maybe the battery will last longer, but Slackware was working so well before the change to an sdd that I don't see a difference yet.
 
Old 04-15-2014, 04:04 AM   #8
TenTenths
Senior Member
 
Registered: Aug 2011
Location: Dublin
Distribution: Centos 5 / 6
Posts: 1,601

Rep: Reputation: 483Reputation: 483Reputation: 483Reputation: 483Reputation: 483
Quote:
Originally Posted by StevenXL View Post
Working like a charm right now. Not sure I notice a big difference in performance - the machine is much quieter, and maybe the battery will last longer, but Slackware was working so well before the change to an sdd that I don't see a difference yet.
Unless you're doing anything that's really disk intensive you'll generally not notice much of a speed improvement once the system has booted. There's a big gain on Windows machines as they make such extensive use of swap-file. Quieter and battery are going to be your big wins in this case.
 
Old 04-15-2014, 09:23 AM   #9
plisken
Member
 
Registered: Dec 2001
Location: Scotland
Distribution: Slackware 9.1/13.37/14 RedHat 6.2/7/EL6.5 SuSE 8.2/11.1
Posts: 459

Rep: Reputation: 30
My first thought when reading the OP was http://clonezilla.org/

You mention that you havent noticed a huge speed difference. I recently upgraded to an SSD on a macbook and though I did notice an increase in performance, it wasnt huge. I hovever put that down to the fact that I had a sataIII disk on a sataII controller.

One last thing I'll mention was http://en.wikipedia.org/wiki/Trim_%28computing%29 and maybe someone more informed may comment on whether this is something to be aware of with Linus/Slackware and SSD's

I've note yet upgraded to an SSD on anything Slackware yet but probably soon will.
 
Old 04-15-2014, 09:48 AM   #10
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Hanover, Germany
Distribution: Main: Gentoo Others: What fits the task
Posts: 15,651
Blog Entries: 2

Rep: Reputation: 4095Reputation: 4095Reputation: 4095Reputation: 4095Reputation: 4095Reputation: 4095Reputation: 4095Reputation: 4095Reputation: 4095Reputation: 4095Reputation: 4095
Quote:
Originally Posted by plisken View Post
One last thing I'll mention was http://en.wikipedia.org/wiki/Trim_%28computing%29 and maybe someone more informed may comment on whether this is something to be aware of with Linus/Slackware and SSD's
Indeed it is, forget to mention that. To be able to use TRIM (which you definitely should) you have to use a TRIM aware filesystem, like ext4, btrfs or jfs. You also have to either add the discard mount option for partitions on the SSD or run fstrim from time to time.
 
Old 04-15-2014, 10:57 AM   #11
onebuck
Moderator
 
Registered: Jan 2005
Location: Midwest USA, Central Illinois
Distribution: SlackwareŽ
Posts: 11,450
Blog Entries: 4

Rep: Reputation: 1505Reputation: 1505Reputation: 1505Reputation: 1505Reputation: 1505Reputation: 1505Reputation: 1505Reputation: 1505Reputation: 1505Reputation: 1505Reputation: 1505
Thumbs up Member Response

Hi,

Quote:
Originally Posted by StevenXL View Post
Hi guys,

I am upgrading to an SSD, and it would be a pain to have to get all my configuration back on a clean install. I figured I would ask the community how I can make the process as easy as possible.

Here is my current situation:

1 - I am upgrading a laptop
2 - I backed up all my files to an external USB drive; this is a 1TB USB drive so there is still a lot of space on it.
3 - My current disk is partitioned into a swap, home, and root, as well as an NTFS partition for windows.
4 - I don't need the NTFS partition. I will be using virtualization for my Windows needs.
5 - I have a Slackware boot-up USB as well.

Thanks!
So that I do not duplicate information, please look at: http://www.linuxquestions.org/questi...an-ssd-925789/

Post #26 & #27 provide some useful information for setting up SSD on a Slackware system. The whole thread provides some insight to SSD usage.

Please remember not to mix older SSD configuration with a newer SSD config. There's definitely a gotcha if you do!

I use SSD on most of my Slackware systems. There are a lot of people who provide 'FUD' when it comes to 'SSD' vs spinning HDD. When in doubt look at the original manufacture information for a particular 'SSD' or 'HDD'.

Hope this helps.
 
Old 04-15-2014, 12:03 PM   #12
StevenXL
Member
 
Registered: Jan 2014
Posts: 76

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by onebuck View Post
Hi,

So that I do not duplicate information, please look at: http://www.linuxquestions.org/questi...an-ssd-925789/

Post #26 & #27 provide some useful information for setting up SSD on a Slackware system. The whole thread provides some insight to SSD usage.

Please remember not to mix older SSD configuration with a newer SSD config. There's definitely a gotcha if you do!

I use SSD on most of my Slackware systems. There are a lot of people who provide 'FUD' when it comes to 'SSD' vs spinning HDD. When in doubt look at the original manufacture information for a particular 'SSD' or 'HDD'.

Hope this helps.
This does help a lot. My next move is to figure out how to configure my system to best take advantage of SSD. On a first-pass, I need to enable TRIM, it seems, but I will check out the links you posted before messing with anything.
 
Old 04-15-2014, 12:21 PM   #13
bimboleum
Member
 
Registered: Oct 2009
Posts: 51

Rep: Reputation: 9
More thoughts on partitioning

Hi,
My 2-cents on partitioning a drive (SSD or otherwise) to hold your favourite Slackware distribution!

Assuming you have a big enough drive (assuming /dev/sda):-

/dev/sda1 /boot .... 100M
/dev/sda2 swap space
/dev/sda3 / ........ root filesystem ... currently I use 30G but YMMV
/dev/sda4 / ........ alternate root filesystem (see below for why)
/dev/sda5 all the remaining space

Partitions 3 and 4 are where a Slackware distribution is installed. Having 2 such partitions allows me to install a new distribution (on, say /dev/sda4) without disturbing an older, stable distribution (in /dev/sda3) and so have a bootable backup when the new install goes aggly.

Partition 5 is dedicated to LVM and forms a single volume group from which I allocate logical volumes for /home, /opt, /usr/local and whatever-else I want to be in separate filesystems. Unless I know different I allocate 2G each to these because using logical volumes (and the ext<n> filesystem) allows me to expand the volumes as needed.

As you may notice, this arrangement is not EFI-friendly ... I have only used this with a legacy boot.

As usual, YMMV :-)

cheers
pete

pete hilton
saruman@ruvolo-hilton.org
 
Old 04-15-2014, 01:13 PM   #14
onebuck
Moderator
 
Registered: Jan 2005
Location: Midwest USA, Central Illinois
Distribution: SlackwareŽ
Posts: 11,450
Blog Entries: 4

Rep: Reputation: 1505Reputation: 1505Reputation: 1505Reputation: 1505Reputation: 1505Reputation: 1505Reputation: 1505Reputation: 1505Reputation: 1505Reputation: 1505Reputation: 1505
Member Response

Hi,

@bimboleum

Sorry, /dev/sda4 as shown would/could be a extended partition with /dev/sda5 being a logical partition within that allocated space.

Linux allows 4 primary partitions if you wish to use '/dev/sda4' as extended then you can create multiple logical partitions within that allocated space.

Hope this helps.
 
Old 04-16-2014, 11:38 AM   #15
bimboleum
Member
 
Registered: Oct 2009
Posts: 51

Rep: Reputation: 9
Number of partitions

Hi,
gdisk allows more than 4 partitions which is what I use

cheers
pete
 
  


Reply

Tags
hdd, partition, ssd, upgrade


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Upgrading to an SSD yawningdog Linux - Hardware 4 11-26-2012 09:37 AM
SSD raid1 vs SSD raid10 advice ? wonker Linux - Hardware 8 05-23-2012 02:46 AM
ssd slack66 Slackware 5 06-24-2010 01:56 AM
Upgrading to Badger! Can't login anymore after upgrading? BellaSha87 Ubuntu 1 12-03-2005 01:09 PM


All times are GMT -5. The time now is 09:50 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration