View previous topic :: View next topic |
Author |
Message |
gixer n00b
Joined: 22 Nov 2003 Posts: 28 Location: Cypress, CA, USA
|
Posted: Sun Feb 17, 2008 1:51 pm Post subject: Found this bug in Genkernel, might help you... |
|
|
Today I used Genkernel 3.4.10_pre2 to regen a kernel for me (yes I am lazy ). Upon rebooting I got this:
/etc/initrd.scripts: 936: Syntax Error: Bad Substitution
Kernel Panic - not syncing: Attemtped to kill init!
and that was it, system froze.
After some investigation, this is what I did to fix it.
nano -w /usr/share/genkernel/generic/initrd.scripts
goto the very last lines:
find_looptype() {
LOOPTYPE="${LOOP##*.}"
[ "${LOOPTYPE}" == "loop" ] && LOOPTYPE="normal"
[ "${LOOP}" == "/zisofs" ] && LOOPTYPE="${LOOP:1}"
[ -z "${LOOPTYPE}" ] && LOOPTYPE="noloop"
}
the line it's complaining about is:
[ "${LOOP}" == "/zisofs" ] && LOOPTYPE="${LOOP:1}"
take out the ":1" so it looks like so:
[ "${LOOP}" == "/zisofs" ] && LOOPTYPE="${LOOP}"
I'm assuming because the init uses ash instead of bash, ash handles substitutions differently, I ran this script in bash with the -n flag (keeps it from actually running the script and simply syntax checks it) and got no complaints. I don't do shell programming, maybe someone else can comment on why, or even better what the correct solution should be. All I know is this resolved it for me, and I've had no ill side-effects.
Now re-run genkernel, and poof, no more error, it boots correctly. I hope this saves someone else a few hours of research or even worse keeps them from not being able to use their machine. Thank goodness I keep several revisions of kernel on my /boot partition, and was able to simply revert, figure out the problem, and now I'm running the newest kernel.
Hope this helps someone.
-Allan _________________ If you had to rebuild your car's engine on the freeway, every week, would that be ok? Then why would you use windowz? |
|
Back to top |
|
|
nixnut Bodhisattva
Joined: 09 Apr 2004 Posts: 10974 Location: the dutch mountains
|
|
Back to top |
|
|
V-Li Retired Dev
Joined: 03 Jan 2006 Posts: 613
|
Posted: Sun Feb 17, 2008 3:41 pm Post subject: |
|
|
Did you report it to genkernel maintainers? |
|
Back to top |
|
|
gixer n00b
Joined: 22 Nov 2003 Posts: 28 Location: Cypress, CA, USA
|
Posted: Sun Feb 17, 2008 6:40 pm Post subject: |
|
|
V-Li wrote: | Did you report it to genkernel maintainers? |
I looked for about 30 min for ANY contact info, or a place, or an email, and couldn't find one, so unfortunately no, I didn't, that's why I posted the solution here. I looked in the wiki as well, but nothing.
I guess the proper place to report/search for this was the bugs.gentoo.org site. I have really never used that site (unless someone linked to it from here, now that I think about it) in the almost 4 years I have been using Gentoo Thanks to nixnut, I will be searching that site in the future as well as here.
-Allan _________________ If you had to rebuild your car's engine on the freeway, every week, would that be ok? Then why would you use windowz?
Last edited by gixer on Sun Feb 17, 2008 6:50 pm; edited 1 time in total |
|
Back to top |
|
|
gixer n00b
Joined: 22 Nov 2003 Posts: 28 Location: Cypress, CA, USA
|
Posted: Sun Feb 17, 2008 6:44 pm Post subject: |
|
|
wow! what's funny is I looked here first, and didn't find anything, I guess I'm gonna have to start searching that site too Thank you for the link/info. According to this patch, THIS is the correct line:
[ "${LOOP}" == "/zisofs" ] && LOOPTYPE="${LOOP#/}
they replaced the :1 with #/
-Allan _________________ If you had to rebuild your car's engine on the freeway, every week, would that be ok? Then why would you use windowz? |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|