<SOLVED> Copying Home Partition to Fresh KDE Install

Questions about Grub, UEFI,the liveCD and the installer
Forum rules
Before you post please read how to get help
Post Reply
User avatar
gtsfer
Level 7
Level 7
Posts: 1912
Joined: Mon May 27, 2013 9:15 am
Location: Bucks County PA, USA

<SOLVED> Copying Home Partition to Fresh KDE Install

Post by gtsfer »

I have LMDE installed on my main hard drive, alone so far. I have installed and have been running KDE on an WD 500GB external USB hard drive. I like it a lot and it's pretty much fully configured at this point. So I'm going to install KDE on my hard drive as it will run a tad faster than it does on a 4800 RPM USB attached unit.

I've been involved in a few threads where an OP had questions on copying the home partition to a new install. I know the basics, but have never done it myself. Here's my plan.

Backup of data - DONE
Export (save markings) from KDE installed on USB drive with Synaptic Package Manager to a file - DONE
Make space for KDE on hard drive with Gparted from Live session
Install KDE on hard drive
Run Updates, Install nVidia Driver
Import (read markings) with SPM from saved KDE install, then apply (this installs all packages I have added on my KDE USB install)
Copy "home" KDE partition from USB install to KDE hard drive "home" with Gparted.

My specific questions are:
1) Am I missing anything?
2) Will this configure FF with all my bookmarks, extensions and plug-ins etc?
3) This will configure all my installed apps too, yes, no?
4) How do I copy "home"? with Gparted? Is it basically like this?
... boot again from a live session
... unmount whatever partitions that I want to copy from and to
... use copy/move function

I've never done a copy/move in Gparted so I thought I would ask rather than experiment on my own. And I'm not sure just how much of my config will port along as I asked in #2 and #3.

My thanks up front if you decide to rsvp. 8)
Last edited by gtsfer on Sat Aug 30, 2014 2:13 pm, edited 1 time in total.
"There is no gravity, the earth sucks." - Issac Newton @ 75
KDE & Cinnamon 18.1 & Win 10 - ASUS M5A99FX PRO MB, AMD FX-8370 Octo-Core CPU, 16GB RAM, AMD Radeon R7 240
User avatar
austin.texas
Level 20
Level 20
Posts: 12046
Joined: Tue Nov 17, 2009 3:57 pm
Location: at /home

Re: Copying Home Partition to Fresh KDE Install

Post by austin.texas »

2) Will this configure FF with all my bookmarks, extensions and plug-ins etc?
3) This will configure all my installed apps too, yes, no?
Generally your apps will retain their config. Firefox and Thunderbird may be the exceptions. You will probably have to take care of that manually.

There is some info I need first.
You had KDE installed with a separate /home partition. So when you installed to the hard drive did you designate a particular partition as /home during installation?
Please post the result of

Code: Select all

sudo blkid -o list
and post the contents of fstab from the hard drive.
Mint 18.2 Cinnamon, Quad core AMD A8-3870 with Radeon HD Graphics 6550D, 8GB DDR3, Ralink RT2561/RT61 802.11g PCI
Linux Linx 2018
User avatar
jahid
Level 6
Level 6
Posts: 1217
Joined: Sat Dec 07, 2013 4:07 pm
Location: Khulna, Bangladesh

Re: Copying Home Partition to Fresh KDE Install

Post by jahid »

1) I don't think so..
2) yes
3) yes
4) I haven't done like this. I simply copy files with file manager and skip that part which says permission denied.

But if you used a separate /home partition it would be easier. You wouldn't even need to backup your home partition (though that's always a safety measure). In that case simply changing the partition mount point to /home would do the task.
jahid@HP ProBook 440 G1 Laptop
User avatar
gtsfer
Level 7
Level 7
Posts: 1912
Joined: Mon May 27, 2013 9:15 am
Location: Bucks County PA, USA

Re: Copying Home Partition to Fresh KDE Install

Post by gtsfer »

austin.texas wrote:Generally your apps will retain their config. Firefox and Thunderbird may be the exceptions. You will probably have to take care of that manually. ....

You had KDE installed with a separate /home partition. So when you installed to the hard drive did you designate a particular partition as /home during installation?
Yes !!! There's a separate /home for LMDE, if I understand your question correctly. I don't have KDE installed to the hard drive yet but I'm getting ready to. That also has a separate /home partition on the external USB disk. Here's results of blkid, run from booting LMDE that's installed on hard drive.

Code: Select all

sudo blkid -o list
device                     fs_type     label        mount point                    UUID
-----------------------------------------------------------------------------------------------------------------------
/dev/sda2                  swap        linux-swap   <swap>                         9fb5f4e5-3eef-4d95-89cd-69d5238a2fcb
/dev/sdb1                  ext4        250GB Disk   /media/gtsfer/250GB Disk       39639c04-6b68-4a0e-b9c9-bfb1298d4b53
/dev/sda1                  ext4                     /                              a9806a57-5c9d-4984-8eda-2f983ddea2f1
/dev/sda3                  ext4                     /home                          23ef2bd6-7c8d-4f6f-8328-1a2543ea8377
/dev/sdg1                  ext4        C17Root      /media/gtsfer/C17Root          0e31c10d-d45d-4ca8-959f-0411443cbc5e
/dev/sdg2                  swap                     (not mounted)                  61cbbd9c-e76f-4286-b516-7d30726146e7
/dev/sdg3                  ext4        C17Home      /media/gtsfer/C17Home          7234fef0-43ab-438f-a73e-288b506795f3
/dev/sdg5                  ext4        KdeRoot      /media/gtsfer/KdeRoot          0eed399f-b8dd-48a4-b3b8-aaef42640fd0
/dev/sdg6                  ext4        KdeHome      /media/gtsfer/KdeHome          7905f0d6-befe-46bd-a45e-4afade71db70
/dev/sdg7                  ext4        SlackRoot    /media/gtsfer/SlackRoot        d25ecd0f-98ef-4cdf-af42-0b9410fabaa0
/dev/sdg8                  ext4        SlackHome    /media/gtsfer/SlackHome        58ccde31-7316-4dce-a3be-fdbb2d20ca06
The external USB has Cinnamon, KDE and Slackware installed right now for experimentation purposes. (Slackware is installed but not made bootable yet as I didn't want Lilo to screw up Grub. Don't worry about that part I guess at all). There's also a 2nd hard drive in the system that I use only for data backup (that's not my only copy of my data btw).

And here's fstab from LMDE as well...

Code: Select all

# UNCONFIGURED FSTAB FOR BASE SYSTEM
proc	/proc	proc	defaults	0	0
# /dev/sda1
UUID=a9806a57-5c9d-4984-8eda-2f983ddea2f1	/	ext4	rw,errors=remount-ro	0	1
# /dev/sda2
UUID=9fb5f4e5-3eef-4d95-89cd-69d5238a2fcb	swap	swap	sw	0	0
# /dev/sda3
UUID=23ef2bd6-7c8d-4f6f-8328-1a2543ea8377	/home	ext4	rw,errors=remount-ro	0	0
I suspected that FF and Thunderbird would be best configured manually. It would have been nice but it's not a big deal.
"There is no gravity, the earth sucks." - Issac Newton @ 75
KDE & Cinnamon 18.1 & Win 10 - ASUS M5A99FX PRO MB, AMD FX-8370 Octo-Core CPU, 16GB RAM, AMD Radeon R7 240
User avatar
jahid
Level 6
Level 6
Posts: 1217
Joined: Sat Dec 07, 2013 4:07 pm
Location: Khulna, Bangladesh

Re: Copying Home Partition to Fresh KDE Install

Post by jahid »

As you have a separate /home partition and if you haven't formatted it yet then don't format it. Just start installing system from a live system and during partitioning step select the home partition and just change the mount point to /home (don't mark it to format). That way you won't need to copy the home folder agian.

I don't use thunderbird, but firefox retains all of it's data/passwords/history/accounts/bookmarks..
jahid@HP ProBook 440 G1 Laptop
User avatar
gtsfer
Level 7
Level 7
Posts: 1912
Joined: Mon May 27, 2013 9:15 am
Location: Bucks County PA, USA

Re: Copying Home Partition to Fresh KDE Install

Post by gtsfer »

jahid wrote:As you have a separate /home partition and if you haven't formatted it yet then don't format it. Just start installing system from a live system and during partitioning step select the home partition and just change the mount point to /home (don't mark it to format). That way you won't need to copy the home folder agian.

I don't use thunderbird, but firefox retains all of it's data/passwords/history/accounts/bookmarks..
That would be nice if FF retained all that. Normally I would import bookmarks, etc and reconfig it from scratch. But I'm willing to try it and see what works.

But I'm a little confused. My existing home partition on the hard disk is for LMDE. I'm not going to uninstall that but dual-boot with LMDE and KDE on the hard disk. And aren't they totally different animals? I mean KDE would need it's own config files (the hidden ones in /home) would it not?

I guess another question is what would I gain by copying /home from the USB disk to a fresh install of KDE on the hard drive (once I do the install that is). Would my panel settings for instance get ported over. I have customized quite a few items with KDE in System Settings and the panel mostly.
"There is no gravity, the earth sucks." - Issac Newton @ 75
KDE & Cinnamon 18.1 & Win 10 - ASUS M5A99FX PRO MB, AMD FX-8370 Octo-Core CPU, 16GB RAM, AMD Radeon R7 240
User avatar
gold_finger
Level 9
Level 9
Posts: 2885
Joined: Mon Mar 11, 2013 11:39 pm

Re: Copying Home Partition to Fresh KDE Install

Post by gold_finger »

Possibly a better idea? When you create partitions ahead of time with GParted, create one for the KDE home as well. If you can, make it the same size or larger than the one you have on the external drive. Then copy/paste with GParted the home from external drive to the new KDE home on internal drive. After you've done that, go ahead with the installation. Select mount points as usual, but make sure not to format the home partition. As long as you have same username on both installs everything should work out fine and you won't need to copy/past anything afterwards. (You'll still need to install any extra programs, but /home should be already setup.) T-Bird and Firefox should be just as you had them on external drive.

P.s. If you can't make new home as big as one on external drive, shrink the /home partition on the external drive first. (Shrink it to a size you will be able to fit on internal drive.) Then do the copy/paste.

P.s.s. Possible snag with above approach would be that it might copy same UUID for the /home partition as the one used on the external drive. If you try to boot with external drive connected that might pose a problem. May want to run sudo blkid -c /dev/null to check the UUIDs before installing. Can't remember off top of my head how to generate new UUID, but think it's fairly simple. Just do search for that and change UUID on the internal /home after the copy, but before installing.
Please add [SOLVED] to your thread if a solution is found. Go to your first post in the thread, hit "Edit" button and add [SOLVED] to the title of the post.

How To Format Your Forum Posts.

Try Linux Beginner Search Engine for Linux questions.
User avatar
gtsfer
Level 7
Level 7
Posts: 1912
Joined: Mon May 27, 2013 9:15 am
Location: Bucks County PA, USA

Re: Copying Home Partition to Fresh KDE Install

Post by gtsfer »

gold_finger wrote:Possibly a better idea? When you create partitions ahead of time with GParted, create one for the KDE home as well. If you can, make it the same size or larger than the one you have on the external drive. Then copy/paste with GParted the home from external drive to the new KDE home on internal drive. After you've done that, go ahead with the installation. Select mount points as usual, but make sure not to format the home partition. As long as you have same username on both installs everything should work out fine and you won't need to copy/past anything afterwards. (You'll still need to install any extra programs, but /home should be already setup.) T-Bird and Firefox should be just as you had them on external drive.
I like that and it sounds viable, thanks! I think I'll give this one a try, worse comes to worse I can delete the KDE install (partitions) and start over. Even if I had to repair Grub I can do this now np. Installing extra programs is easy. Since I found out the SPM trick of "save markings / read markings" I can do it all in one fell swoop.
gold_finger wrote:P.s. If you can't make new home as big as one on external drive, shrink the /home partition on the external drive first. (Shrink it to a size you will be able to fit on internal drive.) Then do the copy/paste.
This too is no problem, since I have Cinnamon installed on USB drive too my home partition for KDE is only 20GB. I'm not even using it except for the config files, I just access my data on the C17 home partition.
gold_finger wrote:P.s.s. Possible snag with above approach would be that it might copy same UUID for the /home partition as the one used on the external drive. If you try to boot with external drive connected that might pose a problem. May want to run sudo blkid -c /dev/null to check the UUIDs before installing. Can't remember off top of my head how to generate new UUID, but think it's fairly simple. Just do search for that and change UUID on the internal /home after the copy, but before installing.
I believe I can deal with this too now. Good heads up and I'll check on this to make sure. But the UUID should be in /etc/fstabs so maybe it won't happen. But I'll take a look at it just to be sure.

I'm still wondering if system settings, panel settings and widgets will port over, but I don't mind trying it to find out. if it doesn't work, wash, rinse and repeat. Maybe I'll learn something. :wink:

Blasted SQL errors.... I almost just lost this whole thing.... :D
"There is no gravity, the earth sucks." - Issac Newton @ 75
KDE & Cinnamon 18.1 & Win 10 - ASUS M5A99FX PRO MB, AMD FX-8370 Octo-Core CPU, 16GB RAM, AMD Radeon R7 240
User avatar
gold_finger
Level 9
Level 9
Posts: 2885
Joined: Mon Mar 11, 2013 11:39 pm

Re: Copying Home Partition to Fresh KDE Install

Post by gold_finger »

gtsfer wrote: But the UUID should be in /etc/fstabs so maybe it won't happen.
Yes, the UUID will be in fstab -- but that's precisely why it may be a problem. When fstab finds two different partitions with that same UUID, I'm thinking that system might get confused and cause a boot error. I've never had that situation myself, so I'm just guessing that it could cause problems under those circumstances.

gtsfer wrote:I'm still wondering if system settings, panel settings and widgets will port over, but I don't mind trying it to find out.
I'm not familiar with KDE specifics, but I'd guess that anything that has config files in /home will still be there and work as you had them set before.
Please add [SOLVED] to your thread if a solution is found. Go to your first post in the thread, hit "Edit" button and add [SOLVED] to the title of the post.

How To Format Your Forum Posts.

Try Linux Beginner Search Engine for Linux questions.
User avatar
gtsfer
Level 7
Level 7
Posts: 1912
Joined: Mon May 27, 2013 9:15 am
Location: Bucks County PA, USA

Re: Copying Home Partition to Fresh KDE Install

Post by gtsfer »

gold_finger wrote:
gtsfer wrote: But the UUID should be in /etc/fstabs so maybe it won't happen.
Yes, the UUID will be in fstab -- but that's precisely why it may be a problem. When fstab finds two different partitions with that same UUID, I'm thinking that system might get confused and cause a boot error. I've never had that situation myself, so I'm just guessing that it could cause problems under those circumstances.
Oh, I get it now. Copying the partition with Gparted will copy the UUID too. I looked in Gparted just for fun and there's a "create new UUID" in there once you unmount a partition. So if I need to do it after I run the sudo blkid -c /dev/null I know how.
gtsfer wrote:I'm still wondering if system settings, panel settings and widgets will port over, but I don't mind trying it to find out.
I'm not familiar with KDE specifics, but I'd guess that anything that has config files in /home will still be there and work as you had them set before.[/quote]

I don't know where all that stuff is kept. But, yes it would make perfect sense for it to be kept in "home" somewhere.

Not too long ago I would have just gone ahead and installed and configured everything from scratch. I guess my M$ mentality is "out the window" now completely. Now I'm thinking "what can I do and how?"
"There is no gravity, the earth sucks." - Issac Newton @ 75
KDE & Cinnamon 18.1 & Win 10 - ASUS M5A99FX PRO MB, AMD FX-8370 Octo-Core CPU, 16GB RAM, AMD Radeon R7 240
User avatar
austin.texas
Level 20
Level 20
Posts: 12046
Joined: Tue Nov 17, 2009 3:57 pm
Location: at /home

Re: Copying Home Partition to Fresh KDE Install

Post by austin.texas »

gold_finger wrote:Possibly a better idea? When you create partitions ahead of time with GParted, create one for the KDE home as well. If you can, make it the same size or larger than the one you have on the external drive. Then copy/paste with GParted the home from external drive to the new KDE home on internal drive. After you've done that, go ahead with the installation. Select mount points as usual, but make sure not to format the home partition. As long as you have same username on both installs everything should work out fine and you won't need to copy/past anything afterwards. (You'll still need to install any extra programs, but /home should be already setup.) T-Bird and Firefox should be just as you had them on external drive.

P.s. If you can't make new home as big as one on external drive, shrink the /home partition on the external drive first. (Shrink it to a size you will be able to fit on internal drive.) Then do the copy/paste.

P.s.s. Possible snag with above approach would be that it might copy same UUID for the /home partition as the one used on the external drive. If you try to boot with external drive connected that might pose a problem. May want to run sudo blkid -c /dev/null to check the UUIDs before installing. Can't remember off top of my head how to generate new UUID, but think it's fairly simple. Just do search for that and change UUID on the internal /home after the copy, but before installing.
gold_finger nailed it.

How to change UUID of partition:
In a terminal, to generate a random sample uuid string, enter the command:

Code: Select all

uuidgen
dan@skynet ~ $ uuidgen
- result...
7867bab5-eaf4-41c4-b972-4abb645e0f65
then change the uuid of your partition to 7867bab5-eaf4-41c4-b972-4abb645e0f65 - using sdb3 as an example:

Code: Select all

sudo tune2fs -U 7867bab5-eaf4-41c4-b972-4abb645e0f65 /dev/sdb3
Mint 18.2 Cinnamon, Quad core AMD A8-3870 with Radeon HD Graphics 6550D, 8GB DDR3, Ralink RT2561/RT61 802.11g PCI
Linux Linx 2018
User avatar
austin.texas
Level 20
Level 20
Posts: 12046
Joined: Tue Nov 17, 2009 3:57 pm
Location: at /home

Re: Copying Home Partition to Fresh KDE Install

Post by austin.texas »

gold_finger wrote:Yes, the UUID will be in fstab -- but that's precisely why it may be a problem. When fstab finds two different partitions with that same UUID, I'm thinking that system might get confused and cause a boot error. I've never had that situation myself, so I'm just guessing that it could cause problems under those circumstances.
I can assure you from experience that it will cause problems - but not a boot error. It will boot, but you can't be sure which partition is booted, and which partition files are being saved to.
Mint 18.2 Cinnamon, Quad core AMD A8-3870 with Radeon HD Graphics 6550D, 8GB DDR3, Ralink RT2561/RT61 802.11g PCI
Linux Linx 2018
User avatar
jahid
Level 6
Level 6
Posts: 1217
Joined: Sat Dec 07, 2013 4:07 pm
Location: Khulna, Bangladesh

Re: Copying Home Partition to Fresh KDE Install

Post by jahid »

gtsfer wrote: But I'm a little confused. My existing home partition on the hard disk is for LMDE. I'm not going to uninstall that but dual-boot with LMDE and KDE on the hard disk. And aren't they totally different animals? I mean KDE would need it's own config files (the hidden ones in /home) would it not?
Then your best bet is to create a new home partition for that KDE too and then copy the home folder from external hdd to relevant position in your new system. And about firefox, It has the same type of config files for LMDE and your new KDE. So if you want to retain them then you can copy the config files and folders from LMDE to new KDE to the corresponding position.

For firefox the requred folders are:
~/.cache/mozilla & ~/.mozilla


N.B: Copying the whole home partition from LMDE to KDE is not a good idea. You need to avoid copying the DE specific config files for precaution.
jahid@HP ProBook 440 G1 Laptop
User avatar
gtsfer
Level 7
Level 7
Posts: 1912
Joined: Mon May 27, 2013 9:15 am
Location: Bucks County PA, USA

Re: Copying Home Partition to Fresh KDE Install

Post by gtsfer »

jahid wrote:
gtsfer wrote:N.B: Copying the whole home partition from LMDE to KDE is not a good idea. You need to avoid copying the DE specific config files for precaution.
Thanks Jahid, got that. I have KDE installed and running on the USB external drive. That's the one we've been talking about copying all along. I wouldn't even think of mixing an LMDE home partition up with another distro or vice versa. You're right, that would create a nightmare. 8)
"There is no gravity, the earth sucks." - Issac Newton @ 75
KDE & Cinnamon 18.1 & Win 10 - ASUS M5A99FX PRO MB, AMD FX-8370 Octo-Core CPU, 16GB RAM, AMD Radeon R7 240
User avatar
gtsfer
Level 7
Level 7
Posts: 1912
Joined: Mon May 27, 2013 9:15 am
Location: Bucks County PA, USA

Re: Copying Home Partition to Fresh KDE Install

Post by gtsfer »

Done! And this worked out really well. This method ported all of my FF settings, add-ins, bookmarks, passwords and everything to a fresh KDE install on hard drive. In addition, most of my system settings, my customized LO Writer Toolbar and Options plus everything I had setup in my panel and 99% of what I wanted came right over into the new install. The steps I used as proposed by gold_finger are as follows if anyone cares to use them.
1) Boot from LMDE live.
2) Create partitions / and /home with GParted. (make same size or greater /home partition)
2) In Gparted, copy/paste /home from external drive to new KDE /home on internal drive.
3) Run sudo blkid -c /dev/null to check UUIDs. Change UUID on internal HD /home after copy if needed. (YES, had to change it)
4) Disconnect external USB Drive. (so as to not get all of the OSes on my USB drive included in Grub menu on hard disk)
5) Do installation. Select mount points, but do not format the home partition.
6) Reboot. Do updates. Install nVidia Driver. Reboot. (only needed as I needed "nomodeset" to boot live with my graphics card)
7) Installed all extra programs via my prior saved “read markings” in Package manager.
Austin.texas and gold_finger nailed it from the beginning with the UUIDs. It saved me a lot of hassle and my thanks to you both! Although I "cheated" a little and used Gparted to generate a new random UUID.

The few things I did have to do was re-install and set wallpaper, fixed Grub for a default 5 second countdown instead of 10 and set auto-login for my user ID. All minimal stuff. It was well worth the time to explore this and a great learning experience as well. :D 8)
"There is no gravity, the earth sucks." - Issac Newton @ 75
KDE & Cinnamon 18.1 & Win 10 - ASUS M5A99FX PRO MB, AMD FX-8370 Octo-Core CPU, 16GB RAM, AMD Radeon R7 240
Post Reply

Return to “Installation & Boot”