Find the answer to your Linux question:
Page 1 of 2 1 2 LastLast
Results 1 to 10 of 17
Hi! I have just had a Linux box shipped back from overseas. For safety I carried the hard disk drives in my hand luggage. Now upon reconnecting the hard disks ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Jul 2005
    Location
    Manchester, UK
    Posts
    8

    Boot Errors


    Hi!

    I have just had a Linux box shipped back from overseas. For safety I carried the hard disk drives in my hand luggage. Now upon reconnecting the hard disks (I'm fairly sure I have done this correctly) and booting I receive the following error:

    Code:
    mkrootdev: label / not found
    Mounting root filesystem
    mount: error 2 mounting ext3
    pivotroot: pivot_root(/sysroot,/sysroot/initrd) failed: 2
    umount /initrd/proc failed: 2
    Freeing unused kernel memory: 128k freed
    Kernel panic: No init found. Try passing init= option to kernel.
    There appears to be some problem mounting the root file system, but I don't see why this should have happened or how to fix it! I don't know much about configuring the kernel so the 'init=' suggestion is a little daunting!?

    Can someone please offer some assistance? I have trawled the web for an answer but without much success!

    Thanks

  2. #2
    Linux Guru
    Join Date
    May 2004
    Location
    forums.gentoo.org
    Posts
    1,817
    Maybe you just put the boot drive in the wrong place. In the usual rig, there are 2 IDE channels, each of which can handle 2 IDE devices. Linux puts a name to each of these, set by how it is hardwired:

    hda Primary channel, Master drive
    hdb Primary channel, Slave drive
    hdc Secondary channel, Master drive
    hdd Secondary channel, Slave drive

    During boot, the boot scripts and then the kernel look for drives based on those names, so if you hook one up wrong, it won't boot. No big deal. Unless you need both drives to boot, there are only 4 ways to try before you find the right one. If that doesn't do it, we'll need to go just a little deeper, but not too.
    /IMHO
    //got nothin'
    ///this use to look better

  3. #3
    Just Joined!
    Join Date
    Jul 2005
    Location
    Manchester, UK
    Posts
    8
    Thanks for your reply drakebasher.

    I'm fairly certain that the main installation is on hda and I know for certain that hdb is simply a backup drive. I've tried connecting the main drive to both connectors on the primary channel but to no avail. I even tried removing the second hard disk altogether but that just caused a disk boot failure.

    The other channel is connected to the CD-ROM drive and I haven't touched this at all. In fact the ribbon can't even physically reach the hard disks so I don't that this can be involved.

    Any thoughts? Thanks again!

  4. $spacer_open
    $spacer_close
  5. #4
    Linux Guru
    Join Date
    May 2004
    Location
    forums.gentoo.org
    Posts
    1,817
    You didn't mention what bootloader you have. It is probably either Grub or LILO. I don't use LILO, so I can't help much there, but of course there are some similarities with Grub. The following may be useful if you have Grub:

    When you boot, you may get a menu with a choice of OSs to boot to, one of which will boot automatically after a few seconds. When you see the menu, press any key (try the up/down arrow keys) to "stop the clock"

    If you don't see a menu, you should at least see some screen other than the ones seen if you boot with no drive at all. When you see that screen, press any key to get the menu screen and "stop the clock"

    At that point, you should have some instructions for editing the menu entries or getting a Grub command line, etc. If you highlight the selected OS and then press 'e' to edit, you will see the boot script written to Grub. Please post that script here. It should look something like:
    Code:
    title My New Linux version 20.0.2
    root (hd0,0)
    kernel /vmlinuz-lots.of.numbers.etc root=LABEL=/
    initrd /initrd-lots.of.numbers.etc
    After writing all that down (we don't need the "lots.of.numbers.etc" part, the "vmlinuz" part alone will do) press esc to get back to the menu list. Press 'c' to get the Grub command line. Then do:
    Code:
    grub> root &#40;hd   <and then press tab>
    And write down what you get and post it here. You can then press esc to back out again and then safely shutdown the computer without needing to attempt booting.

    If you have LILO....
    /IMHO
    //got nothin'
    ///this use to look better

  6. #5
    Just Joined!
    Join Date
    Jul 2005
    Location
    Manchester, UK
    Posts
    8
    Thankfully I'm using Grub. I have only one OS option in my list: Red Hat Linux (2.4.20-8). But I guess this is what you're really after:

    Code:
    root &#40;hd0,0&#41;
    kernel /boot/vmlinuz-lots.of.numbers.etc ro root=LABEL=/ hdc=ide-scsi
    initrd /boot/initrd-lots.of.numbers.etc.img
    Pressing tab brings up:

    Code:
    grub> root &#40;hd
    Possible disks are&#58; hd0 hd1
    
    grub> root &#40;hd
    Hope this makes sense!

  7. #6
    Linux Guru
    Join Date
    May 2004
    Location
    forums.gentoo.org
    Posts
    1,817
    Red Hat likes that "LABEL" crap, but I don't see the value. But we'll have to work with it for now. Put both drives in place and do this: Get the Grub command line like you did before and then:
    Code:
    grub> root &#40;hd0,0&#41;
    grub> kernel /   <tab>
    &#40;you should get something like this&#58;&#41;
    boot  bin  etc  sbin  tmp  mnt  proc  root 
    &#40;If not, the root &#40; / &#41; partition may be on the other drive.  In any case, continue&#58;&#41;
    grub> root &#40;hd0,   <tab>
    &#40;What do you get?&#41;
    grub> root &#40;hd1,   <tab>
    &#40;again?&#41;
    grub> root &#40;hd1,0&#41;   <this time, hit enter>
    grub> kernel /   <tab>
    &#40;and again.&#41;
    This will give us an idea of the layout of your drives.

    Do you have another Linux system that we could read one or both of these drives from? If no, that's okay, it just might make things easier.
    /IMHO
    //got nothin'
    ///this use to look better

  8. #7
    Just Joined!
    Join Date
    Jul 2005
    Location
    Manchester, UK
    Posts
    8
    Aha - we appear to be getting somewhere:

    Code:
    grub> root &#40;hd0,0&#41;
    grub> kernel /   <tab>
    
    Possible files are&#58; lost+found dev home proc space var tmp etc root usr bin initrd lib mnt opt sbin misc tftpboot hdb poweroff .font.cache-1
    
    grub> root &#40;hd0,   <tab>
    
    Possible partitions are&#58;
      Partition num&#58; 0, Filesystem type is ext2fs, partition type 0x83
      Partition num&#58; 1, Filesystem type is ext2fs, partition type 0x83
      Partition num&#58; 2, Filesystem type is unknown, partition type 0x82
      Partition num&#58; 4, Filesystem type is ext2fs, partition type 0x83
    
    grub> root &#40;hd1,   <tab>
    grub> root &#40;hd1,0&#41;   <this time, hit enter>
    
    Error 5&#58; Partition table invalid or corrupt
    I presume there are no partitions on hd1 then? I don't have another Linux system available I'm afraid. Does this shed any light on the subject?

  9. #8
    Linux Guru
    Join Date
    May 2004
    Location
    forums.gentoo.org
    Posts
    1,817
    Quote Originally Posted by rigadon
    Code:
    grub> root &#40;hd0,0&#41;
    grub> kernel /   <tab>
    
    Possible files are&#58; lost+found dev home proc space var tmp etc root usr bin initrd lib mnt opt sbin misc tftpboot hdb poweroff .font.cache-1
    That list should have included "boot". Did it not? And what did you get when you did 'root (hd1, <tab>'? You should have gotten a list of partitions like you did for 'hd0,':
    Code:
    grub> root &#40;hd0,   <tab>
    
    Possible partitions are&#58;
      Partition num&#58; 0, Filesystem type is ext2fs, partition type 0x83
      Partition num&#58; 1, Filesystem type is ext2fs, partition type 0x83
      Partition num&#58; 2, Filesystem type is unknown, partition type 0x82
      Partition num&#58; 4, Filesystem type is ext2fs, partition type 0x83
    Also, assuming that doesn't get an error, try:
    Code:
    grub> root &#40;hd1,1&#41;   <enter>
    grub> kernel /   <tab>
    We have so far established that you have Linux partitions at hda1, hda2 and hda5. hda3 is a swap partition and hda4 is an extended partition (a container for logical partitions like hda5). The other drive should be the master drive on the secondary IDE channel to satisfy the kernel parameter 'hdc=ide-scsi'. That's some progress.
    /IMHO
    //got nothin'
    ///this use to look better

  10. #9
    Just Joined!
    Join Date
    Jul 2005
    Location
    Manchester, UK
    Posts
    8
    Apologies - boot is in the list also. Trust me to miss out the important one

    I didn't get anything back when I did 'root (hd1, <tab>' and both 'root(hd1,0)' and 'root(hd1,1)' give the Error 5 I posted previously - that's why I thought there were no partitions on hdb. But surely there must be at least ONE?!

    The other drive should be the master drive on the secondary IDE channel to satisfy the kernel parameter 'hdc=ide-scsi'.
    I had assumed that the 'hdc=ide-scsi' part applied to the CD-ROM drive on the secondary channel? Is this not correct?

  11. #10
    Linux Guru
    Join Date
    May 2004
    Location
    forums.gentoo.org
    Posts
    1,817
    I'll go with on the hdc=ide-scsi for the CDROM. And you said you haven't touched that, so that's good.

    I'm concerned that Grub can't read the second drive, but otherwise, it seems to me that you should be able to boot as long as the boot drive is mounted as Primary Master. (given the "hdb" subdirectory on (hd0,0), it seems certain that the second drive should be Primary Slave.) So here's the expected boot process:
    Grub loads and gets pointed to your boot partition where the menu is. Since it takes 4 different files to get the menu up, that indicates things are generally okay. The command 'root (hd0,0)' sets hda1 as the location where the kernel and initrd are located. The next command tells Grub the name of the kernel you want to boot. It also tells Grub that the kernel is in the /boot subdirectory on (hd0,0) and that the root filesystem is on the partition which is "labelled" '/'. Now, without a working Linux, we can't tell which physical partition that is: we need the 'e2label' command to see what labels have been put on which partitions. But since (hd0,0) has all the right subdirectories (including /boot!) that looks like it should probably be the root filesystem. It is possible that the second drive is actually the one with the root filesystem, but that would be a peculiar layout. (It is also possible that the root filesystem is on (hd0,1) or (hd0,4), but that leaves the question of 'why can't Grub find the one labelled '/'?') Is it possible that the BIOS settings for the second drive are incorrect, preventing Grub from understanding it?
    /IMHO
    //got nothin'
    ///this use to look better

Page 1 of 2 1 2 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •