The GPT generator doesn't change anything on your setups, you can still use fstab just as before and you even still have to if you want to add mount options. It will simple automatically create units for /home and/or swap if the GPT partition is marked with the corresponding identifier. This simplifies the most basic setups since you don't have to set up the partitions in fstab anymore. The partition itself has the information if it is home or swap and systemd makes use of this information which imho makes perfect sense.
]]>The only partitions that are automounted are all swap and the first /home (special UUID which you have to set manually, no tool does that. Yet?). So simply create your own home.mount unit and you have no more worries. All other partitions have to be mounted manually anyway withh fstab or unit file.
In my case with msdos partition and fstab is get automounted every ext4 partition but not swap.
I have no idea how to create the dev-sda8.swap unit.
/dev/sda5 /boot ext4 defaults,relatime,x-systemd.automount 0 2
/dev/sda6 / ext4 defaults,relatime,x-systemd.automount 0 1
/dev/sda7 /home ext4 defaults,relatime,x-systemd.automount 0 2
/dev/sda8 none swap defaults 0 0
tmpfs /tmp tmpfs rw,nodev,nosuid,relatime,size=3G 0 0
That's basically my thinking too. Everything is listed in one file - I stand some chance of figuring out what I've messed up. Everything is configured in a zillion files - I stand no chance of figuring out what I've done (and I'm more likely to have done it in the first place).
That is somewhat true. rootfs and /boot are somehow detected from their mount during initramfs, tmp is configured as mount unit by default in /usr/lib, then athe fstab generator runs, then the gpt generator and then you can have custom unit files all over the place in /etc, and /run. Don't forget manual mounts with mount and fuse which will be automatically added as temporary mount units, too.
]]>Thanks but I think I'll stick to fstab. No idea how that would work for home on an lvm volume anyhow. On the wikipedia page, there's no special guid for home on Linux only on Solaris etc.
When you specify the partition type code in gdisk, you have the option of using the short four character indentifier, but you can also use a full GUID if you please. I had to do this to make an Intel Rapid Start partition before support was added by Rod Smith. Gdisk doens't know what the hell it is, but it doesn't stop you either.
FWIW, when I found out I could use just mount units instead of the fstab, I converted everything. It worked quite well, but I ended up realizing that I really like having all the mount info central to one file, where I could potentially see immediately why my shit was potentially going wrong. So in the end I switched back. I'm sure I lose a few milliseconds of boot time for the generator to do its thing, but meh…
]]>Thanks but I think I'll stick to fstab. No idea how that would work for home on an lvm volume anyhow. On the wikipedia page, there's no special guid for home on Linux only on Solaris etc.
Currently you can only find it in the systemd changelog or in the source code.
* A logic to automatically discover and enable home and swap
partitions on GPT disks has been added. With this in place
/etc/fstab becomes optional for many setups as systemd can
discover certain partitions located on the root disk
automatically. Home[ partitions are recognized under their
GPT type ID 933ac7e12eb44f13b8440e14e2aef915. Swap
partitions are recognized under their GPT type ID
0657fd6da4ab43c484e50933c84b4f4f.
But what if I want a partition mounted with certain options when I'm booted into one OS and with other options when booted into another? That can't be specified in a single set of options for the particular partition, can it?
Then use mount units if you want to avoid fstab. The only partitions that are automounted are all swap and the first /home (special UUID which you have to set manually, no tool does that. Yet?). So simply create your own home.mount unit and you have no more worries. All other partitions have to be mounted manually anyway withh fstab or unit file.
]]>but enther agai in the theme, as far I underestand this work only if you fallow what dev (sÿstëmd [hollydays here]) spect to you use, otherwise fallpack to you dirty fstab
]]>That wouldn't help if you wanted multiple drives/partitions of the same file system to be mounted with different options.
Those settings are per-partition, so it would indeed fix the problem.
]]>Kaustic wrote:Awebb wrote:systemd 207 will make great improvements on mount-units, so the use of fstab changes from mandatory to optional.
With systemd, fstab has always been optional. Edit: But I guess it’s now even more optional? Heh.
Not really. In the beginning, using mount services was not recommended by the developers. Now it seems... not so not recommended anymore.
Aha, but just because the developers recommended fstab didn’t make it any less optional. A few of the TUs who sit on IRC have not used an /etc/fstab for a long time.
]]>