Subject: [alpine-devel] kernels and booting

From: Natanael Copa <[email-masked]>
Date: Wed, 3 Aug 2011 15:53:09 +0200

Hi,

So now again the update-extlinux called from syslinux trigger script
has caused my box unbootable. Now I want fix this. The question is how?

The problems we want solve is:

* If you upgrade your kernel you should have a fallback alternative in
case new kernel is broken some how.

* Should be possible to pick from a menu.

* If you upgrade the extlinux.conf should pick the newest kernel by
  default.

Previously I have done, install 2 kernels, grsec and vserver. if grsec
kernel break i can always boot up the server one.

I had a onetime generated extlinux.conf. If i added a kernel I needed
to manually modify extlinux.conf.

The extlinux.conf used vmlinuz-grsec and initramfs-grsec which was
symlinks to latest kernel.

The problem here was that when installing a new kernel there was some
manual work to get it working. So update-extlinux showed up. It parses
the /boot and overwrites extlinux.conf, without taking any backup of
the current.

So if you multiboot, good bye to your custom ubuntu or fedora or windows
boot entry.

Now my laptop is also unbootable so I have disabled the syslinux trigger til 1) we
have figured out how it should be solved, 2) implemtened the solution
with all the factors in consideration (like multi OS booting), 3) have
tested it that it works in most cases.

Any ideas how this should ideally work? How do we provide backup kernel
if kernel upgrade break you box? How do we generate the boot menu and
keep it updated with newer kernels?

-nc

---
Unsubscribe:  [email-masked]
Help:         [email-masked]
---

---

From: Natanael Copa <[email-masked]>
Date: Wed, 3 Aug 2011 16:03:52 +0200

On Wed, 3 Aug 2011 15:53:09 +0200
Natanael Copa <[email-masked]> wrote:

> 
> Now my laptop is also unbootable so I have disabled the syslinux
> trigger 

I just realized that this will break all current boxes too... because
all current extlinux.conf has the full path instead of the
vmlinuz-grsec symlink.

And I am short on time for fixing it. ARGH!

Please! How do we get out of this mess? We need something that works
*NOW* - before people upgrades to the kernel I just pushed...

-nc

---

---

From: Kiyoshi Aman <[email-masked]>
Date: Wed, 3 Aug 2011 10:44:16 -0400

Write a Perl script which reads the original config, updates the
relevant lines, and spits out the new config while leaving the old one
as a backup, perhaps.

---

---

From: Natanael Copa <[email-masked]>
Date: Wed, 3 Aug 2011 19:11:31 +0200

On Wed, 3 Aug 2011 10:44:16 -0400

> relevant lines, and spits out the new config while leaving the old one

Yes that approx what I'll do, except for the perl part.

I'll create an upgrade script that will check if current extlinux.conf
is generated, and if not, it will try parse the important stuff like
modules=... and pax_nouderef and modify /etc/update-extlinux.conf with
this info.

And update-extlinux will keep a backup of previous generation. 

Thanks!

> > I just realized that this will break all current boxes too...
> > because all current extlinux.conf has the full path instead of the
> > vmlinuz-grsec symlink.
> >

---

---

From: Natanael Copa <[email-masked]>
Date: Wed, 3 Aug 2011 17:15:02 +0200

On Wed, 3 Aug 2011 16:03:52 +0200

> *NOW* - before people upgrades to the kernel I just pushed...

Sorry if i sounded harsh. Just got a bit strerssed up.

I think the proper way is to fix update-extlinux, which after
reading the sources, is indeed a very nice tool.

I think we also want some upgrade scripts and try to import the
alpine-2.2 generated + manual stuff. I think we could try parse the
current extlinux.conf and fish out the interesting parts
to  /etc/update-extlinux.d/ where we put the rest of the local
customizations.

And i think we should rename /etc/extlinux.conf
to /etc/update-extlinux.conf

I think I will have a little time to look at it tonight.

-nc

---