Pagina 1 di 2

[Risolto] [Grub] sparito windows da grub (lubuntu)

Inviato: lunedì 15 novembre 2010, 13:55
da alegnu
Salve a tutti, questo è il mio primo post ed è anche la prima volta che (era ora  :P) riesco a far funzionare un sistema GNU/Linux come si deve sulla mia macchina!
Prima di esporvi il mio problema premetto che sono più che alle prime armi (anche per questo motivo non posso del tutto abbandonare windows) quindi spero che oltre a risolvere il mio problema sappiate darmi anche spiegazioni in modo tale da poter essere in grado di risolvere da solo la prossima volta...

Ecco il problema:
dopo aver installato lubuntu sul mio hd e fatto gli aggiornamenti del caso mi è sparita la scelta di windows xp dalla schermata di startup

Digitando il comando
sudo fdisk -l
mi esce questo:

Dispositivo Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1        4116    33055536+   7  HPFS/NTFS
/dev/sda2            4116        7477    26995713    5  Esteso
/dev/sda5            4116        7381    26227712   83  Linux
/dev/sda6            7381        7477      766976   82  Linux swap / Solaris

Re: [Grub] sparito windows da grub (lubuntu)

Inviato: lunedì 15 novembre 2010, 13:57
da alegnu
alegnu ha scritto: Salve a tutti, questo è il mio primo post ed è anche la prima volta che (era ora  :P) riesco a far funzionare un sistema GNU/Linux come si deve sulla mia macchina!
Prima di esporvi il mio problema premetto che sono più che alle prime armi (anche per questo motivo non posso del tutto abbandonare windows) quindi spero che oltre a risolvere il mio problema sappiate darmi anche spiegazioni in modo tale da poter essere in grado di risolvere da solo la prossima volta...

Ecco il problema:
dopo aver installato lubuntu sul mio hd e fatto gli aggiornamenti del caso mi è sparita la scelta di windows xp dalla schermata di startup

Digitando il comando
sudo fdisk -l
mi esce questo:

Dispositivo Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1        4116    33055536+   7  HPFS/NTFS
/dev/sda2            4116        7477    26995713    5  Esteso
/dev/sda5            4116        7381    26227712   83  Linux
/dev/sda6            7381        7477      766976   82  Linux swap / Solaris




Re: [Grub] sparito windows da grub (lubuntu)

Inviato: lunedì 15 novembre 2010, 14:03
da giulux
hai provato a fare nel terminale

Codice: Seleziona tutto

sudo update-grub
?

Re: [Grub] sparito windows da grub (lubuntu)

Inviato: lunedì 15 novembre 2010, 14:17
da alegnu
giulux ha scritto: hai provato a fare nel terminale

Codice: Seleziona tutto

sudo update-grub
?
Sì avevo provato ma niente

Re: [Grub] sparito windows da grub (lubuntu)

Inviato: lunedì 15 novembre 2010, 14:20
da giulux

Re: [Grub] sparito windows da grub (lubuntu)

Inviato: lunedì 15 novembre 2010, 14:22
da alegnu
giulux ha scritto: provato anche questa?
http://wiki.ubuntu-it.org/Amministrazio ... perareGrub
no, adesso provo...

Re: [Grub] sparito windows da grub (lubuntu)

Inviato: lunedì 15 novembre 2010, 15:03
da alegnu
giulux ha scritto: provato anche questa?
http://wiki.ubuntu-it.org/Amministrazio ... perareGrub
no purtroppo non funziona, e questi comandi non funzionano
sudo mount --bind /dev /mnt/dev
sudo mount --bind /proc /mnt/proc
sudo mount --bind /sys /mnt/sys

sudo chroot /mnt

Re: [Grub] sparito windows da grub (lubuntu)

Inviato: lunedì 15 novembre 2010, 15:10
da giulux
alegnu ha scritto:
giulux ha scritto: provato anche questa?
http://wiki.ubuntu-it.org/Amministrazio ... perareGrub
no purtroppo non funziona, e questi comandi non funzionano
sudo mount --bind /dev /mnt/dev
sudo mount --bind /proc /mnt/proc
sudo mount --bind /sys /mnt/sys

sudo chroot /mnt
che vuol dire non funzionano? posta il terminale

Re: [Grub] sparito windows da grub (lubuntu)

Inviato: lunedì 15 novembre 2010, 18:57
da alegnu
ecco qua

Codice: Seleziona tutto

To run a command as administrator (user "root"), use "sudo <command>".
See "man sudo_root" for details.

ubuntu@ubuntu:~$ sudo fdisk -l

Disk /dev/sda: 61.5 GB, 61492838400 bytes
255 heads, 63 sectors/track, 7476 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: 0x000ed275

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1        4116    33055536+   7  HPFS/NTFS
/dev/sda2            4116        7477    26995713    5  Extended
/dev/sda5            4116        7381    26227712   83  Linux
/dev/sda6            7381        7477      766976   82  Linux swap / Solaris

Disk /dev/sdb: 41.1 GB, 41110142976 bytes
255 heads, 63 sectors/track, 4998 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: 0x21512150

   Device Boot      Start         End      Blocks   Id  System

Disk /dev/sdc: 1039 MB, 1039663104 bytes
32 heads, 62 sectors/track, 1023 cylinders
Units = cylinders of 1984 * 512 = 1015808 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x70707573

This doesn't look like a partition table
Probably you selected the wrong device.

   Device Boot      Start         End      Blocks   Id  System
/dev/sdc1   ?      857863     1833814   968143376    d  Unknown
Partition 1 has different physical/logical beginnings (non-Linux?):
     phys=(255, 105, 46) logical=(857862, 3, 57)
Partition 1 has different physical/logical endings:
     phys=(370, 10, 5) logical=(1833813, 3, 24)
Partition 1 does not end on cylinder boundary.
/dev/sdc2   ?      857861     1132110   272054928    a  OS/2 Boot Manager
Partition 2 has different physical/logical beginnings (non-Linux?):
     phys=(781, 111, 63) logical=(857860, 26, 34)
Partition 2 has different physical/logical endings:
     phys=(357, 80, 50) logical=(1132109, 23, 59)
Partition 2 does not end on cylinder boundary.
/dev/sdc3   ?      891677     1783498   884685616+  6f  Unknown
Partition 3 has different physical/logical beginnings (non-Linux?):
     phys=(372, 97, 51) logical=(891676, 30, 47)
Partition 3 has different physical/logical endings:
     phys=(357, 32, 48) logical=(1783497, 4, 27)
Partition 3 does not end on cylinder boundary.
/dev/sdc4   ?     1454477     1454504       26849    a  OS/2 Boot Manager
Partition 4 has different physical/logical beginnings (non-Linux?):
     phys=(269, 114, 37) logical=(1454476, 12, 25)
Partition 4 has different physical/logical endings:
     phys=(0, 0, 0) logical=(1454503, 14, 30)
Partition 4 does not end on cylinder boundary.

Partition table entries are not in disk order
ubuntu@ubuntu:~$ sudo mount /dev/sda1 /mnt
ubuntu@ubuntu:~$ sudo mount --bind /dev /mnt/dev
mount: mount point /mnt/dev does not exist
ubuntu@ubuntu:~$ sudo mount --bind /proc /mnt/proc
mount: mount point /mnt/proc does not exist
ubuntu@ubuntu:~$ sudo mount --bind /sys /mnt/sys
mount: mount point /mnt/sys does not exist
ubuntu@ubuntu:~$ sudo chroot /mnt
chroot: failed to run command `/bin/bash': No such file or directory
ubuntu@ubuntu:~$ mount /dev/sda2 /boot
mount: only root can do that
ubuntu@ubuntu:~$ grub-install /dev/sda
cp: cannot create regular file `/boot/grub/915resolution.mod': Permission denied
ubuntu@ubuntu:~$ update-grub2
grub-mkconfig: You must run this as root
ubuntu@ubuntu:~$ sudo grub-install /dev/sda
/usr/sbin/grub-probe: error: cannot find a device for /boot/grub (is /dev mounted?).
ubuntu@ubuntu:~$ update-grub2
grub-mkconfig: You must run this as root
ubuntu@ubuntu:~$ sudo update-grub2
/usr/sbin/grub-probe: error: cannot find a device for / (is /dev mounted?).
ubuntu@ubuntu:~$ grub-install --recheck /dev/sda
rm: cannot remove `/boot/grub/915resolution.mod': Permission denied
ubuntu@ubuntu:~$ 

Re: [Grub] sparito windows da grub (lubuntu)

Inviato: lunedì 15 novembre 2010, 19:02
da alegnu
Vi ricordo di tenere presente che al momento sono quasi completamente estraneo al mondo di GNUlinux quindi non date niente per scontato e che questa distribuzione e' lubuntu

Re: [Grub] sparito windows da grub (lubuntu)

Inviato: martedì 16 novembre 2010, 12:42
da alegnu
Allora vi aggiorno sulla situazione: nello smanettare ho incasinato un bel po' quindi ho formattato tutto l'hd (!) e ho ricominciato da capo:

1-installato Windows sul primo hard disk
2-installato Lubuntu sul secondo Hard disk
3-testato il dual boot che funzionava alla perfezione
4-eseguito aggiornamenti di Lubuntu
5-WINDOWS XP E' DI NUOVO SPARITO DALLA SCHERMATA ALL'AVVIO!
6- >:(

roba da matti

Re: [Grub] sparito windows da grub (lubuntu)

Inviato: martedì 16 novembre 2010, 13:17
da Marcolea
Ho il tuo identico problema, solo con win 7 invece che con xp... :'(
Stessa sequenza: dopo il primo aggiornamento di lubuntu, nel grub sparisce ogni indicazione su windows...
prima dell'agiornamento tutto funzionava perfettamente  >:(
Ho provato anch'io col wiki indicato in precedenza, senza risultati...

Ciao
Marco

Re: [Grub] sparito windows da grub (lubuntu)

Inviato: martedì 16 novembre 2010, 13:29
da streetcross
postare grub.cfg

Re: [Grub] sparito windows da grub (lubuntu)

Inviato: martedì 16 novembre 2010, 13:37
da Marcolea
#
# 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
  set have_grubenv=true
  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 recordfail {
  set recordfail=1
  if [ -n "${have_grubenv}" ]; then if [ -z "${boot_once}" ]; then save_env recordfail; fi; fi
}

function load_video {
  insmod vbe
  insmod vga
}

insmod part_msdos
insmod ext2
set root='(hd0,msdos3)'
search --no-floppy --fs-uuid --set 7328b084-67e5-4f56-8163-5fcadffb8fbb
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,msdos3)'
search --no-floppy --fs-uuid --set 7328b084-67e5-4f56-8163-5fcadffb8fbb
set locale_dir=($root)/boot/grub/locale
set lang=it
insmod gettext
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/light-gray
### END /etc/grub.d/05_debian_theme ###

### BEGIN /etc/grub.d/10_linux ###
menuentry 'Ubuntu, with Linux 2.6.35-22-generic' --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
insmod part_msdos
insmod ext2
set root='(hd0,msdos3)'
search --no-floppy --fs-uuid --set 7328b084-67e5-4f56-8163-5fcadffb8fbb
linux /boot/vmlinuz-2.6.35-22-generic root=UUID=7328b084-67e5-4f56-8163-5fcadffb8fbb ro  quiet splash
initrd /boot/initrd.img-2.6.35-22-generic
}
menuentry 'Ubuntu, with Linux 2.6.35-22-generic (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
insmod part_msdos
insmod ext2
set root='(hd0,msdos3)'
search --no-floppy --fs-uuid --set 7328b084-67e5-4f56-8163-5fcadffb8fbb
echo 'Loading Linux 2.6.35-22-generic ...'
linux /boot/vmlinuz-2.6.35-22-generic root=UUID=7328b084-67e5-4f56-8163-5fcadffb8fbb ro single
echo 'Loading initial ramdisk ...'
initrd /boot/initrd.img-2.6.35-22-generic
}
### END /etc/grub.d/10_linux ###

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

### BEGIN /etc/grub.d/20_memtest86+ ###
menuentry "Memory test (memtest86+)" {
insmod part_msdos
insmod ext2
set root='(hd0,msdos3)'
search --no-floppy --fs-uuid --set 7328b084-67e5-4f56-8163-5fcadffb8fbb
linux16 /boot/memtest86+.bin
}
menuentry "Memory test (memtest86+, serial console 115200)" {
insmod part_msdos
insmod ext2
set root='(hd0,msdos3)'
search --no-floppy --fs-uuid --set 7328b084-67e5-4f56-8163-5fcadffb8fbb
linux16 /boot/memtest86+.bin console=ttyS0,115200n8
}
### END /etc/grub.d/20_memtest86+ ###

### 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 ###

Re: [Grub] sparito windows da grub (lubuntu)

Inviato: martedì 16 novembre 2010, 13:40
da streetcross
già, non c'è mi par strano se hai dato l'update grub, in ogni caso puoi usare l'aggiunta manuale della voce tramite apposito script ovviamente, non con la modifica del file stesso

Re: [Grub] sparito windows da grub (lubuntu)

Inviato: martedì 16 novembre 2010, 13:50
da Marcolea
streetcross ha scritto: già, non c'è mi par strano se hai dato l'update grub, in ogni caso puoi usare l'aggiunta manuale della voce tramite apposito script ovviamente, non con la modifica del file stesso
Bene...grazie....ma come si fa ad aggiungere lo script manualmente e soprattutto: qual'è lo script che si deve aggiungere..? :-[

Due neofiti al prezzo di uno... ;D

M.

Re: [Grub] sparito windows da grub (lubuntu)

Inviato: martedì 16 novembre 2010, 13:54
da streetcross
sopra vi hanno linkato il wiki, vi linco pure la mia guida, scritta in maniera davvero volgare  ;D basta fare quanto scritto http://streetcross.wordpress.com/2009/04/11/grub2-impariamolo/

Re: [Grub] sparito windows da grub (lubuntu)

Inviato: martedì 16 novembre 2010, 15:12
da alegnu
streetcross ha scritto: sopra vi hanno linkato il wiki, vi linco pure la mia guida, scritta in maniera davvero volgare  ;D basta fare quanto scritto http://streetcross.wordpress.com/2009/04/11/grub2-impariamolo/
grazie, immaginavo di non essere il solo, purtroppo questa guida prevede delle basi che non ho, non è che potresti incollarmi la parte della guida riguarda il mio problema e magari spiegarmi un po' più semplicemente come fare?
Grazie mille, vedo sereno all'orizzonte...

Re: [Grub] sparito windows da grub (lubuntu)

Inviato: martedì 16 novembre 2010, 15:17
da streetcross
in realtà non serve sapere niente, basta fare quanto scritto (beh certo bisogna sapere in che partizione hai installato windows, ma se non lo sai tu :) )

Codice: Seleziona tutto

Diciamo che all’appello c’è tutto quello che può interessare, manca però una cosa che potrebbe essere utile a chi utilizza MacOSX, Windows o magari un altro OS che vuole avviare col suo boot loader. Per aggiungere questa opzione basta cerare un altro file, ma va bene anche quello esempio, col seguente contenuto:
cat << _EOF
menuentry “Nome sistema operativo” {
set root=(hdX,Y)
chainloader +1
}
_EOF

In questo caso risulta possibile una altra via, ovvero editare il file etc/default/grub utile anche per altri aspetti:
# This file is sourced by update-grub, and its variables are propagated
# to its children in /etc/grub.d/
GRUB_DEFAULT=0
GRUB_TIMEOUT=5
GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`
GRUB_CMDLINE_LINUX=”quiet”# 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=640×480

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

ovvero aggiungendo queste righe:
GRUB_OTHER_TITLES=(“MacOSX” “FreeBSD”)
GRUB_OTHER_DEVICES=(/dev/sdxY /dev/sdyZ)

Ovviamente sostituendo i dati con i nostri. Come sempre ricordiamoci di aggiornare il GRUB2 dopo una modifica!
con aggiornare si intende

Codice: Seleziona tutto

sudo update-grub
ovviamente hdX,Y o /dev/sdxY va modificato mettendo la partizione deisderata, esempio: hd0,1 o /dev/sda1

Re: [Grub] sparito windows da grub (lubuntu)

Inviato: martedì 16 novembre 2010, 15:42
da alegnu
windows è  su /dev/sda1

ma non so come si fa a editare, se non è chiedere troppo mi diresti i passaggi?