[ubuntu-it] grub2 error 22
Roby Pozzato
roberto a robertopozzato.it
Ven 5 Mar 2010 23:13:21 GMT
Piviul ha scritto:
>> # grub-install --root-directory=/boot /dev/hda
Ci avviciniamo, ma siamo ancora lontani. :-(
Controllando grub.cfg mi sembra che imposti nei vari "menuentry" sempre
"set root=(hd0,2)", che dovrebbe andare bene, visto che /boot è
/dev/sda2, sia con quell'aggiunta che senza.
Poi, stimolato da paolo, ho controllato fstab, già che ero lì. Accidenti
a me, io facevo
root a ubuntu:~# cryptsetup luksOpen /dev/sda3 sda3_crypto
mentre in fstab c'è
/dev/mapper/sda3_crypt / ext4 errors=remount-ro 0 1
Notata la "o" finale nel nome del device? :-(
Corretto anche quello, riavvio e si va un passettino più avanti, adesso
si ferma alla shell di grub.
Mi armo di santa pazienza, e con un occhio su
http://grub.enbug.org/Manual#head-4ec5b739d92a8fa63f77205a4a9818a094d943bb
cerco di vedere dove arrivo.
Faccio così:
sh:grub> ls /
(per avere il contenuto di /boot)
sh:grub> linux /vmlinuz-2.6.31-19-generic-pae root=/dev/sda2 ro
(per caricare il kernel in memoria)
sh:grub> initrd /initrd.img-2.6.31-19-generic-pae
(perché se no mi dava un errore, abbiate pazienza ma non so cosa faccia,
quella roba lì)
sh:grub> boot
(per avviare il boot)
Ok, parte, mi fa sbloccare la swap e sda3 criptate, poi si impianta.
Questo l'output:
(...)
Begin: Starting AppArmor profiles...
mount: mounting /sys on /root/sys failed: no such file or directory
mount: mounting /dev on /root/dev failed: no such file or directory
Done
mount: mounting /sys on /root/sys failed: no such file or directory
mount: mounting /proc on /root/proc failed: no such file or directory
Target filesystem doesn't have /sbin/init
No init found. Try passing init=bootarg.
BusyBox v1.13.3 (Ubuntu 1:1.13.3-1ubuntu7) built-in shell (ash)
Enter 'help' for a list of built-in commands.
(initramfs)
Ovviamente digito 'help' ma il semplice elenco dei comandi mi dice poco.
Tutti quei "no such file or directory" dovrebbero dirmi qualcosa: certo
che /root/sys ecc. non esistono, ma chi gli ha detto di cercarli lì?
Solo che adesso devo proprio andare a dormire, nelle prossime 36 ore mi
aspettano 1.000 km di macchina, con i meteo che parlano di bufere di
neve. :-(
Ci ripenserò domenica pomeriggio, e se nel frattempo a qualcuno viene
qualche idea avrà tutta la mia gratitudine.
Se serve, questo è il 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,2)
search --no-floppy --fs-uuid --set b02b7ff5-8010-455f-9a74-51c6a1b1e24c
if loadfont /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-19-generic-pae" {
recordfail=1
if [ -n ${have_grubenv} ]; then save_env recordfail; fi
set quiet=1
insmod ext2
set root=(hd0,2)
search --no-floppy --fs-uuid --set b02b7ff5-8010-455f-9a74-51c6a1b1e24c
linux /vmlinuz-2.6.31-19-generic-pae root=/dev/mapper/sda3_crypt ro
quiet splash
initrd /initrd.img-2.6.31-19-generic-pae
}
menuentry "Ubuntu, Linux 2.6.31-19-generic-pae (recovery mode)" {
recordfail=1
if [ -n ${have_grubenv} ]; then save_env recordfail; fi
insmod ext2
set root=(hd0,2)
search --no-floppy --fs-uuid --set b02b7ff5-8010-455f-9a74-51c6a1b1e24c
linux /vmlinuz-2.6.31-19-generic-pae root=/dev/mapper/sda3_crypt ro single
initrd /initrd.img-2.6.31-19-generic-pae
}
menuentry "Ubuntu, Linux 2.6.31-14-generic-pae" {
recordfail=1
if [ -n ${have_grubenv} ]; then save_env recordfail; fi
set quiet=1
insmod ext2
set root=(hd0,2)
search --no-floppy --fs-uuid --set b02b7ff5-8010-455f-9a74-51c6a1b1e24c
linux /vmlinuz-2.6.31-14-generic-pae root=/dev/mapper/sda3_crypt ro
quiet splash
initrd /initrd.img-2.6.31-14-generic-pae
}
menuentry "Ubuntu, Linux 2.6.31-14-generic-pae (recovery mode)" {
recordfail=1
if [ -n ${have_grubenv} ]; then save_env recordfail; fi
insmod ext2
set root=(hd0,2)
search --no-floppy --fs-uuid --set b02b7ff5-8010-455f-9a74-51c6a1b1e24c
linux /vmlinuz-2.6.31-14-generic-pae root=/dev/mapper/sda3_crypt ro single
initrd /initrd.img-2.6.31-14-generic-pae
}
### 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 ###
if [ ${timeout} != -1 ]; then
if keystatus; then
if keystatus --shift; then
set timeout=-1
else
set timeout=0
fi
else
if sleep --interruptible 3 ; then
set timeout=0
fi
fi
fi
### 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 ###
Ancora grazie, e buon week end a tutti.
--
Roby
* http://www.sprazzidiluce.it
Maggiori informazioni sulla lista
ubuntu-it