You are not logged in.

#1 2020-04-21 19:27:03

sanbope
Member
Registered: 2020-04-21
Posts: 20

How to mount a disk permanently?

When I login it doesnt enter, and that's because /home disk is not mount. so I have go to f2 (console), login and mount /dev/sda7 (which is my /home disk) and if I reboot my pc I have to do it again. so, how can I to mount /dev/sda7 in /home for ever? like "save the change"

Offline

#2 2020-04-21 19:36:15

Slithery
Administrator
From: Norfolk, UK
Registered: 2013-12-01
Posts: 5,776

Re: How to mount a disk permanently?

man fstab

No, it didn't "fix" anything. It just shifted the brokeness one space to the right. - jasonwryan
Closing -- for deletion; Banning -- for muppetry. - jasonwryan

aur - dotfiles

Offline

#3 2020-04-21 19:48:46

Head_on_a_Stick
Member
From: The Wirral
Registered: 2014-02-20
Posts: 8,999
Website

Re: How to mount a disk permanently?

Mount it manually then run

grep '/home ' /proc/self/mounts >> /etc/fstab

It's lazy and half-assed but it should work. Read the man page if you want to do it properly, as Slitherly suggests. The above command will make an entry using the device node as an identifier but this may change from one boot to the next — the UUID, PARTUUID or LABEL would be a better approach.

But check /etc/fstab beforehand and if you already have a line there for /home then post the entire content of the file here along with the journal entries for one of the problematic boots.


Jin, Jîyan, Azadî

Offline

#4 2020-04-21 19:57:04

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

Re: How to mount a disk permanently?


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#5 2020-04-21 20:14:07

sanbope
Member
Registered: 2020-04-21
Posts: 20

Re: How to mount a disk permanently?

thanks. with super user i went to /etc/fstab and with nano i edited it. it was cuz /home is /dev/sda7 and in fstab was /dev/sda6

Offline

#6 2020-04-21 20:20:04

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

Re: How to mount a disk permanently?

Did you bother to read the link I posted? Using sdx is the reason you opened this thread in the first place...


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#7 2020-04-22 13:25:49

sanbope
Member
Registered: 2020-04-21
Posts: 20

Re: How to mount a disk permanently?

i did it, there just explain how to create fstab and to configure the time. but i did it when i installed arch, anyway I just edited it and now I dont have to mount it each time

Offline

#8 2020-04-22 13:31:10

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

Re: How to mount a disk permanently?

It suggests using UUIDs rather than kernel device names in fstab.  That suggestion exists precisely because using kernel device names (like sda6/sda7) may work for a little while, but then will "randomly" and break.

So all you've done is a poor patch job that has it working for the moment.  It may or may not work each time you reboot.  Rather than playing Russian roulette with your home partition, just use UUIDs in your fstab to fix it properly.


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

Board footer

Powered by FluxBB