Re: [Cooker] Suggestion... no more vimlinuz@

2001-11-27 Thread Silvan Pagan

On Tuesday 27 November 2001 07:56 am, you wrote:
> > le mar 27-11-2001 à 12:48, Borsenkow Andrej a écrit :
> > > > true. I think it's impossible for a script to guess the old kernel
> > > real
> > > > filenames,

Well,  it's not so much that the script needs to guess the old kernel real 
filenames.  Mandrake's install should just configure lilo or grub initially 
to point explicitly to the images it just installed, and then there would be 
no problems of this nature in the future.  Straight out of the box, all the 
different lilo entries point to the symlinks.  Change the symlinks and re-run 
lilo (as evidently make install did) and then you have a problem.

For my own part, I now realize that you can make install a kernel...  I got 
this nasty surprise most likely because I typed "make modules install."  I 
guess that makes me sound like a moron rank newbie why are you wasting my 
time for not knowing that, but I've read every piece of kernel documentation 
I could find online, and none of them mention that you can do that.

Mandrake's own manual says: Compiling the kernel and modules, and then 
installing modules is done in a single line:

make dep bzImage modules modules_install

No mention of install THERE.  No mention of it anywhere else I've found 
either, though I must say it's a wonderful innovation that I will make use of 
in the future in a more controlled manner.  If I had known that was going to 
happen, I'd've fixed the lilo entries beforehand.

Anyway, I'm still enough of a newbie that I'm sure everyone wants me to shut 
up and go be a crybaby somewhere else, so I'll do just that...  :)
-- 
Silvan Pagan Dragon -=[UDIC]=-
rm -Rf /mnt/windows/windows





RE: [Cooker] Suggestion... no more vimlinuz@

2001-11-27 Thread Fabrice FACORAT

le mar 27-11-2001 à 13:56, Borsenkow Andrej a écrit :
> 
> > le mar 27-11-2001 à 12:48, Borsenkow Andrej a écrit :
> > > > true. I think it's impossible for a script to guess the old kernel
> > > real
> > > > filenames,
> > >
> > > readlink(vmlinuz) as long as it follows conventions. If not, break
> and
> > > create explicit name ... hey, but then it does create explicit name
> > > currently ... so, final suggestion - when installing new kernel
> check if
> > > explicit entry for current kernel exists if not create it as backup.
> > 
> > we can have several ...
> > [root@bastard root]# rpm -q kernel
> > kernel-2.4.13-6mdk
> > kernel-2.4.13-10mdk
> > kernel-2.4.13-12mdk
> > 
> 
> So where is the problem? I speak only about default link vmlinuz ->
> vmlinuz-actual-version. 
> 
> Ahh, I understand. I do not care about people installing multiple cooker
> versions. 

so see my point.

> I do care about normal people installing security updates.
> Currently they are left without backup entry in boot menu. I already
> reported it.
> 
> Cooker folks know how to correct it if evil things happen. Average users
> do not. So installkernel should (actually, must) be polite and give them
> (average users) possibility to revert to old known good if anything with
> new kernel goes wrong.

yes
 
> O.K.?

ok, but ... picture it.
I'm a lame new user.
I upgrade one time for a first kernel security upgrade. I don't touch
anything and just used to boot the new kernel entry ( I don't know where
to change this even if it's easy to find ). There's a second kernel
security update and maybe a fourth ( mt or linus are very tired ). So we
arrive in the casewhere as for cooker users he installs several kernels
...

 Yes we have to think that people can be very lame ! :(

To my mind the simplest solution is to used in the boot loader config
file SINCE the beginning ( install ) the true filenames even if the
symlinks exists in /boot. Imagine I have 3 kernel : 2.4.8-26mdk
installed at install time by DrakX, 2.4.13-6mdk and 2.4.13-12 mdk
cooker/security kernels update ).

My /boot/grub/menu.lst will look like this :

[...]
title linux
kernel (hd2,0)/vmlinuz hdc=ide-scsi quiet vga=788
initrd (hd2,0)/initrd.img

WRONG
[...]

title linux-2413-6mdk
kernel (hd2,0)/vmlinuz-2.4.13-6mdk hdc=ide-scsi root=/dev/sdb6
apm=realmode_power_off
initrd (hd2,0)/initrd-2.4.13-6mdk.img

title 2413-12
kernel (hd2,0)/vmlinuz-2.4.13-12mdk devfs=mount hdc=ide-scsi quiet
vga=788 apm=realmode_power_off root=/dev/sdb6
initrd (hd2,0)/initrd-2.4.13-12mdk.img

it should be ( I suppose I have the original install kernel names here
2.4.8-26mdk ) :

title linux
kernel (hd2,0)/vmlinuz-2.4.8-26mdk hdc=ide-scsi quiet vga=788
initrd (hd2,0)/initrd.-24.8-26mdkimg

GOOD

title linux-2413-6mdk
kernel (hd2,0)/vmlinuz-2.4.13-6mdk hdc=ide-scsi root=/dev/sdb6
apm=realmode_power_off
initrd (hd2,0)/initrd-2.4.13-6mdk.img

title 2413-12
kernel (hd2,0)/vmlinuz-2.4.13-12mdk devfs=mount hdc=ide-scsi quiet
vga=788 apm=realmode_power_off root=/dev/sdb6
initrd (hd2,0)/initrd-2.4.13-12mdk.img

and in /boot we have :

vmlinuz-2.4.8-26mdk
vmlinuz-2.4.13-6mdk
vmlinuz-2.4.13-12mdk
vmlinuz -> vmlinuz-2.4.13-12mdk

the same for initrd.
In this case there's nothing to change in %postin kernel script. Just
the %inst need to be modified to use the real name.

-- 
http://perso.wanadoo.fr/linux_wizard/index.html 
-
Je suis assis sous un chene
qui est un peu plie





RE: [Cooker] Suggestion... no more vimlinuz@

2001-11-27 Thread Borsenkow Andrej


> le mar 27-11-2001 à 12:48, Borsenkow Andrej a écrit :
> > > true. I think it's impossible for a script to guess the old kernel
> > real
> > > filenames,
> >
> > readlink(vmlinuz) as long as it follows conventions. If not, break
and
> > create explicit name ... hey, but then it does create explicit name
> > currently ... so, final suggestion - when installing new kernel
check if
> > explicit entry for current kernel exists if not create it as backup.
> 
> we can have several ...
> [root@bastard root]# rpm -q kernel
> kernel-2.4.13-6mdk
> kernel-2.4.13-10mdk
> kernel-2.4.13-12mdk
> 

So where is the problem? I speak only about default link vmlinuz ->
vmlinuz-actual-version. 

Ahh, I understand. I do not care about people installing multiple cooker
versions. I do care about normal people installing security updates.
Currently they are left without backup entry in boot menu. I already
reported it.

Cooker folks know how to correct it if evil things happen. Average users
do not. So installkernel should (actually, must) be polite and give them
(average users) possibility to revert to old known good if anything with
new kernel goes wrong.

O.K.?

-andrej




RE: [Cooker] Suggestion... no more vimlinuz@

2001-11-27 Thread Fabrice FACORAT

le mar 27-11-2001 à 12:48, Borsenkow Andrej a écrit :
> > true. I think it's impossible for a script to guess the old kernel
> real
> > filenames, 
> 
> readlink(vmlinuz) as long as it follows conventions. If not, break and
> create explicit name ... hey, but then it does create explicit name
> currently ... so, final suggestion - when installing new kernel check if
> explicit entry for current kernel exists if not create it as backup.

we can have several ...
[root@bastard root]# rpm -q kernel
kernel-2.4.13-6mdk
kernel-2.4.13-10mdk
kernel-2.4.13-12mdk

-- 
http://perso.wanadoo.fr/linux_wizard/index.html 
-
Ta mere elle pas encore compris l'histoire de Paf le Chien 





RE: [Cooker] Suggestion... no more vimlinuz@

2001-11-27 Thread Borsenkow Andrej

> true. I think it's impossible for a script to guess the old kernel
real
> filenames, 

readlink(vmlinuz) as long as it follows conventions. If not, break and
create explicit name ... hey, but then it does create explicit name
currently ... so, final suggestion - when installing new kernel check if
explicit entry for current kernel exists if not create it as backup.


-andrej




RE: [Cooker] Suggestion... no more vimlinuz@

2001-11-27 Thread Fabrice FACORAT

le mar 27-11-2001 à 08:34, Borsenkow Andrej a écrit :
> > The make copied my new bzImage, initrd and System.map to /boot and set
> up
> > an
> > entry in LILO.  That had never happened before. 
> 
> 
> That is what make install does. You have to do make modules_install
> before because make install tries to create initrd and it obviously
> needs existing modules for this. You should not do make install until
> you are sure everything has been properly installed. Still ...

always have a command line like this one make modules && make
modules_install && make install
if something failed it will stop.
 
> > The new entry in LILO was also pointing to the broken kernel.  Getting
> the
> > picture here?  When LILO added the new entry, it also referenced the
> > images
> > pointed to by the symlinks, which  make (or something) changed...
> > 
> > failsafe points to broken kernel
> > nofsbwhatever points to broken kernel
> > linux points to broken kernel
> > 248-dmm points to broken kernel
> > 
> 
> It is exactly what I have already written about (Is rpm -I kernel really
> safe?) installkernel should make backup of actual kernel instead of
> creating double entries for linux and xyz-N entries pointing to the same
> new (possibly) broken kernel.
> 
> So if you have 2.4.10-1 and install 2.4.15-2 instead of getting "linux"
> and "2415-2" entries (that is useless if 2.4.15-2 is broken) I expect
> "linux" and 2410-1 so I can boot old kernel if something went wrong.

true. I think it's impossible for a script to guess the old kernel real
filenames, So it better use the real name from the beginning.
Symlink names can be keep for ... compatibility ( I d'ont know which
one, but as it used to be ), but the boot loader may use kernel realname
or at least failsafe entry one. But even this is not enough :

[root@bastard root]# rpm -q kernel
kernel-2.4.13-6mdk
kernel-2.4.13-10mdk
kernel-2.4.13-12mdk

3 kernel and only one failsafe entry, so use real names since the
beginning is better. With this it will be possible to update kernel via
urpmi in a so easy way !

-- 
http://perso.wanadoo.fr/linux_wizard/index.html 
-
C'est souvent avec une femme idiote qu'on vit en bonne intelligence. 
Albert Willemetz (1887-1962)





RE: [Cooker] Suggestion... no more vimlinuz@

2001-11-26 Thread Borsenkow Andrej

> The make copied my new bzImage, initrd and System.map to /boot and set
up
> an
> entry in LILO.  That had never happened before. 


That is what make install does. You have to do make modules_install
before because make install tries to create initrd and it obviously
needs existing modules for this. You should not do make install until
you are sure everything has been properly installed. Still ...


 
> The new entry in LILO was also pointing to the broken kernel.  Getting
the
> picture here?  When LILO added the new entry, it also referenced the
> images
> pointed to by the symlinks, which  make (or something) changed...
> 
> failsafe points to broken kernel
> nofsbwhatever points to broken kernel
> linux points to broken kernel
> 248-dmm points to broken kernel
> 

It is exactly what I have already written about (Is rpm -I kernel really
safe?) installkernel should make backup of actual kernel instead of
creating double entries for linux and xyz-N entries pointing to the same
new (possibly) broken kernel.

So if you have 2.4.10-1 and install 2.4.15-2 instead of getting "linux"
and "2415-2" entries (that is useless if 2.4.15-2 is broken) I expect
"linux" and 2410-1 so I can boot old kernel if something went wrong.

-andrej