Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.debian.kernel > #50314 > unrolled thread
| Started by | Roger Shimizu <rogershimizu@gmail.com> |
|---|---|
| First post | 2015-07-27 16:50 +0200 |
| Last post | 2016-01-12 12:30 +0100 |
| Articles | 12 — 3 participants |
Back to article view | Back to linux.debian.kernel
Bug#793786: initramfs-tools: fix the broken netconsole feature in initramfs-tools Roger Shimizu <rogershimizu@gmail.com> - 2015-07-27 16:50 +0200
Bug#793786: initramfs-tools: fix the broken netconsole feature in initramfs-tools Roger Shimizu <rogershimizu@gmail.com> - 2015-07-29 12:00 +0200
Bug#793786: initramfs-tools: fix the broken netconsole feature in initramfs-tools Roger Shimizu <rogershimizu@gmail.com> - 2015-07-31 19:10 +0200
Bug#793786: initramfs-tools: fix the broken netconsole feature in initramfs-tools Roger Shimizu <rogershimizu@gmail.com> - 2015-08-02 12:20 +0200
Bug#793786: initramfs-tools: fix the broken netconsole feature in initramfs-tools Ben Hutchings <ben@decadent.org.uk> - 2015-12-09 04:50 +0100
Bug#793786: initramfs-tools: fix the broken netconsole feature in initramfs-tools Roger Shimizu <rogershimizu@gmail.com> - 2016-01-10 14:20 +0100
Bug#793786: initramfs-tools: fix the broken netconsole feature in initramfs-tools Ben Hutchings <ben@decadent.org.uk> - 2016-01-11 00:20 +0100
Bug#793786: initramfs-tools: fix the broken netconsole feature in initramfs-tools Roger Shimizu <rogershimizu@gmail.com> - 2016-01-11 02:00 +0100
Bug#793786: initramfs-tools: fix the broken netconsole feature in initramfs-tools Ben Hutchings <ben@decadent.org.uk> - 2016-01-11 02:30 +0100
Bug#793786: marked as done (initramfs-tools: fix the broken netconsole feature in initramfs-tools) owner@bugs.debian.org (Debian Bug Tracking System) - 2015-12-28 03:50 +0100
Processed: Re: Bug#793786: initramfs-tools: fix the broken netconsole feature in initramfs-tools owner@bugs.debian.org (Debian Bug Tracking System) - 2016-01-10 08:30 +0100
Bug#793786: marked as done (initramfs-tools: fix the broken netconsole feature in initramfs-tools) owner@bugs.debian.org (Debian Bug Tracking System) - 2016-01-12 12:30 +0100
| From | Roger Shimizu <rogershimizu@gmail.com> |
|---|---|
| Date | 2015-07-27 16:50 +0200 |
| Subject | Bug#793786: initramfs-tools: fix the broken netconsole feature in initramfs-tools |
| Message-ID | <pQRT4-4QW-13@gated-at.bofh.it> |
[Multipart message — attachments visible in raw view] — view raw
Package: initramfs-tools Version: 0.120 Severity: normal Tags: patch Dear Maintainer, Currently there're a few issues on netconsole support in initramfs-tools: - netconsole setting (param to kernel module) can only be set in /etc/initramfs-tools/modules, but not from the expected kernel command line - debug info of initramfs-tools can be outputed to local console or saved to local file, which is inconvient for embeded system when the boot fails and there's neither console or serial console So here's the two patches to fix them. Please help to merge. Thank you! Cheers, Roger -- Package-specific info: -- /proc/cmdline console=ttyS0,115200 earlyprintk netconsole=@192.168.11.150/,6666@192.168.11.1/ root=/dev/md2 initrd=0x00800040,12M panic=5 BOOTVER=0.21 mtdparts=nand_mtd:0x1000000(boot),0xfe800000(rootfs),0x800000(reserve) debug -- System Information: Debian Release: 8.1 APT prefers stable APT policy: (990, 'stable'), (500, 'stable-updates'), (500, 'unstable'), (1, 'experimental') Architecture: armel (armv5tel) Kernel: Linux 4.0.0-2-kirkwood Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash Init: sysvinit (via /sbin/init) Versions of packages initramfs-tools depends on: ii cpio 2.11+dfsg-4.1 ii klibc-utils 2.0.4-2 ii kmod 18-3 ii udev 215-17+deb8u1 Versions of packages initramfs-tools recommends: pn busybox | busybox-initramfs | busybox-static <none> Versions of packages initramfs-tools suggests: ii bash-completion 1:2.1-4 -- no debconf information
[toc] | [next] | [standalone]
| From | Roger Shimizu <rogershimizu@gmail.com> |
|---|---|
| Date | 2015-07-29 12:00 +0200 |
| Message-ID | <pRwjw-4xK-3@gated-at.bofh.it> |
| In reply to | #50314 |
Dear Ian, Thanks for your response! I'd like to ask whether you could offer the "Reviewed-by" for my first patch of Bug#793786? (0001-advance-the-timing-of-insmod-netconsole.patch) You must be a netconsole user that understand the reasoning why to load netconsole module with param should be earlier than calling "load_modules" routine. Look forward to your feedback! Cheers, Roger On Wed, Jul 29, 2015 at 4:17 AM, Ian Campbell <ijc@debian.org> wrote: > On Wed, 2015-07-29 at 01:16 +0900, Roger Shimizu wrote: >> Hope you don't mind that I polished your code and post in BTS. > > Absolutely not, thanks for doing so! > > In case it is necessary any code from http://www.hellion.org.uk/blog/po > sts/debugging-initramfs-over-netconsole/ > should be considered: > > Signed-off-by: Ian Campbell <ijc@debian.org> > > for the purposes of inclusion in initramfs-tools. > > Ian. -- To UNSUBSCRIBE, email to debian-bugs-dist-REQUEST@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
[toc] | [prev] | [next] | [standalone]
| From | Roger Shimizu <rogershimizu@gmail.com> |
|---|---|
| Date | 2015-07-31 19:10 +0200 |
| Message-ID | <pSlYM-3G7-51@gated-at.bofh.it> |
| In reply to | #50332 |
[Multipart message — attachments visible in raw view] — view raw
Dear Maintainer, Per Ian's confirmation, enclosed the updated patchset. 1st patch is not touched, only some commit log change in 2nd patch. Thank you! Cheers, Roger
[toc] | [prev] | [next] | [standalone]
| From | Roger Shimizu <rogershimizu@gmail.com> |
|---|---|
| Date | 2015-08-02 12:20 +0200 |
| Message-ID | <pSYx4-Um-3@gated-at.bofh.it> |
| In reply to | #50332 |
[Multipart message — attachments visible in raw view] — view raw
Dear Ian, Thanks for your feedback! After reading your comment, I reviewed the whole procedure of loading netconsole module during initramfs-tools booting, previously and after my patch, I start to consider that original "modprobe netconsole netconsole=$param" line in init file is merely a dirty hack. The real fix is to load the netconsole module with param inside load_modules() routine. So I created v3 patchset, which looks more clean to me. Of course patchset v2 & v3 both works well as I tested. So I let the package maintainer to choose which is better to merge. Dear Maintainer, Enclosed is the updated patchset v3. Changelog: v1 => v2: for 0002 patch: commit log change v2 => v3: for 0001 patch: change loading netconsole module timing from separately in init script to load_modules() routine v2 pros: limit the affected range only when netconsole is set; cons: netconsole module would be load twice, so seems a dirty hack v3 pros: clean code; cons: add a condition judging on each module loading (overhead?) Both v2 and v3 are fine to me. Please simply pick one when to merge. Thank you! Cheers, Roger
[toc] | [prev] | [next] | [standalone]
| From | Ben Hutchings <ben@decadent.org.uk> |
|---|---|
| Date | 2015-12-09 04:50 +0100 |
| Message-ID | <qDDVo-2XK-7@gated-at.bofh.it> |
| In reply to | #50353 |
[Multipart message — attachments visible in raw view] — view raw
On Sun, 2 Aug 2015 19:08:30 +0900 Roger Shimizu <rogershimizu@gmail.com> wrote: > Dear Ian, > > Thanks for your feedback! > > After reading your comment, I reviewed the whole procedure of loading > netconsole module during initramfs-tools booting, previously and after > my patch, I start to consider that original "modprobe netconsole > netconsole=$param" line in init file is merely a dirty hack. The real > fix is to load the netconsole module with param inside load_modules() > routine. > > So I created v3 patchset, which looks more clean to me. > Of course patchset v2 & v3 both works well as I tested. So I let the > package maintainer to choose which is better to merge. [...] An initramfs built with MODULES=most (default) always includes netconsole.ko (assuming it was enabled in the kernel configuration). So the netconsole parameter needs to work even if netconsole doesn't appear in /conf/modules, and your v3 breaks that. So I applied your v2. Thanks. Ben. -- Ben Hutchings I'm always amazed by the number of people who take up solipsism because they heard someone else explain it. - E*Borg on alt.fan.pratchett
[toc] | [prev] | [next] | [standalone]
| From | Roger Shimizu <rogershimizu@gmail.com> |
|---|---|
| Date | 2016-01-10 14:20 +0100 |
| Message-ID | <qPo4y-4DC-1@gated-at.bofh.it> |
| In reply to | #51605 |
[Multipart message — attachments visible in raw view] — view raw
> CaseA (MODULES=list, netconsole param from bootloader, tested on an > armel/orion5x device): > - /etc/initramfs-tools/initramfs.conf: > MODULES=list > > - /etc/initramfs-tools/modules: > mv643xx_eth > netconsole > mvmdio > sata_mv > sd_mod > raid1 > jfs > > CaseB (MODULES=dep, netconsole param from bootloader, tested on an > armel/orion5x device): > - /etc/initramfs-tools/initramfs.conf: > MODULES=dep > > - /etc/initramfs-tools/modules: > mv643xx_eth > netconsole > mvmdio > > CaseC (MODULES=most, netconsole param from bootloader, tested on x86-64 device): > -/etc/initramfs-tools/initramfs.conf: > MODULES=most > > - /etc/initramfs-tools/modules: > # empty all previous cases were using netconsole param from bootloader, so I created Case A2 to use netconsole param from conf/modules. CaseA2 (MODULES=list, netconsole param from conf/modules, tested on an armel/kirkwood device): - /etc/initramfs-tools/initramfs.conf: MODULES=list - /etc/initramfs-tools/modules: mv643xx_eth netconsole mvmdio sata_mv sd_mod raid1 xfs This time I ran case A/A2/B on an armel/kirkwood device Linkstation LS-WXL. Enclosed the netconsole boot log. Cheers, Roger
[toc] | [prev] | [next] | [standalone]
| From | Ben Hutchings <ben@decadent.org.uk> |
|---|---|
| Date | 2016-01-11 00:20 +0100 |
| Message-ID | <qPxrb-2pa-13@gated-at.bofh.it> |
| In reply to | #51605 |
[Multipart message — attachments visible in raw view] — view raw
On Sun, 2016-01-10 at 16:20 +0900, Roger Shimizu wrote:
> Control: reopen -1
>
> On Wed, Dec 9, 2015 at 12:39 PM, Ben Hutchings <ben@decadent.org.uk> wrote:
> > An initramfs built with MODULES=most (default) always includes
> > netconsole.ko (assuming it was enabled in the kernel configuration).
> > So
> > the netconsole parameter needs to work even if netconsole doesn't
> > appear in /conf/modules, and your v3 breaks that. So I applied your
> > v2. Thanks.
>
> I find current v2 patch will sometimes fail because it load netconsole.ko before
> loading network driver.
So maybe we should run 'udevadm settle' before loading modules?
> I made some changes based on patch v3, can confirmed various scenarios,
> including "MODULES=most" you mentioned. So here's patch v4.
> (also in my github repo's netconsole branch:
> https://github.com/rogers0/initramfs-tools/tree/netconsole)
>
> the fix already takes various cases into account:
> - MODULES=most (default) or MODULES={dep,list} (popular for embedded devices)
> - netconsole param may be inside conf/modules or come with bootloader's config
>
> for "MODULES=most" case , netconsole.ko is included by default, so there's
> no need to list it in conf/modules, and netconsole param should be put into
> bootloader's config
>
> for "MODULES={dep,list}" case, netconsole param can be either from
> conf/modules or bootloader, and the previous one is preferred if both are
> specified.
[...]
The kernel parameter should be preferred if both are specified. (In
general, the most specific configuration source should take
precedence.)
Ben.
--
Ben Hutchings
Power corrupts. Absolute power is kind of neat.
- John Lehman, Secretary of the US Navy 1981-1987
[toc] | [prev] | [next] | [standalone]
| From | Roger Shimizu <rogershimizu@gmail.com> |
|---|---|
| Date | 2016-01-11 02:00 +0100 |
| Message-ID | <qPyZX-3hi-1@gated-at.bofh.it> |
| In reply to | #52136 |
On Mon, Jan 11, 2016 at 8:13 AM, Ben Hutchings <ben@decadent.org.uk> wrote:
> On Sun, 2016-01-10 at 16:20 +0900, Roger Shimizu wrote:
>> I find current v2 patch will sometimes fail because it load netconsole.ko before
>> loading network driver.
>
> So maybe we should run 'udevadm settle' before loading modules?
I don't understand this part.
If you have patch, I can run it in my netconsole testable environment,
then feedback the log.
>> I made some changes based on patch v3, can confirmed various scenarios,
>> including "MODULES=most" you mentioned. So here's patch v4.
>> (also in my github repo's netconsole branch:
>> https://github.com/rogers0/initramfs-tools/tree/netconsole)
>>
>> the fix already takes various cases into account:
>> - MODULES=most (default) or MODULES={dep,list} (popular for embedded devices)
>> - netconsole param may be inside conf/modules or come with bootloader's config
>>
>> for "MODULES=most" case , netconsole.ko is included by default, so there's
>> no need to list it in conf/modules, and netconsole param should be put into
>> bootloader's config
>>
>> for "MODULES={dep,list}" case, netconsole param can be either from
>> conf/modules or bootloader, and the previous one is preferred if both are
>> specified.
> [...]
>
> The kernel parameter should be preferred if both are specified. (In
> general, the most specific configuration source should take
> precedence.)
Yes, I agree.
I meant if both are *same* specific level, param from conf/modules
will be preferred.
It's what's the test case A2 for.
Cheers,
Roger
[toc] | [prev] | [next] | [standalone]
| From | Ben Hutchings <ben@decadent.org.uk> |
|---|---|
| Date | 2016-01-11 02:30 +0100 |
| Message-ID | <qPzt0-3IG-3@gated-at.bofh.it> |
| In reply to | #52139 |
[Multipart message — attachments visible in raw view] — view raw
On Mon, 2016-01-11 at 09:54 +0900, Roger Shimizu wrote:
> On Mon, Jan 11, 2016 at 8:13 AM, Ben Hutchings <ben@decadent.org.uk> wrote:
> > On Sun, 2016-01-10 at 16:20 +0900, Roger Shimizu wrote:
> > > I find current v2 patch will sometimes fail because it load netconsole.ko before
> > > loading network driver.
> >
> > So maybe we should run 'udevadm settle' before loading modules?
>
> I don't understand this part.
> If you have patch, I can run it in my netconsole testable environment,
> then feedback the log.
--- a/init
+++ b/init
@@ -207,6 +207,7 @@ run_scripts /scripts/init-top
maybe_break modules
[ "$quiet" != "y" ] && log_begin_msg "Loading essential drivers"
+udevadm settle # make sure network drivers are loaded
[ -n "${netconsole}" ] && modprobe netconsole netconsole="${netconsole}"
load_modules
[ "$quiet" != "y" ] && log_end_msg
--- END ---
It won't be reliable for USB networking, but I think that's inevitable.
> > > I made some changes based on patch v3, can confirmed various scenarios,
> > > including "MODULES=most" you mentioned. So here's patch v4.
> > > (also in my github repo's netconsole branch:
> > > https://github.com/rogers0/initramfs-tools/tree/netconsole)
> > >
> > > the fix already takes various cases into account:
> > > - MODULES=most (default) or MODULES={dep,list} (popular for embedded devices)
> > > - netconsole param may be inside conf/modules or come with bootloader's config
> > >
> > > for "MODULES=most" case , netconsole.ko is included by default, so there's
> > > no need to list it in conf/modules, and netconsole param should be put into
> > > bootloader's config
> > >
> > > for "MODULES={dep,list}" case, netconsole param can be either from
> > > conf/modules or bootloader, and the previous one is preferred if both are
> > > specified.
> > [...]
> >
> > The kernel parameter should be preferred if both are specified. (In
> > general, the most specific configuration source should take
> > precedence.)
>
> Yes, I agree.
> I meant if both are *same* specific level, param from conf/modules
> will be preferred.
> It's what's the test case A2 for.
The kernel paramater is more specific, because that is something the
user can (usually) edit at boot time.
Ben.
--
Ben Hutchings
Q. Which is the greater problem in the world today, ignorance or apathy?
A. I don't know and I couldn't care less.
[toc] | [prev] | [next] | [standalone]
| From | owner@bugs.debian.org (Debian Bug Tracking System) |
|---|---|
| Date | 2015-12-28 03:50 +0100 |
| Subject | Bug#793786: marked as done (initramfs-tools: fix the broken netconsole feature in initramfs-tools) |
| Message-ID | <qKw3e-3Io-657@gated-at.bofh.it> |
| In reply to | #50314 |
[Multipart message — attachments visible in raw view] — view raw
Your message dated Sun, 27 Dec 2015 23:00:16 +0000 with message-id <E1aDKIS-0001mb-EK@franck.debian.org> and subject line Bug#793786: fixed in initramfs-tools 0.121~rc2 has caused the Debian Bug report #793786, regarding initramfs-tools: fix the broken netconsole feature in initramfs-tools to be marked as done. This means that you claim that the problem has been dealt with. If this is not the case it is now your responsibility to reopen the Bug report if necessary, and/or fix the problem forthwith. (NB: If you are a system administrator and have no idea what this message is talking about, this may indicate a serious mail system misconfiguration somewhere. Please contact owner@bugs.debian.org immediately.) -- 793786: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=793786 Debian Bug Tracking System Contact owner@bugs.debian.org with problems
[toc] | [prev] | [next] | [standalone]
| From | owner@bugs.debian.org (Debian Bug Tracking System) |
|---|---|
| Date | 2016-01-10 08:30 +0100 |
| Subject | Processed: Re: Bug#793786: initramfs-tools: fix the broken netconsole feature in initramfs-tools |
| Message-ID | <qPiBQ-14T-7@gated-at.bofh.it> |
| In reply to | #50314 |
Processing control commands:
> reopen -1
Bug #793786 {Done: Ben Hutchings <ben@decadent.org.uk>} [initramfs-tools] initramfs-tools: fix the broken netconsole feature in initramfs-tools
'reopen' may be inappropriate when a bug has been closed with a version;
all fixed versions will be cleared, and you may need to re-add them.
Bug reopened
No longer marked as fixed in versions initramfs-tools/0.121~rc2.
--
793786: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=793786
Debian Bug Tracking System
Contact owner@bugs.debian.org with problems
[toc] | [prev] | [next] | [standalone]
| From | owner@bugs.debian.org (Debian Bug Tracking System) |
|---|---|
| Date | 2016-01-12 12:30 +0100 |
| Subject | Bug#793786: marked as done (initramfs-tools: fix the broken netconsole feature in initramfs-tools) |
| Message-ID | <qQ5jb-cc-7@gated-at.bofh.it> |
| In reply to | #50314 |
[Multipart message — attachments visible in raw view] — view raw
Your message dated Tue, 12 Jan 2016 20:20:19 +0900 with message-id <CAEQ9gEneKu-o4Vtt2TnSrH+2yFLDcg=sw2OG7yiDd+LQwsGzPg@mail.gmail.com> and subject line Re: Bug#793786: initramfs-tools: fix the broken netconsole feature in initramfs-tools has caused the Debian Bug report #793786, regarding initramfs-tools: fix the broken netconsole feature in initramfs-tools to be marked as done. This means that you claim that the problem has been dealt with. If this is not the case it is now your responsibility to reopen the Bug report if necessary, and/or fix the problem forthwith. (NB: If you are a system administrator and have no idea what this message is talking about, this may indicate a serious mail system misconfiguration somewhere. Please contact owner@bugs.debian.org immediately.) -- 793786: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=793786 Debian Bug Tracking System Contact owner@bugs.debian.org with problems
[toc] | [prev] | [standalone]
Back to top | Article view | linux.debian.kernel
csiph-web