Installation d'un noyau Debian chez ovh.

De Le Wiki du Forum-Debian.fr
Révision datée du 19 septembre 2012 à 10:24 par Loreleil (discussion | contributions) (→‎Publier)
(diff) ← Version précédente | Voir la version actuelle (diff) | Version suivante → (diff)
Aller à la navigation Aller à la recherche

Intérêts

  • Bénéficier d'un noyau stable et éprouver.
  • Bénéficier des modules iptables, entre autre. ^¿^


Prérequis

  • Préalablement, suivre ce fil.
  • Inutile de préciser qu'à ce stade, de part vos choix, vous êtes censé savoir ce que vous faite, non ?


Choix du noyau

  • Mon choix est le suivant: 2.6.32-5-amd64


:~# aptitude search linux-image

...

p linux-image-2.6.32-5-amd64 - Linux 2.6.32 for 64-bit PCs

...


Renommer le noyau ovh

  • Avant
:~# ls /etc/grub.d/

00_header 05_debian_theme 06_OVHkernel 10_linux 20_linux_xen 30_os-prober 40_custom 41_custom README

:~#
  • Après
:~# mv /etc/grub.d/06_OVHkernel /etc/grub.d/11_OVHkernel


Installation du noyau 2.6.32-5-amd64

~# aptitude install linux-image-2.6.32-5-amd64


Mise à jour de grub

:~# grub-mkconfig

Generating grub.cfg ...
#
# DO NOT EDIT THIS FILE
#
# It is automatically generated by grub-mkconfig using templates
# from /etc/grub.d and settings from /etc/default/grub
#
### BEGIN /etc/grub.d/00_header ###

if [ -s $prefix/grubenv ]; then 
load_env
fi
set default="0"
if [ "${prev_saved_entry}" ]; then
set saved_entry="${prev_saved_entry}"
save_env saved_entry
set prev_saved_entry=
save_env prev_saved_entry
set boot_once=true
fi

function savedefault {
if [ -z "${boot_once}" ]; then
saved_entry="${chosen}"
save_env saved_entry
fi
}

function load_video {
insmod vbe
insmod vga
insmod video_bochs
insmod video_cirrus
}

insmod part_msdos
insmod ext2
set root='(hd0,msdos1)'
search --no-floppy --fs-uuid --set xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
if loadfont /usr/share/grub/unicode.pf2 ; then
set gfxmode=640x480
load_video
insmod gfxterm
fi
terminal_output gfxterm
insmod part_msdos
insmod ext2
set root='(hd0,msdos1)'
search --no-floppy --fs-uuid --set xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
set locale_dir=($root)/boot/grub/locale
set lang=fr
insmod gettext
set timeout=5
### END /etc/grub.d/00_header ###

### BEGIN /etc/grub.d/05_debian_theme ###
set menu_color_normal=cyan/blue
set menu_color_highlight=white/blue
### END /etc/grub.d/05_debian_theme ###

### BEGIN /etc/grub.d/10_linux ###
Found linux image: /boot/vmlinuz-2.6.32-5-amd64
Found initrd image: /boot/initrd.img-2.6.32-5-amd64
menuentry 'Debian GNU/Linux, avec Linux 2.6.32-5-amd64' --class debian --class gnu-linux --class gnu --class os {
insmod part_msdos
insmod ext2
set root='(hd0,msdos1)'
search --no-floppy --fs-uuid --set xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
echo 'Chargement de Linux 2.6.32-5-amd64 ...'
linux /boot/vmlinuz-2.6.32-5-amd64 root=/dev/sda1 ro quiet
echo 'Chargement du disque mémoire initial ...'
initrd /boot/initrd.img-2.6.32-5-amd64
}
menuentry 'Debian GNU/Linux, avec Linux 2.6.32-5-amd64 (mode de dépannage)' --class debian --class gnu-linux --class gnu --class
os {
insmod part_msdos
insmod ext2
set root='(hd0,msdos1)'
search --no-floppy --fs-uuid --set xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
echo 'Chargement de Linux 2.6.32-5-amd64 ...'
linux /boot/vmlinuz-2.6.32-5-amd64 root=/dev/sda1 ro single
echo 'Chargement du disque mémoire initial ...'
initrd /boot/initrd.img-2.6.32-5-amd64
}
### END /etc/grub.d/10_linux ###

### BEGIN /etc/grub.d/11_OVHkernel ###
Warning: update-grub_lib is deprecated, use grub-mkconfig_lib instead
Found linux image: /boot/bzImage-3.2.13-xxxx-grs-ipv6-64
menuentry "Debian GNU/Linux, OVH kernel 3.2.13-xxxx-grs-ipv6-64" {
insmod part_msdos
insmod ext2
set root='(hd0,msdos1)'
search --no-floppy --fs-uuid --set xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
linux /boot/bzImage-3.2.13-xxxx-grs-ipv6-64 root=/dev/sda1 ro quiet
}
### END /etc/grub.d/11_OVHkernel ###

### BEGIN /etc/grub.d/20_linux_xen ###
### END /etc/grub.d/20_linux_xen ###

### BEGIN /etc/grub.d/30_os-prober ###
No volume groups found
### END /etc/grub.d/30_os-prober ###

### BEGIN /etc/grub.d/40_custom ###
# This file provides an easy way to add custom menu entries. Simply type the
# menu entries you want to add after this comment. Be careful not to change
# the 'exec tail' line above.
### END /etc/grub.d/40_custom ###

### BEGIN /etc/grub.d/41_custom ###
if [ -f $prefix/custom.cfg ]; then
source $prefix/custom.cfg;
fi
### END /etc/grub.d/41_custom ###
done
:~#


:~# update-grub2
Generating grub.cfg ...
Found linux image: /boot/vmlinuz-2.6.32-5-amd64
Found initrd image: /boot/initrd.img-2.6.32-5-amd64
Warning: update-grub_lib is deprecated, use grub-mkconfig_lib instead
Found linux image: /boot/bzImage-3.2.13-xxxx-grs-ipv6-64
No volume groups found
done
 :~#

Vérifications

:~# grep menuentry /boot/grub/grub.cfg
menuentry 'Debian GNU/Linux, avec Linux 2.6.32-5-amd64' --class debian --class gnu-linux --class gnu --class os {
menuentry 'Debian GNU/Linux, avec Linux 2.6.32-5-amd64 (mode de dépannage)' --class debian --class gnu-linux --class gnu --class os {
menuentry "Debian GNU/Linux, OVH kernel 3.2.13-xxxx-grs-ipv6-64" {
:~#
:~# dd if=/dev/sda bs=512 count=1 | strings
1+0 enregistrements lus
1+0 enregistrements écrits
512 octets (512 B) copiés, 0,000340238 s, 1,5 MB/s
ZRr=
`|f
\|f1
GRUB
Geom
Hard Disk
Rea
Error
:~#
:~# aptitude search 2.6.32-5-amd64
...
i linux-image-2.6.32-5-amd64 - Linux 2.6.32 for 64-bit PCs
...
:~#


Terminé! Rebooter le serveur

:~# /sbin/reboot


  • Ce qui donne après redémarrage:
:~# uname -r
2.6.32-5-amd64
:~#
:~# uname -a
Linux yunohost 2.6.32-5-amd64 #1 SMP Sun May 6 04:00:17 UTC 2012 x86_64 GNU/Linux
:~#
:~# lsmod
Module Size Used by
xt_multiport 2267 11
ip6table_filter 2384 1
ip6_tables 15107 1 ip6table_filter
xt_recent 5977 2
ipt_REJECT 1953 1
xt_tcpudp 2319 32
ipt_LOG 4518 4
xt_limit 1782 8
nf_conntrack_ipv4 9833 5
nf_defrag_ipv4 1139 1 nf_conntrack_ipv4
xt_state 1303 5
nf_conntrack 46535 2 nf_conntrack_ipv4,xt_state
iptable_filter 2258 1
ip_tables 13915 1 iptable_filter
x_tables 12845 9 xt_multiport,ip6_tables,xt_recent,ipt_REJECT,xt_tcpudp,ipt_LOG,xt_limit,xt_state,ip_tables
loop 11799 0
snd_pcm 60487 0
psmouse 49985 0
snd_timer 15598 1 snd_pcm
snd 46526 2 snd_pcm,snd_timer
soundcore 4598 1 snd
snd_page_alloc 6249 1 snd_pcm
video 17445 0
i2c_i801 7830 0
parport_pc 18855 0
i2c_core 15819 1 i2c_i801
serio_raw 3752 0
pcspkr 1699 0
evdev 7352 3
output 1692 1 video
parport 27954 1 parport_pc
button 4650 0
processor 29935 0
ext4 288382 2
mbcache 5050 1 ext4
jbd2 67111 1 ext4
crc16 1319 1 ext4
dm_mod 53946 0
raid10 17809 0
raid456 44516 0
async_raid6_recov 5170 1 raid456
async_pq 3479 2 raid456,async_raid6_recov
raid6_pq 77179 2 async_raid6_recov,async_pq
async_xor 2478 3 raid456,async_raid6_recov,async_pq
xor 4380 1 async_xor
async_memcpy 1198 2 raid456,async_raid6_recov
async_tx 1734 5 raid456,async_raid6_recov,async_pq,async_xor,async_memcpy
raid1 18431 0
raid0 5517 0
multipath 6059 0
linear 3455 0
md_mod 73920 6 raid10,raid456,raid1,raid0,multipath,linear
btrfs 375821 0
zlib_deflate 17746 1 btrfs
crc32c 2560 1
libcrc32c 1074 1 btrfs
sd_mod 29937 4
crc_t10dif 1276 1 sd_mod
uhci_hcd 18521 0
ahci 32870 3
thermal 11674 0
ehci_hcd 32097 0
libata 133776 1 ahci
e1000e 124836 0
scsi_mod 126725 2 sd_mod,libata
usbcore 123122 3 uhci_hcd,ehci_hcd
nls_base 6377 1 usbcore
thermal_sys 11942 3 video,processor,thermal
:~#


Moment privilégié, moment partagé ... . ^¿^ .


Loreleil


Debianneux-Autodidacte . ^¿^ . sur les chemins de la connaissance et du libre ... (talk) 10:49, 19 September 2012 (CEST)