[colug-432] Fstab Questions

Rick Hornsby richardjhornsby at gmail.com
Tue Mar 5 14:38:47 EST 2019


On March 5, 2019 at 13:18:22, Stephen P. Molnar (s.molnar at sbcglobal.net)
wrote:

I have just reinstalled Debian Stretch and have soee questions about the
fstab.

I have installed a new hdc.


A new physical drive? So you added a third physical drive, ostensibly
/dev/sdc? I’m not sure if “hdc” here means a 3rd drive, or refers to a new
hard drive controller.

Here is my durectiry stucture:

NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sda 8:0 0 465.8G 0 disk
├─sda1 8:1 0 457.9G 0 part /
├─sda2 8:2 0 1K 0 part
└─sda5 8:5 0 7.9G 0 part [SWAP]
sdb 8:16 0 1.8T 0 disk
├─sdb1 8:17 0 1.8T 0 part /media/comp/900b5f0b-4f3d-4a64-8c91-29aee4c6fd07
├─sdb2 8:18 0 1K 0 part
└─sdb5 8:21 0 7.9G 0 part
sdc 8:32 0 465.8G 0 disk
└─sdc1 8:33 0 465.8G 0 part /media/comp/1f363165-2c59-4236-850d-36d1e807099e
sr0 11:0 1 1024M 0 rom

Here is what I have the installed fstab:

# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point> <type> <options> <dump> <pass>
# / was on /dev/sda1 during installation
UUID=4dc278b7-1792-4e89-b67e-a517fce97d19 / ext4 errors=remount-ro 0 1
# swap was on /dev/sda5 during installation
UUID=acfb9d26-69c6-4489-88fc-12f5c50bda97 none swap sw 0 0
/dev/sr0 /media/cdrom0 udf,iso9660 user,noauto 0 0

Here is what I'm proposing:

/dev/hda1 / ext4 defaults 0 1
/dev/hda5 none swap sw 0 0
/dev/hdb1 /hdb1 ext4 defaults 0 0
/dev/hdc1 /hdc1 ext4 defaults 0 0


Based on the information provided above, I think these will need to be
/dev/sd*, not /dev/hd*.

If those are your desired mount points, ensure that the directories /hdb1
and /hdc1 (or /sdb1, /sdc1) exist. A directory in this context is - serves
as - a mount point.

There are two key questions:

1. Will the boot proceed to completion?

Maybe? The UUID is there to allow the system to search for the correct
partition, rather than depending on a strict filesystem ordering. In
reality, it’s pretty rare for ie /dev/sda1 and /dev/sdb1 to switch places -
it usually happens when disks are physically moved to another port or
location on the system bus.

Based on the information provided, I don’t see why the system wouldn’t
boot. Your master boot record location hasn’t changed, so all of the
references held by the bootloader stuff (grub, initrd, etc) should still be
valid.

2. Will users have read/write permission?

r/w permission to what?

With the exception of marking the entire filesystem as readonly to
everyone, fstab generally doesn’t control a user’s r/w access. The ‘user’
mount option (IIRC, can’t find it in the manpage atm) says whether a normal
user can mount/unmount the filesystem - generally not something you want to
happen.

File permissions are controlled at the filesystem level. So you would mount
the filesystem wherever you want it, make it permanent in /etc/fstab, and
then set the ownership/permissions using chown/chmod.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.colug.net/pipermail/colug-432/attachments/20190305/99be5852/attachment.html 


More information about the colug-432 mailing list