FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Debian > Debian Kernel

 
 
LinkBack Thread Tools
 
Old 07-30-2010, 11:04 AM
maximilian attems
 
Default Bug#590744: Fails to boot if /sbin/init is a symlink

On Fri, Jul 30, 2010 at 11:49:32AM +0200, Michael Biebl wrote:
> On 30.07.2010 11:31, Michael Biebl wrote:
> > On 30.07.2010 06:21, Michael Prokop wrote:
> >
> >>
> >> Can you please give the following snapshot version a try:
> >>
> >> http://people.debian.org/~mika/initramfs-tools/initramfs-tools_0.97.3~1.gbp8d572e_all.deb
> >>
> >
> > I've tested the following:
> > - /sbin/init being a relative symlink: works
> > - /sbin/init being an absolute symlink: works
> > - /sbin/init missing: correctly dropped to rescue shell, even if upstart
> > installed (/etc/init/)
> > - passing init=/bin/systemd on the boot command line: works
> > - passing bogus init=/sbin/foo on the boot command line: warning message that
> > requested init was not found, is displayed, but continues booting with /sbin/init.
> >
> > So yes, it works correctly now for all cases I tested and expect.
>
> Looking at the code, the only issue I see, is that validate_init is *always*
> executed at least twice, even if we find a valid init at the first try.
> This means, for most cases we unnecessarily execute validate_init at
> """
> # No init on rootmount
> if ! validate_init "${init}" ; then
> """
> Not that much of an issue, just an idea for a small optimization.
>

please this is executed on every boot, could we have a fastforward
path for the common cases.
dracut probably solved this long ago, please have a look there
what fedora guys are doing.

thanks.



--
To UNSUBSCRIBE, email to debian-kernel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 20100730110430.GO19138@baikonur.stro.at">http://lists.debian.org/20100730110430.GO19138@baikonur.stro.at
 
Old 07-31-2010, 06:25 PM
Michael Prokop
 
Default Bug#590744: Fails to boot if /sbin/init is a symlink

* maximilian attems <max@stro.at> [Fri Jul 30, 2010 at 01:04:30PM +0200]:
> On Fri, Jul 30, 2010 at 11:49:32AM +0200, Michael Biebl wrote:
> > On 30.07.2010 11:31, Michael Biebl wrote:
> > > On 30.07.2010 06:21, Michael Prokop wrote:

> > >> Can you please give the following snapshot version a try:

> > >> http://people.debian.org/~mika/initramfs-tools/initramfs-tools_0.97.3~1.gbp8d572e_all.deb


> > > I've tested the following:
> > > - /sbin/init being a relative symlink: works
> > > - /sbin/init being an absolute symlink: works
> > > - /sbin/init missing: correctly dropped to rescue shell, even if upstart
> > > installed (/etc/init/)
> > > - passing init=/bin/systemd on the boot command line: works
> > > - passing bogus init=/sbin/foo on the boot command line: warning message that
> > > requested init was not found, is displayed, but continues booting with /sbin/init.

> > > So yes, it works correctly now for all cases I tested and expect.

> > Looking at the code, the only issue I see, is that validate_init is *always*
> > executed at least twice, even if we find a valid init at the first try.
> > This means, for most cases we unnecessarily execute validate_init at
> > """
> > # No init on rootmount
> > if ! validate_init "${init}" ; then
> > """
> > Not that much of an issue, just an idea for a small optimization.

> please this is executed on every boot, could we have a fastforward
> path for the common cases.
> dracut probably solved this long ago, please have a look there
> what fedora guys are doing.

dracut doesn't seem to support symlinks at all AFAICS.

maks: I've implemented a fastfoward path, please review
branch mika/validate_init at
http://git.debian.org/?p=kernel/initramfs-tools.git

regards,
-mika-
 
Old 07-31-2010, 06:27 PM
Michael Prokop
 
Default Bug#590744: Fails to boot if /sbin/init is a symlink

* Michael Biebl <biebl@debian.org> [Fri Jul 30, 2010 at 11:49:32AM +0200]:
> On 30.07.2010 11:31, Michael Biebl wrote:
> > On 30.07.2010 06:21, Michael Prokop wrote:

> >> Can you please give the following snapshot version a try:

> >> http://people.debian.org/~mika/initramfs-tools/initramfs-tools_0.97.3~1.gbp8d572e_all.deb

> > I've tested the following:
> > - /sbin/init being a relative symlink: works
> > - /sbin/init being an absolute symlink: works
> > - /sbin/init missing: correctly dropped to rescue shell, even if upstart
> > installed (/etc/init/)
> > - passing init=/bin/systemd on the boot command line: works
> > - passing bogus init=/sbin/foo on the boot command line: warning message that
> > requested init was not found, is displayed, but continues booting with /sbin/init.

> > So yes, it works correctly now for all cases I tested and expect.

Thanks a lot for testing.

> Looking at the code, the only issue I see, is that validate_init is *always*
> executed at least twice, even if we find a valid init at the first try.
> This means, for most cases we unnecessarily execute validate_init at
> """
> # No init on rootmount
> if ! validate_init "${init}" ; then
> """
> Not that much of an issue, just an idea for a small optimization.

Good catch. I think I've addressed this issue in branch
mika/validate_init at
http://git.debian.org/?p=kernel/initramfs-tools.git

If you think there's anything else we could improve there please let
me know.

thanks && regards,
-mika-
 
Old 07-31-2010, 09:15 PM
maximilian attems
 
Default Bug#590744: Fails to boot if /sbin/init is a symlink

On Sat, Jul 31, 2010 at 08:25:09PM +0200, Michael Prokop wrote:
>
> dracut doesn't seem to support symlinks at all AFAICS.

well this seems sane to me.

> maks: I've implemented a fastfoward path, please review
> branch mika/validate_init at
> http://git.debian.org/?p=kernel/initramfs-tools.git

will do in the next 48 hours, but haven't been told that
the ! symlink cause is the usual fastpath.
not sure this symlink complication is really worth it.



--
To UNSUBSCRIBE, email to debian-kernel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 20100731211529.GQ19138@baikonur.stro.at">http://lists.debian.org/20100731211529.GQ19138@baikonur.stro.at
 
Old 07-31-2010, 10:03 PM
Michael Biebl
 
Default Bug#590744: Fails to boot if /sbin/init is a symlink

On 31.07.2010 23:15, maximilian attems wrote:
> On Sat, Jul 31, 2010 at 08:25:09PM +0200, Michael Prokop wrote:
>>
>> dracut doesn't seem to support symlinks at all AFAICS.
>

I'm pretty sure it does. Fedora 14 just switched to systemd and they use a
symlink. I guess dracut does not really care and does not do any safety checks
as initramfs-tools currently does.

>> maks: I've implemented a fastfoward path, please review
>> branch mika/validate_init at
>> http://git.debian.org/?p=kernel/initramfs-tools.git
>
> will do in the next 48 hours, but haven't been told that
> the ! symlink cause is the usual fastpath.
> not sure this symlink complication is really worth it.

I do think, it should be possible to boot with /sbin/init being a symlink
(either absolute or relative).
I don't really care if that means, that either the safety checks are made more
sophisticated or dropped altogether.

Cheers,
Michael

--
Why is it that all of the instruments seeking intelligent life in the
universe are pointed away from Earth?
 

Thread Tools




All times are GMT. The time now is 10:40 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org