Re: Booting an alternative kernel from loader prompt fails the first time only
On Sun, Apr 21, 2013 at 01:36:58AM +0100, Steven Hartland wrote: - Original Message - From: Joshua Isom jri...@gmail.com To: freebsd-current@freebsd.org Sent: Sunday, April 21, 2013 12:41 AM Subject: Re: Booting an alternative kernel from loader prompt fails the first time only On 4/20/2013 12:41 PM, Manfred Antar wrote: At 10:24 AM 4/20/2013, Rainer Hurling wrote: On 20.04.2013 18:47 (UTC+2), Florian Smeets wrote: On 20.04.13 18:05, Steven Hartland wrote: When trying to boot an alternative kernel from the loader prompt it fails the first time the command is run but succeeds the second time. Type '?' for a list of commands, 'help' for more detailed help. OK boot kernel.generic Booting... don't know how to load module '/boot/kernel.generic/kernel' OK boot kernel.generic Booting... /boot/kernel.generic/kernel text=0xd21288 data=.. Yes, I've been seeing the same thing for about 6-12 months maybe more. None of the people I asked were able to confirm, so I'm happy that I'm not imagining it :) I also can confirm this behaviour for month now (on 10.0-CURRENT amd64 with clang). Rainer Have you tried: OK boot /boot/kernel.generic/kernel Use full path name always works for me Manfred I believe this may well have been introduced by:- http://svnweb.freebsd.org/base?view=revisionrevision=241069 When booting with a /boot/loader.conf that contains a module load line e.g. zfs_load=YES then this is loaded before the kernel. Loading any module causes last_file_format to get set so when the next file that's loaded is in fact a kernel it still try's to load it as a kernel module using what was stored with last_file_format. This fails and trips the Restart from the beginning case which contains: last_file_format = i = 0; fp = NULL; continue; So i gets set to 0 but the loop then increments it to 1 before running the next iteration, so its impossible to use first handler in the retry case; which I suspect is the kernel loader. This also explains why the second call to boot works as last_file_format is now 0 due to the previous failure. If this is the issue the attached patch should fix it. I can't test it ATM as my current box is at the office and doesn't have remote KVM, so I need to be in front of it. If anyone can confirm this attached patch fixes the problem then I'll get it committed, otherwise I'll test on Monday. I've been noticing this issue on my laptop, and I can confirm that the patch fixes it. -Mark ___ freebsd-current@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to freebsd-current-unsubscr...@freebsd.org
Re: Booting an alternative kernel from loader prompt fails the first time only
On 21.04.2013 02:36 (UTC+2), Steven Hartland wrote: - Original Message - From: Joshua Isom jri...@gmail.com To: freebsd-current@freebsd.org Sent: Sunday, April 21, 2013 12:41 AM Subject: Re: Booting an alternative kernel from loader prompt fails the first time only On 4/20/2013 12:41 PM, Manfred Antar wrote: At 10:24 AM 4/20/2013, Rainer Hurling wrote: On 20.04.2013 18:47 (UTC+2), Florian Smeets wrote: On 20.04.13 18:05, Steven Hartland wrote: When trying to boot an alternative kernel from the loader prompt it fails the first time the command is run but succeeds the second time. Type '?' for a list of commands, 'help' for more detailed help. OK boot kernel.generic Booting... don't know how to load module '/boot/kernel.generic/kernel' OK boot kernel.generic Booting... /boot/kernel.generic/kernel text=0xd21288 data=.. Yes, I've been seeing the same thing for about 6-12 months maybe more. None of the people I asked were able to confirm, so I'm happy that I'm not imagining it :) I also can confirm this behaviour for month now (on 10.0-CURRENT amd64 with clang). Rainer Have you tried: OK boot /boot/kernel.generic/kernel Use full path name always works for me Manfred I believe this may well have been introduced by:- http://svnweb.freebsd.org/base?view=revisionrevision=241069 When booting with a /boot/loader.conf that contains a module load line e.g. zfs_load=YES then this is loaded before the kernel. Loading any module causes last_file_format to get set so when the next file that's loaded is in fact a kernel it still try's to load it as a kernel module using what was stored with last_file_format. This fails and trips the Restart from the beginning case which contains: last_file_format = i = 0; fp = NULL; continue; So i gets set to 0 but the loop then increments it to 1 before running the next iteration, so its impossible to use first handler in the retry case; which I suspect is the kernel loader. This also explains why the second call to boot works as last_file_format is now 0 due to the previous failure. If this is the issue the attached patch should fix it. I can't test it ATM as my current box is at the office and doesn't have remote KVM, so I need to be in front of it. If anyone can confirm this attached patch fixes the problem then I'll get it committed, otherwise I'll test on Monday. I tried your patch with recent 10.0-CURRENT amd64 (r249715, clang), and it seems to work. I can set module path, load some modules, and afterwards load a kernel in one call. Thank you very much. Best wishes, Rainer Regards Steve ___ freebsd-current@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to freebsd-current-unsubscr...@freebsd.org
Re: Booting an alternative kernel from loader prompt fails the first time only
On 21.04.2013 04:36, Steven Hartland wrote: This fails and trips the Restart from the beginning case which contains: last_file_format = i = 0; fp = NULL; continue; So i gets set to 0 but the loop then increments it to 1 before running the next iteration, so its impossible to use first handler in the retry case; which I suspect is the kernel loader. This also explains why the second call to boot works as last_file_format is now 0 due to the previous failure. If this is the issue the attached patch should fix it. I can't test it ATM as my current box is at the office and doesn't have remote KVM, so I need to be in front of it. If anyone can confirm this attached patch fixes the problem then I'll get it committed, otherwise I'll test on Monday. Hi, yes, you are right. I just committed this with r249719. Thanks. -- WBR, Andrey V. Elsukov ___ freebsd-current@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to freebsd-current-unsubscr...@freebsd.org
Booting an alternative kernel from loader prompt fails the first time only
When trying to boot an alternative kernel from the loader prompt it fails the first time the command is run but succeeds the second time. Type '?' for a list of commands, 'help' for more detailed help. OK boot kernel.generic Booting... don't know how to load module '/boot/kernel.generic/kernel' OK boot kernel.generic Booting... /boot/kernel.generic/kernel text=0xd21288 data=.. Both kernels where built from r249664 based source. As a side issue, shouldn't additional kernel module dependencies be noted in UPDATING so those that use MODULES_OVERRIDE don't get bitten by machines failing to boot due to known dependencies? Ideally it would be nice if there was some sort of warning when building / installing the kernel that dependencies where missing. Regards Steve This e.mail is private and confidential between Multiplay (UK) Ltd. and the person or entity to whom it is addressed. In the event of misdirection, the recipient is prohibited from using, copying, printing or otherwise disseminating it or any information contained in it. In the event of misdirection, illegible or incomplete transmission please telephone +44 845 868 1337 or return the E.mail to postmas...@multiplay.co.uk. ___ freebsd-current@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to freebsd-current-unsubscr...@freebsd.org
Re: Booting an alternative kernel from loader prompt fails the first time only
On 20.04.13 18:05, Steven Hartland wrote: When trying to boot an alternative kernel from the loader prompt it fails the first time the command is run but succeeds the second time. Type '?' for a list of commands, 'help' for more detailed help. OK boot kernel.generic Booting... don't know how to load module '/boot/kernel.generic/kernel' OK boot kernel.generic Booting... /boot/kernel.generic/kernel text=0xd21288 data=.. Yes, I've been seeing the same thing for about 6-12 months maybe more. None of the people I asked were able to confirm, so I'm happy that I'm not imagining it :) I see this on serial as well as on the normal console in front of a PC. Florian signature.asc Description: OpenPGP digital signature
Re: Booting an alternative kernel from loader prompt fails the first time only
On 20.04.2013 18:47 (UTC+2), Florian Smeets wrote: On 20.04.13 18:05, Steven Hartland wrote: When trying to boot an alternative kernel from the loader prompt it fails the first time the command is run but succeeds the second time. Type '?' for a list of commands, 'help' for more detailed help. OK boot kernel.generic Booting... don't know how to load module '/boot/kernel.generic/kernel' OK boot kernel.generic Booting... /boot/kernel.generic/kernel text=0xd21288 data=.. Yes, I've been seeing the same thing for about 6-12 months maybe more. None of the people I asked were able to confirm, so I'm happy that I'm not imagining it :) I also can confirm this behaviour for month now (on 10.0-CURRENT amd64 with clang). Rainer I see this on serial as well as on the normal console in front of a PC. Florian ___ freebsd-current@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to freebsd-current-unsubscr...@freebsd.org
Re: Booting an alternative kernel from loader prompt fails the first time only
At 10:24 AM 4/20/2013, Rainer Hurling wrote: On 20.04.2013 18:47 (UTC+2), Florian Smeets wrote: On 20.04.13 18:05, Steven Hartland wrote: When trying to boot an alternative kernel from the loader prompt it fails the first time the command is run but succeeds the second time. Type '?' for a list of commands, 'help' for more detailed help. OK boot kernel.generic Booting... don't know how to load module '/boot/kernel.generic/kernel' OK boot kernel.generic Booting... /boot/kernel.generic/kernel text=0xd21288 data=.. Yes, I've been seeing the same thing for about 6-12 months maybe more. None of the people I asked were able to confirm, so I'm happy that I'm not imagining it :) I also can confirm this behaviour for month now (on 10.0-CURRENT amd64 with clang). Rainer I see this on serial as well as on the normal console in front of a PC. Florian Have you tried: OK boot /boot/kernel.generic/kernel Use full path name always works for me Manfred || n...@pozo.com || || || -- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean. ___ freebsd-current@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to freebsd-current-unsubscr...@freebsd.org
Re: Booting an alternative kernel from loader prompt fails the first time only
On 4/20/2013 12:41 PM, Manfred Antar wrote: At 10:24 AM 4/20/2013, Rainer Hurling wrote: On 20.04.2013 18:47 (UTC+2), Florian Smeets wrote: On 20.04.13 18:05, Steven Hartland wrote: When trying to boot an alternative kernel from the loader prompt it fails the first time the command is run but succeeds the second time. Type '?' for a list of commands, 'help' for more detailed help. OK boot kernel.generic Booting... don't know how to load module '/boot/kernel.generic/kernel' OK boot kernel.generic Booting... /boot/kernel.generic/kernel text=0xd21288 data=.. Yes, I've been seeing the same thing for about 6-12 months maybe more. None of the people I asked were able to confirm, so I'm happy that I'm not imagining it :) I also can confirm this behaviour for month now (on 10.0-CURRENT amd64 with clang). Rainer Have you tried: OK boot /boot/kernel.generic/kernel Use full path name always works for me Manfred I couldn't get any other method to work. I can also confirm this. While working with Adrian testing ath changes, I frequently had to reboot into an old kernel(/boot/ATH/kernel, full path seemed required) to regain networking unless I physically moved the computer to add ethernet. Also, it's really annoying when I would have to manually kldload each module in order, especially opensolaris.ko and zfs.ko, and making sure I loaded /boot/ATH/if_ath.ko before /boot/ATH/if_ath_pci.ko or else the loader would load from /boot/kernel instead of /boot/ATH and I'd end up with broken networking even though the kernel was right. I'd really love it if there were a way for modules to be bundled with the kernel file and loaded from the kernel instead of the filesystem, especially since many modules can't be compiled in. As a side note, my /boot/loader is from -STABLE, mod time of January 24 this year. This could be an issue on -STABLE also. ___ freebsd-current@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to freebsd-current-unsubscr...@freebsd.org
Re: Booting an alternative kernel from loader prompt fails the first time only
- Original Message - From: Joshua Isom jri...@gmail.com To: freebsd-current@freebsd.org Sent: Sunday, April 21, 2013 12:41 AM Subject: Re: Booting an alternative kernel from loader prompt fails the first time only On 4/20/2013 12:41 PM, Manfred Antar wrote: At 10:24 AM 4/20/2013, Rainer Hurling wrote: On 20.04.2013 18:47 (UTC+2), Florian Smeets wrote: On 20.04.13 18:05, Steven Hartland wrote: When trying to boot an alternative kernel from the loader prompt it fails the first time the command is run but succeeds the second time. Type '?' for a list of commands, 'help' for more detailed help. OK boot kernel.generic Booting... don't know how to load module '/boot/kernel.generic/kernel' OK boot kernel.generic Booting... /boot/kernel.generic/kernel text=0xd21288 data=.. Yes, I've been seeing the same thing for about 6-12 months maybe more. None of the people I asked were able to confirm, so I'm happy that I'm not imagining it :) I also can confirm this behaviour for month now (on 10.0-CURRENT amd64 with clang). Rainer Have you tried: OK boot /boot/kernel.generic/kernel Use full path name always works for me Manfred I believe this may well have been introduced by:- http://svnweb.freebsd.org/base?view=revisionrevision=241069 When booting with a /boot/loader.conf that contains a module load line e.g. zfs_load=YES then this is loaded before the kernel. Loading any module causes last_file_format to get set so when the next file that's loaded is in fact a kernel it still try's to load it as a kernel module using what was stored with last_file_format. This fails and trips the Restart from the beginning case which contains: last_file_format = i = 0; fp = NULL; continue; So i gets set to 0 but the loop then increments it to 1 before running the next iteration, so its impossible to use first handler in the retry case; which I suspect is the kernel loader. This also explains why the second call to boot works as last_file_format is now 0 due to the previous failure. If this is the issue the attached patch should fix it. I can't test it ATM as my current box is at the office and doesn't have remote KVM, so I need to be in front of it. If anyone can confirm this attached patch fixes the problem then I'll get it committed, otherwise I'll test on Monday. Regards Steve This e.mail is private and confidential between Multiplay (UK) Ltd. and the person or entity to whom it is addressed. In the event of misdirection, the recipient is prohibited from using, copying, printing or otherwise disseminating it or any information contained in it. In the event of misdirection, illegible or incomplete transmission please telephone +44 845 868 1337 or return the E.mail to postmas...@multiplay.co.uk. alternative-boot.patch Description: Binary data ___ freebsd-current@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to freebsd-current-unsubscr...@freebsd.org