* [gentoo-user] /boot filesystem, SSDs, TRIM
@ 2018-08-23 3:58 Adam Carter
2018-08-23 4:23 ` Walter Dnes
` (3 more replies)
0 siblings, 4 replies; 14+ messages in thread
From: Adam Carter @ 2018-08-23 3:58 UTC (permalink / raw
To: gentoo-user
[-- Attachment #1: Type: text/plain, Size: 353 bytes --]
For a long time people recommended ext2 for /boot. The Gentoo wiki still
does. Is there any compelling reason to use ext2 for /boot (on a system
whose other filesystems are ext4) these days? AFAIK for systems that have
/boot on an SSD, ext4 makes more sense due to discard support, and for
non-SSD it doesn't matter either way. Have I missed something?
[-- Attachment #2: Type: text/html, Size: 383 bytes --]
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [gentoo-user] /boot filesystem, SSDs, TRIM
2018-08-23 3:58 [gentoo-user] /boot filesystem, SSDs, TRIM Adam Carter
@ 2018-08-23 4:23 ` Walter Dnes
2018-08-23 10:42 ` Adam Carter
2018-08-23 5:01 ` Klaus Ethgen
` (2 subsequent siblings)
3 siblings, 1 reply; 14+ messages in thread
From: Walter Dnes @ 2018-08-23 4:23 UTC (permalink / raw
To: gentoo-user
On Thu, Aug 23, 2018 at 01:58:19PM +1000, Adam Carter wrote
> For a long time people recommended ext2 for /boot. The Gentoo wiki still
> does. Is there any compelling reason to use ext2 for /boot (on a system
> whose other filesystems are ext4) these days? AFAIK for systems that have
> /boot on an SSD, ext4 makes more sense due to discard support, and for
> non-SSD it doesn't matter either way. Have I missed something?
How often are you writing to /boot anyways? Journalling is of little
benefit in that case, and imposes more wear+tear on SSD drives. Or is
it possible to turn off journaling for one partition under ext4?
--
Walter Dnes <waltdnes@waltdnes.org>
I don't run "desktop environments"; I run useful applications
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [gentoo-user] /boot filesystem, SSDs, TRIM
2018-08-23 3:58 [gentoo-user] /boot filesystem, SSDs, TRIM Adam Carter
2018-08-23 4:23 ` Walter Dnes
@ 2018-08-23 5:01 ` Klaus Ethgen
2018-08-23 7:36 ` Neil Bothwick
2018-08-23 6:19 ` Canek Peláez Valdés
2018-08-24 23:43 ` malloc1337
3 siblings, 1 reply; 14+ messages in thread
From: Klaus Ethgen @ 2018-08-23 5:01 UTC (permalink / raw
To: gentoo-user
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512
The question should be if and why to use /boot at all on modern systems.
Grub is able to boot from various system combinations. btrfs, lvm,
mdraid, even encrypted disks (however, in the last case, it is not that
trivial to install grub).
So for me there is little to no usage for /boot at all.
Regards
Klaus
- --
Klaus Ethgen http://www.ethgen.ch/
pub 4096R/4E20AF1C 2011-05-16 Klaus Ethgen <Klaus@Ethgen.ch>
Fingerprint: 85D4 CA42 952C 949B 1753 62B3 79D0 B06F 4E20 AF1C
-----BEGIN PGP SIGNATURE-----
Comment: Charset: ISO-8859-1
iQGzBAEBCgAdFiEEMWF28vh4/UMJJLQEpnwKsYAZ9qwFAlt+P5cACgkQpnwKsYAZ
9qwjuwv9FQaqKiCI7p5rQ+vOFPhfNqM+MbuqcXkyCWxZ+0NyT5+vkRP5TVJTSQA6
p68XdAtHGTAJdBmKxzsXE3wM0Shp6SnhpQJ/QCol/5U+97Ud5O+3GI3fVrFzudXl
qFO31VIizc1jK670sibjcBk8gbUu2Swiz2/2tg1dHpeaJLSKwDQIs7PhoSqiEwOo
Oeexh1OLHDQTLJAMASp4cSWxWH9tsNq+OZBrDI2LKHXvFB668CSnCyQE8JM2OSQF
1XRJQ75rFNVUqdL/EERMF/Q9IrRdQD8Cy2RR6uXTul/2UQBPDogOBgPqzPYXzwy/
SxrAsYNiLGucB4lt5tyLro0IYuBY3pLWB1InJ6W0eAcw1NCgFvOtCjWvTneFhnIN
CHdBl1kLJJLFZp8nstR0U4cBhmcyKJB76hGpAxqNgO3J1rmIPKAmTGvRc4gRaQV5
lbfI5dVi19DvbAgzsF1QBd3F737gIsHu5Cluusp/JMdNa7dq+BC519EYZM2MAgK2
2bjVz2G0
=uyTR
-----END PGP SIGNATURE-----
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [gentoo-user] /boot filesystem, SSDs, TRIM
2018-08-23 3:58 [gentoo-user] /boot filesystem, SSDs, TRIM Adam Carter
2018-08-23 4:23 ` Walter Dnes
2018-08-23 5:01 ` Klaus Ethgen
@ 2018-08-23 6:19 ` Canek Peláez Valdés
2018-08-25 22:06 ` Tom H
2018-08-24 23:43 ` malloc1337
3 siblings, 1 reply; 14+ messages in thread
From: Canek Peláez Valdés @ 2018-08-23 6:19 UTC (permalink / raw
To: gentoo-user
[-- Attachment #1: Type: text/plain, Size: 839 bytes --]
On Wed, Aug 22, 2018 at 10:58 PM Adam Carter <adamcarter3@gmail.com> wrote:
>
> For a long time people recommended ext2 for /boot. The Gentoo wiki still
does. Is there any compelling reason to use ext2 for /boot (on a system
whose other filesystems are ext4) these days? AFAIK for systems that have
/boot on an SSD, ext4 makes more sense due to discard support, and for
non-SSD it doesn't matter either way. Have I missed something?
AFAIU, UEFI systems need a boot partition, and it has to be VFAT. Most
motherboards support a "legacy mode" to boot using the MBR; but it will
eventually go away, and good riddance; UEFI is so much easier and saner to
use.
Regards.
--
Dr. Canek Peláez Valdés
Profesor de Carrera Asociado C
Departamento de Matemáticas
Facultad de Ciencias
Universidad Nacional Autónoma de México
[-- Attachment #2: Type: text/html, Size: 1438 bytes --]
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [gentoo-user] /boot filesystem, SSDs, TRIM
2018-08-23 5:01 ` Klaus Ethgen
@ 2018-08-23 7:36 ` Neil Bothwick
2018-08-23 11:14 ` Adam Carter
2018-08-23 11:53 ` Dale
0 siblings, 2 replies; 14+ messages in thread
From: Neil Bothwick @ 2018-08-23 7:36 UTC (permalink / raw
To: gentoo-user
[-- Attachment #1: Type: text/plain, Size: 832 bytes --]
On Thu, 23 Aug 2018 06:01:18 +0100, Klaus Ethgen wrote:
> The question should be if and why to use /boot at all on modern systems.
>
> Grub is able to boot from various system combinations. btrfs, lvm,
> mdraid, even encrypted disks (however, in the last case, it is not that
> trivial to install grub).
The other question is why use GRUB on a modern system? UEFI boot managers
are far simpler to work with than GRUBs monster configuration file and in
that case it makes sense to combine /boot with the ESP and use VFAT for
it.
As for the original question, AIUI ext2 was recommended more because there
was no need for ext3/4 and journalling on such a small filesystem, rather
than there being any compelling reason for not using ext4, so use what
you want.
--
Neil Bothwick
Microbiology: staph only.
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [gentoo-user] /boot filesystem, SSDs, TRIM
2018-08-23 4:23 ` Walter Dnes
@ 2018-08-23 10:42 ` Adam Carter
2018-08-23 18:46 ` malloc1337
0 siblings, 1 reply; 14+ messages in thread
From: Adam Carter @ 2018-08-23 10:42 UTC (permalink / raw
To: gentoo-user
[-- Attachment #1: Type: text/plain, Size: 640 bytes --]
>
> How often are you writing to /boot anyways? Journalling is of little
> benefit in that case, and imposes more wear+tear on SSD drives. Or is
> it possible to turn off journaling for one partition under ext4?
>
I review the Changlog on every point release and update the kernel if
there's anything I find interesting. From the file dates this seems to be
about 3 times a month.
My intuition is that the long term damage due to the journal would be far
less than the damage due to the loss of effective wear levelling that would
result from not being able to TRIM. Just intuition tho. Let me know if i'm
misunderstanding something.
[-- Attachment #2: Type: text/html, Size: 883 bytes --]
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [gentoo-user] /boot filesystem, SSDs, TRIM
2018-08-23 7:36 ` Neil Bothwick
@ 2018-08-23 11:14 ` Adam Carter
2018-08-23 14:02 ` Peter Humphrey
2018-08-23 11:53 ` Dale
1 sibling, 1 reply; 14+ messages in thread
From: Adam Carter @ 2018-08-23 11:14 UTC (permalink / raw
To: gentoo-user
[-- Attachment #1: Type: text/plain, Size: 476 bytes --]
>
> The other question is why use GRUB on a modern system? UEFI boot managers
> are far simpler to work with than GRUBs monster configuration file and in
> that case it makes sense to combine /boot with the ESP and use VFAT for
> it.
>
I couldn't grok the Gentoo UEFI setup instructions before loosing patience
with them. That's weak, so I will try again.
man mount shows that discard/TRIM is supported by linux vfat driver, as
vfat also supports all the fat mount options.
[-- Attachment #2: Type: text/html, Size: 718 bytes --]
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [gentoo-user] /boot filesystem, SSDs, TRIM
2018-08-23 7:36 ` Neil Bothwick
2018-08-23 11:14 ` Adam Carter
@ 2018-08-23 11:53 ` Dale
2018-08-24 4:10 ` Walter Dnes
2018-08-25 22:31 ` Tom H
1 sibling, 2 replies; 14+ messages in thread
From: Dale @ 2018-08-23 11:53 UTC (permalink / raw
To: gentoo-user
Neil Bothwick wrote:
> On Thu, 23 Aug 2018 06:01:18 +0100, Klaus Ethgen wrote:
>
>> The question should be if and why to use /boot at all on modern systems.
>>
>> Grub is able to boot from various system combinations. btrfs, lvm,
>> mdraid, even encrypted disks (however, in the last case, it is not that
>> trivial to install grub).
> The other question is why use GRUB on a modern system? UEFI boot managers
> are far simpler to work with than GRUBs monster configuration file and in
> that case it makes sense to combine /boot with the ESP and use VFAT for
> it.
>
> As for the original question, AIUI ext2 was recommended more because there
> was no need for ext3/4 and journalling on such a small filesystem, rather
> than there being any compelling reason for not using ext4, so use what
> you want.
>
>
Correct me if I'm wrong here, it used to be that grub, the original
version not the current bloated one, had to have ext2. At the time,
that was *the* file system. If I recall correctly, a ext4 file system
can be *read* the same as ext2. The difference is the journal. So,
when booting, grub etc is only reading /boot and it shouldn't matter if
it is ext2, ext3 or ext4. It's only when being written to that it
matters. Am I recalling that right?
Another one of those times where Linux provides a ton of options. :/
Dale
:-) :-)
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [gentoo-user] /boot filesystem, SSDs, TRIM
2018-08-23 11:14 ` Adam Carter
@ 2018-08-23 14:02 ` Peter Humphrey
0 siblings, 0 replies; 14+ messages in thread
From: Peter Humphrey @ 2018-08-23 14:02 UTC (permalink / raw
To: gentoo-user
On Thursday, 23 August 2018 12:14:49 BST Adam Carter wrote:
> [from Neil Bothwick:]
> > The other question is why use GRUB on a modern system? UEFI boot
> > managers are far simpler to work with than GRUBs monster configuration
file and
> > in that case it makes sense to combine /boot with the ESP and use VFAT
for it.
>
> I couldn't grok the Gentoo UEFI setup instructions before loosing patience
> with them. That's weak, so I will try again.
I haven't been able to reconcile the Wiki with all the other docs out there,
including other Gentoo docs. I finished up with this:
# parted -l /dev/nvme0n1
Model: Unknown (unknown)
Disk /dev/nvme0n1: 256GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags:
Number Start End Size File system Name Flags
1 1049kB 3146kB 2097kB uefi bios_grub
2 3146kB 2147MB 2144MB fat32 boot boot, esp
3 2147MB 4295MB 2147MB linux-swap(v1) swap
4 4295MB 19.3GB 15.0GB ext4 rescuesys
5 19.3GB 36.5GB 17.2GB ext4 gentooroot
--->8
> man mount shows that discard/TRIM is supported by linux vfat driver, as
> vfat also supports all the fat mount options.
I've found that fstrim only works on my VFAT /boot if it's been mounted
during boot. If it's set to noauto in fstab, and then mounted with
-odiscard, fstrim complains that "discard is not supported"
--
Regards,
Peter.
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [gentoo-user] /boot filesystem, SSDs, TRIM
2018-08-23 10:42 ` Adam Carter
@ 2018-08-23 18:46 ` malloc1337
0 siblings, 0 replies; 14+ messages in thread
From: malloc1337 @ 2018-08-23 18:46 UTC (permalink / raw
To: gentoo-user
Thus spoke Adam Carter (adamcarter3@gmail.com):
> >
> > Or is it possible to turn off journaling for one partition under ext4?
> >
>
> My intuition is that the long term damage due to the journal would be far
> less than the damage due to the loss of effective wear levelling that would
> result from not being able to TRIM. Just intuition tho. Let me know if i'm
> misunderstanding something.
Why not just disable journaling on those partitions altogether?
# Delete has_journal option
tune2fs -O ^has_journal <your_boot_partition>
# Issue required fsck
e2fsck -f <your_boot_partition>
# Check fs options
dumpe2fs <your_boot_partition> | less
--
malloc1337
mailto: disquz@mm-no.de
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [gentoo-user] /boot filesystem, SSDs, TRIM
2018-08-23 11:53 ` Dale
@ 2018-08-24 4:10 ` Walter Dnes
2018-08-25 22:31 ` Tom H
1 sibling, 0 replies; 14+ messages in thread
From: Walter Dnes @ 2018-08-24 4:10 UTC (permalink / raw
To: gentoo-user
On Thu, Aug 23, 2018 at 06:53:14AM -0500, Dale wrote
> Correct me if I'm wrong here, it used to be that grub, the original
> version not the current bloated one, had to have ext2. At the time,
> that was *the* file system. If I recall correctly, a ext4 file system
> can be *read* the same as ext2. The difference is the journal. So,
> when booting, grub etc is only reading /boot and it shouldn't matter if
> it is ext2, ext3 or ext4. It's only when being written to that it
> matters. Am I recalling that right?
Actually ext3 is straight ext2+journal. Ext4 can read ext2. It may
be able to do small writes, but once it inserts its magic stuff, ext2
can't read it.
BTW, I see that your system is inserting junk after periods. Binary
view shows that where there should be 0x2E, it's 0x2E 0xA0
> Another one of those times where Linux provides a ton of options. :/
>
> Dale
>
> :-) :-)
And also after closing parentheses. Should be 0x29, but is 0x29 0xA0.
--
Walter Dnes <waltdnes@waltdnes.org>
I don't run "desktop environments"; I run useful applications
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [gentoo-user] /boot filesystem, SSDs, TRIM
2018-08-23 3:58 [gentoo-user] /boot filesystem, SSDs, TRIM Adam Carter
` (2 preceding siblings ...)
2018-08-23 6:19 ` Canek Peláez Valdés
@ 2018-08-24 23:43 ` malloc1337
3 siblings, 0 replies; 14+ messages in thread
From: malloc1337 @ 2018-08-24 23:43 UTC (permalink / raw
To: gentoo-user
Thus spoke Adam Carter (adamcarter3@gmail.com):
> For a long time people recommended ext2 for /boot. The Gentoo wiki still
> does. Is there any compelling reason to use ext2 for /boot (on a system
> whose other filesystems are ext4) these days? AFAIK for systems that have
> /boot on an SSD, ext4 makes more sense due to discard support, and for
> non-SSD it doesn't matter either way. Have I missed something?
Why not just disable journaling on those partitions altogether?
# Delete has_journal option
tune2fs -O ^has_journal <your_boot_partition>
# Issue required fsck
e2fsck -f <your_boot_partition>
# Check fs options
dumpe2fs <your_boot_partition> | less
--
malloc1337
mailto: disquz@mm-no.de
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [gentoo-user] /boot filesystem, SSDs, TRIM
2018-08-23 6:19 ` Canek Peláez Valdés
@ 2018-08-25 22:06 ` Tom H
0 siblings, 0 replies; 14+ messages in thread
From: Tom H @ 2018-08-25 22:06 UTC (permalink / raw
To: Gentoo User
On Thu, Aug 23, 2018 at 9:20 AM Canek Peláez Valdés <caneko@gmail.com> wrote:
> On Wed, Aug 22, 2018 at 10:58 PM Adam Carter <adamcarter3@gmail.com> wrote:
>>
>> For a long time people recommended ext2 for /boot. The Gentoo wiki
>> still does. Is there any compelling reason to use ext2 for /boot (on
>> a system whose other filesystems are ext4) these days? AFAIK for
>> systems that have /boot on an SSD, ext4 makes more sense due to
>> discard support, and for non-SSD it doesn't matter either way. Have I
>> missed something?
>
> AFAIU, UEFI systems need a boot partition, and it has to be VFAT.
Only to use systemd-boot.
UEFI needs a VFAT ESP (EFI System Partition). For systemd-boot, the
ESP and "/boot" have to be the same because it cannot read other
filesystems, unlike grub, refind, and whatever other EFI boot
managers/loaders exist.
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [gentoo-user] /boot filesystem, SSDs, TRIM
2018-08-23 11:53 ` Dale
2018-08-24 4:10 ` Walter Dnes
@ 2018-08-25 22:31 ` Tom H
1 sibling, 0 replies; 14+ messages in thread
From: Tom H @ 2018-08-25 22:31 UTC (permalink / raw
To: Gentoo User
On Thu, Aug 23, 2018 at 2:54 PM Dale <rdalek1967@gmail.com> wrote:
> Correct me if I'm wrong here, it used to be that grub, the original
> version not the current bloated one, had to have ext2.
The upstream version. Various distributions added ext4 support to
grub1 (circa 2009, IIRC). None of the patches were upstreamed because
grub1 development was closed.
> If I recall correctly, a ext4 file system can be *read* the same as
> ext2. The difference is the journal.
That's true for ext3. For ext4, you have to ensure that some
ext4-specific features are off for it to be read as if it were ext2.
^ permalink raw reply [flat|nested] 14+ messages in thread
end of thread, other threads:[~2018-08-25 22:31 UTC | newest]
Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-08-23 3:58 [gentoo-user] /boot filesystem, SSDs, TRIM Adam Carter
2018-08-23 4:23 ` Walter Dnes
2018-08-23 10:42 ` Adam Carter
2018-08-23 18:46 ` malloc1337
2018-08-23 5:01 ` Klaus Ethgen
2018-08-23 7:36 ` Neil Bothwick
2018-08-23 11:14 ` Adam Carter
2018-08-23 14:02 ` Peter Humphrey
2018-08-23 11:53 ` Dale
2018-08-24 4:10 ` Walter Dnes
2018-08-25 22:31 ` Tom H
2018-08-23 6:19 ` Canek Peláez Valdés
2018-08-25 22:06 ` Tom H
2018-08-24 23:43 ` malloc1337
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox