Results 1 to 7 of 7

Thread: "boot files" installed to wrong hard drive

  1. #1
    Join Date
    Jan 2009
    Beans
    9

    Question "boot files" installed to wrong hard drive

    Hi,

    I have just installed Ubuntu Server 12.04LTS on new hardware. The operating system (/) and swap was placed on a 60GB SSD while two WD RE4 2TB drives were configured in RAID1 for /home.

    When I restarted after installation, the system refused to boot and I got a blinking line. I restarted again and choose the first SATA disk which is one of the WD hard drives, the system booted as it should.

    So, for some reason, the installation placed some boot files (GRUB?) on the SATA1 drive rather than the SSD where / is located.

    SATA1 connector: HDD1 (software RAID1 with /home)
    SATA2 connector: HDD2 (software RAID1 with /home)
    SATA3 connector: SSD (with swap and /)

    Why does this happen and what do I need to do in order for the system to boot from the SSD right away. Now, I manually have to go into bios and select the HDD. Off course, I don't want the boot to be dependent on one of the hard drives in the RAID setup.

  2. #2
    Join Date
    Jun 2009
    Location
    SW Forida
    Beans
    Hidden!
    Distro
    Kubuntu

    Re: "boot files" installed to wrong hard drive

    Not sure about server installer, but desktop always defaults to sda. But during install at partitioning stage you should get the option on which drive to install grub2's boot loader.

    If you can boot you can just install grub to any drive.

    sudo fdisk -l
    #if it's "/dev/sdb" then just run:
    sudo grub-install /dev/sdb


    if sdc use that instead. And then in BIOS boot from that drive.
    Did you use gpt partitioning on SSD? To install correctly with gpt it also need a bios_grub partition if booting in BIOS mode.
    UEFI boot install & repair info - Regularly Updated :
    https://ubuntuforums.org/showthread.php?t=2147295
    Please use Thread Tools above first post to change to [Solved] when/if answered completely.

  3. #3
    Join Date
    Jan 2009
    Beans
    9

    Re: "boot files" installed to wrong hard drive

    Quote Originally Posted by oldfred View Post
    Not sure about server installer, but desktop always defaults to sda. But during install at partitioning stage you should get the option on which drive to install grub2's boot loader.

    If you can boot you can just install grub to any drive.

    sudo fdisk -l
    #if it's "/dev/sdb" then just run:
    sudo grub-install /dev/sdb


    if sdc use that instead. And then in BIOS boot from that drive.
    Did you use gpt partitioning on SSD? To install correctly with gpt it also need a bios_grub partition if booting in BIOS mode.
    Well, I used the built in partitioning function in the installer, the one that is blue and yellow

    I can boot just fine from sda which happens to be disk 1 in my RAID1 array. The computer tries to boot from sdc since that's where / is (I guess) but nothing happens since GRUB apparently installed to sda.

    So if I do the sudo grub-install /dev/sdc GRUB should install on my SSD (given that this is sdc) as an identical copy of whatever GRUB is on sda currently?

    Code:
    Disk /dev/sda: 2000.4 GB, 2000398934016 bytes
    255 heads, 63 sectors/track, 243201 cylinders, total 3907029168 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: 0x0003b28c
    
       Device Boot      Start         End      Blocks   Id  System
    /dev/sda1   *        2048  3907028991  1953513472   fd  Linux raid autodetect
    
    Disk /dev/sdb: 2000.4 GB, 2000398934016 bytes
    255 heads, 63 sectors/track, 243201 cylinders, total 3907029168 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: 0x0006e3d1
    
       Device Boot      Start         End      Blocks   Id  System
    /dev/sdb1            2048  3907028991  1953513472   fd  Linux raid autodetect
    
    Disk /dev/sdc: 60.0 GB, 60022480896 bytes
    255 heads, 63 sectors/track, 7297 cylinders, total 117231408 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: 0x0009a110
    
       Device Boot      Start         End      Blocks   Id  System
    /dev/sdc1   *        2048    85938175    42968064   83  Linux
    /dev/sdc2        85938176   117229567    15645696   82  Linux swap / Solaris
    
    Disk /dev/md0: 2000.3 GB, 2000263380992 bytes
    2 heads, 4 sectors/track, 488345552 cylinders, total 3906764416 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: 0x00000000
    
    Disk /dev/md0 doesn't contain a valid partition table
    Last edited by apkatt; February 18th, 2013 at 09:18 PM.

  4. #4
    Join Date
    Nov 2009
    Location
    Catalunya, Spain
    Beans
    14,560
    Distro
    Ubuntu 18.04 Bionic Beaver

    Re: "boot files" installed to wrong hard drive

    Yes, it will be identical. You can have grub2 on as many as you want MBRs.

    Run the command, set the 60GB first in boot order, and you're good to go.
    Darko.
    -----------------------------------------------------------------------
    Ubuntu 18.04 LTS 64bit

  5. #5
    Join Date
    Jan 2009
    Beans
    9

    Re: "boot files" installed to wrong hard drive

    Quote Originally Posted by darkod View Post
    Yes, it will be identical. You can have grub2 on as many as you want MBRs.

    Run the command, set the 60GB first in boot order, and you're good to go.
    Ok! By boot order, you are referring to boot priority in UEFI/BIOS?

    EDIT: Also, why is there an asterisk under the "BOOT" column on both sda and sdc?
    Last edited by apkatt; February 18th, 2013 at 09:30 PM.

  6. #6
    Join Date
    Jun 2009
    Location
    SW Forida
    Beans
    Hidden!
    Distro
    Kubuntu

    Re: "boot files" installed to wrong hard drive

    The * is the boot flag. But grub does not use boot flag. Windows (lilo, syslinux, maybe others) have to have boot flag to know which PBR - partition boot sector has more boot code. Grub does not normally use PBR.

    But a few BIOS (Intel for sure) have to see a boot flag on a primary partition or they will not let you boot. So still best to have a boot flag. Only one per drive, on a primary partition or the NTFS Windows boot partition if dual booting with Windows.
    UEFI boot install & repair info - Regularly Updated :
    https://ubuntuforums.org/showthread.php?t=2147295
    Please use Thread Tools above first post to change to [Solved] when/if answered completely.

  7. #7
    Join Date
    Jan 2009
    Beans
    9

    Re: "boot files" installed to wrong hard drive

    Quote Originally Posted by oldfred View Post
    The * is the boot flag. But grub does not use boot flag. Windows (lilo, syslinux, maybe others) have to have boot flag to know which PBR - partition boot sector has more boot code. Grub does not normally use PBR.

    But a few BIOS (Intel for sure) have to see a boot flag on a primary partition or they will not let you boot. So still best to have a boot flag. Only one per drive, on a primary partition or the NTFS Windows boot partition if dual booting with Windows.
    Ok, thanks. I hope this works now, cannot restart now since people are using the server.

    EDIT: It worked! Thanks!
    Last edited by apkatt; February 21st, 2013 at 04:14 PM.

Bookmarks

Posting Permissions

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