dracut/grubby fails to update grub.cfg

Chris Murphy lists at colorremedies.com
Tue Oct 21 14:17:10 UTC 2014


On Oct 21, 2014, at 8:07 AM, Stefan Huchler <stefan.huchler at mail.de> wrote:

> Chris Murphy <lists at colorremedies.com> writes:
> 
>> Where you get bad results is with, e.g. a pre-existing legacy OS like
>> Windows XP, where it's not aligned and any subsequent partition is
>> also not aligned. In that case, even a Btrfs volume wouldn't be
>> aligned.
> 
> I dont want to care at all, I dont want to know if to use fdisk is ok or
> do I have to use sfdisk or another tool etc. I dont want 1980 dos
> partion tables… not dos 15.0 aka windows.

Again if you're using modern utilities, you don't have to know any of these things, alignment is a solved problem. My point is that Btrfs doesn't do anything differently than other filesystems in this regard, which is exactly nothing. It all depends on an earlier tool aligning the partition on the physical sector boundary.


> 
>> Well it's certainly exceptionally f'n complicated in relation to the
>> benefits we get. But whatever, that ship has sailed. We'll just have
>> to see how it all plays out, but for now UEFI and Secure Boot are the
>> way of the present, not just the future.
> 
> Benefits? I dont see any.

Rootkit immunity. Chain of trust. Why should only Windows users get these things? 

> 
>> No I mean you create a new partition and format it ext4. I'm not sure
>> how you have sda only formatted Btrfs without other partitions unless
>> you have another drive attached, because UEFI requires an EFI system
>> partition;
> 
> Its called legacy boot I think. I dont even know if my 2011 Thinkpad
> x220 has UEFI.

No, it's my mistake I thought you had a UEFI computer for some reason. In any case legacy boot isn't a great way to work around having UEFI because first it's still a UEFI machine and then you have this "compatibility support module" added on as a layer in between UEFI and the OS. It can sometimes solve certain problems but it often just adds even more complexity.


> 
> $ LANG=xx sudo fdisk -l
> 
> Disk /dev/sda: 119.2 GiB, 128035676160 bytes, 250069680 sectors
> Units: sectors of 1 * 512 = 512 bytes
> Sector size (logical/physical): 512 bytes / 512 bytes
> I/O size (minimum/optimal): 512 bytes / 512 bytes
> Disklabel type: dos
> Disk identifier: 0x1b1cf5cb

Right, so you're depending on the Btrfs 64KB bootloader pad (offset) for GRUB core.img to reside on, and thus boot the system. That's fine, but this isn't a supported layout by Fedora in that the installer won't let you create such a system, so you're kinda on your own at the moment.
> 
> 
> 
>> so minimum to boot Linux on UEFI you need two partitions if
>> you have one drive.
> 
> And I want to be able to make with some basic tools and a chroot my
> system bootable, not 50 funny partitons what I would never be able to remember.

This is sorta beside the point, but my Android phone has 35 partitions - not my idea either, that's how it is. I have no idea what most of them are used for, yet the phone still works.

> 
>> For Btrfs you need three partitions because Btrfs
>> doesn't support swapfiles. The officially supported layout for Btrfs
>> on UEFI is: EFI System partition, /boot on ext4, Btrfs with root and
>> home subvols mounted at / and /home respectively, and swap. That's
>> four partitions.
> 
> the officially supported by whom? Redhat? I dont care if grub supports
> taht I am sold, if its doable better I do it better.

Fedora Project, and by support it means an issue we'd block release on if it didn't work correctly. You can do what you want by having /boot on ext4 and the rest of your OS on / on Btrfs, and grubby will properly update grub.cfg without complaints. If you insist on having /boot on Btrfs, then right now you either have to use an out of tree grubby or you need to manually use grub2-mkconfig -o, etc.


Chris Murphy



More information about the users mailing list