Slackware This Forum is for the discussion of Slackware Linux.
|
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
|
04-14-2014, 11:37 AM
|
#1
|
Member
Registered: Jan 2014
Posts: 81
Rep: 
|
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!
|
|
|
04-14-2014, 12:19 PM
|
#2
|
Moderator
Registered: Dec 2009
Location: Germany
Distribution: Whatever fits the task best
Posts: 17,148
|
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.
|
|
|
04-14-2014, 12:47 PM
|
#3
|
Senior Member
Registered: Oct 2003
Location: Northeastern Michigan, where Carhartt is a Designer Label
Distribution: Slackware 32- & 64-bit Stable
Posts: 3,541
|
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.
|
|
|
04-14-2014, 12:58 PM
|
#4
|
Moderator
Registered: Dec 2009
Location: Germany
Distribution: Whatever fits the task best
Posts: 17,148
|
Quote:
Originally Posted by tronayne
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.
|
|
|
04-14-2014, 01:03 PM
|
#5
|
Senior Member
Registered: Oct 2003
Location: Northeastern Michigan, where Carhartt is a Designer Label
Distribution: Slackware 32- & 64-bit Stable
Posts: 3,541
|
Thanks for pointing that out (I knew about not using cfdisk) but forgot to mention it.
|
|
|
04-14-2014, 01:14 PM
|
#6
|
Senior Member
Registered: Oct 2005
Distribution: Slackware 14.1
Posts: 3,482
|
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.
|
|
|
04-14-2014, 11:24 PM
|
#7
|
Member
Registered: Jan 2014
Posts: 81
Original Poster
Rep: 
|
Quote:
Originally Posted by TobiSGD
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.
|
|
|
04-15-2014, 03:04 AM
|
#8
|
Senior Member
Registered: Aug 2011
Location: Dublin
Distribution: Centos 5 / 6 / 7 / 8
Posts: 3,557
|
Quote:
Originally Posted by StevenXL
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.
|
|
|
04-15-2014, 08:23 AM
|
#9
|
Member
Registered: Dec 2001
Location: Scotland
Distribution: Slackware 9.1-15 RH 6.2/7, RHEL 6.5 SuSE 8.2/11.1, Debian 10.5
Posts: 518
Rep:
|
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.
|
|
|
04-15-2014, 08:48 AM
|
#10
|
Moderator
Registered: Dec 2009
Location: Germany
Distribution: Whatever fits the task best
Posts: 17,148
|
Quote:
Originally Posted by plisken
|
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.
|
|
|
04-15-2014, 09:57 AM
|
#11
|
Moderator
Registered: Jan 2005
Location: Central Florida 20 minutes from Disney World
Distribution: SlackwareŽ
Posts: 13,973
|
Member Response
Hi,
Quote:
Originally Posted by StevenXL
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.
|
|
|
04-15-2014, 11:03 AM
|
#12
|
Member
Registered: Jan 2014
Posts: 81
Original Poster
Rep: 
|
Quote:
Originally Posted by onebuck
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.
|
|
|
04-15-2014, 11:21 AM
|
#13
|
Member
Registered: Oct 2009
Posts: 111
Rep:
|
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
|
|
|
04-15-2014, 12:13 PM
|
#14
|
Moderator
Registered: Jan 2005
Location: Central Florida 20 minutes from Disney World
Distribution: SlackwareŽ
Posts: 13,973
|
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.

|
|
|
04-16-2014, 10:38 AM
|
#15
|
Member
Registered: Oct 2009
Posts: 111
Rep:
|
Number of partitions
Hi,
gdisk allows more than 4 partitions which is what I use
cheers
pete
|
|
|
All times are GMT -5. The time now is 03:59 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|