Page 1 of 2 12 LastLast
Results 1 to 10 of 14

Thread: not booting after swapping boot drive to different SATA controller

  1. #1

    Default not booting after swapping boot drive to different SATA controller

    Hi,

    After attaching my boot drive to another SATA controller the OpenSUSE 13.1 install on the boot drive doesn't boot anymore.

    Code:
    Waiting for device /dev/root to appear: ......................... Could not find /dev/root. 
    Want me to fall back to ata-Hitachi_HUA722010CLA330_JPW9K0J818PA7L-part3 (Y/n)
    I don't understand why it's not booting as all partitions except for swap are referred to through their UUID.

    To try and resolve this I booted into the Rescue mode from the OpenSUSE install DVD (or install USB here). The contents of /dev/disk/by-id and /dev/disk/by-uuid are as follows

    Code:
    ata-Hitachi_HUA722010CLA330_JPW9K0J818PA7L
    ata-Hitachi_HUA722010CLA330_JPW9K0J818PA7L-part1
    ata-Hitachi_HUA722010CLA330_JPW9K0J818PA7L-part2
    ata-Hitachi_HUA722010CLA330_JPW9K0J818PA7L-part3
    ata-Hitachi_HUA722010CLA330_JPW9K0J818PA7L-part4
    Code:
    17eef133-3073-436b-8af1-4bc20ddc990b
    8452-E359
    8d2536f2-d284-4bca-8ac1-b80d7a10f1a0
    96d51a1b-91b3-4209-ab23-f9cf0a8f51e8
    9aa080b9-3d79-4671-a239-6eaa197659cd
    B0CE-6610
    There are four ext4 partitions on the drive, swap (-part1), boot (-part2), root (-part3) and home (-part4). The short UUIDs are the USB flash drives connected. Then I mounted ata-Hitachi_HUA722010CLA330_JPW9K0J818PA7L-part2 as /mnt/boot and ata-Hitachi_HUA722010CLA330_JPW9K0J818PA7L-part3 as /mnt/root to have a look at fstab and grub2 config.

    /mnt/root/etc/fstab contains the entries

    Code:
    /dev/disk/by-id/ata-Hitachi_HUA722010CLA330_JPW9K0J81A552L-part1 swap                 swap       defaults              0 0
    UUID=17eef133-3073-436b-8af1-4bc20ddc990b /                    ext4       acl,user_xattr        1 1
    UUID=96d51a1b-91b3-4209-ab23-f9cf0a8f51e8 /boot                ext4       acl,user_xattr        1 2
    UUID=8d2536f2-d284-4bca-8ac1-b80d7a10f1a0 /home                ext4       acl,user_xattr        1 2
    and the boot entry from /mnt/boot/grub2/grub.cfg is

    Code:
    menuentry 'openSUSE 13.1' --class 'opensuse-13-1' --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-simple-17eef133-3073-436b-8af1-4bc20ddc990b' {
        load_video
        set gfxpayload=keep
        insmod gzio
        insmod part_gpt
        insmod ext2
        set root='hd0,gpt2'
        if [ x$feature_platform_search_hint = xy ]; then
          search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt2 --hint-efi=hd0,gpt2 --hint-baremetal=ahci0,gpt2  96d51a1b-91b3-4209-ab23-f9cf0a8f51e8
        else
          search --no-floppy --fs-uuid --set=root 96d51a1b-91b3-4209-ab23-f9cf0a8f51e8
        fi
        echo    'Loading Linux 3.11.10-7-desktop ...'
        linux    /vmlinuz-3.11.10-7-desktop root=UUID=17eef133-3073-436b-8af1-4bc20ddc990b   resume=/dev/disk/by-id/ata-Hitachi_HUA722010CLA330_JPW9K0J81A552L-part1 splash=silent quiet showopts intel_iommu=on
        echo    'Loading initial ramdisk ...'
        initrd    /initrd-3.11.10-7-desktop
    }
    The swap partition is incorrectly referenced (boot drive was cloned from another system and hadn't corrected this yet) but / seems to be well referenced to as root=UUID=17eef133-3073-436b-8af1-4bc20ddc990b - manually mounting this UUID confirms that this is the root partition.

    Any pointers are appreciated as I'm somewhat stuck here. TIA.

  2. #2
    Join Date
    Aug 2010
    Location
    Chicago suburbs
    Posts
    15,674
    Blog Entries
    3

    Default Re: not booting after swapping boot drive to different SATA controller

    Quote Originally Posted by siddharta42 View Post
    Any pointers are appreciated as I'm somewhat stuck here. TIA.
    This might not help. But I'll mention it just in case.

    The closest that I have come to something like this, was when I attempted to boot a system on an external drive. A computer had failed, do I took out the drive and put in an external enclosure. And I got similar messages to what you are seeing.

    As best I can tell, grub was seeing the disk just fine (using BIOS/UEFI) calls. But the kernel was not able to see the disk. There were probably missing drivers for the "initrd"

    My solution was to go into rescue mode -- mounting all of the disk, chroot to "/mount", and run "mkinitrd". That fixed it.

    My suggestion: try rebuilding the initrd.

    You need to boot from media with the same architecture (32-bit or 64-bit must match the installed system). The install disk is probably your best choice.

    Mount the root partition on "/mnt".

    Mount the boot, home, other partitions on "/mnt/boot", "/mnt/home", "/mnt/boot/efi" (since you seem to have an EFI system).

    Then:

    Code:
    # mount --bind /dev /mnt/dev
    # mount --bind /proc /mnt/proc
    # mount --bind /sys /mnt/sys
    # chroot /mnt
    # mkinitrd
    # exit
    then reboot and see if that has fixed the problem.
    openSUSE Leap 15.3; KDE Plasma 5.18.6;

  3. #3

    Default [SOLVED] Re: not booting after swapping boot drive to different SATA controller

    That solved the issue. I'll need to dig into that a bit further as I don't understand what exactly I've done there when following your instructions. Anyway don't know how to mark the thread as solved but solved it is! Thanks!

    Very useful as I've run into this before when cloning OpenSUSE based VMs or restoring a boot disk from an image.

  4. #4
    Join Date
    Nov 2009
    Location
    West Virginia Sector 13
    Posts
    16,287

    Default Re: not booting after swapping boot drive to different SATA controller

    Ok I'll ty to explain

    You booted to a outside disk ie the DVD. So that the root partition is the one that the DVD booted OS uses. But you need to be in the one on the hard drive to do the repair. Luckily Linux has a command to allow you to shift the current root partition ie chroot.

    So first we mount the root partition from the hard drive to some mount point in this case /mnt but it could be any valid mount point.

    But there are several directories that are virtual and need to be in the running root partitions ie /dev /proc, /sys So we first must bind these to the mount point we used to mount the root that is on the hard drive so that when we chroot they will be available.

    Then we change root (chroot) to the partition that we mounted at /mnt and then can run mkinitrd to recreate the initrd stuff so it is all pointing to the right location. You could also run yast if you need to install a driver or do any other repair needed Since we are now running on the root partition on the hard drive not the one from the DVD.

    chroot is very useful

  5. #5
    Join Date
    Aug 2010
    Location
    Chicago suburbs
    Posts
    15,674
    Blog Entries
    3

    Default Re: [SOLVED] Re: not booting after swapping boot drive to different SATA controller

    Quote Originally Posted by siddharta42 View Post
    That solved the issue. I'll need to dig into that a bit further as I don't understand what exactly I've done there when following your instructions.
    I'm glad to hear that the problem is solved.

    Let me give some more detail there.

    The original error message ("Could not find /dev/root") comes from the kernel. So grub has succeeded in loading the kernel.

    Once the kernel is running and is using the "initrd" (which was read with BIOS calls), it starts doing all of its disk access with internal kernel code and device drivers that it loads from the "initrd". So it looked as if there might be something missing in the "initrd", and the rebuild solves that.

    As to what actually went wrong? That, I do not know. Presumably, when you plugged the disk into a different SATA connector, it needed different device drivers. Maybe this was a different SATA speed, and perhaps SATA 3 requires different drivers from those that work for SATA 1 and SATA 2. But I am only guessing.
    openSUSE Leap 15.3; KDE Plasma 5.18.6;

  6. #6

    Thumbs up Re: not booting after swapping boot drive to different SATA controller

    Read up a bit on initrd and chroot, this is great learning experience. I very much appreciate your help. Thanks nrickert and gogalthorp!

  7. #7

    Default Re: not booting after swapping boot drive to different SATA controller

    Too late to edit: I forgot to mention that the boot drive was initially attached to onboard SATA (Intel C204 chipset) and I moved to PCIe SATA controller with SiL chipset. So it would seem to be a driver issue indeed. Thanks again!

  8. #8

    Default Re: not booting after swapping boot drive to different SATA controller

    Well it looks like I have a similiar issue again... but this time with a RAID controller for which there is no module shipping with the default kernel. I've an updated module on driver update disk that allows me to run the installer and install to the RAID array attached to the controller.

    At next boot however the system is unable to find the root partition, which I gather to be another issue with the initrd missing the module for the RAID controller. I can boot into Rescue, load the module and mount the / partition. When running mkinitrd hit errors out with
    Code:
    Root device: /dev/disk/by-id/scsi-etc (/dev/sdc3) (mounted on / as ext4)
    modeprob: Module rr26xx not found. 
    WARNING: no dependencies for kernel module 'rr26xx' found
    How would I update the initrd correctly with the missing module? Thanks!

    edit: I already tried to copy rr26xx.ko into /lib/modules/3.11.6-4-desktop/kernel/drivers/scsi but no go.

  9. #9

    Default Re: not booting after swapping boot drive to different SATA controller

    Hi, I'm clueless here and hope someone can point me onwards again. To summarize,

    1) To move on I did a fresh install of OpenSUSE 13.1 on a RAID array managed by a hardware RAID controller. The driver is located by the installer on the driver update disk (thanks to another helpful person here), which has the kernel module for the RAID controller for 4 different kernels (including 3.11.6-4-desktop and -default).

    2) The installer loads the module and is able to partition, format and install to the RAID1 volume. However after the installation is completed the system fails to boot, it does load GRUB2 and then fails to find /dev/root.

    3) Booted into the Rescue mode (with driver for kernel 3.11.6-4-default from the driver update disk) and chroot to the root partition. mkinitrd gave me
    Code:
    modprobe: Module rr26xx not found.
    but was able to resolve this by inserting the module for kernel 3.11.6-4-desktop in
    Code:
    /lib/modules/3.11.6-4-desktop/kernel/drivers/scsi
    and running
    Code:
    depmod -a 3.11.6-4-desktop
    .
    4) Still doesn't boot (and this is where I'm stuck now). Looking at the GRUB2 entry I can confirm that root= is pointing to a UUID that matches the root partition on the RAID (confirmed the symlink in Rescue mode).

    I have no idea what could be the problem or how to move on from here. Any help is again appreciated. I've learned a lot with trial and error but would now like to move on - less error, more progress . Thanks (again).

    edit: should I open a new thread for this as it may be a different issue?

  10. #10
    Join Date
    Nov 2009
    Location
    West Virginia Sector 13
    Posts
    16,287

    Default Re: not booting after swapping boot drive to different SATA controller

    Is it true hardware RAID or a FAKE (BIOS assisted) RAID controller? A true hardware RAID should not require a driver since the array will look like a single drive to the OS and will thus be transparent.

    FAKE RAID can be a problem if it relies on propritary drivers.

Page 1 of 2 12 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
  •