Usando grub2 non ho più il /menu.lst ma il file corrispondente è
/boot/grub/grub.cfg che ti posto
Codice: Seleziona tutto
gian64@gian64-laptop:~$ cat /boot/grub/grub.cfg
#
# DO NOT EDIT THIS FILE
#
# It is automatically generated by /usr/sbin/grub-mkconfig using templates
# from /etc/grub.d and settings from /etc/default/grub
#
### BEGIN /etc/grub.d/00_header ###
if [ -s /boot/grub/grubenv ]; then
have_grubenv=true
load_env
fi
set default="0"
if [ ${prev_saved_entry} ]; then
saved_entry=${prev_saved_entry}
save_env saved_entry
prev_saved_entry=
save_env prev_saved_entry
fi
insmod ext2
set root=(hd0,6)
search --no-floppy --fs-uuid --set 4196bfde-4958-4666-895f-e9a49d7dbda1
if loadfont /usr/share/grub/unicode.pf2 ; then
set gfxmode=640x480
insmod gfxterm
insmod vbe
if terminal_output gfxterm ; then true ; else
# For backward compatibility with versions of terminal.mod that don't
# understand terminal_output
terminal gfxterm
fi
fi
if [ ${recordfail} = 1 ]; then
set timeout=-1
else
set timeout=10
fi
### END /etc/grub.d/00_header ###
### BEGIN /etc/grub.d/05_debian_theme ###
set menu_color_normal=white/black
set menu_color_highlight=black/white
### END /etc/grub.d/05_debian_theme ###
### BEGIN /etc/grub.d/10_linux ###
menuentry "Ubuntu, Linux 2.6.31-15-generic" {
recordfail=1
if [ -n ${have_grubenv} ]; then save_env recordfail; fi
set quiet=1
insmod ext2
set root=(hd0,9)
search --no-floppy --fs-uuid --set 14d221f8-7660-439e-85e3-5fdbcbd1e8a7
linux /vmlinuz-2.6.31-15-generic root=UUID=4196bfde-4958-4666-895f-e9a49d7dbda1 ro quiet splash
initrd /initrd.img-2.6.31-15-generic
}
menuentry "Ubuntu, Linux 2.6.31-15-generic (recovery mode)" {
recordfail=1
if [ -n ${have_grubenv} ]; then save_env recordfail; fi
insmod ext2
set root=(hd0,9)
search --no-floppy --fs-uuid --set 14d221f8-7660-439e-85e3-5fdbcbd1e8a7
linux /vmlinuz-2.6.31-15-generic root=UUID=4196bfde-4958-4666-895f-e9a49d7dbda1 ro single
initrd /initrd.img-2.6.31-15-generic
}
menuentry "Ubuntu, Linux 2.6.31-14-generic" {
recordfail=1
if [ -n ${have_grubenv} ]; then save_env recordfail; fi
set quiet=1
insmod ext2
set root=(hd0,9)
search --no-floppy --fs-uuid --set 14d221f8-7660-439e-85e3-5fdbcbd1e8a7
linux /vmlinuz-2.6.31-14-generic root=UUID=4196bfde-4958-4666-895f-e9a49d7dbda1 ro quiet splash
initrd /initrd.img-2.6.31-14-generic
}
menuentry "Ubuntu, Linux 2.6.31-14-generic (recovery mode)" {
recordfail=1
if [ -n ${have_grubenv} ]; then save_env recordfail; fi
insmod ext2
set root=(hd0,9)
search --no-floppy --fs-uuid --set 14d221f8-7660-439e-85e3-5fdbcbd1e8a7
linux /vmlinuz-2.6.31-14-generic root=UUID=4196bfde-4958-4666-895f-e9a49d7dbda1 ro single
initrd /initrd.img-2.6.31-14-generic
}
### END /etc/grub.d/10_linux ###
### BEGIN /etc/grub.d/20_memtest86+ ###
menuentry "Memory test (memtest86+)" {
linux16 /memtest86+.bin
}
menuentry "Memory test (memtest86+, serial console 115200)" {
linux16 /memtest86+.bin console=ttyS0,115200n8
}
### END /etc/grub.d/20_memtest86+ ###
### BEGIN /etc/grub.d/30_os-prober ###
menuentry "Windows NT/2000/XP (on /dev/sda1)" {
insmod fat
set root=(hd0,1)
search --no-floppy --fs-uuid --set 16d9-b5d2
drivemap -s (hd0) ${root}
chainloader +1
}
menuentry "Slackware Linux (Slackware 13.0.0.0.0) (on /dev/sda10)" {
insmod ext2
set root=(hd0,10)
search --no-floppy --fs-uuid --set 6f03804f-5b5e-4c50-8af5-ce66b397899f
linux /boot/vmlinuz-generic-2.6.29.6 root=/dev/sda10
}
menuentry "Slackware Linux (Slackware 13.0.0.0.0) (on /dev/sda10)" {
insmod ext2
set root=(hd0,10)
search --no-floppy --fs-uuid --set 6f03804f-5b5e-4c50-8af5-ce66b397899f
linux /boot/vmlinuz-generic-smp-2.6.29.6-smp root=/dev/sda10
}
menuentry "Slackware Linux (Slackware 13.0.0.0.0) (on /dev/sda10)" {
insmod ext2
set root=(hd0,10)
search --no-floppy --fs-uuid --set 6f03804f-5b5e-4c50-8af5-ce66b397899f
linux /boot/vmlinuz-huge-2.6.29.6 root=/dev/sda10
}
menuentry "Slackware Linux (Slackware 13.0.0.0.0) (on /dev/sda10)" {
insmod ext2
set root=(hd0,10)
search --no-floppy --fs-uuid --set 6f03804f-5b5e-4c50-8af5-ce66b397899f
linux /boot/vmlinuz-huge-smp-2.6.29.6-smp root=/dev/sda10
}
menuentry "Windows 7 (loader) (on /dev/sda2)" {
insmod fat
set root=(hd0,2)
search --no-floppy --fs-uuid --set 94aa-2459
chainloader +1
}
menuentry "Ubuntu lucid (development branch), kernel 2.6.32-5-generic (on /dev/sdb2)" {
insmod ext2
set root=(hd1,6)
search --no-floppy --fs-uuid --set 729b4c08-5928-4d4e-a804-de7daeb69bf0
linux /vmlinuz-2.6.32-5-generic root=UUID=1813202a-9b41-447a-8722-a43c84ac68bd ro quiet splash
initrd /initrd.img-2.6.32-5-generic
}
menuentry "Ubuntu lucid (development branch), kernel 2.6.32-5-generic (recovery mode) (on /dev/sdb2)" {
insmod ext2
set root=(hd1,6)
search --no-floppy --fs-uuid --set 729b4c08-5928-4d4e-a804-de7daeb69bf0
linux /vmlinuz-2.6.32-5-generic root=UUID=1813202a-9b41-447a-8722-a43c84ac68bd ro single
initrd /initrd.img-2.6.32-5-generic
}
menuentry "Ubuntu lucid (development branch), kernel 2.6.32-4-generic (on /dev/sdb2)" {
insmod ext2
set root=(hd1,6)
search --no-floppy --fs-uuid --set 729b4c08-5928-4d4e-a804-de7daeb69bf0
linux /vmlinuz-2.6.32-4-generic root=UUID=1813202a-9b41-447a-8722-a43c84ac68bd ro quiet splash
initrd /initrd.img-2.6.32-4-generic
}
menuentry "Ubuntu lucid (development branch), kernel 2.6.32-4-generic (recovery mode) (on /dev/sdb2)" {
insmod ext2
set root=(hd1,6)
search --no-floppy --fs-uuid --set 729b4c08-5928-4d4e-a804-de7daeb69bf0
linux /vmlinuz-2.6.32-4-generic root=UUID=1813202a-9b41-447a-8722-a43c84ac68bd ro single
initrd /initrd.img-2.6.32-4-generic
}
menuentry "Ubuntu lucid (development branch), kernel 2.6.32-2-generic (on /dev/sdb2)" {
insmod ext2
set root=(hd1,6)
search --no-floppy --fs-uuid --set 729b4c08-5928-4d4e-a804-de7daeb69bf0
linux /vmlinuz-2.6.32-2-generic root=UUID=1813202a-9b41-447a-8722-a43c84ac68bd ro quiet splash
initrd /initrd.img-2.6.32-2-generic
}
menuentry "Ubuntu lucid (development branch), kernel 2.6.32-2-generic (recovery mode) (on /dev/sdb2)" {
insmod ext2
set root=(hd1,6)
search --no-floppy --fs-uuid --set 729b4c08-5928-4d4e-a804-de7daeb69bf0
linux /vmlinuz-2.6.32-2-generic root=UUID=1813202a-9b41-447a-8722-a43c84ac68bd ro single
initrd /initrd.img-2.6.32-2-generic
}
menuentry "Ubuntu lucid (development branch), memtest86+ (on /dev/sdb2)" {
insmod ext2
set root=(hd1,6)
search --no-floppy --fs-uuid --set 729b4c08-5928-4d4e-a804-de7daeb69bf0
linux /memtest86+.bin
}
menuentry "openSUSE 11.1 - 2.6.27.37-0.1 (on /dev/sdb8)" {
insmod ext2
set root=(hd1,8)
search --no-floppy --fs-uuid --set 99bf7774-b89f-40db-aea4-ac8f2956fd2a
linux /boot/vmlinuz-2.6.27.37-0.1-pae root=/dev/disk/by-id/usb-WD_5000AAK_External_574D41535930383435333936-0:0-part8 resume=/dev/disk/by-id/ata-ST9120821A_3PL0TY85-part8 splash=silent showopts vga=0x317
initrd /boot/initrd-2.6.27.37-0.1-pae
}
menuentry "Failsafe -- openSUSE 11.1 - 2.6.27.37-0.1 (on /dev/sdb8)" {
insmod ext2
set root=(hd1,8)
search --no-floppy --fs-uuid --set 99bf7774-b89f-40db-aea4-ac8f2956fd2a
linux /boot/vmlinuz-2.6.27.37-0.1-pae root=/dev/disk/by-id/usb-WD_5000AAK_External_574D41535930383435333936-0:0-part8 showopts ide=nodma apm=off noresume nosmp maxcpus=0 edd=off powersaved=off nohz=off highres=off processor.max_cstate=1 x11failsafe vga=0x317
initrd /boot/initrd-2.6.27.37-0.1-pae
}
### END /etc/grub.d/30_os-prober ###
### BEGIN /etc/grub.d/35_slackware ###
menuentry "Slackware Aggiunto" {
set root=(hd0,10)
search --no-floppy --fs-uuid --set /dev/sda10
linux /boot/vmlinuz-generic-2.6.29.6 root=UUID=/dev/sda10 ro quiet
}
### END /etc/grub.d/35_slackware ###
### 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 ###
Inoltre ti posto i relativi script di configurazione da cui hanno origine le parti del /grub.cfg che interessano a noi
Codice: Seleziona tutto
gian64@gian64-laptop:~$ cat /etc/grub.d/30_os-prober
#! /bin/sh -e
# grub-mkconfig helper script.
# Copyright (C) 2006,2007,2008,2009 Free Software Foundation, Inc.
#
# GRUB is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# GRUB is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with GRUB. If not, see <http://www.gnu.org/licenses/>.
prefix=/usr
exec_prefix=${prefix}
libdir=${exec_prefix}/lib
. ${libdir}/grub/grub-mkconfig_lib
found_other_os=
adjust_timeout () {
if [ "x${found_other_os}" = "x" ] ; then
if [ "x${GRUB_HIDDEN_TIMEOUT}" != "x" ] ; then
if [ "x${GRUB_HIDDEN_TIMEOUT_QUIET}" = "xtrue" ] ; then
verbose=
else
verbose=" --verbose"
fi
if [ "x${GRUB_HIDDEN_TIMEOUT}" = "x0" ] ; then
cat <<EOF
if [ \${timeout} != -1 ]; then
if keystatus; then
if keystatus --shift; then
set timeout=-1
else
set timeout=0
fi
else
if sleep$verbose --interruptible 3 ; then
set timeout=0
fi
fi
fi
EOF
else
cat << EOF
if [ \${timeout} != -1 ]; then
if sleep$verbose --interruptible ${GRUB_HIDDEN_TIMEOUT} ; then
set timeout=0
fi
fi
EOF
fi
fi
fi
}
if [ "x${GRUB_DISABLE_OS_PROBER}" = "xtrue" ]; then
adjust_timeout
exit 0
fi
if [ -z "`which os-prober 2> /dev/null`" -o -z "`which linux-boot-prober 2> /dev/null`" ] ; then
# missing os-prober and/or linux-boot-prober
adjust_timeout
exit 0
fi
OSPROBED="`os-prober | tr ' ' '^' | paste -s -d ' '`"
if [ -z "${OSPROBED}" ] ; then
# empty os-prober output, nothing doing
adjust_timeout
exit 0
fi
for OS in ${OSPROBED} ; do
DEVICE="`echo ${OS} | cut -d ':' -f 1`"
LONGNAME="`echo ${OS} | cut -d ':' -f 2 | tr '^' ' '`"
LABEL="`echo ${OS} | cut -d ':' -f 3 | tr '^' ' '`"
BOOT="`echo ${OS} | cut -d ':' -f 4`"
if [ -z "${LONGNAME}" ] ; then
LONGNAME="${LABEL}"
fi
echo "Found ${LONGNAME} on ${DEVICE}" >&2
found_other_os=1
case ${BOOT} in
chain)
cat << EOF
menuentry "${LONGNAME} (on ${DEVICE})" {
EOF
save_default_entry | sed -e "s/^/\t/"
prepare_grub_to_access_device ${DEVICE} | sed -e "s/^/\t/"
case ${LONGNAME} in
Windows\ Vista*|Windows\ 7*)
;;
*)
cat << EOF
drivemap -s (hd0) \${root}
EOF
;;
esac
cat <<EOF
chainloader +1
}
EOF
;;
linux)
LINUXPROBED="`linux-boot-prober ${DEVICE} 2> /dev/null | tr ' ' '^' | paste -s -d ' '`"
for LINUX in ${LINUXPROBED} ; do
LROOT="`echo ${LINUX} | cut -d ':' -f 1`"
LBOOT="`echo ${LINUX} | cut -d ':' -f 2`"
LLABEL="`echo ${LINUX} | cut -d ':' -f 3 | tr '^' ' '`"
LKERNEL="`echo ${LINUX} | cut -d ':' -f 4`"
LINITRD="`echo ${LINUX} | cut -d ':' -f 5`"
LPARAMS="`echo ${LINUX} | cut -d ':' -f 6- | tr '^' ' '`"
if [ -z "${LLABEL}" ] ; then
LLABEL="${LONGNAME}"
fi
if [ "${LROOT}" != "${LBOOT}" ]; then
LKERNEL="${LKERNEL#/boot}"
LINITRD="${LINITRD#/boot}"
fi
cat << EOF
menuentry "${LLABEL} (on ${DEVICE})" {
EOF
save_default_entry | sed -e "s/^/\t/"
prepare_grub_to_access_device ${LBOOT} | sed -e "s/^/\t/"
cat << EOF
linux ${LKERNEL} ${LPARAMS}
EOF
if [ -n "${LINITRD}" ] ; then
cat << EOF
initrd ${LINITRD}
EOF
fi
cat << EOF
}
EOF
done
;;
macosx)
OSXUUID="`grub-probe --target=fs_uuid --device ${DEVICE} 2> /dev/null`"
cat << EOF
menuentry "${LONGNAME} (on ${DEVICE})" {
EOF
save_default_entry | sed -e "s/^/\t/"
prepare_grub_to_access_device ${DEVICE} | sed -e "s/^/\t/"
cat << EOF
insmod vbe
do_resume=0
if [ /var/vm/sleepimage -nt10 / ]; then
if xnu_resume /var/vm/sleepimage; then
do_resume=1
fi
fi
if [ \$do_resume == 0 ]; then
xnu_uuid ${OSXUUID} uuid
if [ -f /Extra/DSDT.aml ]; then
acpi -e /Extra/DSDT.aml
fi
xnu_kernel /mach_kernel boot-uuid=\${uuid} rd=*uuid
if [ /System/Library/Extensions.mkext -nt /System/Library/Extensions ]; then
xnu_mkext /System/Library/Extensions.mkext
else
xnu_kextdir /System/Library/Extensions
fi
if [ -f /Extra/Extensions.mkext ]; then
xnu_mkext /Extra/Extensions.mkext
fi
if [ -d /Extra/Extensions ]; then
xnu_kextdir /Extra/Extensions
fi
if [ -f /Extra/devtree.txt ]; then
xnu_devtree /Extra/devtree.txt
fi
if [ -f /Extra/splash.jpg ]; then
insmod jpeg
xnu_splash /Extra/splash.jpg
fi
if [ -f /Extra/splash.png ]; then
insmod png
xnu_splash /Extra/splash.png
fi
if [ -f /Extra/splash.tga ]; then
insmod tga
xnu_splash /Extra/splash.tga
fi
fi
}
EOF
;;
hurd|*)
echo " ${LONGNAME} is not yet supported by grub-mkconfig." >&2
;;
esac
done
adjust_timeout
Questo fa parte integrante di grub2 e giuro che ci ho capito ben poco, quello che segue invece l'ho creato io
Codice: Seleziona tutto
gian64@gian64-laptop:~$ cat /etc/grub.d/35_slackware
#! /bin/sh -e
echo "Adding Slackware" >&2
cat << EOF
menuentry "Slackware Aggiunto" {
set root=(hd0,10)
search --no-floppy --fs-uuid --set /dev/sda10
linux /boot/vmlinuz-generic-2.6.29.6 root=UUID=/dev/sda10 ro quiet
}
EOF
Ti posto anche
un'altra discussione che ho intavolato su LQH da cui ho ricavato le soluzioni tentate.