Like probably most OpenSuSE Dropbox users I’m having to change my /home directory to the EXT4 file system. Currently, it’s Btrfs.
My idea for doing this is:
Log off all useraccounts (I have my than one on my machine) and log in as **root
**2) Using the console tar the /home directory to an external drive (options to keep all current properties of the files)
umount the /home directory
Use Partitioner in Yast to create the new partition (I’ve not ever done this before, but I’m hoping that the instructions are easy to follow).
mount the new partition as the /home directory (I’ve never done this before either)
tar the backed-up files into the new /home directory
So questions:
Does this sound like the right way to do it?
Advice about using Partitioner? And am I right in thinking I can use the KDE version of Yast in root, since root does not use the /home directory?
How do I remount /home into the new partition? And how do I make sure that it will be remounted every time I boot my machine anew?
I’m hoping to have all this done over the Christmas/New Year holidays, so the season’s greetings to you all.
I hope you mean to log in in the console (Ctrl-Alt-F1), not in the GUI.
for tar, i would say look at what
cd /
tar cfz <the-backup-file.tar.z> home
can do for you. The z command is for compressing, you may not need it.
<the-backup-file.tar.z) is a file, thus NOT a “external drive”, but a file on a file system (that file system may of course be on what you call an “external drive”).
and 5) are all in one go using the YaST partitioner. In fact, when you enter the partitioner and choose the correct partition, you only have to check for Formatting and the type ext4. The mount point should be still there, but it is of copurse good to check all that is there.
I was planning to use the console for the backup. But should I use **Yast2 **there rather than the GUI? And will that give me readable instructions that I can follow? What would be the problem with running Yast from the GUI, given that root does not use the /home directory?
By “external drive” I meant file on a file system on an external drive. And thanks for reminding me of the options in tar. I’ve used this before to transfer files from one computer to another but such a long time ago that I’ve forgotten them!
it will offer you the ncurses interface. It requires a bit of getting used to it (use tabs to jump around and/or Alt-), but you can first try it out by using it from a root konsole. Then you can also see what the partitioning part of YaST offers you. As long as you do not fire things off, you can walk around there to see what it has to offer.
Ok that is fine then. My example is just a start. I am still not sure if you should do
cd /
tar ......... ...... home
or
cd /home
tar ..... ........ *
Also adding the v command (making it cfv without compression) might be nice, it will give you some feedback on what it is doing.
BTW, and mostly off topic, I am not sure I understand what an “external drive” is. I do not know of any Linux command that will tell you if a mass-storage device (I assume that is what the word “drive” means in this case) is “internal” or “external”. So when the system does not know the difference, what is the use of talking about it?
In any case, you will use a file on a place, not being inside /home, that has space enough. Could even be inside the / partition.
Oh yes, and of course I assume you have your normal backup and possibly even an extra backup taken immediatly before you start this action.
I’ve used yast in a console before - I’ve had to when KDE has crashed - and found it a bit confusing, but I take your point about not using GUI with root. I’ve found it a bit confusing, which is why I was thinking not to use it, but, since I’ve always managed in the end, I should have a bit more confidence in myself.
As far as “external drive” is concerned, this was not meant as a technical term but a physical drive that I could hold in my hand, separate from the PC. I’ll only go ahead when I’m sure I have a backup to the /home directory. My problem at the moment is that Dropbox was my usual backup and that isn’t working. Hence the reason for this exercise!
But I make take your point and have two backups. I’ll do one to my physical, external drive and then another to the /root directory. The /root one I can then use to restore /home. The physical one can then be the backup of the backup, in case I screw up the file systems on the PC.
Question about unmounting the /home directory: do I need to unmount /home before I use yast or is that part of the partitioner as well?
As an afterthought (while taking a shower after some sporting), I would after the umount kmake a comment (# in front of the entry) out of the line in /etc/fstab. Then YaST will crete the new entry and when everything works as expected you can remove the old entry.
Nice you find a good vi doc. It is not an easy program, but I use it already for tens of years.
In this case, go to the start of the entry using the arrow keys, then type i (for insert) and then # (should now be the first character of that line), then hit Esc (which will end Input mode).
Then :wq to enter command line (the and to write the contents and quit vi.
Eventually everything got done. The bits that took longest were the backing up of /home and the reloading. But that was all okay in the end, as was using yast to run partitioner and remount /home. Everything seemed okay, I ran **shutdown **and went to bed.
This morning I started my machine, hoping everything would be fine, but it wasn’t. The machine is now hanging, cycling between session 1 and session 7. This may be because I’ve pressed ctl-alt-f1 and ctl-alt-f7 several times and response is a little slow. So that may not be the problem. But it shows something is going on.
what is going on I’m not sure because I got a failure in each session the machine started. The failure in session 1, when I checked systemctl status, was “Failed to start Load Kernal Modules”.
(The failure in session 7 was a failure to start the Name Servive Cache Daemon. It’s now hanging on “Started Locale Service.)
The reason it gives for the Load Kernal Modules failure was a failure to insert ‘bbswitch’. “No such device” it says.
if it’s failed to load the kernel modules, does this mean I have to reload the OS? Or is there something simpler I can do? Or am I looking in the wrong place?
Hm, I do not see anything that I can relate to your /home excersize. What I could excpect is impossibilty to mount /home, but that is not what yoy report.
Did you hit Esc during boot to see what message are there?
But I think it is better to start a new thread with a new title to draw the atten tion of other people then me. You can of course post there a link to this thread to highlight the history.
To recap, do I understand correctly that the conversion went OK and that after that you could login with a (at least one) user and that that user was able to access the files in his/her home directory and work normally?
No, KDE failed to load, but I can logon as root in session 1. Otherwise, I’m stuffed. Session 7, where KDE should start, is hanging having announced that it has “Started Locale Service”.