You are not logged in.

#1 2016-09-29 23:01:40

LiquidAurum
Member
Registered: 2014-11-04
Posts: 43

Plugged in new hard drive after install, cant activate swap now

So to make sure I don't mix up the drives I only had one of my 2 drives plugged in. After the install was finished I plugged in the 2nd hard drive but now at boot it can't activate swap on /dev/sda1 because my install hard drive got renamed to /dev/sdb. How do I mark /dev/sdb1 and unmark /dev/sda1 as swap?

Offline

#2 2016-09-29 23:09:29

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,530
Website

Re: Plugged in new hard drive after install, cant activate swap now

Use UUIDs.  Otherwise you'll just end up having more troubles later.


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#3 2016-09-29 23:19:40

pillowHugger95
Member
Registered: 2016-09-29
Posts: 10

Re: Plugged in new hard drive after install, cant activate swap now

It is best practice to refer to the UUID of the partition in fstab and so on.

blkid /dev/sdX1

In the case of switching swap on and off use the

swapon

and

swapoff

commands.
The man page (as always is really helpful).

man swapon

For more information:
https://wiki.archlinux.org/index.php/Sw … _partition

Offline

#4 2016-09-29 23:43:38

LiquidAurum
Member
Registered: 2014-11-04
Posts: 43

Re: Plugged in new hard drive after install, cant activate swap now

So is the command I use for UUID?

 ls -l /dev/disk/by-uuid/ 

Offline

#5 2016-09-29 23:45:03

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,424
Website

Re: Plugged in new hard drive after install, cant activate swap now

Did you read the page Trilby linked to? Have you actually tried running the command or would you like me to come over and do it for you?


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#6 2016-09-29 23:57:13

LiquidAurum
Member
Registered: 2014-11-04
Posts: 43

Re: Plugged in new hard drive after install, cant activate swap now

I have read it, but the only command they're providing on the UUID section is an ls command. I didn't think those did anything other then list things. I don't like just running a command until I know for sure because I'd rather not have to retrace my steps and fix what I screwed up.

Offline

#7 2016-09-30 00:04:33

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,424
Website

Re: Plugged in new hard drive after install, cant activate swap now

In that case, understand what you are doing:

man ls

Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#8 2016-09-30 00:07:32

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,530
Website

Re: Plugged in new hard drive after install, cant activate swap now

Yes that is the only command there - but there are a few problems here.  First, that was meant as a general direction that you could follow from.  You can read other wiki pages about how to set up your fstab - even the installation guide details using UUIDs for fstab.

The second problem is that while it is good that you don't want to blindly run commands, if you need to check that it is ok before running `ls` then there is a real problem, which is #3.  Third, if you aren't sure what an `ls` command does, how the hell are you running archlinux and who installed it for you?


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#9 2016-09-30 00:26:16

LiquidAurum
Member
Registered: 2014-11-04
Posts: 43

Re: Plugged in new hard drive after install, cant activate swap now

Thanks for your guys' help

Offline

Board footer

Powered by FluxBB