[SOLVED] apt-get/aptitude stuck on grub->Generating grub.cfg

All Gurus once were Newbies
Forum rules
There are no such things as "stupid" questions. However if you think your question is a bit stupid, then this is the right place for you to post it. Please stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions prefer the other forums within the support section.
Before you post please read this

[SOLVED] apt-get/aptitude stuck on grub->Generating grub.cfg

Postby gorfou on Mon Nov 29, 2010 4:34 pm

Hello every one!

I'm running a new install of LMDE, with xp as dual-boot, installed from a dvd downloaded two months ago ( I did check the integrity, so no problem there), gurb installed just fine. During dist-upgrade with apt-get(500+ updates :D ), some packages where stuck when configuring. I ctrl+c'ed them. the problem is that running aptitude to try to solve this don't do better.
It is still stuck, after an half hour, showing this:

Code: Select all
sudo aptitude full-upgrade
Les paquets partiellement installés suivants seront configurés :
  grub-pc linux-image-2.6-686 linux-image-2.6.32-5-686
Aucun paquet ne va être installé, mis à jour ou enlevé.
0 paquets mis à jour, 0 nouvellement installés, 0 à enlever et 0 non mis à jour.
Il est nécessaire de télécharger 0 o d'archives. Après dépaquetage, 0 o seront utilisés.
Paramétrage de linux-image-2.6.32-5-686 (2.6.32-28) ...
Running depmod.
Running update-initramfs.
update-initramfs: Generating /boot/initrd.img-2.6.32-5-686
Examining /etc/kernel/postinst.d.
run-parts: executing /etc/kernel/postinst.d/dkms 2.6.32-5-686 /boot/vmlinuz-2.6.32-5-686
dkms: running auto installation service for kernel 2.6.32-5-686:
      ndiswrapper (1.56)...done.
run-parts: executing /etc/kernel/postinst.d/initramfs-tools 2.6.32-5-686 /boot/vmlinuz-2.6.32-5-686
run-parts: executing /etc/kernel/postinst.d/pm-utils 2.6.32-5-686 /boot/vmlinuz-2.6.32-5-686
run-parts: executing /etc/kernel/postinst.d/zz-update-grub 2.6.32-5-686 /boot/vmlinuz-2.6.32-5-686
Generating grub.cfg ...
Found Debian background: linuxmint.png
Found linux image: /boot/vmlinuz-2.6.32-5-686
Found initrd image: /boot/initrd.img-2.6.32-5-686



I am still waiting, now for more than half an hour. I googled for stuck grub, I searched some bug reports for debian, I tried to run
Code: Select all
sudo dpkg --configure -a

after killing the process (as recommended here), removing locking files when it was necessary ( /var/lib/dpkg/lock to get dpkg running, /var/cache/debconf/config.dat and then /var/cache/debconf/passwords.dat /var/cache/debconf/templates.dat to get aptitude working). I encountered the same problem. Removing those files and then running the above dpkg command after killing the aptitude process causes it to be stuck at the exact same point.

One important note : Gparted (see Gparted Screenshot under) shows me I got a 100G hdd when I only got 2x40G on my toshiba satellite laptop.

Could you please help me?
how can I be sure I'll be able to boot next time?
how to get grub working?

I put the lspci output at the bottom of this post.







Gparted Screenshot
Image

lspci output
Code: Select all
$ lspci
00:00.0 Host bridge: Intel Corporation Mobile 945GM/PM/GMS, 943/940GML and 945GT Express Memory Controller Hub (rev 03)
00:02.0 VGA compatible controller: Intel Corporation Mobile 945GM/GMS, 943/940GML Express Integrated Graphics Controller (rev 03)
00:02.1 Display controller: Intel Corporation Mobile 945GM/GMS/GME, 943/940GML Express Integrated Graphics Controller (rev 03)
00:1b.0 Audio device: Intel Corporation N10/ICH 7 Family High Definition Audio Controller (rev 02)
00:1c.0 PCI bridge: Intel Corporation N10/ICH 7 Family PCI Express Port 1 (rev 02)
00:1c.1 PCI bridge: Intel Corporation N10/ICH 7 Family PCI Express Port 2 (rev 02)
00:1c.2 PCI bridge: Intel Corporation N10/ICH 7 Family PCI Express Port 3 (rev 02)
00:1d.0 USB Controller: Intel Corporation N10/ICH 7 Family USB UHCI Controller #1 (rev 02)
00:1d.1 USB Controller: Intel Corporation N10/ICH 7 Family USB UHCI Controller #2 (rev 02)
00:1d.2 USB Controller: Intel Corporation N10/ICH 7 Family USB UHCI Controller #3 (rev 02)
00:1d.3 USB Controller: Intel Corporation N10/ICH 7 Family USB UHCI Controller #4 (rev 02)
00:1d.7 USB Controller: Intel Corporation N10/ICH 7 Family USB2 EHCI Controller (rev 02)
00:1e.0 PCI bridge: Intel Corporation 82801 Mobile PCI Bridge (rev e2)
00:1f.0 ISA bridge: Intel Corporation 82801GBM (ICH7-M) LPC Interface Bridge (rev 02)
00:1f.2 IDE interface: Intel Corporation 82801GBM/GHM (ICH7 Family) SATA IDE Controller (rev 02)
00:1f.3 SMBus: Intel Corporation N10/ICH 7 Family SMBus Controller (rev 02)
04:00.0 Network controller: Intel Corporation PRO/Wireless 3945ABG [Golan] Network Connection (rev 02)
05:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8101E/RTL8102E PCI Express Fast Ethernet controller (rev 01)
06:00.0 FireWire (IEEE 1394): VIA Technologies, Inc. VT6306/7/8 [Fire II(M)] IEEE 1394 OHCI Controller (rev c0)
06:04.0 CardBus bridge: ENE Technology Inc CB-712/4 Cardbus Controller (rev 10)
06:04.1 FLASH memory: ENE Technology Inc ENE PCI Memory Stick Card Reader Controller (rev 01)
06:04.2 SD Host controller: ENE Technology Inc ENE PCI Secure Digital Card Reader Controller (rev 01)
06:04.3 FLASH memory: ENE Technology Inc FLASH memory: ENE Technology Inc: (rev 01)
06:04.4 FLASH memory: ENE Technology Inc SD/MMC Card Reader Controller (rev 01)


EDIT : while preparing to shudown, keyboardInterrupted the hanging dpkg --configure -a and got the output shown in Full dkpg --configure -a. I choosed not to install grub and it seemed like there were some missing files.

Full dkpg --configure -a
Code: Select all
sudo dpkg --configure -a
Paramétrage de linux-image-2.6.32-5-686 (2.6.32-28) ...
Running depmod.
Running update-initramfs.
update-initramfs: Generating /boot/initrd.img-2.6.32-5-686
Examining /etc/kernel/postinst.d.
run-parts: executing /etc/kernel/postinst.d/dkms 2.6.32-5-686 /boot/vmlinuz-2.6.32-5-686
dkms: running auto installation service for kernel 2.6.32-5-686:
      ndiswrapper (1.56)...done.
run-parts: executing /etc/kernel/postinst.d/initramfs-tools 2.6.32-5-686 /boot/vmlinuz-2.6.32-5-686
run-parts: executing /etc/kernel/postinst.d/pm-utils 2.6.32-5-686 /boot/vmlinuz-2.6.32-5-686
run-parts: executing /etc/kernel/postinst.d/zz-update-grub 2.6.32-5-686 /boot/vmlinuz-2.6.32-5-686
Generating grub.cfg ...
Found Debian background: linuxmint.png
Found linux image: /boot/vmlinuz-2.6.32-5-686
Found initrd image: /boot/initrd.img-2.6.32-5-686
^CFailed to process /etc/kernel/postinst.d at /var/lib/dpkg/info/linux-image-2.6.32-5-686.postinst line 799.
dpkg : erreur de traitement de linux-image-2.6.32-5-686 (--configure) :
 sous-processus script post-installation installé tué par le signal (Interrompre)
dpkg : des problèmes de dépendances empêchent la configuration de linux-image-2.6-686 :
 linux-image-2.6-686 dépend de linux-image-2.6.32-5-686 ; cependant :
 Le paquet linux-image-2.6.32-5-686 n'est pas encore configuré.
dpkg : erreur de traitement de linux-image-2.6-686 (--configure) :
 problèmes de dépendances - laissé non configuré
Paramétrage de grub-pc (1.98+20100804-8) ...
grep: /tmp/os-prober.kTJ9nz/raided-map: Aucun fichier ou dossier de ce type
grep: /tmp/os-prober.kTJ9nz/swaps-map: Aucun fichier ou dossier de ce type
grep: /tmp/os-prober.kTJ9nz/mounted-map: Aucun fichier ou dossier de ce type
grep: /tmp/os-prober.kTJ9nz/raided-map: Aucun fichier ou dossier de ce type
grep: /tmp/os-prober.kTJ9nz/swaps-map: Aucun fichier ou dossier de ce type
grep: /tmp/os-prober.kTJ9nz/mounted-map: Aucun fichier ou dossier de ce type
rmdir: échec de suppression de « /var/lib/os-prober/mount »: Périphérique ou ressource occupé
grep: /tmp/os-prober.kTJ9nz/raided-map: Aucun fichier ou dossier de ce type
grep: /tmp/os-prober.kTJ9nz/swaps-map: Aucun fichier ou dossier de ce type
grep: /tmp/os-prober.kTJ9nz/mounted-map: Aucun fichier ou dossier de ce type
rmdir: échec de suppression de « /var/lib/os-prober/mount »: Périphérique ou ressource occupé
Generating grub.cfg ...
Found Debian background: linuxmint.png
Found linux image: /boot/vmlinuz-2.6.32-5-686
Found initrd image: /boot/initrd.img-2.6.32-5-686
^Cdpkg : erreur de traitement de grub-pc (--configure) :
 sous-processus script post-installation installé tué par le signal (Interrompre)
grep: /tmp/os-prober.ya1ljx/raided-map: Aucun fichier ou dossier de ce type
grep: /tmp/os-prober.ya1ljx/swaps-map: Aucun fichier ou dossier de ce type
grep: /tmp/os-prober.ya1ljx/mounted-map: Aucun fichier ou dossier de ce type
grep: /tmp/os-prober.ya1ljx/raided-map: Aucun fichier ou dossier de ce type
grep: /tmp/os-prober.ya1ljx/swaps-map: Aucun fichier ou dossier de ce type
grep: /tmp/os-prober.ya1ljx/mounted-map: Aucun fichier ou dossier de ce type
rmdir: échec de suppression de « /var/lib/os-prober/mount »: Périphérique ou ressource occupé
grep: /tmp/os-prober.ya1ljx/raided-map: Aucun fichier ou dossier de ce type
grep: /tmp/os-prober.ya1ljx/swaps-map: Aucun fichier ou dossier de ce type
grep: /tmp/os-prober.ya1ljx/mounted-map: Aucun fichier ou dossier de ce type
rmdir: échec de suppression de « /var/lib/os-prober/mount »: Périphérique ou ressource occupé
Des erreurs ont été rencontrées pendant l'exécution :
 linux-image-2.6.32-5-686
 linux-image-2.6-686
 grub-pc
gorfou
Level 1
Level 1
 
Posts: 20
Joined: Wed Dec 02, 2009 5:27 pm

Linux Mint is funded by ads and donations.
 

Re: [SOLVED] apt-get/aptitude stuck on grub->Generating grub

Postby gorfou on Mon Nov 29, 2010 5:50 pm

if you're stuck like I was, simply:
    kill package manager process (e.g. killall -15 aptitude)
    remove stuck configuration files ( remove /var/lib/dpkg/lock to get dpkg running /var/cache/debconf/config.dat /var/cache/debconf/passwords.dat /var/cache/debconf/templates.dat)
    reboot
    install something -i.e. rerun aptitude-
    if he asks you to configure some packets => Y (yes)
    if he asks you to install grub somewhere, don't, just type 'sudo grub-install /dev/sda' after

reboot always do the trick :)
gorfou
Level 1
Level 1
 
Posts: 20
Joined: Wed Dec 02, 2009 5:27 pm


Return to Newbie Questions

Who is online

Users browsing this forum: No registered users and 2 guests