update-grub reports error on inexistant device

Bug #441301 reported by Lorenzo Zoffoli
20
This bug affects 3 people
Affects Status Importance Assigned to Milestone
grub (Ubuntu)
Invalid
Undecided
Unassigned
Nominated for Lucid by seawolf

Bug Description

Binary package hint: grub

Executing `sudo update-grub` will report error: "error: cannot open `/dev/sdc' while attempting to get disk size"
 many times.

Full output:
$ sudo update-grub
error: cannot open `/dev/sdc' while attempting to get disk size
error: cannot open `/dev/sdc' while attempting to get disk size
Generating grub.cfg ...
error: cannot open `/dev/sdc' while attempting to get disk size
error: cannot open `/dev/sdc' while attempting to get disk size
error: cannot open `/dev/sdc' while attempting to get disk size
error: cannot open `/dev/sdc' while attempting to get disk size
error: cannot open `/dev/sdc' while attempting to get disk size
Found linux image: /boot/vmlinuz-2.6.31-11-generic
Found initrd image: /boot/initrd.img-2.6.31-11-generic
error: cannot open `/dev/sdc' while attempting to get disk size
error: cannot open `/dev/sdc' while attempting to get disk size
error: cannot open `/dev/sdc' while attempting to get disk size
error: cannot open `/dev/sdc' while attempting to get disk size
error: cannot open `/dev/sdc' while attempting to get disk size
error: cannot open `/dev/sdc' while attempting to get disk size
Found memtest86+ image: /boot/memtest86+.bin
Found Windows 7 (loader) on /dev/sda1
error: cannot open `/dev/sdc' while attempting to get disk size
error: cannot open `/dev/sdc' while attempting to get disk size
error: cannot open `/dev/sdc' while attempting to get disk size
done

However grub.cfg is correctly created and boot give no problems...

$ sudo fdisk -l

Disco /dev/sda: 320.1 GB, 320072933376 byte
255 testine, 63 settori/tracce, 38913 cilindri
Unità = cilindri di 16065 * 512 = 8225280 byte
Identificativo disco: 0xfaaca98d

Dispositivo Boot Start End Blocks Id System
/dev/sda1 * 1 13 102400 7 HPFS/NTFS
La partizione 1 non termina al limite del cilindro.
/dev/sda2 13 12749 102297600 7 HPFS/NTFS
/dev/sda3 12750 38913 210162330 5 Esteso
/dev/sda5 12750 24906 97651071 83 Linux
/dev/sda6 24907 38305 107627436 83 Linux
/dev/sda7 38306 38913 4883728+ 82 Linux swap / Solaris

Disco /dev/sdb: 1000.2 GB, 1000204886016 byte
255 testine, 63 settori/tracce, 121601 cilindri
Unità = cilindri di 16065 * 512 = 8225280 byte
Identificativo disco: 0x00036009

Dispositivo Boot Start End Blocks Id System
/dev/sdb1 1 121601 976760001 83 Linux

Revision history for this message
madden (linux-madfix) wrote :

Same effects here, while Karmic Beta was installed from an USB-Stick.

Disque /dev/sda: 320.1 Go, 320072933376 octets
255 têtes, 63 secteurs/piste, 38913 cylindres
Unités = cylindres de 16065 * 512 = 8225280 octets
Identifiant de disque : 0x167afea7

Périphérique Amorce Début Fin Blocs Id Système
/dev/sda1 1 538 4321453+ 82 Linux swap / Solaris
/dev/sda2 * 539 3671 25165822+ 83 Linux
/dev/sda3 3672 9750 48829567+ 83 Linux
/dev/sda4 9751 38913 234251797+ 5 Etendue
/dev/sda5 9751 12911 25390701 83 Linux
/dev/sda6 12912 15464 20506941 83 Linux
/dev/sda7 15465 18625 25390701 83 Linux
/dev/sda8 18626 21178 20506941 83 Linux
/dev/sda9 21179 24825 29294496 83 Linux
/dev/sda10 24826 26041 9767488+ 83 Linux
/dev/sda11 26042 29749 29784478+ 83 Linux
/dev/sda12 29750 38913 73609798+ 83 Linux

Revision history for this message
madden (linux-madfix) wrote :

An easy workaround :
Unplug any external usb device, then run :
sudo update-grub

That's rock ;-)

Revision history for this message
Ralph (ralph-puncher-deactivatedaccount) wrote :

I have a similar problem. My external USB disk is named sdc on some bootups and sdg on others. I have a test (Karmic) system installed on this disk (I have now made Karmic my standard system on a fix internal drive but the problem still persists). It seems that during system initialization the USB memory card readers (SD, SF, etc), of which there are 4, are either given their designations before the USB disk, which then becomes sdg, or afterward, in which case the external disk becomes sdc. as a circumvention of the "cannot open..." error messages I use gparted to get the disk designations, then rename the pre-defined /boot/grub/device.map[-sdc or sdg] entry appropriate to the configuration.
I have attached hwinfo listings of the two configurations taken 15 minutes apart.

Revision history for this message
Ralph (ralph-puncher-deactivatedaccount) wrote :

The second attachment is the problem/alternate configuration.

Revision history for this message
dino99 (9d9) wrote :

outdated report & no more maintained distro; please send a new one if that issue still exist (using ubuntu-bug)

Changed in grub (Ubuntu):
status: New → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.