Page 2 of 2

Re: Lost initrd

Posted: 26. Mar 2013, 10:05
by knome
As shown from your mount command , do you have usb memory devices attached (dev/sdc, sdd etc.)? Try unplugging these and then boot.

Has the kernel for aptosid been upgraded? This may have introduced a fault in the reading of devices. Can you fall back to an earlier kernel?

I've avoided Grub2 as an initial boot... I keep a small dedicated Grub legacy boot partition and chainload boot any installations from that including Salix Lilo boot.

Re: Lost initrd

Posted: 26. Mar 2013, 14:41
by hakerdefo
Van_Vinkle wrote:Thanks a lot, hakerdefo. I've followed your advice, but there is yet a problem.
After update-grub and reboot, trying to launch salix an error message appears:

Code: Select all

 error: unknown filesystem
I don't know where is the error, because, as said, /dev/sda3 is the partition in which salix' root resides.

Thanks for your support.

Van_Vinkle

Edit: Changed the content of /etc/grub.d/40_custom
okay. try this menuentry in your 40_custom file in aptosid.

Code: Select all

menuentry "Salix (on /dev/sda3)" --class gnu-linux --class gnu --class os {
   insmod part_msdos
   insmod ext2
   set root='(hd0,msdos3)'
   search --no-floppy --fs-uuid --set=root 17405d87-e0a8-4b36-94cd-27682c750d50
   linux /boot/vmlinuz-huge-smp-3.2.29-smp root=UUID=17405d87-e0a8-4b36-94cd-27682c750d50
}
i'm assuming you are using salix 14.0 with kernel 3.2.29-smp if you have different version of salix you'll have different kernel then you'll have to change the 'inux /boot/vmlinuz-huge-smp-3.2.29-smp' part in the above menuentry with the kernel version you have. if you are on salix 14.0 then no need to change anything.
Cheers!!!

Re: Lost initrd

Posted: 27. Mar 2013, 16:32
by Van_Vinkle
hakerdefo, unfortunately I've copied verbatim (changing only the kernel name) your configuration to 40_custom and it does not go. An error message "Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block (0,0)" arises again.

To return the favour, I can send my owl to attack the bird which is torturing you :D.

Best wishes.

Van_Vinkle

Re: Lost initrd

Posted: 28. Mar 2013, 11:54
by hakerdefo
Van_Vinkle wrote:hakerdefo, unfortunately I've copied verbatim (changing only the kernel name) your configuration to 40_custom and it does not go. An error message "Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block (0,0)" arises again.
Van_Vinkle
Let's try something different. boot your aptosid. delete the custom menuentry in 40_custom. now let's create an initrd and see what happens.
Open terminal and run the following commands

Code: Select all

sudo mount /dev/sda3 /mnt

Code: Select all

sudo mount --bind /dev /mnt/dev

Code: Select all

sudo mount --bind /proc /mnt/proc

Code: Select all

sudo mount --bind /sys /mnt/sys

Code: Select all

sudo chroot  /mnt

Code: Select all

cd /boot

Code: Select all

mkinitrd -c -k 2.6.37.6 -u -m -f ext4 -r /dev/sda3  -o /boot/initrd-huge-2.6.37.6

Code: Select all

exit

Code: Select all

sudo umount /mnt

Code: Select all

sudo update-grub

Code: Select all

sudo reboot
let us know if this works for you or not.
Van_Vinkle wrote:To return the favour, I can send my owl to attack the bird which is torturing you .

Best wishes.

Van_Vinkle
That bird helps me stay awake ;)

Re: Lost initrd

Posted: 29. Mar 2013, 11:01
by hakerdefo
Hello Van_vinkle! I was surfing the net and boy oh boy i stumbled upon this one at linuxquestions.org,
http://www.linuxquestions.org/questions ... 175455834/
There you have posted the result of bootinfoscript which looks like this,

Code: Select all

Boot Info Script 0.61      [1 April 2012]
 
 
============================= Boot Info Summary: ===============================
 
 => Grub2 (v1.99) is installed in the MBR of /dev/sda and looks at sector 1 of
    the same hard drive for core.img. core.img is at this location and uses an
    embedded config file:
   
    ---------------------------------------------------------------------------
    search.fs_uuid d1e46756-9e15-48e1-964e-3cd1b8263f71 root
    set prefix=($root)/boot/grub
    ---------------------------------------------------------------------------
    -----.
 => Grub2 (v1.99) is installed in the MBR of /dev/sdb and looks at sector 1 of
    the same hard drive for core.img. core.img is at this location and looks
    for (,msdos1)/boot/grub on this drive.
 
sda1: __________________________________________________________________________
 
    File system:       ext4
    Boot sector type:  -
    Boot sector info:
    Operating System:  
    Boot files:        
 
sda2: __________________________________________________________________________
 
    File system:       ext4
    Boot sector type:  -
    Boot sector info:
    Operating System:  
    Boot files:        
 
sda3: __________________________________________________________________________
 
    File system:       swap
    Boot sector type:  -
    Boot sector info:
 
sda4: __________________________________________________________________________
 
    File system:       ext4
    Boot sector type:  -
    Boot sector info:
    Operating System:  
    Boot files:        
 
sdb1: __________________________________________________________________________
 
    File system:       ext4
    Boot sector type:  Grub2 (v1.99)
    Boot sector info:  Grub2 (v1.99) is installed in the boot sector of sdb1
                       and looks at sector 48696752 of the same hard drive
                       for core.img. core.img is at this location and looks
                       for (,msdos1)/boot/grub on this drive.
    Mounting failed:   mount: /dev/sdb1 already mounted or sdb1 busy
 
sdb2: __________________________________________________________________________
 
    File system:       ext4
    Boot sector type:  -
    Boot sector info:
    Operating System:  
    Boot files:        
 
sdb3: __________________________________________________________________________
 
    File system:       ext4
    Boot sector type:  -
    Boot sector info:
    Operating System:  Slackware 13.37.0
    Boot files:        /etc/fstab
 
============================ Drive/Partition Info: =============================
 
Drive: sda _____________________________________________________________________
 
Disk /dev/sda: 250.1 GB, 250059350016 bytes
255 heads, 63 sectors/track, 30401 cylinders, total 488397168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
 
Partition  Boot  Start Sector    End Sector  # of Sectors  Id System
 
/dev/sda1    *             63    37,110,149    37,110,087  83 Linux
/dev/sda2          37,110,150   317,988,863   280,878,714  83 Linux
/dev/sda3         483,877,800   488,392,064     4,514,265  82 Linux swap / Solaris
/dev/sda4         317,988,864   483,876,863   165,888,000  83 Linux
 
 
Drive: sdb _____________________________________________________________________
 
Disk /dev/sdb: 82.0 GB, 81964302336 bytes
255 heads, 63 sectors/track, 9964 cylinders, total 160086528 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
 
Partition  Boot  Start Sector    End Sector  # of Sectors  Id System
 
/dev/sdb1           6,205,440    98,643,967    92,438,528  83 Linux
/dev/sdb2               2,048     6,205,439     6,203,392  83 Linux
/dev/sdb3          98,643,968   160,086,015    61,442,048  83 Linux
 
 
"blkid" output: ________________________________________________________________
 
Device           UUID                                   TYPE       LABEL
 
/dev/sda1        9c20d769-2927-4bcd-bb03-73c5c384b6b2   ext4      
/dev/sda2        91436a3a-1b66-45f9-8e50-4be8e3b4fd4f   ext4      
/dev/sda3        41809959-28b0-449b-9deb-e1495e2b742e   swap      
/dev/sda4        a29f44f5-75aa-48f8-90ad-2dc8ee1c4fb7   ext4      
/dev/sdb1        d1e46756-9e15-48e1-964e-3cd1b8263f71   ext4      
/dev/sdb2        122c0f1c-9f47-475b-b460-2d6188b0c440   ext4      
/dev/sdb3        17405d87-e0a8-4b36-94cd-27682c750d50   ext4      
 
================================ Mount points: =================================
 
Device           Mount_Point              Type       Options
 
/dev/disk/by-uuid/d1e46756-9e15-48e1-964e-3cd1b8263f71 /                        ext4       (rw,relatime,errors=remount-ro,data=ordered)
/dev/sda2        /home                    ext4       (rw,relatime,errors=remount-ro,data=ordered)
 
 
=============================== sdb3/etc/fstab: ================================
 
--------------------------------------------------------------------------------
/dev/sda3        swap             swap        defaults         0   0
/dev/sdb3        /                ext4        noatime,defaults 1   1
/dev/sda4        /home            ext4        defaults         1   2
/dev/sdb1        /media/disk      ext4        defaults         0   2   
/dev/sda2        /media/disk-1    ext4        defaults         1   1
/dev/sda1        /media/disk-2    ext4        defaults         1   3
/dev/sdb2        /media/disk-3    ext4        defaults         1   3
#/dev/cdrom      /mnt/cdrom       auto        noauto,owner,ro  0   0
#/dev/fd0        /mnt/floppy      auto        noauto,users,rw,umask=00 0   0
devpts           /dev/pts         devpts      gid=5,mode=620   0   0
proc             /proc            proc        defaults         0   0
tmpfs            /dev/shm         tmpfs       defaults         0   0
--------------------------------------------------------------------------------
 
=================== sdb3: Location of files loaded by Grub: ====================
 
           GiB - GB             File                                 Fragment(s)
 
  51.296623230 = 55.079329792   boot/vmlinuz                                   1
  51.296623230 = 55.079329792   boot/vmlinuz-huge-2.6.37.6                     1
 
========= Devices which don't seem to have a corresponding hard drive: =========
 
sdc sdd sde sdf
 
=============================== StdErr Messages: ===============================
 
xz: (stdin): Compressed data is corrupt
xz: (stdin): Compressed data is corrupt
xz: (stdin): Compressed data is corrupt
  No volume groups found
mdadm: No arrays found in config file or automatically
Now earlier when knome asked for the results of 'fdisk -l' you posted this,

Code: Select all

root@aptosidbox1:/etc/grub.d# fdisk -l

Disk /dev/sda: 82.0 GB, 81964302336 bytes
255 heads, 63 sectors/track, 9964 cylinders, total 160086528 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x7b83f016

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1         6205440    98643967    46219264   83  Linux
/dev/sda2            2048     6205439     3101696   83  Linux
/dev/sda3        98643968   160086015    30721024   83  Linux

Partition table entries are not in disk order

Disk /dev/sdb: 250.1 GB, 250059350016 bytes
255 heads, 63 sectors/track, 30401 cylinders, total 488397168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x000a9eb6

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1   *          63    37110149    18555043+  83  Linux
/dev/sdb2        37110150   317988863   140439357   83  Linux
/dev/sdb3       483877800   488392064     2257132+  82  Linux swap / Solaris
/dev/sdb4       317988864   483876863    82944000   83  Linux

Partition table entries are not in disk order
root@aptosidbox1:/etc/grub.d# 
Now what's interesting is according to the bootinfoscript 'sda3' is a swap partition. So the menuentry that we made won't work. But strangely according to the result of 'fdisk-l' 'sdb3' is swap partition. Most likely you changed the order of sda and sdb drives in your bios or changed the data cables of the drives connected to the motherboard. Anyways after analyzing the output of bootinfoscript i can say that salix is installed on 'sdb3'. So the following menuentry in 40_custom for sure will work,

Code: Select all

   menuentry "Salix (on /dev/sdb3)" --class gnu-linux --class gnu --class os {
   insmod part_msdos
   insmod ext2
   set root='(hd1,msdos3)'
   linux /boot/vmlinuz-huge-2.6.37.6 root=/dev/sdb3
}
And if you want to try you can still use my previous post and make an initrd cause that would be a fitting end to Lost initrd ;)
Cheers!!!

Re: Lost initrd

Posted: 29. Mar 2013, 19:40
by Van_Vinkle
Hi hakerdefo, I've tried your advice and it runs very well. Your solution making an initrd through chroot worked as expected. My file 40_custom looks now like this:

Code: Select all

#!/bin/sh
exec tail -n +3 $0
# 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.
    menuentry "Salix-Slackware 13.37 (on /dev/sda3)" --class gnu-linux --class gnu --class os {
       insmod part_msdos
       insmod ext2
       set root='(hd0,msdos3)'
       search --no-floppy --fs-uuid --set=root 17405d87-e0a8-4b36-94cd-27682c750d50
       linux /boot/vmlinuz root=UUID=17405d87-e0a8-4b36-94cd-27682c750d50
       initrd /boot/initrd-huge-2.6.37.6
    }
It has been necessary to add the last stanza "initrd /boot/initrd-huge-2.6.37.6" manually at the end of the script, and after running update-grub and rebooting, salix is again in my computer.

I posted in linux-questions because I wanted my salix running. I thought (not correctly) that in a very big forum like there, with thousands of members, I could find a solution more easily for my problem. Finally it has not been there but in this salix forum, much more modest, thanks to your help.

Concerning sda and sdb drives, it seems that they order is a random one.

Thank you very much again.

Van Vinkle

Re: Lost initrd [Solved]

Posted: 30. Mar 2013, 09:25
by hakerdefo
I'm happy that you got Salix booting again :D
The entry auto generated by grub2 os-prober should also work now. You can try it and if it boots Salix then there will be no need for 40_custom entry anymore.
Cheers!!!

Re: Lost initrd [Solved]

Posted: 30. Mar 2013, 16:25
by Van_Vinkle
For the sake of general knowledge: grub2 os-prober should work, but it does not always correctly. Before posting here, I've tried it many times and some times it detected correctly sidux, sometimes not. Why? I don't know.

Best wishes.

Re: Lost initrd [Solved]

Posted: 31. Mar 2013, 09:00
by hakerdefo
Van_vinkle wrote:Before posting here, I've tried it many times and some times it detected correctly sidux, sometimes not. Why?
What i meant was after you have created initrd in Salix, 'update-grub' command in aptosid would have regenerated the menuentry in grub2 and that new entry should be good enough to boot Salix and if it does then there is no need for custom entry. Anyways it might be a good idea to keep the custom entry as a backup. If you want to know more about creating custom grub2 menu just read the following guide,
https://help.ubuntu.com/community/Grub2/CustomMenus
Cheers!!!