public inbox for gentoo-amd64@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-amd64] genkernel changes
@ 2008-12-19 15:50 Wil Reichert
  2008-12-20  0:05 ` [gentoo-amd64] " Duncan
  0 siblings, 1 reply; 4+ messages in thread
From: Wil Reichert @ 2008-12-19 15:50 UTC (permalink / raw
  To: gentoo-amd64

I build my own kernels but since my / partition is lvm I use genkernel
to create an initrd.  Previously 'genkernel --lvm initrd' did what I
wanted but it seems that the since genkernel-3.4.10.902 thats no
longer the case.  Reading the man page it seems that the initrd
parameter has been replaced by initramfs.  However, when I attempt to
run it with that I get

matter boot # genkernel --lvm initramfs
Error: Unknown option 'initramfs'!

I can easily roll back to a previous version of genkernel, I'm just
wondering if genkernel is broken or I'm just doing something wrong?

Wil



^ permalink raw reply	[flat|nested] 4+ messages in thread

* [gentoo-amd64]  Re: genkernel changes
  2008-12-19 15:50 [gentoo-amd64] genkernel changes Wil Reichert
@ 2008-12-20  0:05 ` Duncan
  2008-12-20  4:40   ` Wil Reichert
  0 siblings, 1 reply; 4+ messages in thread
From: Duncan @ 2008-12-20  0:05 UTC (permalink / raw
  To: gentoo-amd64

"Wil Reichert" <wil.reichert@gmail.com> posted
7a329d910812190750n606b52efl5c3a8cb3cb0560ad@mail.gmail.com, excerpted
below, on  Fri, 19 Dec 2008 07:50:34 -0800:

> I build my own kernels but since my / partition is lvm I use genkernel
> to create an initrd.  Previously 'genkernel --lvm initrd' did what I
> wanted but it seems that the since genkernel-3.4.10.902 thats no longer
> the case.  Reading the man page it seems that the initrd parameter has
> been replaced by initramfs.  However, when I attempt to run it with that
> I get
> 
> matter boot # genkernel --lvm initramfs Error: Unknown option
> 'initramfs'!
> 
> I can easily roll back to a previous version of genkernel, I'm just
> wondering if genkernel is broken or I'm just doing something wrong?

I do /not/ use either genkernel or an initramfs/initrd, so this is from 
various reading I've done and I have no idea how accurate it might or 
might not be.  Never-the-less, it's likely the case based on what I've 
come across on the subject.

Formerly, the kernel used a separate "init-ram-disk" aka initrd (init-r-
d).  Now, the kernel uses (if enabled) an "init-file-system", directly 
appended to the kernel itself, not a separate file.

Therefore, what I'd guess is happening is that there's no separate 
command to make it in the new genkernel, since it's not a separate file.  
Rather, it probably reads the associated kernel option as to whether to 
create it or not, and then does so before generating the final kernel, 
finally appending the compressed initramfs to the already created kernel.

Far be it from me to tell you how to arrange your system, and it sounds 
like it's a bit late for you anyway, but this is something to keep in 
mind for those just setting up.  While I'm running both LVM2 and kernel/
md RAID (0,1 and 6, 0 for speed on stuff like ccache and the gentoo tree 
where redundancy isn't needed, 1 for /boot since that's all grub 
understands, and 6 for the main system), the fact that LVM2 requires 
userspace help and therefore an initrd if the / filesystem is to be 
placed on it, while with RAID the necessary info can be auto-detected or 
passed on the command line, was the reason I chose to go with partitioned 
RAID for / (and a backup I call rootbak) instead of putting it on LVM2. 
/home and my media and mail and news partitions, etc, with their backups, 
are all on LVM2, but / and rootbak are directly on partitioned RAID-6.  

Also, / (and rootbak) include /usr and /var as well (except for 
/usr/local and /var/log, with /var/tmp being a symlink to /tmp, which is 
tmpfs), so the full installed system along with the portage data in
/var/db and /var/lib/portage, are all on the same volume and managed 
together, thus kept in sync.  This is because I had some major headaches 
in a disaster recovery scenario where the /, /var, and /usr partitions 
weren't in sync with each other, so I didn't know /what/ package versions 
I actually had on disk.  Keep it all on the same volume and it stays in 
sync, if I go to rootbak, tho it may be dated, it too is in sync.

Thus I can pass the necessary parameters to assemble the partitioned-
RAID-6 upon which the / filesystem is located directly to the kernel, and 
don't need an initrd/initramfs.  Later, as the system boots normally, it 
loads the raid and lvm services (baselayout-2 with openrc treats them as 
full services, not the "addons" baselayout-1 used, and loads them as 
such), bringing up the rest of the RAID devices, and then LVM on top of 
the RAID-6 (the RAID-0,1 only have a single partition/volume each anyway, 
so no need for LVM there).  I thus entirely avoid the complexity of an 
initramfs/initrd.

As I said, whether something like this may or may not have been better 
for you, it's kind of late now that you're / is on LVM, but it's 
something others just setting up should at least evaluate as an option, 
as they plan out their system.

One other comment for those considering this.  I only created my main / 
and a single rootbak backup for it.  If I had it to do over, I'd create 
two backup / images, thus handling the case of tragedy striking just as I 
was updating the first backup and the resultant loss of both it and the 
working /.  That should be a rather rare event, but were I prepared for 
it I'd certainly have rather better peace of mind now.

-- 
Duncan - List replies preferred.   No HTML msgs.
"Every nonfree program has a lord, a master --
and if you use the program, he is your master."  Richard Stallman




^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [gentoo-amd64] Re: genkernel changes
  2008-12-20  0:05 ` [gentoo-amd64] " Duncan
@ 2008-12-20  4:40   ` Wil Reichert
  2008-12-20  7:40     ` Duncan
  0 siblings, 1 reply; 4+ messages in thread
From: Wil Reichert @ 2008-12-20  4:40 UTC (permalink / raw
  To: gentoo-amd64

On Fri, Dec 19, 2008 at 4:05 PM, Duncan <1i5t5.duncan@cox.net> wrote:
> "Wil Reichert" <wil.reichert@gmail.com> posted
> 7a329d910812190750n606b52efl5c3a8cb3cb0560ad@mail.gmail.com, excerpted
> below, on  Fri, 19 Dec 2008 07:50:34 -0800:
>
>> I build my own kernels but since my / partition is lvm I use genkernel
>> to create an initrd.  Previously 'genkernel --lvm initrd' did what I
>> wanted but it seems that the since genkernel-3.4.10.902 thats no longer
>> the case.  Reading the man page it seems that the initrd parameter has
>> been replaced by initramfs.  However, when I attempt to run it with that
>> I get
>>
>> matter boot # genkernel --lvm initramfs Error: Unknown option
>> 'initramfs'!
>>
>> I can easily roll back to a previous version of genkernel, I'm just
>> wondering if genkernel is broken or I'm just doing something wrong?
>
> I do /not/ use either genkernel or an initramfs/initrd, so this is from
> various reading I've done and I have no idea how accurate it might or
> might not be.  Never-the-less, it's likely the case based on what I've
> come across on the subject.
>
> Formerly, the kernel used a separate "init-ram-disk" aka initrd (init-r-
> d).  Now, the kernel uses (if enabled) an "init-file-system", directly
> appended to the kernel itself, not a separate file.
>
> Therefore, what I'd guess is happening is that there's no separate
> command to make it in the new genkernel, since it's not a separate file.
> Rather, it probably reads the associated kernel option as to whether to
> create it or not, and then does so before generating the final kernel,
> finally appending the compressed initramfs to the already created kernel.
>
> Far be it from me to tell you how to arrange your system, and it sounds
> like it's a bit late for you anyway, but this is something to keep in
> mind for those just setting up.  While I'm running both LVM2 and kernel/
> md RAID (0,1 and 6, 0 for speed on stuff like ccache and the gentoo tree
> where redundancy isn't needed, 1 for /boot since that's all grub
> understands, and 6 for the main system), the fact that LVM2 requires
> userspace help and therefore an initrd if the / filesystem is to be
> placed on it, while with RAID the necessary info can be auto-detected or
> passed on the command line, was the reason I chose to go with partitioned
> RAID for / (and a backup I call rootbak) instead of putting it on LVM2.
> /home and my media and mail and news partitions, etc, with their backups,
> are all on LVM2, but / and rootbak are directly on partitioned RAID-6.
>
> Also, / (and rootbak) include /usr and /var as well (except for
> /usr/local and /var/log, with /var/tmp being a symlink to /tmp, which is
> tmpfs), so the full installed system along with the portage data in
> /var/db and /var/lib/portage, are all on the same volume and managed
> together, thus kept in sync.  This is because I had some major headaches
> in a disaster recovery scenario where the /, /var, and /usr partitions
> weren't in sync with each other, so I didn't know /what/ package versions
> I actually had on disk.  Keep it all on the same volume and it stays in
> sync, if I go to rootbak, tho it may be dated, it too is in sync.
>
> Thus I can pass the necessary parameters to assemble the partitioned-
> RAID-6 upon which the / filesystem is located directly to the kernel, and
> don't need an initrd/initramfs.  Later, as the system boots normally, it
> loads the raid and lvm services (baselayout-2 with openrc treats them as
> full services, not the "addons" baselayout-1 used, and loads them as
> such), bringing up the rest of the RAID devices, and then LVM on top of
> the RAID-6 (the RAID-0,1 only have a single partition/volume each anyway,
> so no need for LVM there).  I thus entirely avoid the complexity of an
> initramfs/initrd.
>
> As I said, whether something like this may or may not have been better
> for you, it's kind of late now that you're / is on LVM, but it's
> something others just setting up should at least evaluate as an option,
> as they plan out their system.
>
> One other comment for those considering this.  I only created my main /
> and a single rootbak backup for it.  If I had it to do over, I'd create
> two backup / images, thus handling the case of tragedy striking just as I
> was updating the first backup and the resultant loss of both it and the
> working /.  That should be a rather rare event, but were I prepared for
> it I'd certainly have rather better peace of mind now.

Yep, I understood the limitations when I configured it like this.
Used to keep around a 'real' partition for / & had everything else
lvm'd but it eventually just seemed unnecessary.  Move to all lvm a
couple years back & its hardly even been an issue.  I like the ease in
which you can do snapshots & move lv's around to various drives.

BTW, I figured out the answer to my problem.  The man page for
genkernel used to have an action called 'initrd'.  In 3.4.10.902 the
man page changes that to 'initramfs', but it should be 'ramdisk'.
Just submitted bug 251702.

Wil



^ permalink raw reply	[flat|nested] 4+ messages in thread

* [gentoo-amd64]  Re: genkernel changes
  2008-12-20  4:40   ` Wil Reichert
@ 2008-12-20  7:40     ` Duncan
  0 siblings, 0 replies; 4+ messages in thread
From: Duncan @ 2008-12-20  7:40 UTC (permalink / raw
  To: gentoo-amd64

"Wil Reichert" <wil.reichert@gmail.com> posted
7a329d910812192040na259a95v5223ced5977a5823@mail.gmail.com, excerpted
below, on  Fri, 19 Dec 2008 20:40:40 -0800:

> BTW, I figured out the answer to my problem.  The man page for genkernel
> used to have an action called 'initrd'.  In 3.4.10.902 the man page
> changes that to 'initramfs', but it should be 'ramdisk'. Just submitted
> bug 251702.

Thanks for the followup with the fix.  Now if I (or someone here, at 
least) can remember it next time someone asks... =:^)

-- 
Duncan - List replies preferred.   No HTML msgs.
"Every nonfree program has a lord, a master --
and if you use the program, he is your master."  Richard Stallman




^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2008-12-20  7:45 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-12-19 15:50 [gentoo-amd64] genkernel changes Wil Reichert
2008-12-20  0:05 ` [gentoo-amd64] " Duncan
2008-12-20  4:40   ` Wil Reichert
2008-12-20  7:40     ` Duncan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox