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 > Ubuntu > Ubuntu User

 
 
LinkBack Thread Tools
 
Old 07-05-2010, 01:45 PM
"Robert P. J. Day"
 
Default building and installing a new kernel makes my system unbootable

some strange things happening here -- for the first time, after i
configured and built a new kernel, i ran "make deb-pkg" to turn it
into a .deb package file, then used "dpkg" to install that, after
which i still apparently had to run the appropriate incantations of
"update-initramfs" and "update-grub", then i rebooted.

the boot process is clearly trying to boot the new kernel
(2.6.35-rc4+), only to fail with an error trying to mount the root
filesystem. no problem, thinks i, i'll just reboot, drop into GRUB
and select the earlier, working kernel ... except that nothing i do
will get me to GRUB -- not SHIFT, ESC or TAB. when i installed my ner
kernels manually, SHIFT always worked, but now, i have no idea what's
changed.

i suspect i'll boot off of the CD and poke around, but i'm open to
suggestions -- why would this have happened? and is there
*something* that will get me to GRUB?

rday

--

================================================== ======================
Robert P. J. Day Waterloo, Ontario, CANADA

Top-notch, inexpensive online Linux/OSS/kernel courses
http://crashcourse.ca

Twitter: http://twitter.com/rpjday
LinkedIn: http://ca.linkedin.com/in/rpjday
================================================== ======================

--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
 
Old 07-05-2010, 03:45 PM
Chan Chung Hang Christopher
 
Default building and installing a new kernel makes my system unbootable

Robert P. J. Day wrote:
> some strange things happening here -- for the first time, after i
> configured and built a new kernel, i ran "make deb-pkg" to turn it
> into a .deb package file, then used "dpkg" to install that, after
> which i still apparently had to run the appropriate incantations of
> "update-initramfs" and "update-grub", then i rebooted.
>
> the boot process is clearly trying to boot the new kernel
> (2.6.35-rc4+), only to fail with an error trying to mount the root
> filesystem. no problem, thinks i, i'll just reboot, drop into GRUB
> and select the earlier, working kernel ... except that nothing i do
> will get me to GRUB -- not SHIFT, ESC or TAB. when i installed my ner
> kernels manually, SHIFT always worked, but now, i have no idea what's
> changed.

sounds like stage1 not being able to load stage2


>
> i suspect i'll boot off of the CD and poke around, but i'm open to
> suggestions -- why would this have happened? and is there
> *something* that will get me to GRUB?

reinstall grub.


--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
 
Old 07-05-2010, 06:01 PM
"Robert P. J. Day"
 
Default building and installing a new kernel makes my system unbootable

On Mon, 5 Jul 2010, Chan Chung Hang Christopher wrote:

> Robert P. J. Day wrote:
> > some strange things happening here -- for the first time, after i
> > configured and built a new kernel, i ran "make deb-pkg" to turn it
> > into a .deb package file, then used "dpkg" to install that, after
> > which i still apparently had to run the appropriate incantations of
> > "update-initramfs" and "update-grub", then i rebooted.
> >
> > the boot process is clearly trying to boot the new kernel
> > (2.6.35-rc4+), only to fail with an error trying to mount the root
> > filesystem. no problem, thinks i, i'll just reboot, drop into GRUB
> > and select the earlier, working kernel ... except that nothing i do
> > will get me to GRUB -- not SHIFT, ESC or TAB. when i installed my ner
> > kernels manually, SHIFT always worked, but now, i have no idea what's
> > changed.
>
> sounds like stage1 not being able to load stage2
>
>
> >
> > i suspect i'll boot off of the CD and poke around, but i'm open to
> > suggestions -- why would this have happened? and is there
> > *something* that will get me to GRUB?
>
> reinstall grub.

just to describe what i'm doing, i have the current git pull of the
kernel source tree (apparently, 2.6.35-rc4), and i've followed exactly
the same instructions i documented here:

http://crashcourse.ca/introduction-linux-kernel-programming/lesson-1-building-and-running-new-linux-kernel

that i've used just fine for a while -- do a build and:

$ sudo make modules_install
$ sudo make install
$ sudo update-initramfs -c -k 2.6.35-crash+
$ sudo update-grub

that's worked fine until now, but with this kernel tree, if i do the
above and reboot, i not only can't stop in GRUB, but the boot fails as
the kernel panics, claiming it can't mount a root file system.

i recovered by booting off the CD into rescue mode, mounting
/dev/sda1 (/boot), then literally editing grub/grub.cfg and deleting
the entries for that new kernel. nothing else would allow me to boot.

i have no idea why this is happening -- this recipe has worked fine
until now.

rday

--

================================================== ======================
Robert P. J. Day Waterloo, Ontario, CANADA

Top-notch, inexpensive online Linux/OSS/kernel courses
http://crashcourse.ca

Twitter: http://twitter.com/rpjday
LinkedIn: http://ca.linkedin.com/in/rpjday
================================================== ======================

--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
 
Old 07-06-2010, 08:49 AM
"Robert P. J. Day"
 
Default building and installing a new kernel makes my system unbootable

On Mon, 5 Jul 2010, Chan Chung Hang Christopher wrote:

> Robert P. J. Day wrote:
> > some strange things happening here -- for the first time, after
> > i configured and built a new kernel, i ran "make deb-pkg" to turn
> > it into a .deb package file, then used "dpkg" to install that,
> > after which i still apparently had to run the appropriate
> > incantations of "update-initramfs" and "update-grub", then i
> > rebooted.
> >
> > the boot process is clearly trying to boot the new kernel
> > (2.6.35-rc4+), only to fail with an error trying to mount the root
> > filesystem. no problem, thinks i, i'll just reboot, drop into
> > GRUB and select the earlier, working kernel ... except that
> > nothing i do will get me to GRUB -- not SHIFT, ESC or TAB. when i
> > installed my ner kernels manually, SHIFT always worked, but now, i
> > have no idea what's changed.
>
> sounds like stage1 not being able to load stage2

> > i suspect i'll boot off of the CD and poke around, but i'm open
> > to suggestions -- why would this have happened? and is there
> > *something* that will get me to GRUB?
>
> reinstall grub.

i'm not sure why that would solve the problem since i can certainly
boot any of my *older* kernels, suggesting that GRUB itself is fine.
it's just building a new kernel from the canonical kernel source tree
that gives me an unbootable system -- to the point where i can't even
stop in GRUB during the boot process to select an earlier, working
kernel.

to recap, here's the recipe that seems to have worked fine for me so
far:

* "git pull" the canonical source tree (currently at 2.6.35-rc4)
* copy good config starting point from /boot

$ yes ' | make oldconfig [to bring .config up to date]
$ make
$ sudo make modules_install
$ sudo make install
$ sudo update-initramfs -c -k 2.6.35-rc4+
$ sudo update-grub

i can visually verify that all of the above seems to install the right
things in the right places and, until now, it seems to have worked
fine. so why the sudden failure?

the end result of the above is a kernel panic trying to mount the
root FS, so maybe GRUB really is borked somehow and, as i wrote
earlier, the only way i can recover is to boot to rescue mode and
manually remove those entries from /boot/grub/grub.cfg.

is any part of my recipe above suspect? it's just odd that it seems
to have worked so well until now. is there some kind of validation
command i can run before rebooting that will perform some kind of
sanity check on the current GRUB setup?

rday

--

================================================== ======================
Robert P. J. Day Waterloo, Ontario, CANADA

Top-notch, inexpensive online Linux/OSS/kernel courses
http://crashcourse.ca

Twitter: http://twitter.com/rpjday
LinkedIn: http://ca.linkedin.com/in/rpjday
================================================== ======================

--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
 
Old 07-06-2010, 09:01 AM
Colin Law
 
Default building and installing a new kernel makes my system unbootable

On 6 July 2010 09:49, Robert P. J. Day <rpjday@crashcourse.ca> wrote:
> On Mon, 5 Jul 2010, Chan Chung Hang Christopher wrote:
>
>> Robert P. J. Day wrote:
>> > * some strange things happening here -- for the first time, after
>> > i configured and built a new kernel, i ran "make deb-pkg" to turn
>> > it into a .deb package file, then used "dpkg" to install that,
>> > after which i still apparently had to run the appropriate
>> > incantations of "update-initramfs" and "update-grub", then i
>> > rebooted.
>> >
>> > * the boot process is clearly trying to boot the new kernel
>> > (2.6.35-rc4+), only to fail with an error trying to mount the root
>> > filesystem. *no problem, thinks i, i'll just reboot, drop into
>> > GRUB and select the earlier, working kernel ... except that
>> > nothing i do will get me to GRUB -- not SHIFT, ESC or TAB. *when i
>> > installed my ner kernels manually, SHIFT always worked, but now, i
>> > have no idea what's changed.
>>
>> sounds like stage1 not being able to load stage2
>
>> > * i suspect i'll boot off of the CD and poke around, but i'm open
>> > to suggestions -- why would this have happened? *and is there
>> > *something* that will get me to GRUB?
>>
>> reinstall grub.
>
> *i'm not sure why that would solve the problem since i can certainly
> boot any of my *older* kernels, suggesting that GRUB itself is fine.
> it's just building a new kernel from the canonical kernel source tree
> that gives me an unbootable system -- to the point where i can't even
> stop in GRUB during the boot process to select an earlier, working
> kernel.

That does not make sense to me, you say you can boot the older
kernels, but also say that you cannot stop in grub to in order to boot
into the older kernel. If you cannot get into grub, even before it
tries to load the kernel, then does that not mean that it is a grub
issue?

Colin

>
> *to recap, here's the recipe that seems to have worked fine for me so
> far:
>
> ** "git pull" the canonical source tree (currently at 2.6.35-rc4)
> ** copy good config starting point from /boot
>
> *$ yes ' | make oldconfig * *[to bring .config up to date]
> *$ make
> *$ sudo make modules_install
> *$ sudo make install
> *$ sudo update-initramfs -c -k 2.6.35-rc4+
> *$ sudo update-grub
>
> i can visually verify that all of the above seems to install the right
> things in the right places and, until now, it seems to have worked
> fine. *so why the sudden failure?
>
> *the end result of the above is a kernel panic trying to mount the
> root FS, so maybe GRUB really is borked somehow and, as i wrote
> earlier, the only way i can recover is to boot to rescue mode and
> manually remove those entries from /boot/grub/grub.cfg.
>
> *is any part of my recipe above suspect? *it's just odd that it seems
> to have worked so well until now. *is there some kind of validation
> command i can run before rebooting that will perform some kind of
> sanity check on the current GRUB setup?
>
> rday
>
> --
>
> ================================================== ======================
> Robert P. J. Day * * * * * * * * * * * * * * * Waterloo, Ontario, CANADA
>
> * * * *Top-notch, inexpensive online Linux/OSS/kernel courses
> * * * * * * * * * * * *http://crashcourse.ca
>
> Twitter: * * * * * * * * * * * * * * * * * * * http://twitter.com/rpjday
> LinkedIn: * * * * * * * * * * * * * * * http://ca.linkedin.com/in/rpjday
> ================================================== ======================
>
> --
> ubuntu-users mailing list
> ubuntu-users@lists.ubuntu.com
> Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
>

--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
 
Old 07-06-2010, 09:06 AM
"Robert P. J. Day"
 
Default building and installing a new kernel makes my system unbootable

On Tue, 6 Jul 2010, Colin Law wrote:

> On 6 July 2010 09:49, Robert P. J. Day <rpjday@crashcourse.ca> wrote:
> > On Mon, 5 Jul 2010, Chan Chung Hang Christopher wrote:
> >
> >> Robert P. J. Day wrote:
> >> > * some strange things happening here -- for the first time, after
> >> > i configured and built a new kernel, i ran "make deb-pkg" to turn
> >> > it into a .deb package file, then used "dpkg" to install that,
> >> > after which i still apparently had to run the appropriate
> >> > incantations of "update-initramfs" and "update-grub", then i
> >> > rebooted.
> >> >
> >> > * the boot process is clearly trying to boot the new kernel
> >> > (2.6.35-rc4+), only to fail with an error trying to mount the root
> >> > filesystem. *no problem, thinks i, i'll just reboot, drop into
> >> > GRUB and select the earlier, working kernel ... except that
> >> > nothing i do will get me to GRUB -- not SHIFT, ESC or TAB. *when i
> >> > installed my ner kernels manually, SHIFT always worked, but now, i
> >> > have no idea what's changed.
> >>
> >> sounds like stage1 not being able to load stage2
> >
> >> > * i suspect i'll boot off of the CD and poke around, but i'm open
> >> > to suggestions -- why would this have happened? *and is there
> >> > *something* that will get me to GRUB?
> >>
> >> reinstall grub.
> >
> > *i'm not sure why that would solve the problem since i can
> > certainly boot any of my *older* kernels, suggesting that GRUB
> > itself is fine. it's just building a new kernel from the canonical
> > kernel source tree that gives me an unbootable system -- to the
> > point where i can't even stop in GRUB during the boot process to
> > select an earlier, working kernel.
>
> That does not make sense to me, you say you can boot the older
> kernels, but also say that you cannot stop in grub to in order to
> boot into the older kernel. If you cannot get into grub, even
> before it tries to load the kernel, then does that not mean that it
> is a grub issue?
>
> Colin

it makes no sense to me, either, but i think you may have
misunderstood. when i have nothing but older (and ubuntu-packaged
kernels), pressing SHIFT early lets me into GRUB where i can pick the
kernel i want to run.

when i install this new kernel, SHIFT no longer appears to work so i
can't even select an older, working kernel, the new kernel boots, and
fails. if i manually edit /boot/grub/grub.cfg to remove the
references to the new kernel, i'm back to having a working system.

i'm confused since GRUB shouldn't operate this way, of course.

rday

--

================================================== ======================
Robert P. J. Day Waterloo, Ontario, CANADA

Top-notch, inexpensive online Linux/OSS/kernel courses
http://crashcourse.ca

Twitter: http://twitter.com/rpjday
LinkedIn: http://ca.linkedin.com/in/rpjday
================================================== ======================--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
 
Old 07-06-2010, 10:47 AM
Markus Schönhaber
 
Default building and installing a new kernel makes my system unbootable

05.07.2010 20:01, Robert P. J. Day:

> $ sudo make modules_install
> $ sudo make install
> $ sudo update-initramfs -c -k 2.6.35-crash+
> $ sudo update-grub
>
> that's worked fine until now, but with this kernel tree, if i do the
> above and reboot, i not only can't stop in GRUB, but the boot fails as
> the kernel panics, claiming it can't mount a root file system.
>
> i recovered by booting off the CD into rescue mode, mounting
> /dev/sda1 (/boot), then literally editing grub/grub.cfg and deleting
> the entries for that new kernel. nothing else would allow me to boot.

If GRUB doesn't work with the entries for your self-built kernel but
does without them, it seems that exactly these entries makes GRUB choke.
WAG: Does it get better if you rename your kernel and initrd files to
something that doesn't end with a '+' character?

--
Regards
mks

--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
 
Old 07-06-2010, 10:58 AM
"Robert P. J. Day"
 
Default building and installing a new kernel makes my system unbootable

On Tue, 6 Jul 2010, Markus Schönhaber wrote:

> 05.07.2010 20:01, Robert P. J. Day:
>
> > $ sudo make modules_install
> > $ sudo make install
> > $ sudo update-initramfs -c -k 2.6.35-crash+
> > $ sudo update-grub
> >
> > that's worked fine until now, but with this kernel tree, if i do the
> > above and reboot, i not only can't stop in GRUB, but the boot fails as
> > the kernel panics, claiming it can't mount a root file system.
> >
> > i recovered by booting off the CD into rescue mode, mounting
> > /dev/sda1 (/boot), then literally editing grub/grub.cfg and deleting
> > the entries for that new kernel. nothing else would allow me to boot.
>
> If GRUB doesn't work with the entries for your self-built kernel but
> does without them, it seems that exactly these entries makes GRUB choke.
> WAG: Does it get better if you rename your kernel and initrd files to
> something that doesn't end with a '+' character?

i'm testing that right now, but an earlier example worked just fine
and, in fact, the stock kernel build process explicitly appends a "+"
in certain cases.

anyway, i just built a 2.6.35-rc4 kernel, about to install, create
initramfs, update grub and reboot. stay tuned ...

rday


--

================================================== ======================
Robert P. J. Day Waterloo, Ontario, CANADA

Top-notch, inexpensive online Linux/OSS/kernel courses
http://crashcourse.ca

Twitter: http://twitter.com/rpjday
LinkedIn: http://ca.linkedin.com/in/rpjday
================================================== ======================--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
 
Old 07-06-2010, 11:18 AM
"Robert P. J. Day"
 
Default building and installing a new kernel makes my system unbootable

On Tue, 6 Jul 2010, Markus Schönhaber wrote:

> 05.07.2010 20:01, Robert P. J. Day:
>
> > $ sudo make modules_install
> > $ sudo make install
> > $ sudo update-initramfs -c -k 2.6.35-crash+
> > $ sudo update-grub
> >
> > that's worked fine until now, but with this kernel tree, if i do the
> > above and reboot, i not only can't stop in GRUB, but the boot fails as
> > the kernel panics, claiming it can't mount a root file system.
> >
> > i recovered by booting off the CD into rescue mode, mounting
> > /dev/sda1 (/boot), then literally editing grub/grub.cfg and deleting
> > the entries for that new kernel. nothing else would allow me to boot.
>
> If GRUB doesn't work with the entries for your self-built kernel but
> does without them, it seems that exactly these entries makes GRUB
> choke. WAG: Does it get better if you rename your kernel and initrd
> files to something that doesn't end with a '+' character?

ok, for reasons i can't explain, SHIFT is now back to giving me a
GRUB menu so i can boot my new kernel, watch it explode, and reboot to
a working kernel (as i just did), and now i have some clues.

booting the regular new kernel gave me:

Kernel panic - not syncing: VFS: Unable to mount root fs on
unknown-block(0,0)

hmmm ... so boot new kernel in recovery mode and see:

md: ... autorun DONE
VFS: cannot open root device "mapper/lynx-root" on unknown-block(0,0)

ah, so the kernel can't use LVM to mount the root filesystem in that
logical volume. on the older kernel (and the one i'm running under
right now), that mount works just fine:

$ mount
/dev/mapper/lynx-root on / type ext4 (rw,errors=remount-ro)
... snip ...

so the kernel can't mount the root filesystem? why not? normally,
i'd assume it's because i don't have either LVM or ext4 support. hmmm
... i wonder if support for that is in my initrd ...

rday

--

================================================== ======================
Robert P. J. Day Waterloo, Ontario, CANADA

Top-notch, inexpensive online Linux/OSS/kernel courses
http://crashcourse.ca

Twitter: http://twitter.com/rpjday
LinkedIn: http://ca.linkedin.com/in/rpjday
================================================== ======================--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
 
Old 07-06-2010, 01:52 PM
"Robert P. J. Day"
 
Default building and installing a new kernel makes my system unbootable

On Tue, 6 Jul 2010, Markus Schönhaber wrote:

> 05.07.2010 20:01, Robert P. J. Day:
>
> > $ sudo make modules_install
> > $ sudo make install
> > $ sudo update-initramfs -c -k 2.6.35-crash+
> > $ sudo update-grub
> >
> > that's worked fine until now, but with this kernel tree, if i do the
> > above and reboot, i not only can't stop in GRUB, but the boot fails as
> > the kernel panics, claiming it can't mount a root file system.
> >
> > i recovered by booting off the CD into rescue mode, mounting
> > /dev/sda1 (/boot), then literally editing grub/grub.cfg and deleting
> > the entries for that new kernel. nothing else would allow me to boot.
>
> If GRUB doesn't work with the entries for your self-built kernel but
> does without them, it seems that exactly these entries makes GRUB
> choke. WAG: Does it get better if you rename your kernel and initrd
> files to something that doesn't end with a '+' character?

it's clearly an LVM thing of some kind.

it finally dawned on me that all of those earlier kernels i was
building and running without incident were on my earlier laptop, on
which i had installed ubuntu 10.04 with a single, honking big root
filesystem, as in:

/dev/sda1 on / type ext4 (rw,errors=remount-ro)

and grub never had a problem booting my new kernel. in fact, this is
that old system right now:

$ uname -a
Linux lynx 2.6.35-kwlug+ #1 SMP Mon Jun 7 13:13:50 EDT 2010 x86_64 GNU/Linux
$

on my *new* system, though, well, i decided to get clever during the
installation:

$mount
/dev/mapper/lynx-root on / type ext4 (rw,errors=remount-ro)
... snip ...
/dev/sda1 on /boot type ext2 (rw)
... snip ...

and, unsurprisingly, the boot-time failure states that the kernel
can't open root device "mapper/lynx-root" so this tells me that,
somehow, i haven't built device mapper support into my initrd or
something like that.

does this look familiar to anyone? what probably trivial step have
i forgotten to do? thanks.

rday

--

================================================== ======================
Robert P. J. Day Waterloo, Ontario, CANADA

Top-notch, inexpensive online Linux/OSS/kernel courses
http://crashcourse.ca

Twitter: http://twitter.com/rpjday
LinkedIn: http://ca.linkedin.com/in/rpjday
================================================== ======================--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
 

Thread Tools




All times are GMT. The time now is 08:02 AM.

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