Updates keep destroying initrd and boot config

Hi everyone,

I’m running a dual-boot Vista/OpenSuSE machine. It normally works fine, but occasionally after updating the system rebooting fails. Obviously, this is both frustrating and a bit scary.

The first time, both /boot/grub/menu.lst and /boot/initrd were missing or corrupted. The 2nd and 3rd time it seems to be only /boot/initrd with problems. I have managed to fix it each time using the dvd repair utility followed by Super Grub Disk.

Does anyone have an idea how to fix this? The only thing that I can think may be exotic about my configuration is the fact that I use Vista’s bootloader to call grub (in my root linux partition). Could Super Grub Disk have done something even stranger?

Here is all the info that I can think would be useful (I would be happy to provide more):

> sudo /sbin/sfdisk -l /dev/sda
Disque /dev/sda: 30394 cylindres, 255 têtes, 63 secteurs/piste
AVERTISSEMENT: la partition étendue ne débute pas sur une frontière de.
cylindres DOS et Linux interpréteront les contenus différemment.
Unités= cylindres de 8225280 octets, blocs de 1024 octets, décompte à partir de 0

   Périph Amor Début     Fin   #cyls    #blocs    Id  Système
/dev/sda1   *      0+   6373    6374-  51198131    7  HPFS/NTFS
/dev/sda2       6374+  25815-  19441- 156159832    7  HPFS/NTFS
                début: (c,h,s) expecté (1023,254,63) trouvé (1023,59,22)
/dev/sda3      25815+  30393    4579-  36778949    f  W95 Etendu (LBA)
/dev/sda4          0       -       0          0    0  Vide
/dev/sda5      25815+  26077-    262-   2102646+  82  Linux swap / Solaris
/dev/sda6      26077+  30393    4317-  34676271   83  Linux

/etc/fstab:

/dev/disk/by-id/ata-WDC_WD2500AAJS-75B4A0_WD-WMAT15666892-part5 swap    swap    default
s 0 0
/dev/disk/by-id/ata-WDC_WD2500AAJS-75B4A0_WD-WMAT15666892-part6 /       ext3    acl,use
r_xattr 1 1
/dev/disk/by-id/ata-WDC_WD2500AAJS-75B4A0_WD-WMAT15666892-part1 /windows/c      ntfs-3g
 users,gid=users,locale=fr_FR.UTF-8,exec 0 0
/dev/disk/by-id/ata-WDC_WD2500AAJS-75B4A0_WD-WMAT15666892-part2 /windows/d      ntfs-3g
 users,gid=users,locale=fr_FR.UTF-8,exec 0 0
proc    /proc   proc    defaults 0 0
sysfs   /sys    sysfs   noauto 0 0
debugfs /sys/kernel/debug       debugfs noauto 0 0
devpts  /dev/pts        devpts  mode=0620,gid=5 0 0

/boot/grub/menu.lst:

# Modified by YaST2. Last modification on Mon Aug 24 13:44:50 CEST 2009
default 0
timeout 8
gfxmenu (hd0,5)/boot/message
##YaST - activate

###Don't change this comment - YaST2 identifier: Original name: linux###
title SUSE LINUX
    root (hd0,5)
    kernel /boot/vmlinuz root=/dev/disk/by-id/ata-WDC_WD2500AAJS-75B4A0_WD-WMAT15666892
-part6    repair=1 resume=/dev/disk/by-id/ata-WDC_WD2500AAJS-75B4A0_WD-WMAT15666892-par
t5 splash=silent showopts vga=0x31a
    initrd /boot/initrd

###Don't change this comment - YaST2 identifier: Original name: failsafe###
title Failsafe -- SUSE LINUX
    root (hd0,5)
    kernel /boot/vmlinuz root=/dev/disk/by-id/ata-WDC_WD2500AAJS-75B4A0_WD-WMAT15666892
-part6 showopts ide=nodma apm=off noresume edd=off powersaved=off nohz=off highres=off
processor.max_cstate=1 x11failsafe vga=0x31a
    initrd /boot/initrd

Thanks in advance,
Jesse

PS: I was once able to repair the system using zypper, but I can’t remember or find the exact command again. Does anyone know what it is?

Don’t know the zypper command, but it must have been something like installing a rpm that calls mkinitrd.

Just today this happened to me, updating Milestone 6 with the latest updates. Repaired it through NET-install CD.

I don’t know if this helps, but I just checked

/var/log/YaST2/y2logmkinitrd

and see this but at the end:

Kernel image:   /boot/vmlinuz-2.6.27.29-0.1-trace
Initrd image:   /boot/initrd-2.6.27.29-0.1-trace
Root device:    /dev/disk/by-id/ata-WDC_WD2500AAJS-75B4A0_WD-WMAT15666892-part6 (/dev/s
da6) (mounted on / as ext3)
FATAL: Module ata_generic not found.
WARNING: no dependencies for kernel module 'ata_generic' found.
FATAL: Module piix not found.
WARNING: no dependencies for kernel module 'piix' found.
FATAL: Module ide_pci_generic not found.
WARNING: no dependencies for kernel module 'ide_pci_generic' found.
FATAL: Module usbhid not found.
WARNING: no dependencies for kernel module 'usbhid' found.
Kernel Modules: dock scsi_mod libata ahci ata_piix jbd mbcache ext3 crc-t10dif sd_mod u
sbcore ohci-hcd uhci-hcd ehci-hcd
Features:       block usb resume.userspace resume.kernel
Bootsplash:     openSUSE (1280x1024)
25834 blocks

What can make these fail, and what can I do?

I experienced the same problem. The update left my system with RAID unbootable for a wheek.

Usually when upgrading a kernel, mkinitrd is run a couple of times: for kernel-“flavor”, kernel-“flavor”-base, kernel-“flavor”-extra; the first time mkinitrd is called not all new kernel modules are available yet, therefor the errors. AFAIK.

I have decided to call mkinitrd manually after each kernel upgrade, just to make sure.

I see. In that case, thought, shouldn’t the mkinitrd errors happen only with the first few passes, and not with the last?

I should have included the whole log file before. As you can see, errors have several times, including on the last pass. Here it is:

jesse-local@alix:~> sudo cat /var/log/YaST2/y2logmkinitrd
root's password:                                         

Kernel image:   /boot/vmlinuz-2.6.27.7-9-default
Initrd image:   /boot/initrd-2.6.27.7-9-default 
Root device:    /dev/sda6 (mounted on / as ext3)
Kernel Modules: hwmon thermal_sys processor thermal fan jbd mbcache ext3 dock scsi_mod libata ahci edd crc-t10dif sd_mod usbcore ohci-hcd uhci-hcd ehci-hcd ff-memless hid usbhid                                                                                       
Features:       block usb resume.userspace resume.kernel                                
Bootsplash:     openSUSE (1280x1024)                                                    
26580 blocks                                                                            

Kernel image:   /boot/vmlinuz-2.6.27.7-9-default
Initrd image:   /boot/initrd-2.6.27.7-9-default 
Root device:    /dev/sda6 (mounted on / as ext3)
Kernel Modules: hwmon thermal_sys processor thermal fan jbd mbcache ext3 dock scsi_mod libata ahci edd crc-t10dif sd_mod usbcore ohci-hcd uhci-hcd ehci-hcd ff-memless hid usbhid                                                                                       
Features:       block usb resume.userspace resume.kernel                                
Bootsplash:     openSUSE (1280x1024)                                                    
26580 blocks                                                                            
2009-01-16 15:08:21 WARNING: GRUB::GrubDev2UnixDev: No partition found for /dev/sda with 3.                                                                                     

Kernel image:   /boot/vmlinuz-2.6.27.7-9-default
Initrd image:   /boot/initrd-2.6.27.7-9-default 
Root device:    /dev/sda6 (mounted on / as ext3)
Kernel Modules: hwmon thermal_sys processor thermal fan jbd mbcache ext3 dock scsi_mod libata ahci edd crc-t10dif sd_mod usbcore ohci-hcd uhci-hcd ehci-hcd ff-memless hid usbhid                                                                                       
Features:       block usb resume.userspace resume.kernel                                
Bootsplash:     openSUSE (1280x1024)                                                    
26580 blocks                                                                            
2009-01-16 15:09:00 WARNING: GRUB::GrubDev2UnixDev: No partition found for /dev/sda with 3.                                                                                     

Kernel image:   /boot/vmlinuz-2.6.27.25-0.1-default
Initrd image:   /boot/initrd-2.6.27.25-0.1-default 
node name not found                                
Root device (/dev/sda6) not found                  

Kernel image:   /boot/vmlinuz-2.6.27.25-0.1-default
Initrd image:   /boot/initrd-2.6.27.25-0.1-default 
Root device:    /dev/disk/by-id/ata-WDC_WD2500AAJS-75B4A0_WD-WMAT15666892-part6 (/dev/sda6) (mounted on / as ext3)                                                              
Kernel Modules: dock scsi_mod libata ahci ata_piix ata_generic ide-core piix ide-pci-generic jbd mbcache ext3 crc-t10dif sd_mod usbcore ohci-hcd uhci-hcd ehci-hcd ff-memless hid usbhid                                                                                
Features:       block usb resume.userspace resume.kernel                                
Bootsplash:     openSUSE (1280x1024)                                                    
26613 blocks                                                                            

Kernel image:   /boot/vmlinuz-2.6.27.25-0.1-trace
Initrd image:   /boot/initrd-2.6.27.25-0.1-trace 
Root device:    /dev/disk/by-id/ata-WDC_WD2500AAJS-75B4A0_WD-WMAT15666892-part6 (/dev/sda6) (mounted on / as ext3)                                                              
FATAL: Module ata_generic not found.                                                    
WARNING: no dependencies for kernel module 'ata_generic' found.                         
FATAL: Module piix not found.                                                           
WARNING: no dependencies for kernel module 'piix' found.                                
FATAL: Module ide_pci_generic not found.                                                
WARNING: no dependencies for kernel module 'ide_pci_generic' found.                     
FATAL: Module usbhid not found.                                                         
WARNING: no dependencies for kernel module 'usbhid' found.                              
Kernel Modules: dock scsi_mod libata ahci ata_piix jbd mbcache ext3 crc-t10dif sd_mod usbcore ohci-hcd uhci-hcd ehci-hcd                                                        
Features:       block usb resume.userspace resume.kernel                                
Bootsplash:     openSUSE (1280x1024)                                                    
25832 blocks                                                                            

Kernel image:   /boot/vmlinuz-2.6.27.29-0.1-default
Initrd image:   /boot/initrd-2.6.27.29-0.1-default 
Root device:    /dev/disk/by-id/ata-WDC_WD2500AAJS-75B4A0_WD-WMAT15666892-part6 (/dev/sda6) (mounted on / as ext3)                                                              
Kernel Modules: dock scsi_mod libata ahci ata_piix ata_generic ide-core piix ide-pci-generic jbd mbcache ext3 crc-t10dif sd_mod usbcore ohci-hcd uhci-hcd ehci-hcd ff-memless hid usbhid                                                                                
Features:       block usb resume.userspace resume.kernel
Bootsplash:     openSUSE (1280x1024)
26616 blocks

Kernel image:   /boot/vmlinuz-2.6.27.29-0.1-trace
Initrd image:   /boot/initrd-2.6.27.29-0.1-trace
Root device:    /dev/disk/by-id/ata-WDC_WD2500AAJS-75B4A0_WD-WMAT15666892-part6 (/dev/sda6) (mounted on / as ext3)
FATAL: Module ata_generic not found.
WARNING: no dependencies for kernel module 'ata_generic' found.
FATAL: Module piix not found.
WARNING: no dependencies for kernel module 'piix' found.
FATAL: Module ide_pci_generic not found.
WARNING: no dependencies for kernel module 'ide_pci_generic' found.
FATAL: Module usbhid not found.
WARNING: no dependencies for kernel module 'usbhid' found.
Kernel Modules: dock scsi_mod libata ahci ata_piix jbd mbcache ext3 crc-t10dif sd_mod usbcore ohci-hcd uhci-hcd ehci-hcd
Features:       block usb resume.userspace resume.kernel
Bootsplash:     openSUSE (1280x1024)
25834 blocks

Kernel image:   /boot/vmlinuz-2.6.27.29-0.1-default
Initrd image:   /boot/initrd-2.6.27.29-0.1-default
Root device:    /dev/disk/by-id/ata-WDC_WD2500AAJS-75B4A0_WD-WMAT15666892-part6 (/dev/sda6) (mounted on / as ext3)
Kernel Modules: dock scsi_mod libata ahci ata_piix ata_generic ide-core piix ide-pci-generic jbd mbcache ext3 crc-t10dif sd_mod usbcore ohci-hcd uhci-hcd ehci-hcd ff-memless hid usbhid
Features:       block usb resume.userspace resume.kernel
Bootsplash:     openSUSE (1280x1024)
26616 blocks

Kernel image:   /boot/vmlinuz-2.6.27.29-0.1-trace
Initrd image:   /boot/initrd-2.6.27.29-0.1-trace
Root device:    /dev/disk/by-id/ata-WDC_WD2500AAJS-75B4A0_WD-WMAT15666892-part6 (/dev/sda6) (mounted on / as ext3)
FATAL: Module ata_generic not found.
WARNING: no dependencies for kernel module 'ata_generic' found.
FATAL: Module piix not found.
WARNING: no dependencies for kernel module 'piix' found.
FATAL: Module ide_pci_generic not found.
WARNING: no dependencies for kernel module 'ide_pci_generic' found.
FATAL: Module usbhid not found.
WARNING: no dependencies for kernel module 'usbhid' found.
Kernel Modules: dock scsi_mod libata ahci ata_piix jbd mbcache ext3 crc-t10dif sd_mod usbcore ohci-hcd uhci-hcd ehci-hcd
Features:       block usb resume.userspace resume.kernel
Bootsplash:     openSUSE (1280x1024)
25834 blocks

I’ve seen the same mkinitrd partition error in openSUSE…
Can you post the results of running (as root):

# hwinfo --partition|grep --context=15 /dev/sda

You may like to track the mkinitrd warning issue here:

https://bugzilla.novell.com/show_bug.cgi?id=543076

Hi hedge_hog, thanks for getting back to me. Here’s the result that you asked for.

Also, thanks for posting the bug. I’ll follow it for sure.

Jesse


> sudo hwinfo --partition|grep --context=15 /dev/sda
21: None 00.0: 11300 Partition
  [Created at block.412]
  UDI: /org/freedesktop/Hal/devices/volume_uuid_4452153E52153660
  Unique ID: bdUI.SE1wIdpsiiC
  Parent ID: 3OOL.UK5FR6qJlS2
  SysFS ID: /class/block/sda/sda1
  Hardware Class: partition
  Model: "Partition"
  Device File: /dev/sda1
  Device Files: /dev/sda1, /dev/disk/by-id/scsi-SATA_WDC_WD2500AAJS-_WD-WMAT15666892-part1, /dev/disk/by-id/ata-WDC_WD2500AAJS-75B4A0_WD-WMAT15666892-part1, /dev/disk/by-path/pci-0000:00:1f.2-scsi-0:0:0:0-part1, /dev/disk/by-uuid/4452153E52153660
  Config Status: cfg=no, avail=yes, need=no, active=unknown
  Attached to: #20 (Disk)

22: None 00.0: 11300 Partition
  [Created at block.412]
  UDI: /org/freedesktop/Hal/devices/volume_uuid_EC883AB8883A815E
  Unique ID: 2pkM.SE1wIdpsiiC
  Parent ID: 3OOL.UK5FR6qJlS2
  SysFS ID: /class/block/sda/sda2
  Hardware Class: partition
  Model: "Partition"
  Device File: /dev/sda2
  Device Files: /dev/sda2, /dev/disk/by-id/scsi-SATA_WDC_WD2500AAJS-_WD-WMAT15666892-part2, /dev/disk/by-id/ata-WDC_WD2500AAJS-75B4A0_WD-WMAT15666892-part2, /dev/disk/by-path/pci-0000:00:1f.2-scsi-0:0:0:0-part2, /dev/disk/by-uuid/EC883AB8883A815E, /dev/disk/by-label/DATA
  Config Status: cfg=no, avail=yes, need=no, active=unknown
  Attached to: #20 (Disk)

23: None 00.0: 11300 Partition
  [Created at block.412]
  UDI: /org/freedesktop/Hal/devices/volume_part3_size_1024
  Unique ID: W__Q.SE1wIdpsiiC
  Parent ID: 3OOL.UK5FR6qJlS2
  SysFS ID: /class/block/sda/sda3
  Hardware Class: partition
  Model: "Partition"
  Device File: /dev/sda3
  Device Files: /dev/sda3, /dev/disk/by-id/scsi-SATA_WDC_WD2500AAJS-_WD-WMAT15666892-part3, /dev/disk/by-id/ata-WDC_WD2500AAJS-75B4A0_WD-WMAT15666892-part3, /dev/disk/by-path/pci-0000:00:1f.2-scsi-0:0:0:0-part3
  Config Status: cfg=no, avail=yes, need=no, active=unknown
  Attached to: #20 (Disk)

24: None 00.0: 11300 Partition
  [Created at block.412]
  UDI: /org/freedesktop/Hal/devices/volume_uuid_ec6389b3_078d_40e3_962c_0835e39c7346
  Unique ID: QLVZ.SE1wIdpsiiC
  Parent ID: 3OOL.UK5FR6qJlS2
  SysFS ID: /class/block/sda/sda5
  Hardware Class: partition
  Model: "Partition"
  Device File: /dev/sda5
  Device Files: /dev/sda5, /dev/disk/by-id/scsi-SATA_WDC_WD2500AAJS-_WD-WMAT15666892-part5, /dev/disk/by-id/ata-WDC_WD2500AAJS-75B4A0_WD-WMAT15666892-part5, /dev/disk/by-path/pci-0000:00:1f.2-scsi-0:0:0:0-part5, /dev/disk/by-uuid/ec6389b3-078d-40e3-962c-0835e39c7346
  Config Status: cfg=no, avail=yes, need=no, active=unknown
  Attached to: #20 (Disk)

25: None 00.0: 11300 Partition
  [Created at block.412]
  UDI: /org/freedesktop/Hal/devices/volume_uuid_fbb07455_3e0e_4cdf_8cba_7b7cb51d4e06
  Unique ID: tWld.SE1wIdpsiiC
  Parent ID: 3OOL.UK5FR6qJlS2
  SysFS ID: /class/block/sda/sda6
  Hardware Class: partition
  Model: "Partition"
  Device File: /dev/sda6
  Device Files: /dev/sda6, /dev/root, /dev/disk/by-id/scsi-SATA_WDC_WD2500AAJS-_WD-WMAT15666892-part6, /dev/disk/by-id/ata-WDC_WD2500AAJS-75B4A0_WD-WMAT15666892-part6, /dev/disk/by-path/pci-0000:00:1f.2-scsi-0:0:0:0-part6, /dev/disk/by-uuid/fbb07455-3e0e-4cdf-8cba-7b7cb51d4e06
  Config Status: cfg=no, avail=yes, need=no, active=unknown
  Attached to: #20 (Disk)

Well, my french isn’t good (and never was) but in short I would translate the warnings with “your partition table is seriously messed up” (and this is a potential cause for such strange behavior).

Run


su - -c "fdisk -l"

to get the same output in english.

Here you go. Interestingly, I no longer get the error message! Same thing when I run it in French, by the way.

But yes, there may be a problem with my partition tables. I messed around with gparted a few times before I finally had my dual-boot setup correctly.

Still, though, I don’t see the link with mkinitrd…

Jesse


> su - -c "fdisk -l"
Disk /dev/sda: 250.0 GB, 250000000000 bytes
255 heads, 63 sectors/track, 30394 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x8fa14bd0

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1        6374    51198131    7  HPFS/NTFS
/dev/sda2            6375       25816   156159832    7  HPFS/NTFS
/dev/sda3           25816       30394    36778949    f  W95 Ext'd (LBA)
/dev/sda5           25816       26078     2102646+  82  Linux swap / Solaris
/dev/sda6           26078       30394    34676271   83  Linux

Disk /dev/sdb: 512 MB, 512483328 bytes
16 heads, 63 sectors/track, 993 cylinders
Units = cylinders of 1008 * 512 = 516096 bytes
Disk identifier: 0x840de23e

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1               1         992      499851+   6  FAT16

Disk /dev/dm-0: 10 MB, 10485248 bytes
255 heads, 63 sectors/track, 1 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x00000000

     Device Boot      Start         End      Blocks   Id  System

For comparability can you also post:

# parted /dev/sda print

TIA

Allright, here we go. Does this look strange?


> sudo parted /dev/sda print
root's password:
Model: ATA WDC WD2500AAJS-7 (scsi)
Disque /dev/sda : 250GB
Taille des secteurs (logiques/physiques): 512B/512B
Table de partition : msdos

Numéro  Début   Fin     Taille  Type      Système de fichiers  Fanions
 1      1049kB  52,4GB  52,4GB  primary   ntfs                 démarrage, , , , , , , , , type=07, ,
 2      52,4GB  212GB   160GB   primary   ntfs                 , , , , , , , , , type=07, ,
 3      212GB   250GB   37,7GB  extended                       , , , , , , lba, , , type=0f, ,
 5      212GB   214GB   2153MB  logical   linux-swap           , , , , , , , , , type=82, ,
 6      214GB   250GB   35,5GB  logical   ext3                 , , , , , , , , , type=83, ,

Allright, here we go. Does this look strange?

Can’t say for sure.
Our setup shares some common and some different features
E.g Both our boot patitions are on /dev/sda3. However in my case the “Partition table entries are not in disk order”
but yours are, etc.

We’ll need to wait for a mkinitrd guru diagnose/solve this, or ask from more info.

There is one other user seeing this issue, if they respond with info we might be able to pinpoint what the cause is.
Thanks for the prompt responses.