You are not logged in.
Pages: 1
Hello I'm currently writing a few scripts to help with mounting and unmounting hard drives. I have successfully achieved BOTH without writing to fstab and have achieved mounting and writing to fstab script. I have not achieved removing contents from fstab and unmounting.
It got me thinking though and I am not 100% familiar which is why I came to you guys, is there anywhere else hard drive information like /ect/fstab would be stored to remove as well?
And I guess, probably write too as well.
Last edited by XxXIJasonIXxX (2024-05-18 10:33:24)
Offline
What??
First, you shouldn't be continuously adding / removing from fstab. That file is primarily for fixed devices and is used primarily for mounting at boot time. There is no need to modify fstab at all for mounting and unmounting of other devices.
As to whether such data is stored anywhere else - it is only stored where you put it. It is in fstab because you added to fstab. There is read-only data in /sys/ and probably /proc/ for mounted filesystems - but you'd definitely not be editing these.
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
Okay. So then that brings one more question.
Fstab holds drives there are supposed to remain mounted? For instance i have a drive for arch then 2 secondary drives for other stuff.
Those 3 should be in there if i want it PERMANENTLY mounted?
Offline
You can put the mounts for the two secondary drives in the fstab and mark those entries noauto or have them automount on use. The root filesystem would normally go in the fstab unless the system uses GPT partition automounting. Have you looked at mount helpers with respect to your use case?
Offline
You can put the mounts for the two secondary drives in the fstab and mark those entries noauto or have them automount on use. The root filesystem would normally go in the fstab unless the system uses GPT partition automounting. Have you looked at mount helpers with respect to your use case?
I have not lol. There was a purpose to my learning. I am going into network engineering and powershell is apparently a big thing with it. So I am learning ahead of time. In the process of all this I have learned how to mount/unmount drives with 2 simple commands in powershell. Behind those are about 80 lines of code in total.
Offline
You're going into network engineering and you don't even know about mounting filesystems. Yeah, this should go well.
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
You're going into network engineering and you don't even know about mounting filesystems. Yeah, this should go well.
That's what the college and training, as well as trying to learn myself is for. Thanks for your "useful" input. Also I figured it out and solved it.
Last edited by XxXIJasonIXxX (2024-05-17 23:42:43)
Offline
network engineering … powershell is apparently a big thing with it
No. But knowing how to use a text shell is certainly fundamental to do anything closer to the system and certainly to run archlinux.
I have learned how to mount/unmount drives with 2 simple commands in powershell
Is this WSL?
https://bbs.archlinux.org/misc.php?action=rules
If you've a spare system (or even just a virtual machine) install arch following https://wiki.archlinux.org/title/Installation_guide (not some whacky youtube tutorial) - you can learn a lot this way. In doubt where the topic-specific wiki pages are.
That's what the college and training, as well as trying to learn myself is for.
Tbf
I am going into network engineering
kinda reads like you're starting the job next month. Not like "I'll take classes on network engineering".
Please always remember to mark resolved threads by editing your initial posts subject - so others will know that there's no task left, but maybe a solution to find.
Thanks.
Last edited by seth (2024-05-18 06:24:36)
Offline
Yeah I can see how that was conveyed. Still doesn't dignify a useless response like that
I will mark this solved
Offline
It's likely that someone saying they're going to med school wouldn't be able to do an appendectomy - but if someone saying they are going to be a medical doctor and they don't know what an appendix is, that should raise suspicion. Just the same here. But really my curt response was not to your lack of knowledge and experience, but rather an apparent desire to maintain that ignorance. THAT will not serve you well in your career (or sadly, perhaps it will as a "network engineer").
Last edited by Trilby (2024-05-18 12:40:52)
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
My ignorance? I was asking for help you're the one who came at me ignorant. This matters resolved. I figured it out on my own and definitely don't need YOUR help.
Offline
Pages: 1