Installé le noyau Debian sur ovh. C'est compliqué ... ?

Salut,

Cf. j’ai chrooter mon dédié.

Y connaissant que dalle sur ces histoires de compile :blush: , je me base sur la doc du wiki.

Une grande aventure pour moi … :wink:

Compiler et patcher son noyau

Les modules

root@ksxxx:~# uname -r 2.6.38.2-grsec-xxxx-grs-ipv6-64 root@ksxxx:~# uname -a Linux ksxxx.kimsufi.com 2.6.38.2-grsec-xxxx-grs-ipv6-64 #2 SMP Thu Aug 25 16:40:22 UTC 2011 x86_64 GNU/Linux root@ksxxx:~# lsmod Opening /proc/modules: No such file or directory root@ksxxx:~#

Auriez vous des conseils ? suggestions ? recommandations ? à faire ? à ne surtout pas faire ?

Salut,

Oui, ne pas s’emmerder et installer un noyau Debian. Tu bénéficie des MAJ de sécurité, c’est stable et éprouvé.
C’est ce que j’ai fait, ça roule.

[quote=“lol”]Salut,

Oui, ne pas s’emmerder et installer un noyau Debian. Tu bénéficie des MAJ de sécurité, c’est stable et éprouvé.
C’est ce que j’ai fait, ça roule.[/quote]

J’ai dû mal formulé “recompilé”, en fait tu as raison lol, c’est bien le noyau Debian que je souhaite installer … :wink:

Je corrige le titre … Merci lol :wink:

Par contre les infos (uname et lsmod) donner plus haut proviennent directement du dédié.

En local je ne les obtiens pas, malgré le chroot … :think:

root@machine1:/# root@machine1:/# uname -a Linux machine1 2.6.32-5-amd64 #1 SMP Mon Jan 16 16:22:28 UTC 2012 x86_64 GNU/Linux root@machine1:/# root@machine1:/# uname -r 2.6.32-5-amd64 root@machine1:/#

root@machine1:/# cd boot root@machine1:/boot# ll total 7624 drwxr-xr-x 3 root root 4096 18 nov. 13:18 . drwxr-xr-x 24 root root 4096 10 mars 12:36 .. -rw-r--r-- 1 root root 5735824 26 août 2011 bzImage-2.6.38.2-xxxx-grs-ipv6-64 drwxr-xr-x 3 root root 4096 27 févr. 19:31 grub -rw-r--r-- 1 root root 2056069 26 août 2011 System.map-2.6.38.2-xxxx-grs-ipv6-64 root@machine1:/boot#

root@machine1:/boot/grub# ll total 4112 drwxr-xr-x 3 root root 4096 27 févr. 19:31 . drwxr-xr-x 3 root root 4096 18 nov. 13:18 .. -rw-r--r-- 1 root root 8208 18 nov. 13:18 915resolution.mod -rw-r--r-- 1 root root 10484 18 nov. 13:18 acpi.mod -rw-r--r-- 1 root root 4580 18 nov. 13:18 affs.mod -rw-r--r-- 1 root root 4896 18 nov. 13:18 afs_be.mod -rw-r--r-- 1 root root 4880 18 nov. 13:18 afs.mod -rw-r--r-- 1 root root 1048 18 nov. 13:18 aout.mod -rw-r--r-- 1 root root 8020 18 nov. 13:18 ata.mod -rw-r--r-- 1 root root 2228 18 nov. 13:18 ata_pthru.mod -rw-r--r-- 1 root root 2668 18 nov. 13:18 at_keyboard.mod -rw-r--r-- 1 root root 4796 18 nov. 13:18 befs_be.mod -rw-r--r-- 1 root root 4768 18 nov. 13:18 befs.mod -rw-r--r-- 1 root root 4280 18 nov. 13:18 biosdisk.mod -rw-r--r-- 1 root root 2400 18 nov. 13:18 bitmap.mod -rw-r--r-- 1 root root 2904 18 nov. 13:18 bitmap_scale.mod -rw-r--r-- 1 root root 2020 18 nov. 13:18 blocklist.mod -rw-r--r-- 1 root root 512 18 nov. 13:18 boot.img -rw-r--r-- 1 root root 2568 18 nov. 13:18 boot.mod -rw-r--r-- 1 root root 19648 18 nov. 13:18 bsd.mod -rw-r--r-- 1 root root 1960 18 nov. 13:18 bufio.mod -rw-r--r-- 1 root root 2388 18 nov. 13:18 cat.mod -rw-r--r-- 1 root root 512 18 nov. 13:18 cdboot.img -rw-r--r-- 1 root root 2476 18 nov. 13:18 chain.mod -rw-r--r-- 1 root root 1340 18 nov. 13:18 cmostest.mod -rw-r--r-- 1 root root 2144 18 nov. 13:18 cmp.mod -rw-r--r-- 1 root root 2033 18 nov. 13:18 command.lst -rw-r--r-- 1 root root 1784 18 nov. 13:18 configfile.mod -rw-r--r-- 1 root root 23924 18 nov. 13:18 core.img -rw-r--r-- 1 root root 2864 18 nov. 13:18 cpio.mod -rw-r--r-- 1 root root 1608 18 nov. 13:18 cpuid.mod -rw-r--r-- 1 root root 1784 18 nov. 13:18 crc.mod -rw-r--r-- 1 root root 825 18 nov. 13:18 crypto.lst -rw-r--r-- 1 root root 4396 18 nov. 13:18 crypto.mod -rw-r--r-- 1 root root 4052 18 nov. 13:18 cs5536.mod -rw-r--r-- 1 root root 1824 18 nov. 13:18 datehook.mod -rw-r--r-- 1 root root 2316 18 nov. 13:18 date.mod -rw-r--r-- 1 root root 1241 18 nov. 13:18 datetime.mod -rw-r--r-- 1 root root 48 18 nov. 13:18 device.map -rw-r--r-- 1 root root 512 18 nov. 13:18 diskboot.img -rw-r--r-- 1 root root 1896 18 nov. 13:18 dm_nv.mod -rw-r--r-- 1 root root 5496 18 nov. 13:18 drivemap.mod -rw-r--r-- 1 root root 2036 18 nov. 13:18 echo.mod -rw-r--r-- 1 root root 6436 18 nov. 13:18 efiemu32.o -rw-r--r-- 1 root root 11002 18 nov. 13:18 efiemu64.o -rw-r--r-- 1 root root 24128 18 nov. 13:18 efiemu.mod -rw-r--r-- 1 root root 4404 18 nov. 13:18 elf.mod -rw-r--r-- 1 root root 1636 18 nov. 13:18 example_functional_test.mod -rw-r--r-- 1 root root 5804 18 nov. 13:18 ext2.mod -rw-r--r-- 1 root root 3980 18 nov. 13:18 extcmd.mod -rw-r--r-- 1 root root 5940 18 nov. 13:18 fat.mod -rw-r--r-- 1 root root 11992 18 nov. 13:18 font.mod -rw-r--r-- 1 root root 2764 18 nov. 13:18 fshelp.mod -rw-r--r-- 1 root root 128 18 nov. 13:18 fs.lst -rw-r--r-- 1 root root 2504 18 nov. 13:18 functional_test.mod -rw-r--r-- 1 root root 1768 18 nov. 13:18 gcry_arcfour.mod -rw-r--r-- 1 root root 8144 18 nov. 13:18 gcry_blowfish.mod -rw-r--r-- 1 root root 35040 18 nov. 13:18 gcry_camellia.mod -rw-r--r-- 1 root root 17568 18 nov. 13:18 gcry_cast5.mod -rw-r--r-- 1 root root 2992 18 nov. 13:18 gcry_crc.mod -rw-r--r-- 1 root root 19280 18 nov. 13:18 gcry_des.mod -rw-r--r-- 1 root root 3268 18 nov. 13:18 gcry_md4.mod -rw-r--r-- 1 root root 4008 18 nov. 13:18 gcry_md5.mod -rw-r--r-- 1 root root 2636 18 nov. 13:18 gcry_rfc2268.mod -rw-r--r-- 1 root root 19204 18 nov. 13:18 gcry_rijndael.mod -rw-r--r-- 1 root root 9132 18 nov. 13:18 gcry_rmd160.mod -rw-r--r-- 1 root root 16652 18 nov. 13:18 gcry_seed.mod -rw-r--r-- 1 root root 18016 18 nov. 13:18 gcry_serpent.mod -rw-r--r-- 1 root root 8920 18 nov. 13:18 gcry_sha1.mod -rw-r--r-- 1 root root 3484 18 nov. 13:18 gcry_sha256.mod -rw-r--r-- 1 root root 5660 18 nov. 13:18 gcry_sha512.mod -rw-r--r-- 1 root root 11988 18 nov. 13:18 gcry_tiger.mod -rw-r--r-- 1 root root 39616 18 nov. 13:18 gcry_twofish.mod -rw-r--r-- 1 root root 24800 18 nov. 13:18 gcry_whirlpool.mod -rw-r--r-- 1 root root 3984 18 nov. 13:18 gettext.mod -rw-r--r-- 1 root root 38668 18 nov. 13:18 gfxmenu.mod -rw-r--r-- 1 root root 11248 18 nov. 13:18 gfxterm.mod -rw-r--r-- 1 root root 3728 18 nov. 13:18 gptsync.mod -rw-r--r-- 1 root root 10240 18 nov. 13:18 grldr.img -r--r--r-- 1 root root 2247 27 févr. 19:31 grub.cfg -rw-r--r-- 1 root root 1024 30 déc. 2010 grubenv -rw-r--r-- 1 root root 7740 18 nov. 13:18 gzio.mod -rw-r--r-- 1 root root 1460 18 nov. 13:18 halt.mod -rw-r--r-- 1 root root 0 18 nov. 13:18 handler.lst -rw-r--r-- 1 root root 4608 18 nov. 13:18 hashsum.mod -rw-r--r-- 1 root root 7420 18 nov. 13:18 hdparm.mod -rw-r--r-- 1 root root 1216 18 nov. 13:18 hello.mod -rw-r--r-- 1 root root 2488 18 nov. 13:18 help.mod -rw-r--r-- 1 root root 3244 18 nov. 13:18 hexdump.mod -rw-r--r-- 1 root root 6028 18 nov. 13:18 hfs.mod -rw-r--r-- 1 root root 5892 18 nov. 13:18 hfsplus.mod -rw-r--r-- 1 root root 2856 18 nov. 13:18 iorw.mod -rw-r--r-- 1 root root 6252 18 nov. 13:18 iso9660.mod -rw-r--r-- 1 root root 5832 18 nov. 13:18 jfs.mod -rw-r--r-- 1 root root 5932 18 nov. 13:18 jpeg.mod -rw-r--r-- 1 root root 29128 18 nov. 13:18 kernel.img -rw-r--r-- 1 root root 1972 18 nov. 13:18 keystatus.mod -rw-r--r-- 1 root root 5036 18 nov. 13:18 linux16.mod -rw-r--r-- 1 root root 8636 18 nov. 13:18 linux.mod -rw-r--r-- 1 root root 1024 18 nov. 13:18 lnxboot.img -rw-r--r-- 1 root root 5564 18 nov. 13:18 loadenv.mod drwxr-xr-x 2 root root 4096 30 déc. 2010 locale -rw-r--r-- 1 root root 3032 18 nov. 13:18 loopback.mod -rw-r--r-- 1 root root 1300 18 nov. 13:18 lsmmap.mod -rw-r--r-- 1 root root 4160 18 nov. 13:18 ls.mod -rw-r--r-- 1 root root 4944 18 nov. 13:18 lspci.mod -rw-r--r-- 1 root root 6056 18 nov. 13:18 lvm.mod -rw-r--r-- 1 root root 2700 18 nov. 13:18 mdraid.mod -rw-r--r-- 1 root root 2080 18 nov. 13:18 memdisk.mod -rw-r--r-- 1 root root 2876 18 nov. 13:18 memrw.mod -rw-r--r-- 1 root root 4132 18 nov. 13:18 minicmd.mod -rw-r--r-- 1 root root 4348 18 nov. 13:18 minix.mod -rw-r--r-- 1 root root 8508 18 nov. 13:18 mmap.mod -rw-r--r-- 1 root root 2773 18 nov. 13:18 moddep.lst -rw-r--r-- 1 root root 2372 18 nov. 13:18 msdospart.mod -rw-r--r-- 1 root root 11440 18 nov. 13:18 multiboot2.mod -rw-r--r-- 1 root root 10528 18 nov. 13:18 multiboot.mod -rw-r--r-- 1 root root 6676 18 nov. 13:18 nilfs2.mod -rw-r--r-- 1 root root 98304 18 nov. 13:18 normal.mod -rw-r--r-- 1 root root 3548 18 nov. 13:18 ntfscomp.mod -rw-r--r-- 1 root root 9996 18 nov. 13:18 ntfs.mod -rw-r--r-- 1 root root 10524 18 nov. 13:18 ohci.mod -rw-r--r-- 1 root root 1688 18 nov. 13:18 part_acorn.mod -rw-r--r-- 1 root root 1672 18 nov. 13:18 part_amiga.mod -rw-r--r-- 1 root root 2112 18 nov. 13:18 part_apple.mod -rw-r--r-- 1 root root 2004 18 nov. 13:18 part_bsd.mod -rw-r--r-- 1 root root 2276 18 nov. 13:18 part_gpt.mod -rw-r--r-- 1 root root 82 18 nov. 13:18 partmap.lst -rw-r--r-- 1 root root 2100 18 nov. 13:18 part_msdos.mod -rw-r--r-- 1 root root 1788 18 nov. 13:18 part_sun.mod -rw-r--r-- 1 root root 1704 18 nov. 13:18 part_sunpc.mod -rw-r--r-- 1 root root 17 18 nov. 13:18 parttool.lst -rw-r--r-- 1 root root 4488 18 nov. 13:18 parttool.mod -rw-r--r-- 1 root root 1908 18 nov. 13:18 password.mod -rw-r--r-- 1 root root 2992 18 nov. 13:18 password_pbkdf2.mod -rw-r--r-- 1 root root 1332 18 nov. 13:18 pbkdf2.mod -rw-r--r-- 1 root root 1188 18 nov. 13:18 pci.mod -rw-r--r-- 1 root root 2476 18 nov. 13:18 play.mod -rw-r--r-- 1 root root 6628 18 nov. 13:18 png.mod -rw-r--r-- 1 root root 2664 18 nov. 13:18 probe.mod -rw-r--r-- 1 root root 1024 18 nov. 13:18 pxeboot.img -rw-r--r-- 1 root root 1332 18 nov. 13:18 pxecmd.mod -rw-r--r-- 1 root root 5600 18 nov. 13:18 pxe.mod -rw-r--r-- 1 root root 1392 18 nov. 13:18 raid5rec.mod -rw-r--r-- 1 root root 2832 18 nov. 13:18 raid6rec.mod -rw-r--r-- 1 root root 6188 18 nov. 13:18 raid.mod -rw-r--r-- 1 root root 1564 18 nov. 13:18 read.mod -rw-r--r-- 1 root root 1120 18 nov. 13:18 reboot.mod -rw-r--r-- 1 root root 38520 18 nov. 13:18 regexp.mod -rw-r--r-- 1 root root 9868 18 nov. 13:18 reiserfs.mod -rw-r--r-- 1 root root 4104 18 nov. 13:18 relocator.mod -rw-r--r-- 1 root root 4124 18 nov. 13:18 scsi.mod -rw-r--r-- 1 root root 2168 18 nov. 13:18 search_fs_file.mod -rw-r--r-- 1 root root 2312 18 nov. 13:18 search_fs_uuid.mod -rw-r--r-- 1 root root 2256 18 nov. 13:18 search_label.mod -rw-r--r-- 1 root root 2356 18 nov. 13:18 search.mod -rw-r--r-- 1 root root 4920 18 nov. 13:18 serial.mod -rw-r--r-- 1 root root 690 18 nov. 13:18 setjmp.mod -rw-r--r-- 1 root root 5524 18 nov. 13:18 setpci.mod -rw-r--r-- 1 root root 4104 18 nov. 13:18 sfs.mod -rw-r--r-- 1 root root 2168 18 nov. 13:18 sleep.mod -rw-r--r-- 1 root root 2888 18 nov. 13:18 tar.mod -rw-r--r-- 1 root root 124 18 nov. 13:18 terminal.lst -rw-r--r-- 1 root root 3472 18 nov. 13:18 terminal.mod -rw-r--r-- 1 root root 12728 18 nov. 13:18 terminfo.mod -rw-r--r-- 1 root root 5156 18 nov. 13:18 test.mod -rw-r--r-- 1 root root 2884 18 nov. 13:18 tga.mod -rw-r--r-- 1 root root 1675 18 nov. 13:18 trig.mod -rw-r--r-- 1 root root 1276 18 nov. 13:18 true.mod -rw-r--r-- 1 root root 5496 18 nov. 13:18 udf.mod -rw-r--r-- 1 root root 4684 18 nov. 13:18 ufs1.mod -rw-r--r-- 1 root root 5000 18 nov. 13:18 ufs2.mod -rw-r--r-- 1 root root 5796 18 nov. 13:18 uhci.mod -rw-r--r-- 1 root root 2560080 16 nov. 22:12 unicode.pf2 -rw-r--r-- 1 root root 3420 18 nov. 13:18 usb_keyboard.mod -rw-r--r-- 1 root root 7900 18 nov. 13:18 usb.mod -rw-r--r-- 1 root root 5440 18 nov. 13:18 usbms.mod -rw-r--r-- 1 root root 3636 18 nov. 13:18 usbtest.mod -rw-r--r-- 1 root root 2736 18 nov. 13:18 vbeinfo.mod -rw-r--r-- 1 root root 6676 18 nov. 13:18 vbe.mod -rw-r--r-- 1 root root 3048 18 nov. 13:18 vbetest.mod -rw-r--r-- 1 root root 4788 18 nov. 13:18 vga.mod -rw-r--r-- 1 root root 2288 18 nov. 13:18 vga_text.mod -rw-r--r-- 1 root root 5500 18 nov. 13:18 video_bochs.mod -rw-r--r-- 1 root root 5744 18 nov. 13:18 video_cirrus.mod -rw-r--r-- 1 root root 18528 18 nov. 13:18 video_fb.mod -rw-r--r-- 1 root root 33 18 nov. 13:18 video.lst -rw-r--r-- 1 root root 5384 18 nov. 13:18 video.mod -rw-r--r-- 1 root root 3876 18 nov. 13:18 videotest.mod -rw-r--r-- 1 root root 5844 18 nov. 13:18 xfs.mod -rw-r--r-- 1 root root 31420 18 nov. 13:18 xnu.mod -rw-r--r-- 1 root root 1936 18 nov. 13:18 xnu_uuid.mod -rw-r--r-- 1 root root 6208 18 nov. 13:18 zfsinfo.mod -rw-r--r-- 1 root root 24440 18 nov. 13:18 zfs.mod root@machine1:/boot/grub#

[code]root@machine1:/boot/grub# cat 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 xxxxxxxxxxxxxxxxxxxxxxxxxxx
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 xxxxxxxxxxxxxxxxxxxxx
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/06_OVHkernel

menuentry “Debian GNU/Linux, OVH kernel 2.6.38.2-xxxx-grs-ipv6-64” {
insmod part_msdos
insmod ext2
set root=’(hd0,msdos1)’
search --no-floppy --fs-uuid --set xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
linux /boot/bzImage-2.6.38.2-xxxx-grs-ipv6-64 root=/dev/sda1 ro quiet
}

END /etc/grub.d/06_OVHkernel

BEGIN /etc/grub.d/10_linux

END /etc/grub.d/10_linux

BEGIN /etc/grub.d/20_linux_xen

END /etc/grub.d/20_linux_xen

BEGIN /etc/grub.d/30_os-prober

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

root@machine1:/boot/grub# [/code]

root@machine1:/boot/grub# mount /dev/sda1 on / type ext4 (rw,errors=remount-ro) tmpfs on /lib/init/rw type tmpfs (rw,nosuid,mode=0755) proc on /proc type proc (rw,noexec,nosuid,nodev) sysfs on /sys type sysfs (rw,noexec,nosuid,nodev) udev on /dev type tmpfs (rw,mode=0755) tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev) devpts on /dev/pts type devpts (rw,noexec,nosuid,gid=5,mode=620) /dev/sda2 on /home type ext4 (rw) /dev/sda3 on /var type ext4 (rw) /dev/sda5 on /save type ext4 (rw,noexec,nosuid,nodev) /dev/sda7 on /save1 type ext4 (rw) root@machine1:/boot/grub#

[code]root@machine1:/boot/grub# fdisk -l

Disk /dev/sda: 1000.2 GB, 1000204886016 bytes
255 heads, 63 sectors/track, 121601 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x0009a149

Device Boot Start End Blocks Id System
/dev/sda1 * 1 27988 224804864 83 Linux
/dev/sda2 27988 121602 751956696 5 Extended
/dev/sda5 27988 28237 2004992 82 Linux swap / Solaris
/dev/sda6 28237 55009 215040000 83 Linux
/dev/sda7 55009 56156 9216000 83 Linux

Disk /dev/sdf: 1000.2 GB, 1000204886016 bytes
255 heads, 63 sectors/track, 121601 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x000be93b

Device Boot Start End Blocks Id System
/dev/sdf1 1 128 1024000 83 Linux
Partition 1 does not end on cylinder boundary.
/dev/sdf2 128 58770 471040000 5 Extended
/dev/sdf5 128 1148 8192000 83 Linux
/dev/sdf6 1148 1786 5120000 83 Linux
/dev/sdf7 1786 2806 8192000 83 Linux
/dev/sdf8 2806 3061 2048000 83 Linux
/dev/sdf9 3061 5610 20480000 83 Linux
/dev/sdf10 5611 8160 20480000 83 Linux
/dev/sdf11 8160 10710 20480000 83 Linux
/dev/sdf12 10710 29832 153600000 83 Linux
root@machine1:/boot/grub#
[/code]

J’ai pas tout compris, tu cherche à re compiler un noyau pour un serveur hébergé chez OVH ?

Si oui deux solutions possible soit tu le compile sur la machines directement en réutilisant le fichier de configuration et en aillant au préalable vérifie que tous ce qui est nécessaires pour le futur noyau sera choisi ( certaines machines ont des besoins en driver spécifiques ); sinon tu le compile chez toi après avoir au préalable récupérer tout ce qu’il faut et monter un “chroot” suffisant.

Personnellement pour plus de commodités je le faisais directement sur la machine avec un limite de ressources pour ne pas ennuyer mes autres services ( j’étais pas presser à l’époque je le faisais pour modifier la fréquence d’horloge et deux trois autres options :whistle: ).

[quote=“loreleil”]Par contre les infos (uname et lsmod) donner plus haut proviennent directement du dédié.

En local je ne les obtiens pas, malgré le chroot … :think:[/quote]
uname et lsmod obtiennent leurs infos à partir de /proc (tout comme mount lorsqu’il est appelé sans arguments, et plein d’autres commandes) donc vu que tu as monté le /proc de ta machine sur le chroot (pour que ça puisse marcher) c’est tout à fait normal…
C’est un peu comme si tu t’étonnais de voir tes disques dans /dev à partir du chroot et pas ceux de ton dédié. :wink:

aptitude install linux-image-amd64

Faudra juste faire gaffe au noyau par défaut (/etc/default/grub) car le 2.6.32 de Debian étant plus ancien que le 2.6.38 d’OVH il y a des chances que Grub préfère ce dernier si tu ne lui dis pas explicitement d’utiliser le 2.6.32.

@Clochette

Installé le noyau Debian sur un dédié ovh, en l’occurrence je ne le ferai pas en live la bas, mais à partir d’une sauvegarde (local) que j’ai chrooter.

Après j’aviserai … :wink:

@syam

Ne voulais tu pas plutôt dire dans grub.cfg ?

[quote]### BEGIN /etc/grub.d/06_OVHkernel ###
menuentry “Debian GNU/Linux, OVH kernel 2.6.38.2-xxxx-grs-ipv6-64” {
insmod part_msdos
insmod ext2
set root=’(hd0,msdos1)'
search --no-floppy --fs-uuid --set xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
linux /boot/bzImage-2.6.38.2-xxxx-grs-ipv6-64 root=/dev/sda1 ro quiet
}

END /etc/grub.d/06_OVHkernel ###[/quote]

Côté default/grub je vois pas trop quel variable rajouté ?

[code]root@machine1:/boot/grub# cat /etc/default/grub

If you change this file, run ‘update-grub’ afterwards to update

/boot/grub/grub.cfg.

GRUB_DEFAULT=0
GRUB_TIMEOUT=5
GRUB_DISTRIBUTOR=lsb_release -i -s 2> /dev/null || echo Debian
GRUB_CMDLINE_LINUX_DEFAULT=“quiet"
GRUB_CMDLINE_LINUX=”"

Uncomment to enable BadRAM filtering, modify to suit your needs

This works with Linux (no patch required) and with any kernel that obtains

the memory map information from GRUB (GNU Mach, kernel of FreeBSD …)

#GRUB_BADRAM=“x,x,x,x”

Uncomment to disable graphical terminal (grub-pc only)

#GRUB_TERMINAL=console

The resolution used on graphical terminal

note that you can use only modes which your graphic card supports via VBE

you can see them in real GRUB with the command `vbeinfo’

#GRUB_GFXMODE=640x480

Uncomment if you don’t want GRUB to pass “root=UUID=xxx” parameter to Linux

GRUB_DISABLE_LINUX_UUID=true

Uncomment to disable generation of recovery mode menu entries

#GRUB_DISABLE_LINUX_RECOVERY=“true”

Uncomment to get a beep at grub start

#GRUB_INIT_TUNE="480 440 1"
root@machine1:/boot/grub#
[/code]

De manière générale, il ne faut pas éditer grub.cfg soi-même car à la prochaine mise à jour (update-grub) tes modifs seront effacées, ce qui est le meilleur moyen d’avoir des mauvaises surprises. C’est pour ça que Grub fournit /etc/default/grub et tous les hooks dans /etc/grub.d/.

Pour déterminer quel kernel Grub utilisera par défaut, il faut modifier la ligne GRUB_DEFAULT dans /etc/default/grub :

La première ligne renvoyée par cette commande est l’entrée 0, la deuxième l’entrée 1 etc.

[quote=“syam”]

Faudra juste faire gaffe au noyau par défaut (/etc/default/grub) car le 2.6.32 de Debian étant plus ancien que le 2.6.38 d’OVH il y a des chances que Grub préfère ce dernier si tu ne lui dis pas explicitement d’utiliser le 2.6.32.[/quote]

+1 c’est aussi simple que ça.
Pour grub, OVH a créé un fichier dans /etc/default/grub il suffit de le passer après “linux” (changer le numéro si mes souvenirs sont bons)

ls /etc/grub.d/ 00_header 05_debian_theme 10_linux 11_OVHkernel 20_linux_xen 30_os-prober 40_custom 41_custom README

Je suis sidéré, il y a au moins trois que j’ai lancé cet quête.

J’en ai bouffé des pages, des tutos sur la toile, parcourus des blogs, des forums.

Ou il était même question de reconfigurer la carte réseau … et j’en passe.

Pour ce faire sans prendre de risque, je m’étais fixé l’idée de faire ça en local, chroot, et pour ce dernier il me fallait rapatrier les partoches ovh, rsync, avec lequel j’ai bien galéré pour autoriser root.

Tout ceci n’a pas était vain ! :wink:

Et là! Tout simplement … :118

Je suis vert … :mrgreen: :mrgreen:

Retour à mes moutons.

[quote=“syam”]
Pour déterminer quel kernel Grub utilisera par défaut, il faut modifier la ligne GRUB_DEFAULT dans /etc/default/grub :

$ grep menuentry /boot/grub/grub.cfg

La première ligne renvoyée par cette commande est l’entrée 0, la deuxième l’entrée 1 etc.[/quote]

Si j’ai compris …

Actuellement sur le dédié.

root@ksxxx:~# grep menuentry /boot/grub/grub.cfg menuentry "Debian GNU/Linux, OVH kernel 2.6.38.2-xxxx-grs-ipv6-64" { root@ksxxx:~#

[code]:~# cat /etc/default/grub

If you change this file, run ‘update-grub’ afterwards to update

/boot/grub/grub.cfg.

GRUB_DEFAULT=0[/code]

La première ligne renvoyée par cette commande est l’entrée 0, la deuxième l’entrée 1 etc.

Il me suffirai de modifier par 1.

GRUB_DEFAULT=1

:116 :075 :079 :075

[quote=“loreleil”]Il me suffirai de modifier par 1.

Oui enfin la méthode de lol (échanger l’ordre des fichiers “linux” et “OVHkernel” dans /etc/grub.d/) me paraît encore plus simple et fiable. :wink:

Ok, mais j’ai pas vraiment saisi comment opérer avec la méthode de lol … :017

root@ksxxx:/etc/grub.d# ll total 64 drwxr-xr-x 2 root root 4096 16 nov. 22:11 . drwxr-xr-x 106 root root 4096 8 mars 17:33 .. -rwxr-xr-x 1 root root 6433 18 déc. 2010 00_header -rwxr-xr-x 1 root root 5343 18 janv. 2011 05_debian_theme -rwxr-xr-x 1 root root 968 30 déc. 2010 06_OVHkernel -rwxr-xr-x 1 root root 4284 18 janv. 2011 10_linux -rwxr-xr-x 1 root root 4925 18 janv. 2011 20_linux_xen -rwxr-xr-x 1 root root 5789 18 déc. 2010 30_os-prober -rwxr-xr-x 1 root root 214 18 déc. 2010 40_custom -rwxr-xr-x 1 root root 95 18 déc. 2010 41_custom -rw-r--r-- 1 root root 483 18 déc. 2010 README root@ksxxx:/etc/grub.d#
@lol

En passant, dis moi comment cela fonctionnera après, en mode rescue et reboot.

J’aurai se nouveau noyau qui sera affiché dans le manager d’ovh ?

@syam

Je peux donc choisir un noyau plus récent, hein ?

Lequel me conseil tu ?

root@ksxxx:/etc/grub.d# aptitude search linux-image v linux-image - v linux-image-2.6 - p linux-image-2.6-amd64 - Linux for 64-bit PCs (dummy package) p linux-image-2.6-openvz-amd64 - Linux 2.6 for 64-bit PCs (meta-package), OpenVZ support p linux-image-2.6-rt-amd64 - Linux for 64-bit PCs (dummy package) p linux-image-2.6-vserver-amd64 - Linux 2.6 for 64-bit PCs (meta-package), Linux-VServer support p linux-image-2.6-xen-amd64 - Linux 2.6 for 64-bit PCs (meta-package), Xen dom0 support p linux-image-2.6.32-5-amd64 - Linux 2.6.32 for 64-bit PCs p linux-image-2.6.32-5-amd64-dbg - Debugging infos for Linux 2.6.32-5-amd64 p linux-image-2.6.32-5-openvz-amd64 - Linux 2.6.32 for 64-bit PCs, OpenVZ support p linux-image-2.6.32-5-openvz-amd64-dbg - Debugging infos for Linux 2.6.32-5-openvz-amd64 p linux-image-2.6.32-5-vserver-amd64 - Linux 2.6.32 for 64-bit PCs, Linux-VServer support p linux-image-2.6.32-5-vserver-amd64-dbg - Debugging infos for Linux 2.6.32-5-vserver-amd64 p linux-image-2.6.32-5-xen-amd64 - Linux 2.6.32 for 64-bit PCs, Xen dom0 support p linux-image-2.6.32-5-xen-amd64-dbg - Debugging infos for Linux 2.6.32-5-xen-amd64 p linux-image-3.2.0-0.bpo.1-amd64 - Linux 3.2 for 64-bit PCs p linux-image-3.2.0-0.bpo.1-amd64-dbg - Debugging infos for Linux 3.2.0-0.bpo.1-amd64 p linux-image-3.2.0-0.bpo.1-rt-amd64 - Linux 3.2 for 64-bit PCs, PREEMPT_RT p linux-image-3.2.0-0.bpo.1-rt-amd64-dbg - Debugging infos for Linux 3.2.0-0.bpo.1-rt-amd64 p linux-image-3.2.0-1-amd64 - Linux 3.2 for 64-bit PCs p linux-image-3.2.0-1-amd64-dbg - Debugging infos for Linux 3.2.0-1-amd64 p linux-image-3.2.0-1-rt-amd64 - Linux 3.2 for 64-bit PCs, PREEMPT_RT p linux-image-3.2.0-1-rt-amd64-dbg - Debugging infos for Linux 3.2.0-1-rt-amd64 p linux-image-3.2.0-2-amd64 - Linux 3.2 for 64-bit PCs p linux-image-3.2.0-2-amd64-dbg - Debugging infos for Linux 3.2.0-2-amd64 p linux-image-3.2.0-2-rt-amd64 - Linux 3.2 for 64-bit PCs, PREEMPT_RT p linux-image-3.2.0-2-rt-amd64-dbg - Debugging infos for Linux 3.2.0-2-rt-amd64 p linux-image-3.3.0-rc6-amd64 - Linux 3.3-rc6 for 64-bit PCs p linux-image-3.3.0-rc6-amd64-dbg - Debugging infos for Linux 3.3.0-rc6-amd64 p linux-image-amd64 - Linux for 64-bit PCs (meta-package) p linux-image-openvz-amd64 - Linux for 64-bit PCs (meta-package), OpenVZ support p linux-image-rt-amd64 - Linux for 64-bit PCs (meta-package), PREEMPT_RT p linux-image-vserver-amd64 - Linux for 64-bit PCs (meta-package), Linux-VServer support p linux-image-xen-amd64 - Linux for 64-bit PCs (meta-package), Xen dom0 support root@ksxxx:/etc/grub.d#

Simplement renommer 06_OVHkernel pour le déplacer après 10_linux :

# mv /etc/grub.d/06_OVHkernel /etc/grub.d/11_OVHkernel

Le stable, pardi ! Sinon tu fais comment pour les mises à jour de sécurité ? :wink:

Magnifique :023 heeuuu je n’y avais pô penser. :blush:

Comment ça, pas de mise à jour pour un noyau (exemple) tels que celui-ci ?

Ouais, j’ai rien dit. :confused:

C’est le noyau (linux-image-3.2.0-1-amd64) Wheezy. J’ai compris. :wink:

Je suis passé à la pratique :023 sur mon chroot.

root@machine1:/boot/grub# grep menuentry /boot/grub/grub.cfg menuentry "Debian GNU/Linux, OVH kernel 2.6.38.2-xxxx-grs-ipv6-64" { 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, avec Linux 2.6.32-5-amd64 (on /dev/sdf5)" { menuentry "Debian GNU/Linux, avec Linux 2.6.32-5-amd64 (mode de dépannage) (on /dev/sdf5)" { menuentry "Debian GNU/Linux, avec Linux 2.6.32-5-amd64 (on /dev/sdf7)" { menuentry "Debian GNU/Linux, avec Linux 2.6.32-5-amd64 (mode de dépannage) (on /dev/sdf7)" { root@machine1:/boot/grub#

root@machine1:/boot/grub# ls /etc/grub.d/ 00_header 05_debian_theme 10_linux 11_OVHkernel 20_linux_xen 30_os-prober 40_custom 41_custom README root@machine1:/boot/grub#

:dance: :023

Une dernière question, (je crois) Mieux vaut il effectuer cette opération sur le dédié en mode rescue, ou alors cela ne pose pas de souci en live ?

Juste une remarque sur les noyaux, le 2.6.32 vient juste de terminer sa maintenance, (cf https://linuxfr.org/news/retrospective-sur-le-noyau-2-6-32), cela aura été un des plus complets et plus stables des noyaux. Les noyaux de wheezy ne sont pas mis à jour, particulièrement le 3.0???, donc soit c’est celui de la stable en cours, soit c’est le dernier de Sid en prenant soin de prendre les entêtes et tous les paquets liés au noyau, ils auront sans doute une durée de vie limitée dans les dépots et le snapshot n’est pas toujours complet.

PS: Pour ton pbm de /proc au tout début, il te faut monter /proc et /sys
(
mount -t proc proc /proc
mount -t sysfs none /sys
dans le chroot ou
proc /chroot/proc proc defaults 0 0
none /chroot/sys sysfs defaults
dans le fstab de l’hote)

C’est fait, en live et reboot! :023 :041 :041 :041

[code]root@ksxxx:~# /sbin/reboot

The system is going down for reboot NOW!ufi.com (pts/0) (Sun Mar 11 18:41:07
root@ksxxx:~# Connection to x.x.x.x closed by remote host.
Connection to x.x.x.x closed.
loreleil@machine1:~$
loreleil@machine1:~$
loreleil@machine1:~$ ssh -i /home/loreleil/.ssh/id_rsa2 mon_user_labas@x.x.x.x
Linux ksxxx.kimsufi.com 2.6.38.2-grsec-xxxx-grs-ipv6-64 #2 SMP Thu Aug 25 16:40:22 UTC 2011 x86_64 GNU/Linux

server : 22157
ip : x.x.x.x
hostname : ksxxx.kimsufi.com

mon_user_labas@ksxxx:~$ su -
Mot de passe :
[/code]

root@ksxxx:~# ls /etc/grub.d/ 00_header 05_debian_theme 10_linux 11_OVHkernel 20_linux_xen 30_os-prober 40_custom 41_custom README root@ksxxx:~#

root@ksxxx:~# grep menuentry /boot/grub/grub.cfg menuentry "Debian GNU/Linux, OVH kernel 2.6.38.2-xxxx-grs-ipv6-64" { 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 { root@ksxxx:~#
:116 Rétrospectivement, j’avais lancé aptitude search linux-image mais en aucun ne serait ce une seule fois : aptitude install … :013 Je m’en veux … :075 :shhh:

Ceci dit :confused: Grand Merci à vous trois … :041 :041 :041 :023

Ceci est il dans la normalité ?

root@ksxxxxx:~# uname -a Linux ksxxxxx.kimsufi.com 2.6.38.2-grsec-xxxx-grs-ipv6-64 #2 SMP Thu Aug 25 16:40:22 UTC 2011 x86_64 GNU/Linux root@ksxxxxx:~# uname -r 2.6.38.2-grsec-xxxx-grs-ipv6-64 root@ksxxxxx:~#
:think:

T’aurais pas renommé le fichier 11_OVHkernel après avoir installé le noyau Debian avec aptitude install ? => update-grub :mrgreen: (et un grep menubidule chose après pour vérifier que le noyau OVH est à la fin de la liste).

Salut,

[quote=“loreleil”]@lol
En passant, dis moi comment cela fonctionnera après, en mode rescue et reboot.
J’aurai se nouveau noyau qui sera affiché dans le manager d’ovh ?[/quote]

Oui, le manager t’affichera le noyau utilisé

[quote] Informations distribution
Distribution : Debian 6.0.4
Kernel : 2.6.32-5-amd64
[ dernière version 2.6.38.2 ]
Date : #1 SMP Mon Jan 16 16:22:28 UTC 2012[/quote]

[quote=“loreleil”]Ceci est il dans la normalité ?

root@ksxxxxx:~# uname -a Linux ksxxxxx.kimsufi.com 2.6.38.2-grsec-xxxx-grs-ipv6-64 #2 SMP Thu Aug 25 16:40:22 UTC 2011 x86_64 GNU/Linux [/quote]

Non…
Je ne me souviens plus mais j’avais aussi redémarré sur le noyau OVH.
Je ne suis plus certain à présent; Voici mes notes:

root@xxx:/usr/src# mv /etc/grub.d/06_OVHkernel /etc/grub.d/11_OVHkernel root@xxx:/usr/src# grub-mkconfig root@xxx:/usr/src# update-grub2