Taking better advantage of SSD+HDD config in installation

I'm working on a Linux Mint at the moment, when I can I'll boot into Elementary and take a look and get back.

Wiz

Ok. Now I think I managed to make things worse. For some reason the internet was no longer working, and I couldn't access my files. After restarting the system, I saw that it didn't recognize the login password. I am accessing it now by a bootable pendrive :)

I tried to copy the /home folder back from the HDD to the SSD (since at this time it was empty) to see if it would return to normal to complete the task, but I was unable to grant authorization to create new folder or paste the files.
 


Can you show us the output of

Code:
sudo fdisk /dev/sdb
? and press p to print the details to the screen.

Mine looks a bit like this (I have omitted some output as I have 10 Linux on this SSD)

Code:
chris@elementaryOS-Hera:~$ sudo fdisk /dev/sdb
[sudo] password for chris:        

Welcome to fdisk (util-linux 2.31.1).
Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.


Command (m for help): p
Disk /dev/sdb: 238.5 GiB, 256060514304 bytes, 500118192 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: gpt
Disk identifier: 0D77EC9C-6CB9-4124-8C1C-A998621EA25C

Device         Start       End   Sectors   Size Type
/dev/sdb1       2048  41943039  41940992    20G Linux filesystem


Partition table entries are not in disk order.

Command (m for help):

It sounds like the hard drive, /dev/sdb, may not have read/write permissions set properly for you to copy to and from it. We can fix that.

Can you share with us the output of

Code:
ls -l /dev/sdb
?

Those are "l's" as in Brasil.

Mine looks like this, and I am looking for something similar

Code:
chris@elementaryOS-Hera:~$ ls -l /dev/sdb
brw-rw---- 1 root disk 8, 16 Feb 17 16:23 /dev/sdb

Cheers

Wiz
 
Last edited:
On /etc/fstab :

Code command should work but if it doesn't no point in debating it, so use Nano, the console-based text editor

Code:
sudo nano -m /etc/fstab

The -m option gives you the chance to use your mouse to click to move the insertion point to where you want to insert/edit/delete text.

Without the -m you would use the direction keys and Home and End function keys.

Make the changes recommended, and when you go to leave Nano:

*Ctrl-x to start leaving, it will ask if you want to save the modified buffer
Y to save it, it will show you the name of the file to be saved
Enter to save and leave Nano.

* Some people prefer Ctrl-o ... doesn't matter, still 3 steps :)

Wiz
 
On Timeshift:

Again, curious, that you needed to add

software-properties-common

to add the PPA, but again, it is academic, as it happened, and you have got around it - well done ;)

That solution is usually confined to Debian itself and its direct derivatives - antiX, MX-19 &c, whereas the PPAs were developed by Ubuntu and can also be used with Linux Mint, Elementary OS, Zorin and other related distros.

No matter, Timeshift can save "your bacon" more often than you have had hot dinners, so it is good to become fluent with it.

On my tomorrow, we can look at how you are doing with what I have listed above, and modify any plans to suit, if necessary.

Cheers

Wizard
 
Since login to account is blocked, I was doing all this while on live Elementary, so I don't know if its valid.

Can you show us the output of

Code:
sudo fdisk /dev/sdb

? and press p to print the details to the screen.

Here it is:

Code:
Command (m for help): p
Disk /dev/sdb: 931.5 GiB, 1000204886016 bytes, 1953525168 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: dos
Disk identifier: 0xa67739a0

Device     Boot Start        End    Sectors   Size Id Type
/dev/sdb1        2048 1953525167 1953523120 931.5G 83 Linux



Can you share with us the output of

Code:
ls -l /dev/sdb
?

Done:

Code:
brw-rw---- 1 root disk 8, 16 Feb 17 14:51 /dev/sdb

Also done:

Code:
sudo nano -m /etc/fstab

After that (added a line on fstab in order to mount /home as suggested here on the "gedit" step), the output for "sudo fdisk /dev/sdb" stays the same.

Did the "final check" they suggest after reboot

Code:
df /dev/sdb1

And got the right output I suppose:

Code:
elementary@elementary:~$ df /dev/sdb1
Sist. Arq.     Blocos de 1K   Usado Disponível Uso% Montado em
/dev/sdb1         960380648 5493268  906032920   1% /

Still, I tried to reboot and still didn't recognize login password to open new session on previous configuration; it keeps acting like its incorrect. Should I use Timeshift?

Not worried about today's work though, its all on cloud ;)
 
Last edited:
...so I don't know if its valid.

It will be, thanks, and that all looks fine. The HDD can be written to OK, and partitioned OK, so there must be another "fly in the ointment". We could take a lot of time to find what that is and fix it, or

Should I use Timeshift?

... will be your fastest option. This is based on your confirming that you took the Timeshift snapshot before you started the operations to move Home from the SSD to the HDD.

A question first on your use of Timeshift. When you first entered Timeshift, you would have perhaps used the Wizard (Timeshift's Wizard, not me :)) to set up your configuration preferences.

In that process, you would have come across a window that looked like this by default

Acy1qPX.png


or you may have modified it to this

JJPIKje.png


Do you remember which it was? Or other?

With the first screenshot you would have taken a snapshot of /dev/sda1 's contents except for the /home folder.

With the second screenshot, you would have taken a snapshot of your entire /dev/sda1 including the /home folder and its contents.

It makes no difference in your case, provided that if you used Option 2, you went straight from taking the Timeshift snapshot to attempting to move your /home folder from point A to point B.

Why? Because Timeshift is not specifically a Backup/Restore program. When restoring, it does not prompt you that newer or amended files exist, it just puts back what it captured in the first place, and overwrites files with what is stored in its screenshot.

In my next Post, I'll tell you 3 ways to implement a Timeshift Restore.

More coffee

Wiz
 
In that process, you would have come across a window that looked like this by default

Acy1qPX.png


Do you remember which it was? Or other?

So, there's that.

The week had just begun so I'm sure I was sober the moment I finally took the snapshot. But I swear these choices confused me, as there were three columns, but only two options: "Exclude all", "Include hidden" and ... "Exclude all" again. Weird. I've decided to go with midway path. Was it a problem of translation into Portuguese-BR? Or was it all in English and I just psychoticized for a few minutes?

If following the middle column doesn't mean that much of a problem for the snapshot to be useful, in fact there were no important files there. The data backup is still on the external HDD because I chose to do this later.

I can do another clean install and follow these same steps again, that's fine, even if the /home folder doesn't remain on the internal HDD while I reinstall Elementary, the steps are documented here. Waiting for suggestions anyway
 
OK, I have to go out for a bit, back in about 2 and a half hours, so here's some thought for you.

If you use the Epiphany Browser, or Firefox or other, settings for those, history &c, will likely be stored in /home/rafaelys/.config or similar. Likewise for LibreOffice and other apps where you tweak settings or establish a config or preferences.

You've also said elsewhere

games like TES,

so any game settings/high scores/other may be stored there if they do not have a dedicated folder within the app/game.

So you can either perform a clean fresh install or restore from Timeshift, depending on your situation.

Restoring from Timeshift - you would have to install Timeshift on your Elementary Live (Elementary hereafter referred to as EOS) USB stick, using the method you used for the SSD.

The USB stick does not save changes/settings so do it in the one session.

Once Timeshift is installed (in this situation it cannot take a snapshot, but can restore from a snapshot), and given what you have described, in your Home folder on /dev/sda1, there will be a folder for Timeshift, and you would track down the snapshot and get it to restore from there to your drive.

Gotta fly, back when I can.

Wiz
 
I'm back but working between household chores.

I will burn an iso of Hera to a stick and check that Timeshift works with it OK.

Wiz
 
Just reinstall EOS (snapshot included) and retraced my path here, now successfully.

No problem with the password when logging in and HDD properly mounted as /home.

Thank you all for your patience!

P.s.: More relieved I wasn't seeing things lol, indeed those two columns on Timeshift are the same in Pt-BR:

timeshift.jpeg


I'm sending this to [email protected] ;)
 
Thank you all for your patience!

Not at all, thank you for yours :)

Glad to hear it is working out. If you have any questions on Timeshift, pop over to my Thread and ask away.

Cheers

Wizard
 
I came back here to include two questions, which seem to have more to do with this topic than with a new one. It has to do with the versatility of this configuration, and the real possibility of changing OS.

So now the contents of the /home folder are on the HDD, while the OS is bootable via SSD. OK.

1) Assuming the HDD is set to /home now, but for all intents and purposes this folder is contained in "/" on the SSD. If I want to exchange Elementary for another Ubuntu-based distro (Linux Mint for example), I imagine that I would have to choose the SSD to mount from "/".
So, would this also end up formatting the entire HDD in the same process?

2) Even if there is no risk that the HDD will be formatted when installing a new Ubuntu-based distro on the SSD, would I have to repeat the same process described in this topic for the new OS to recognize the /home folder?
 
1)
I imagine that I would have to choose the SSD to mount from "/".

Yes, that would be best.

So, would this also end up formatting the entire HDD in the same process?

No, if you direct the installer (Ubiquity) correctly.

Early in the install, you are shown a window where, if you had Windows on the rig, you would be offered a choice of
a. Installing alongside Windows
b. Erase the disk and install Linux (Mint) or
c. Choose Something else/other.

Without a Windows, you would get the b. and c. choices.

Choose Something else/other and you can manually partition.

2) No. Ubiquity will allow you to see the partition structure of both SSD and HDD and you can choose to have a Home folder/partition which is the existing Home for EOS, and share it.

Wiz
 
Just a heads up, here :)

I've been meaning to come back here for a few days to address an error that was in an article that I recommended as reading and to follow for the OP (Original Poster) @Rafaelys , but I wanted to get a solution resolved first.

It relates to #15 on page 1, and I mentioned an article from How-To-Geek here

https://www.howtogeek.com/442101/how-to-move-your-linux-home-directory-to-another-hard-drive/

Usually, I check that a solution referenced in an article works in my own environment, if I am roughly able to reproduce the situation of the Member asking, and that is often the case, as I run 65 - 70 Linux at a time.

Of course, the one time I do not, it comes back and bites me on the arse. :)

At that time, the article featured the lines a little over halfway down

We’ll use that new empty home directory as the mount point for our filesystem on the new hard drive. We need to unmount it from /mnt and remount it on /home. Note that the command umount doesn’t have an “n” after the “u.”

sudo umount /dev/sdb1

That was incorrect, on the author's part. I spotted it around 19 February, as I was approaching that step, and thought "This may cause problems".

It did ... I was using /dev/sdc11 to setup the new Home partition

Code:
chris@elementaryOS-Hera:/mnt/home$ sudo umount /dev/sdc11
umount: /mnt: target is busy.

That makes sense if you appreciate it - you cannot unmount a Partition or Drive that you are in at the time, you have to first "step outside" that and then unmount it.

I finished the exercise and got the desired solution, but it was a little sloppy.

The article was written by a Dave McKay around October 2019, and I was not sure how I would be responded to, but I contacted How-To-Geek and let them know of the error, and I can report the response was favourable. :)

I got a nice email back from them, and also one from the Author.

As of yesterday, the part in the article now reads:

But first, we’ll change into the root directory (with cd / ) to make sure we’re not in a directory that is going to be included in the mount or unmount locations.

cd /
sudo umount /dev/sdb1
sudo mount /dev/sdb1 /home/

So the article is fine to follow now. :)

I tip my hat to both HTG and Dave McKay for their friendly and courteous professionalism, and I am happy to continue directing Members to HTG as one of the good Linux resources available to us, as I have done for some years now.

Regrets to any Members or Readers if my failure to note the former discrepancy sooner caused any inconvenience or apprehensions to you.

Cheers

Chris Turner
wizardfromoz
 

Members online


Latest posts

Top