Linux masterminds. Get in here.

  • Thread starter Dennisch
  • 239 comments
  • 29,205 views
Is this two separate computers or you're trying to move contents from an SSD to a second drive within the same OS.

1 fresh build, with an SSD for the system files and an HDD for the bulk storage, pictures, documents etc.

But I think I got it working, this one seemed to have done the trick.

Edit.

Fortunately, this pc remains empty for a couple more days, so another fresh install with better installation steps isn't going to be a problem.
 
Last edited:
@BobK

What is the easiest way to move the home folder from the main disc (ssd) to a separate, quite a bit larger, second disc (hdd)?

Edit.

Bit more info should come in handy.

It will be a fresh install, Linux Mint on a 128GB ssd. The second disc is a 2 TB hdd. As the missus is quite the clutterbug, I prefer that she fills up the hdd instead of the ssd.

Edit.

That didn't work. Eh.

That's pretty much the system I'm running right now; a 128GB SSD and a 2.5TB HDD.

Install the system normally but before you install anything more than the bare system, install the big HDD. partition it with four partitions: one which will be /home, one which will be /var/, one which will be /tmp, and one which will be the swap partition. Do not let the system create a swap file when you first install the system; we'll be doing that ourselves; the last place to put a swap file is on an SSD.

Make the swap partition about twice the size of your RAM; I have 32GB of RAM and a 50GB swap file. I made my /tmp and /var partitions 50GB each also, but that was massive overkill; right now /tmp is using 600 MB and /var is 1.2GB. The reason for /tmp and /var being on the hard drive rather than the SSD is because logs are written to /var/logs, and /tmp accumulates lots of junk. More to the point, log files are written to very frequently which will degrade the SSD.

gparted is the tool to use for creating partitions.

I just checked my Linux Mint box and /var is over 11 GB on that system, mostly in /var/cache/apt which of course I don't have on my Slackware system.

Give the rest of the space on the drive to /home of course.

Make a note of which partition is which block device, you'll need this info later. On my system, the HD is /dev/sdb, /dev/sdb1 is /home, /dev/sdb2 is /var/ /dev/sdb3 is /tmp, and /dev/sdb4 is the swap partition.

lsblk is a useful command here.

It's easiest to become root instead of prefixing everything with sudo; do this with "sudo su", type your opassword, and you will then be root until you end the session.

Format the partitions with mkfs on the data partitions and mkswap on the swap partition.

Now we transfer the existing /var/tmp and /home directories (which were created on the SSD) to the hard drive. Mount the HD on a convenient mount point such as /mnt via:

#mount /dev/sdb1 /tmp

or some such, using the appropriate block device for /dev/sdb1

#cp -a /home /mnt
#umount /dev/sdb1 ("umount /mnt" also works here)

#mount /dev/sdb2 /mnt
#cp -a /var /mnt
#umount /dev/sdb2

#mount /dev/sdb3 /mnt
#cp -a /tmp /mnt
#umount /mnt

Now edit /etc/fstab accordingly. Mine looks like this:

Code:
/dev/sdb4        swap             swap        defaults         0   0
/dev/sda1        /                ext4   discard,noatime       1   1
/dev/sdb1        /home            ext4        defaults         1   2
/dev/sdb2        /var             ext4        defaults         1   2
/dev/sdb3        /tmp             ext4        defaults         1   2

There's other stuff for my NFS partitions etc but that isn't relevant here.

Notice the entry for the root partition uses flags of "discard, noatime" instead of "defaults". This is to avoid writing the access time every time a file or directory is accessed; again to save wear and tear on the SSD and nobody cares about atime, just the creation time and modification times on files.

Reboot and cross your fingers! See if everything is mounted properly with the mount command, lsblk, and/or df -h

We still have some cleanup to do but it's fairly minor and we can worry about it later.

Note that I am writing all this off the top of my head and glancing at my own system files, it looks good to me but I can't guarantee I'm not overlooking something. Like UUIDs, lol

It's also possible that when you install the system, it can automagically handle a SSD/HDD setup if it finds such. That would probably be easier.

EDIT: Looks like that askubuntu article covers it, but I'd still put /tmp and /var on the HD too.
 
I tried to partition it during the installation, but that gave me a EFI error of some sort, probably because I didn't partition the SSD correctly.
I did have the HDD setup with the /home, /var and swap, but as there was the error I chose the easier route, according to the askU article.

I can still restart the entire install with 2 freshly formatted discs, do you have any intel on how to partition the SSD during install, as in which partitions does it need (obviously it needs the EFI)?
 
I tried to partition it during the installation, but that gave me a EFI error of some sort, probably because I didn't partition the SSD correctly.
I did have the HDD setup with the /home, /var and swap, but as there was the error I chose the easier route, according to the askU article.

I can still restart the entire install with 2 freshly formatted discs, do you have any intel on how to partition the SSD during install, as in which partitions does it need (obviously it needs the EFI)?

At a bare minimum you need the EFI and /
 
At a bare minimum you need the EFI and /

I'll try that tomorrow, because I know myself, and I'll be screwing around until the Sun comes up again. :lol:

1 GB for the EFI, the rest for / on the SSD.

Swap will be 16gb, var and tmp 20gb each, and the rest for /home.

That should do the trick.
 
@BobK

I just did a fresh install and used the partitioner in the installer to make all my partitions. Much easier. :P

1GB for the EFI, 127 for / on the SSD.
20GB /tmp, 20GB /var, 20GB swap and the other 1940GB for /home.

It runs like a champ. Thanks again for your wisdom and pointing me in the correct directions. 👍
 
@BobK

I just did a fresh install and used the partitioner in the installer to make all my partitions. Much easier. :P

1GB for the EFI, 127 for / on the SSD.
20GB /tmp, 20GB /var, 20GB swap and the other 1940GB for /home.

It runs like a champ. Thanks again for your wisdom and pointing me in the correct directions. 👍

Sounds like a winner!
 
My new found partition magic fingers helped me out a quicker than I expected.

A somewhat new Acer laptop running (big word, more like accommodating) W10, keeps having issues with wireless printers. Owner is sick and tired of the issues and asks Dennisch for help. Standard tricks, print spooler, drivers, etc. Problem stays. Printer works with a different laptop running the same driver.

Linux time!

Grab the stick, install Linux, wow this goes fast! Something about Secureboot needs to be turned off for third party installations. Ok.
Install complete. Reboot.
Error. Mokmanager issues? grubx64 , mmx64 and other shenanigans going wrong.

Following internet gets me nowhere at first. The Mokmanager notification disappears and no bootable device appears. So that didn't get me anywhere. A bit later and more screwing around in the bios, changing names on the usb stick gets me to boot from the stick and it continues on the disc. No usb is no boot. **** it. Start over.

This is where people need to take notes (ish) as it worked for me.

Some modern laptops don't like Linux being installed for some reason. Like this Acer. It will tell you during installation that for 3rd party installation SecureBoot needs to be turned off. That is nonsense of course.
Just continue the installation, next bit is important as without it I wasn't able to find the file needed in the Bios part, you need to partition the disc yourself. Create a Boot partition, a partition with mount point /. and since you're there anyway, create a swap partition. Keep on going.

In my case the installation was completed without errors, I restarted the laptop and..... no bootable device.

Now go into your BIOS, to the security tab, there is an option to Specify a trusted Key, navigate to Ubuntu, and pick Grubx64.efi, and give it a name. If there are issues or greyed out options at the tab, set a supervisor password, save and exit and go back to the security tab.

Save and exit the bios. If you go back into the bios and go to the boot tab, you'll see the name you have given to the Grub file in the boot list.
Kick it up the list, or keep it as it is. Save and exit.

Linux.
 
On the assumption that Word doesn't work well (or at all) under Wine, I'd suggest installing Windows in a VirtualBox or VMWare virtual machine. I'm using exactly that approach on two linux boxes. The Windows VMs boot much faster than the "real" Win7 machine I have; not sure why but probably because the VMs don't have lots of apps installed constantly phoning home in the background.

I now have XP and Win 7 up in virtual machines (both with different versions of Office). I can confirm your experience that windows boots way faster in VM than natively. Ubuntu with Windows 7 on a VM is a very capable and stable setup. I'm very much enjoying it.

I'm up to 7 ubuntu machines in my household (although really only 4 of them see regular use). For the second time in a row I took a complete working ubuntu install and yanked it out of one machine and installed it in another machine with completely different hardware and just booted it. Somehow it manages to just come right up and keep working. It's fairly astounding. You can't do that with any windows that I'm aware of. Probably not MacOS either.
 
For the second time in a row I took a complete working ubuntu install and yanked it out of one machine and installed it in another machine with completely different hardware and just booted it. Somehow it manages to just come right up and keep working. It's fairly astounding. You can't do that with any windows that I'm aware of. Probably not MacOS either.

Windows doesn't allow that by design. I don't recall the exact numbers but Windows only allows a certain number of component changes (video card, CPU chip etc) before it decides it's a whole different machine and refuses to boot.
 
Windows doesn't allow that by design. I don't recall the exact numbers but Windows only allows a certain number of component changes (video card, CPU chip etc) before it decides it's a whole different machine and refuses to boot.
I think it's something like 4 or 5. Though 2 seems to be becoming the norm for software.
As for it booting faster. That is due to a number of reasons, the main two being the hardware environment and file locality. There is no POST and o other actual hardware to boot when you fire up a VM, as opposed to a stand alone PC. Disk fragmentation and file locality is much better as well, though, that is less of an issue if you happen to be running SSDs.
 
For me and you it probably is more for beginners. Though I was raised up with DOS/command and still unfamilar with terminal.
I also prefer a unix based OS over windows. But for many users in business, gaming etc. Windows is still the default.

I think an average person's workflow is windows based it can be a challenge to move to linux. Similar as I am invested in MacOs and iOS.

I'll move this here as not to derail the other thread.

Once a pc is setup, just like a Windows machine is, Linux is simple as is. For most users who just want to use it for Office and Internet stuff, let's call it the basic computer stuff, it works like a charm.

Most people never look at their settings apart from changing the desktop background anyway, so that should not be a deterrent to use Linux over Windows. If you have a bit more than basic computer skills, Linux will serve you just fine, as there are so many helpful people and sites out there, compared to the Microsoft online helpdesk, which is, to be honest, just awful.

Installing a program on Linux no longer requires the terminal as there is a Software manager works just like any other appstore.

If you have a spare laptop or computer, give something like Mint a try.
 
I'll move this here as not to derail the other thread.

Once a pc is setup, just like a Windows machine is, Linux is simple as is. For most users who just want to use it for Office and Internet stuff, let's call it the basic computer stuff, it works like a charm.

Most people never look at their settings apart from changing the desktop background anyway, so that should not be a deterrent to use Linux over Windows. If you have a bit more than basic computer skills, Linux will serve you just fine, as there are so many helpful people and sites out there, compared to the Microsoft online helpdesk, which is, to be honest, just awful.

Installing a program on Linux no longer requires the terminal as there is a Software manager works just like any other appstore.

If you have a spare laptop or computer, give something like Mint a try.

I've found Linux to generally be easier to set up than Windows in the first place. At this point, you just plug in the usb stick, tell it to install, and it's done. It even goes and finds printers for you on your network and installs them. Software installation is easier than windows too. The only time linux really bares its teeth is if you get off the beaten path, and that can be easier than windows. For example getting an Nvidia graphics card working. Although the nice thing about linux is that the answer is usually "there is a way" even to some of the hardest problems. Whereas in windows you can easily run into "no you can't do that".
 
I'll move this here as not to derail the other thread.

Once a pc is setup, just like a Windows machine is, Linux is simple as is. For most users who just want to use it for Office and Internet stuff, let's call it the basic computer stuff, it works like a charm.

Most people never look at their settings apart from changing the desktop background anyway, so that should not be a deterrent to use Linux over Windows. If you have a bit more than basic computer skills, Linux will serve you just fine, as there are so many helpful people and sites out there, compared to the Microsoft online helpdesk, which is, to be honest, just awful.

Installing a program on Linux no longer requires the terminal as there is a Software manager works just like any other appstore.

If you have a spare laptop or computer, give something like Mint a try.

I didnt even know a linux thread existed. Thanks for the suggestion, however I fully transitioned to Apple a few years back. Only my server runs on Synology DSM, which is linux based. It is too basic sometimes and I am forced to use terminal to do simple taskes sometimes.

I've found Linux to generally be easier to set up than Windows in the first place. At this point, you just plug in the usb stick, tell it to install, and it's done. It even goes and finds printers for you on your network and installs them. Software installation is easier than windows too. The only time linux really bares its teeth is if you get off the beaten path, and that can be easier than windows. For example getting an Nvidia graphics card working. Although the nice thing about linux is that the answer is usually "there is a way" even to some of the hardest problems. Whereas in windows you can easily run into "no you can't do that".

I guess it depends on which version you use. My former experience and current experience was that for installing software I needed detailed instructions. Currently my only experience is with DSM (Synology). For a server very user friendly, but when you try more complicated tasks, it can be frustrating.
 
Last edited:
I didnt even know a linux thread existed. Thanks for the suggestion, however I fully transitioned to Apple a few years back. Only my server runs on Synology DSM, which is linux based. It is too basic sometimes and I am forced to use terminal to do simple taskes sometimes.



I guess it depends on which version you use. My former experience and current experience was that for installing software I needed detailed instructions. Currently my only experience is with DSM (Synology). For a server very user friendly, but when you try more complicated tasks, it can be frustrating.
Dont use DSM as a measure of linux. It's a disk manager, not really a full fledged OS. You may have your gears stuck with Mac, but, it's an easy thing to load a linux distro on a usb drive and booting off that. I suggest giving it a go, since its free, easy, and will likely be an experience you aren't expecting. I mean, you always tell others to be open minded, maybe eat off that shoe yourself?.
 
@PocketZeven:
There are dozens if not hundreds of Linux distros. Some of them are aimed at the total novice, others are for the more experienced/knowlegable user. Linux Lite, Linux Mint and Zorin are particularly good for novices. A Mac user might want to look at Elementary OS, which is designed to have a familiar interface for Mac users.
 
Linux, at least ubuntu, has a really cool feature that I just discovered the other day.

For ethernet (not sure about wifi), you can create an ethernet connection setup manually. I want this static IP, I want this DNS server, here is my gateway, etc. And then you can create another ethernet connection setup (for the same physical connection). I want DHCP, automatic DNS, etc. And then you can give them both names.

Now here's the cool part.

When you pick one, it's ready to go (already spooled up somehow in the background). And when you pick the other one, the switch is instant. So for example I have shortnames ready to go on my internal network on one of my ethernet connections (again this is the same physical connection) and not on the other. I can ping a server by name, and then I switch to the other connection, and instantly I cannot ping the server by name, and then I switch it back, and instantly I can.

I'm using this to bypass or invoke pihole at the click of a button. It's amazing.
 
Last edited:
Linux, at least ubuntu, has a really cool feature that I just discovered the other day.

For ethernet (not sure about wifi), you can create an ethernet connection setup manually. I want this static IP, I want this DNS server, here is my gateway, etc. And then you can create another ethernet connection setup (for the same physical connection). I want DHCP, automatic DNS, etc. And then you can give them both names.

Now here's the cool part.

When you pick one, it's ready to go (already spooled up somehow in the background). And when you pick the other one, the switch is instant. So for example I have shortnames ready to go on my internal network on one of my ethernet connections (again this is the same physical connection) and not on the other. I can ping a server by name, and then I switch to the other connection, and instantly I cannot ping the server by name, and then I switch it back, and instantly I can.

I'm using this to bypass or invoke pihole at the click of a button. It's amazing.
It's likely not "spooled up" in the background, rather, it is a config saved and it seems instant because it takes just a few milliseconds to negotiate its connection.
That said, that can be pretty damn useful. Sounds like a good way to easily just between different subnets and ip segments.
 
It's likely not "spooled up" in the background, rather, it is a config saved and it seems instant because it takes just a few milliseconds to negotiate its connection.
That said, that can be pretty damn useful. Sounds like a good way to easily just between different subnets and ip segments.

I admit I don't know everything that's going on in software here. Normally DNS changes involve so much caching that it takes some time for things like shortnames or even just access to DNS to appear after a change. If you go into your existing network connection and edit it, it takes much longer for those changes to propagate through. Somehow by creating a second one, the software knows to keep them separate, and it just flips a switch between them.

So you may be correct that it's not keeping them both active simultaneously, but it sure feels like it compared to editing an existing one.
 
@BobK

Can you help me reassign my middle mouse button? I want to use my middle clicker as an Enter button, but I can only get it to work once, and then it adds the standard function to the button, together with the newly appointed Enter function.

I need to get rid of the old function first, me thinks, and than reassign it to the Enter button.
 
I have committed
@BobK

Can you help me reassign my middle mouse button? I want to use my middle clicker as an Enter button, but I can only get it to work once, and then it adds the standard function to the button, together with the newly appointed Enter function.

I need to get rid of the old function first, me thinks, and than reassign it to the Enter button.
You need to change them in the xkb file.
usr/share/X11/xkb/symbols
Assuming you know the identifier it's pretty straight forward. Just find the key identifier, change it's value, save and restart.
 
I have committed

You need to change them in the xkb file.
usr/share/X11/xkb/symbols
Assuming you know the identifier it's pretty straight forward. Just find the key identifier, change it's value, save and restart.

I can't find a single file there that contains my mouse buttons, only my keyboard buttons. I must be missing something.
 
@BobK

I have a Windows issue in my Lubuntu installs.

I'm running a Lubuntu 16.04 based file server, and have been for a while now. Now I want to try to setup a Minecraft server, again on Lubuntu, but as I can't get the remote desktop (screen sharing) working on anything above 16.04 I installed 16.04 again. Installed Vino, as I did with the file server, checked the boxes. No connection. Compared the settings with the file server, exactly the same. I remembered that I needed to tick the Desktop Sharing box in Desktop Session Settings, and for that to happen I need to install LXsessions-edit. And here's the Windowsy bit. On the file server I never installed that, and thus I don't have the Desktop Session settings tab on that server. Installed it on the Minecraft server, ticked the box, and I can access it remotely too.

Look:
Fileserver

File.png


Minecraft:

Mine.png


What sort of magic happened here?
 
@BobK

I have a Windows issue in my Lubuntu installs.

I'm running a Lubuntu 16.04 based file server, and have been for a while now. Now I want to try to setup a Minecraft server, again on Lubuntu, but as I can't get the remote desktop (screen sharing) working on anything above 16.04 I installed 16.04 again. Installed Vino, as I did with the file server, checked the boxes. No connection. Compared the settings with the file server, exactly the same. I remembered that I needed to tick the Desktop Sharing box in Desktop Session Settings, and for that to happen I need to install LXsessions-edit. And here's the Windowsy bit. On the file server I never installed that, and thus I don't have the Desktop Session settings tab on that server. Installed it on the Minecraft server, ticked the box, and I can access it remotely too.

Look:
Fileserver

View attachment 974162

Minecraft:

View attachment 974163

What sort of magic happened here?

I'm afraid I have no idea. I still use XDMCP when/if I can enable it, and remmina on my Raspberry Pis.
 
DSC_0164.JPG


Installing Ubuntu on a stack of brand new parts is hilariously fast. i5 9600, 16GB and a SSD.

Going to use it as my Minecraft server and to try out if I like Ubuntu enough to make it my daily OS. And I got it all for free. Screw up by someone at my buddy's job.
 
I have a new computer for Xmas, which means it's finally time to set up a dual-boot with Linux. Windows 10 will remain for Windows-only games and will also open the door to Forza titles.

After researching, I have come to the predictable conclusion of trying Linux Mint + Cinnamon. I consider myself a power user and have been learning programming, but I still want something more or less foolproof and not prone to snags. I just want a system that is customizable, efficient, and not a victim of modern UI design trends, and one where the user is firmly in charge -- not Microsoft.

The part I'm a little unsure of is partitioning. Given the nature of Linux, there are a lot of conflicting answers around. This laptop has a 1TB SSD, so there's no allocating based on drive types. Based on various recommendations for Mint (which do not involve /tmp or /var as above), I'm thinking of this:
  • (Lenovo's recovery partition)
  • Windows partition: Shrink it to 64-128GB within Windows
  • Root partition: 32GB in ext4 format
  • Swap partition: 32GB (2x RAM)
  • Shared partition for all non-OS data: remainder of drive in NTFS format, dubbed "/home" for Linux
Any potential problems I'm not seeing?
 
Last edited:
If you're looking to download W10/XB games then will they accept the shared partition? If not then is 128 Gb enough?

I know you're not at the stage of adding things to a brand new computer... but I'd seriously think about whacking an extra Linux-only drive in there. 500Gb per OS might not be enough for AAA titles.
 
Back