View previous topic :: View next topic |
Author |
Message |
gardenair n00b
Joined: 05 Oct 2021 Posts: 72
|
|
Back to top |
|
|
grknight Retired Dev
Joined: 20 Feb 2015 Posts: 1935
|
Posted: Sat Mar 30, 2024 2:59 am Post subject: |
|
|
Make sure you have 6 columns for each fstab entry. Currently, it seems you have combined the 5th and 6th together. There needs to be a space between the numbers. |
|
Back to top |
|
|
gardenair n00b
Joined: 05 Oct 2021 Posts: 72
|
|
Back to top |
|
|
pietinger Moderator
Joined: 17 Oct 2006 Posts: 5184 Location: Bavaria
|
|
Back to top |
|
|
figueroa Advocate
Joined: 14 Aug 2005 Posts: 3007 Location: Edge of marsh USA
|
Posted: Sun Mar 31, 2024 3:43 am Post subject: |
|
|
Since you are only using four partitions, you don't need an extended partition. Simply things and just make four primary partitions.
You don't need a separate boot partition. A separate boot partition adds unnecessary complexity.
For the way I use UUID in the fstab, see the following:
Code: | #was /dev/sda1
UUID=5958fd45-723e-4d6b-9253-e74dada52d45 / ext4 noatime 0 1
#was /dev/sda2
UUID=dddc386d-1e50-4d4a-996f-126efcbc4c91 /home ext4 user,exec,noatime 0 2 |
For finding the UUID:
Code: | $ ls -l /dev/disk/by-uuid/ |
Edited for presentation and thoroughness. _________________ Andy Figueroa
hp pavilion hpe h8-1260t/2AB5; spinning rust x3
i7-2600 @ 3.40GHz; 16 gb; Radeon HD 7570
amd64/23.0/split-usr/desktop (stable), OpenRC, -systemd -pulseaudio -uefi
Last edited by figueroa on Sun Mar 31, 2024 4:20 pm; edited 2 times in total |
|
Back to top |
|
|
gardenair n00b
Joined: 05 Oct 2021 Posts: 72
|
Posted: Sun Mar 31, 2024 11:40 am Post subject: |
|
|
Thanks once again. As I am going ahead Gentoo is opening a new topic/world. It is a sea. It is a reality that If someone wants to learn Linux he/she must use Gentoo and play with it. Each topic is itself a complete book.
Well "figueroa" I use separate boot partitions as I see in most cases on tutorials they make. One thing I know is that making separate "/boot" is used when we need more than one Linux kernel. (If I am correct).
In your home partition, there is " user, exec,noatim". exec means " (allow executing binaries and scripts) what do "user and noatim mean? |
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54605 Location: 56N 3W
|
Posted: Sun Mar 31, 2024 1:11 pm Post subject: |
|
|
gardenair,
exec means that things can be executed from that location. As its the default, it need not be included in fstab.
Think about using noexec in places to deny an attacker opportunities to run programs. Even on /home if your users are not trusted.
user allows any user to mount and the same user to unmount the filesystem. Its only useful on optical media.
A logged in user cannot unmount /home as they will always have an open file there that they cannot close without logging out.
noatime (you missed the e) does not record the time the file was last accessed in the directory. This saves a lot of directory writes.
That's good on SSD and a small speed improvement too.
For the rationale behind a small /boot partition at the start of the drive you need no understand something of the history of the PC. It "just grew" and was never designed to be the way it is now.
== edit ==
Using kernel assigned device names like /dev/sda1 is fine and safe while there is only one device. The kernel assigns names in device detection order, so with two or devices (sda and sdb) naming is not deterministic. They may be swapped. The UUID is a unique property of a filesystem, so that always works in fstab. _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
Hu Administrator
Joined: 06 Mar 2007 Posts: 22771
|
Posted: Sun Mar 31, 2024 3:25 pm Post subject: |
|
|
gardenair wrote: | One thing I know is that making separate "/boot" is used when we need more than one Linux kernel. (If I am correct). | No, this is not correct. There are good reasons why someone may want a separate /boot partition, but the number of kernels stored is not a factor in deciding whether it is necessary. gardenair wrote: | In your home partition, there is " user, exec,noatim". exec means " (allow executing binaries and scripts) what do "user and noatim mean? | noatim is a presentation error. It looks like the code block was copied from an editor that did line wrapping strangely, so the line after noatim should be joined to the noatim line. Neddy answered your question about user, but I want to add some additional commentary.- user looks weird to me here. It is typically used for removable media, so that a person can walk up, plug in media (floppy disk, CD-ROM, or USB mass storage), then use an unprivileged terminal to mount it. Using it on an internal device, especially one that is not noauto does not seem useful to me.
- exec is the default as Neddy says - but with a caveat. user implies noexec, so if exec is desired on a user mount, then the administrator must explicitly list exec after user to override the implicit noexec from user. This is for security reasons, as running programs from removable media may be considered a higher security hazard, so it is disabled by default.
|
|
Back to top |
|
|
figueroa Advocate
Joined: 14 Aug 2005 Posts: 3007 Location: Edge of marsh USA
|
Posted: Sun Mar 31, 2024 4:19 pm Post subject: |
|
|
gardenair
There are man pages for fstab and mount, and, of course, bottomless internet resources. _________________ Andy Figueroa
hp pavilion hpe h8-1260t/2AB5; spinning rust x3
i7-2600 @ 3.40GHz; 16 gb; Radeon HD 7570
amd64/23.0/split-usr/desktop (stable), OpenRC, -systemd -pulseaudio -uefi |
|
Back to top |
|
|
gardenair n00b
Joined: 05 Oct 2021 Posts: 72
|
Posted: Mon Apr 01, 2024 7:36 am Post subject: |
|
|
Thanks all for guiding me.One thing more I want to add that when adding partition label by UUID then the user must awake in adding entry in his /etc/fstab
Example
Code: | #was /dev/sda1
UUID=5958fd45-723e-4d6b-9253-e74dada52d45 / ext4 noatime 0 1 |
Here a minor mistake may effect the entry "UUID=5958fd45-723e-4d6b-9253-e74dada52d45 " so by writing UUID one must be careful in it. Where as by label /dev/sda1 /boot is simple and easy. |
|
Back to top |
|
|
Hu Administrator
Joined: 06 Mar 2007 Posts: 22771
|
Posted: Mon Apr 01, 2024 12:59 pm Post subject: |
|
|
You can more easily avoid such mistakes by never writing the UUID at all. Instead, you should get a tool to show you the UUID in a form that your editor can insert it into fstab without you ever typing any of digits of the UUID. |
|
Back to top |
|
|
sabayonino Veteran
Joined: 03 Jan 2012 Posts: 1040
|
Posted: Mon Apr 01, 2024 3:06 pm Post subject: |
|
|
Look at genfstab
Code: | * sys-fs/genfstab
Available versions: 24 28-r1^t {test}
Homepage: https://github.com/archlinux/arch-install-scripts https://man.archlinux.org/man/genfstab.8
Description: Genfstab - generate output suitable for addition to an fstab file
|
(or simple command line tool like blkid) _________________ LRS 64/32 on G.Drive |
|
Back to top |
|
|
|