* [gentoo-user] btrfs only, without dracut
@ 2014-05-17 15:56 Stefan G. Weichinger
2014-05-17 16:04 ` Stefan G. Weichinger
2014-05-17 18:48 ` Greg Turner
0 siblings, 2 replies; 9+ messages in thread
From: Stefan G. Weichinger @ 2014-05-17 15:56 UTC (permalink / raw
To: gentoo-user
(new thread to separate things a bit more)
Today I took the effort to completely re-install one of my two older
thinkpads.
booted via USB (sysresccd) because the X220 has no optical drive, backed
up the contents of / and the encrypted /home to an external drive and
started up gdisk to reorder the partitions.
There were:
sda1 /boot/efi
sda2 swap (encrypted)
sda3 /root (the old ext4)
sda4 encrypted /home
sda5 /root (the new btrfs)
Wasting the ~25GB of sda3 was not acceptable ;-) and adding that device
to the new btrfs-pool somehow lead to flaky results with grub2-mkconfig
It seems to not detect or interpret correctly the fact that there are 2
physical devices in there and then the "linux ..." line for grub.cfg
gets messed up, at least for me here.
Played around with that and then decided to redo all that from scratch.
Removed sda[345] and did:
sda1 /boot/efi
sda2 swap (encrypted)
sda3 /root (new bigger btrfs)
sda4 encrypted /home (with btrfs inside)
copied back my stuff, chrooted and re-fiddled my grub2/EFI-setup, that
took me a bit but now it works great.
-
And even better(?): no more initrd included now!
grub2-mkconfig somehow decides not to need the initrds generated by
Canek's kerninst and it boots up fine so far. I will check if I should
keep it that way or somehow enforce the usage of the initrd.
opinions?
-
I looked if I can get rid of lvm2-pkg completely but AFAI understand I
need that for cryptsetup, right?
So I masked the lvm2-activation-services ... they don't do anything now
at boot time ... a bit more speed (tiny) and less complexity somehow.
-
So quite a learning curve these days :-)
Thanks for all the help and infos on this list, btw ...
Stefan
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [gentoo-user] btrfs only, without dracut
2014-05-17 15:56 [gentoo-user] btrfs only, without dracut Stefan G. Weichinger
@ 2014-05-17 16:04 ` Stefan G. Weichinger
2014-05-17 18:48 ` Greg Turner
1 sibling, 0 replies; 9+ messages in thread
From: Stefan G. Weichinger @ 2014-05-17 16:04 UTC (permalink / raw
To: gentoo-user
Am 17.05.2014 17:56, schrieb Stefan G. Weichinger:
> sda3 /root (the old ext4)
> sda5 /root (the new btrfs)
sorry for the missing precision here ... I don't mean /root but "the
root filesystem" here for sure ...
Stefan
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [gentoo-user] btrfs only, without dracut
2014-05-17 15:56 [gentoo-user] btrfs only, without dracut Stefan G. Weichinger
2014-05-17 16:04 ` Stefan G. Weichinger
@ 2014-05-17 18:48 ` Greg Turner
2014-05-19 7:04 ` Stefan G. Weichinger
1 sibling, 1 reply; 9+ messages in thread
From: Greg Turner @ 2014-05-17 18:48 UTC (permalink / raw
To: gentoo-user
[-- Attachment #1: Type: text/plain, Size: 1502 bytes --]
On Sat, May 17, 2014 at 8:56 AM, Stefan G. Weichinger <lists@xunil.at>wrote:
> It seems to not detect or interpret correctly the fact that there are 2
> physical devices in there and then the "linux ..." line for grub.cfg
> gets messed up, at least for me here.
>
ACK, genkernel initramfs doesn't "btrfs scan" and TSHTF. genkernel-next
works though. But if you have it working now without any initramfs then
obviously that is full of win (the LA kind, not the Redmond variety)!
I am a bit mystified -- or perhaps ignorant -- as to how it came to be that
btrfs has no option to automatically initiate a scan (like md raid does,
when it's built into the kernel as a non-module). Surely people must want
that feature. I can see how scanning the wrong partitions could lead to
terrible mayhem, though, say, in a disaster recovery scenario where you
binary-cloned a failing drive and forgot to take the old one out before
booting or whatever.... but btrfs has the secret sauce to most likely
figure stuff like that out auto-magically anyhow, using the genid... so
what gives? Anyone know?
Perhaps the option really is there and I simply never found it; admittedly
I didn't look very hard -- regardless, I can't imagine the btrfs people
just "never thought of it". If i's really not implemented, there must be a
reason... and if that reason doesn't apply to my situation I might consider
patching such a feature into my kernels as this is the only thing tying my
workstation to an initramfs.
-gmt
[-- Attachment #2: Type: text/html, Size: 2115 bytes --]
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [gentoo-user] btrfs only, without dracut
2014-05-17 18:48 ` Greg Turner
@ 2014-05-19 7:04 ` Stefan G. Weichinger
2014-05-19 13:39 ` Rich Freeman
0 siblings, 1 reply; 9+ messages in thread
From: Stefan G. Weichinger @ 2014-05-19 7:04 UTC (permalink / raw
To: gentoo-user
Am 17.05.2014 20:48, schrieb Greg Turner:
> On Sat, May 17, 2014 at 8:56 AM, Stefan G. Weichinger <lists@xunil.at>wrote:
>
>> It seems to not detect or interpret correctly the fact that there are 2
>> physical devices in there and then the "linux ..." line for grub.cfg
>> gets messed up, at least for me here.
>>
>
> ACK, genkernel initramfs doesn't "btrfs scan" and TSHTF. genkernel-next
> works though.
I use dracut for generating the initramfs.
> But if you have it working now without any initramfs then
> obviously that is full of win (the LA kind, not the Redmond variety)!
I wonder if there are any real advantages of booting *with* the
initramfs even when you don't need it.
When I look at what dracut does in interaction with systemd:
https://www.kernel.org/pub/linux/utils/boot/dracut/dracut.html#dracutbootup7
https://www.kernel.org/pub/linux/utils/boot/dracut/dracut.html#_dracut_on_shutdown
... it seems to me that this adds something like an additional layer
around certain things and helps to make all that more bulletproof?
Or do I misinterpret here?
> I am a bit mystified -- or perhaps ignorant -- as to how it came to be that
> btrfs has no option to automatically initiate a scan (like md raid does,
> when it's built into the kernel as a non-module). Surely people must want
> that feature. I can see how scanning the wrong partitions could lead to
> terrible mayhem, though, say, in a disaster recovery scenario where you
> binary-cloned a failing drive and forgot to take the old one out before
> booting or whatever.... but btrfs has the secret sauce to most likely
> figure stuff like that out auto-magically anyhow, using the genid... so
> what gives? Anyone know?
I don't. Not yet.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [gentoo-user] btrfs only, without dracut
2014-05-19 7:04 ` Stefan G. Weichinger
@ 2014-05-19 13:39 ` Rich Freeman
2014-05-19 16:39 ` Stefan G. Weichinger
2014-05-19 20:51 ` Dale
0 siblings, 2 replies; 9+ messages in thread
From: Rich Freeman @ 2014-05-19 13:39 UTC (permalink / raw
To: gentoo-user
On Mon, May 19, 2014 at 3:04 AM, Stefan G. Weichinger <lists@xunil.at> wrote:
> Am 17.05.2014 20:48, schrieb Greg Turner:
>> But if you have it working now without any initramfs then
>> obviously that is full of win (the LA kind, not the Redmond variety)!
>
> I wonder if there are any real advantages of booting *with* the
> initramfs even when you don't need it.
>
...
> ... it seems to me that this adds something like an additional layer
> around certain things and helps to make all that more bulletproof?
>
Now that I know how to use dracut I'm basically using it everywhere,
even for VMs that have a single ext4 partition (where it really is a
bit overkill). For the most part it is plug-and-play, and once you
start getting multiple disks involved it adds a lot of robustness.
Dracut can fsck your disks if you want, it can reliably mount the
right root even with fairly confusing layouts, and it actually
respects whatever is in /etc/fstab. It can also be told to mount
anything you want before pivoting via an additional fstab (with the
usual syntax).
Sure, in theory it is one more thing that can go wrong, but I look at
it more like one thing that can help get things to go right when they
would otherwise go wrong.
I'd encourage anybody who hasn't used it to at least get an
understanding of it. It can make your life easier.
There was a Lennart article about using the initramfs to do shutdown
which was good reading. The concept is that you can cleanly unmount
everything this way, and it also handles FUSE much better.
Rich
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [gentoo-user] btrfs only, without dracut
2014-05-19 13:39 ` Rich Freeman
@ 2014-05-19 16:39 ` Stefan G. Weichinger
2014-05-19 20:51 ` Dale
1 sibling, 0 replies; 9+ messages in thread
From: Stefan G. Weichinger @ 2014-05-19 16:39 UTC (permalink / raw
To: gentoo-user
Am 19.05.2014 15:39, schrieb Rich Freeman:
> On Mon, May 19, 2014 at 3:04 AM, Stefan G. Weichinger <lists@xunil.at> wrote:
>> ... it seems to me that this adds something like an additional layer
>> around certain things and helps to make all that more bulletproof?
>>
>
> Now that I know how to use dracut I'm basically using it everywhere,
> even for VMs that have a single ext4 partition (where it really is a
> bit overkill). For the most part it is plug-and-play, and once you
> start getting multiple disks involved it adds a lot of robustness.
> Dracut can fsck your disks if you want, it can reliably mount the
> right root even with fairly confusing layouts, and it actually
> respects whatever is in /etc/fstab. It can also be told to mount
> anything you want before pivoting via an additional fstab (with the
> usual syntax).
Yes, it looks like a small system to me that boots and works before "the
real system" boots up.
> Sure, in theory it is one more thing that can go wrong, but I look at
> it more like one thing that can help get things to go right when they
> would otherwise go wrong.
>
> I'd encourage anybody who hasn't used it to at least get an
> understanding of it. It can make your life easier.
So my impressions were right, thanks for agreeing and explaining.
> There was a Lennart article about using the initramfs to do shutdown
> which was good reading. The concept is that you can cleanly unmount
> everything this way, and it also handles FUSE much better.
Do you have an URL at hand for that?
Thanks, Stefan
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [gentoo-user] btrfs only, without dracut
2014-05-19 13:39 ` Rich Freeman
2014-05-19 16:39 ` Stefan G. Weichinger
@ 2014-05-19 20:51 ` Dale
2014-05-19 21:43 ` Stefan G. Weichinger
1 sibling, 1 reply; 9+ messages in thread
From: Dale @ 2014-05-19 20:51 UTC (permalink / raw
To: gentoo-user
Rich Freeman wrote:
> Now that I know how to use dracut I'm basically using it everywhere,
> even for VMs that have a single ext4 partition (where it really is a
> bit overkill). For the most part it is plug-and-play, and once you
> start getting multiple disks involved it adds a lot of robustness.
> Dracut can fsck your disks if you want, it can reliably mount the
> right root even with fairly confusing layouts, and it actually
> respects whatever is in /etc/fstab. It can also be told to mount
> anything you want before pivoting via an additional fstab (with the
> usual syntax).
>
> Sure, in theory it is one more thing that can go wrong, but I look at
> it more like one thing that can help get things to go right when they
> would otherwise go wrong.
>
> I'd encourage anybody who hasn't used it to at least get an
> understanding of it. It can make your life easier.
>
> There was a Lennart article about using the initramfs to do shutdown
> which was good reading. The concept is that you can cleanly unmount
> everything this way, and it also handles FUSE much better.
>
> Rich
>
>
I might add, I used dracut for a while. A while back when I went to
boot back up, shutdown because my power went out, the init thingy
failed. I had zero clue on how to fix it so I edited grub to ignore the
init part and booted up the old way. Once booted, I kicked out the init
thingy and haven't built one since. I posted this a good while back,
init thingy fails, it's gone. You are right, it is one more thing that
can go wrong. It certainly hasn't fixed anything yet but it sure did
break and keep me from booting with it. ;-)
Dale
:-) :-)
--
I am only responsible for what I said ... Not for what you understood or how you interpreted my words!
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [gentoo-user] btrfs only, without dracut
2014-05-19 20:51 ` Dale
@ 2014-05-19 21:43 ` Stefan G. Weichinger
2014-05-19 21:59 ` Alan McKinnon
0 siblings, 1 reply; 9+ messages in thread
From: Stefan G. Weichinger @ 2014-05-19 21:43 UTC (permalink / raw
To: gentoo-user
Am 19.05.2014 22:51, schrieb Dale:
> I might add, I used dracut for a while. A while back when I went to
> boot back up, shutdown because my power went out, the init thingy
> failed. I had zero clue on how to fix it so I edited grub to ignore the
> init part and booted up the old way. Once booted, I kicked out the init
> thingy and haven't built one since. I posted this a good while back,
> init thingy fails, it's gone. You are right, it is one more thing that
> can go wrong. It certainly hasn't fixed anything yet but it sure did
> break and keep me from booting with it. ;-)
you english speaking guy call that YMMV ... right?
;-)
on the other hand this evening I was able to boot up a live cd on a
brand new Fuji TX150, transfer some rootfs-backup to it and configure
grub2/systemd/dracut/btrfs/kitchensink from the chroot so that grub2 and
dracut booted up correctly on the first try.
... yeah ...
I am quite experienced already (I think so, sorry for sounding arrogant)
but I am not used to getting it right on the first time (usually you
forget some fs/module/uuid-detail ... and chroot a 2nd time).
This might not have been dracut's own merit but it worked anyway.
Stefan
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [gentoo-user] btrfs only, without dracut
2014-05-19 21:43 ` Stefan G. Weichinger
@ 2014-05-19 21:59 ` Alan McKinnon
0 siblings, 0 replies; 9+ messages in thread
From: Alan McKinnon @ 2014-05-19 21:59 UTC (permalink / raw
To: gentoo-user
On 19/05/2014 23:43, Stefan G. Weichinger wrote:
> Am 19.05.2014 22:51, schrieb Dale:
>
>> I might add, I used dracut for a while. A while back when I went to
>> boot back up, shutdown because my power went out, the init thingy
>> failed. I had zero clue on how to fix it so I edited grub to ignore the
>> init part and booted up the old way. Once booted, I kicked out the init
>> thingy and haven't built one since. I posted this a good while back,
>> init thingy fails, it's gone. You are right, it is one more thing that
>> can go wrong. It certainly hasn't fixed anything yet but it sure did
>> break and keep me from booting with it. ;-)
>
> you english speaking guy call that YMMV ... right?
>
> ;-)
Dale's middle name is Murphy
The universe speaks to him in strange and wonderful ways by making his
computer do $OTHER_STUFF in strange and wonderful ways
Dale is the best UAT tester in.the.whole.world - s'truth :-)
>
> on the other hand this evening I was able to boot up a live cd on a
> brand new Fuji TX150, transfer some rootfs-backup to it and configure
> grub2/systemd/dracut/btrfs/kitchensink from the chroot so that grub2 and
> dracut booted up correctly on the first try.
>
> ... yeah ...
>
> I am quite experienced already (I think so, sorry for sounding arrogant)
> but I am not used to getting it right on the first time (usually you
> forget some fs/module/uuid-detail ... and chroot a 2nd time).
>
> This might not have been dracut's own merit but it worked anyway.
>
> Stefan
>
>
>
>
--
Alan McKinnon
alan.mckinnon@gmail.com
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2014-05-19 22:00 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-05-17 15:56 [gentoo-user] btrfs only, without dracut Stefan G. Weichinger
2014-05-17 16:04 ` Stefan G. Weichinger
2014-05-17 18:48 ` Greg Turner
2014-05-19 7:04 ` Stefan G. Weichinger
2014-05-19 13:39 ` Rich Freeman
2014-05-19 16:39 ` Stefan G. Weichinger
2014-05-19 20:51 ` Dale
2014-05-19 21:43 ` Stefan G. Weichinger
2014-05-19 21:59 ` Alan McKinnon
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox