1

A week ago, I installed Xubuntu 16.04 and supposed to mount a partition(/dev/sda3) for root's home (/root). Here is my fstab looks like:

# / was on /dev/sda5 during installation
UUID=81f2f987-b411-4579-a3e5-8e92f66567ac /               ext4    errors=remount-ro 0       1
# /root was on /dev/sda3 during installation
UUID=bbf21f07-54ec-4515-a31b-7767fbfe985d /root           ext4    defaults        0       2
# swap was on /dev/sda6 during installation
UUID=717a9bb5-cb8f-48f7-bd4f-56bfafe431be none            swap    sw              0       0

and fdisk -l:

Device     Boot     Start       End   Sectors  Size Id Type
/dev/sda1  *         2048    206847    204800  100M  7 HPFS/NTFS/exFAT
/dev/sda2          206848 204799999 204593152 97.6G  7 HPFS/NTFS/exFAT
/dev/sda3       204800000 307199999 102400000 48.8G 83 Linux
/dev/sda4       307200000 468860927 161660928 77.1G  5 Extended
/dev/sda5       307202048 368642047  61440000 29.3G 83 Linux
/dev/sda6       368644096 370741247   2097152    1G 82 Linux swap / Solaris
/dev/sda7       370743296 468860927  98117632 46.8G 83 Linux

blkid /dev/sda3:

/dev/sda3: LABEL="home" UUID="bbf21f07-54ec-4515-a31b-7767fbfe985d" TYPE="ext4" PARTUUID="e25cf333-03"

At first, /dev/sda3 sometimes mounted to /root, sometimes not. After I reboot several times, it doesn't mount at all. As well as specify device's file name:

/dev/sda3  /root           ext4    defaults        0       2

I tried mount to /test by UUID form, it works. On Debian Jessie and Xubuntu 14.04, this problem doesn't exist at all.

At last, I use label to denote device:

LABEL=home  /root           ext4    defaults        0       2

Successfully mounted, at least until I'm asking this question here. But I have no clue why /dev/sda3 is not mounted to root in previous cases. Does Ubuntu disable this for security reasons?

1 Answer 1

2

As a general rule, it's inadvisable (at best) to make /root a separate partition from the root (/) filesystem. The reason is that this is the root user's home directory, and it's critical that this location remain accessible even in the event of a severe problem, such as damage to the /etc/fstab file.

I don't know if that's related to your problem, but it might be -- it's conceivable that there's something in the Ubuntu startup or shutdown procedure that's interacting badly with use of a separate /root partition. Certainly use of a separate /root partition is so rare that this case would get absolutely no testing by Ubuntu's developers.

I recommend you reconsider this practice. Given Ubuntu's security model, /root probably contains few or no files, aside from boilerplate account files. If you're storing anything there (especially anything big enough to warrant creating a separate partition for those files), it could be another location would be more sensible.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .