LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
Search this Thread
Old 08-15-2011, 01:30 AM   #1
anth0ny5
LQ Newbie
 
Registered: Mar 2010
Posts: 25

Rep: Reputation: 0
Multi-disk, multi-boot system does not boot after fresh install


Hi, I originally asked this question on FedoraForum, but I'm lead to believe this could be a Linux/Grub issue in general, so I ask here.

After going through the installation process from a Fedora LiveUSB, I am unable to boot into it and instead am greeted by a blinking unresponsive cursor in the top-left of the screen.

The only interesting thing about the install process is that I have two SATA hard disks: a primary (Windows) and a slave (Linux). Rather than have bootloaders compete with each other, near the end of the installation process I chose to install GRUB on "the first partition of sdb1". This way I have separate bootloaders for each disk, and can control which OS boots simply by changing the boot order in the BIOS.

A response in the other topic mentioned that doing so would also change the device nodes of disks and I'd have to first set up GRUB with only one disk installed so that it sees only one disk.
However I find it hard to believe that:
a) GRUB/Linux/Fedora/Anaconda isn't smart enough to figure out how and where to install a boot manager properly on a multi-disk system.
b) I would need to dissemble my laptop and start pulling disks just to install linux in a multi-boot, multi-disk system.
c) boot ordering in the BIOS would change device nodes in GRUB/the kernel, since hardware information is available to figure out the ordering of the devices on the bus.

Surely Linux can support multi-boot, multi-disk installs with separate boot managers on each disk?
Does anyone know what is going on, and how to fix it?

thanks for any help

----
My original post:
Quote:
After installing Fedora 15 from LiveUSB and rebooting it just hangs on a black screen with a blinking cursor (underscore) in the top left of the screen. If it's reached grub, it isn't responding to any commands, and mashing several key combinations (such as ctrl-alt-f1) will produce a beep usually emitted only by the BIOS (hinting that it may never be making its way to grub).

The only particularly interesting thing about the install is that by default it wanted to boot itself from the MBR on my primary-master (Windows) disk. Instead I selected the option to boot from "the first partition in sdb1", which is my primary-slave (Linux) disk, (the first partition being /boot). This way I can change which OS boots by changing the boot order in my BIOS, and so avoiding bootloader wars.

The physical disk layout looks like so (as it appeared in the Installation partition tool):

"vg_fedora" - LVM Group
- "lv_swap" -- <swap>
- "lv_root" - /root -<ext4>
- "lv_home" - /home - <ext4>

sda (primary-master disk 0)
- <ntfs>
- <ntfs>

sdb (primary-slave disk 1)
- /boot <ext4>
- LVM physical partition
- free space

Both disks are formatted as MBR scheme. I formatted sdb using Fedora's Disk Utility and partitioned it during the Installation (which crashed at least once, yay!). As mentioned, when asked where I'd like the boot manager installed, I changed it from "the MBR on sda" to "the first partition on sdb1" (would seem to make more sense if it said "the MBR on sdb").

This isn't the first time I've installed Fedora, and every time yields a similar experience (something always goes awry!). However, the last time I got a black screen it was due to problems with Fedora's LINVA/NV display drivers, other times before it it was due to grub config. But in both cases I was at least able to edit the grub command line and eventually boot into the OS. In this case I'm not able to do either which leads me to believe it's a different problem (and possibly something to do with that option about where the boot manager is installed).

Here is my grub.conf (retrieved after booting from the LiveUSB):
Code:
# grub.conf generated by anaconda
#
# Note that you do not have to rerun grub after making changes to this file
# NOTICE:  You have a /boot partition.  This means that
#          all kernel and initrd paths are relative to /boot/, eg.
#          root (hd1,0)
#          kernel /vmlinuz-version ro root=/dev/mapper/vg_fedora-lv_root
#          initrd /initrd-[generic-]version.img
#boot=/dev/sdb1
default=0
timeout=5
splashimage=(hd1,0)/grub/splash.xpm.gz
hiddenmenu
title Fedora (2.6.38.6-26.rc1.fc15.x86_64)
	root (hd1,0)
	kernel /vmlinuz-2.6.38.6-26.rc1.fc15.x86_64 ro root=/dev/mapper/vg_fedora-lv_root rd_LVM_LV=vg_fedora/lv_root rd_LVM_LV=vg_fedora/lv_swap rd_NO_LUKS rd_NO_MD rd_NO_DM LANG=en_US.UTF-8 SYSFONT=latarcyrheb-sun16 KEYTABLE=us rhgb quiet
	initrd /initramfs-2.6.38.6-26.rc1.fc15.x86_64.img
title Windows 7
	rootnoverify (hd0,0)
	chainloader +1
Only thing of interest here is according to the grub manual (hd1,0) refers to second disk, first partition; my linux "/root" is of course located in one of the LVM partitions however I'm not sure what "root" this is referring to and I can only trust anaconda knows what it was doing (then again I guess I wouldn't be having a problem if that were the case...).

Snooping the filesystem and checking Disk Utility confirms the installation is there and seems proper, and /boot is marked bootable. Which leads me again to believe something's the matter during early boot, either with GRUB or where it lives on the disk.

Last edited by anth0ny5; 08-15-2011 at 01:34 AM.
 
Old 08-15-2011, 04:37 AM   #2
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 12,130

Rep: Reputation: 986Reputation: 986Reputation: 986Reputation: 986Reputation: 986Reputation: 986Reputation: 986Reputation: 986
Quote:
Originally Posted by anth0ny5 View Post
However I find it hard to believe that:
Your interpretation of things is hardly reliable
Quote:
Surely Linux can support multi-boot, multi-disk installs with separate boot managers on each disk?
Certainly.
Limitations in Anaconda are not representative of Linux itself.

Go here, do as it says and post the RESTULTS.txt so we can see the entire boot configuration of your system.
 
Old 08-15-2011, 09:08 AM   #3
yancek
Senior Member
 
Registered: Apr 2008
Distribution: PCLinux, Ubuntu, Slackware
Posts: 4,548

Rep: Reputation: 709Reputation: 709Reputation: 709Reputation: 709Reputation: 709Reputation: 709Reputation: 709
Quote:
Rather than have bootloaders compete with each other, near the end of the installation process I chose to install GRUB on "the first partition of sdb1". This way I have separate bootloaders for each disk, and can control which OS boots simply by changing the boot order in the BIOS.
That won't work. You should have selected to install Grub to the mbr of sdb if you want this method. Either do that or download easybcd to your windows 7 and configure it to put an entry for Fedora.

Posting the bootinfo script output as suggested above would be a good idea.
 
Old 08-16-2011, 02:47 AM   #4
anth0ny5
LQ Newbie
 
Registered: Mar 2010
Posts: 25

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by yancek View Post
That won't work. You should have selected to install Grub to the mbr of sdb if you want this method.
As in the OP, that is what I did. Except the options listed were "install to MBR on sda", or "install to first partition on sdb1", now that last bit got me raising an eyebrow since logically I'd expect it to read "install to MBR on sdb", but since there were only those two options, I trusted the installer knew what it was doing... apparently not so.
Quote:
Originally Posted by syg00 View Post
Go here, do as it says and post the RESTULTS.txt so we can see the entire boot configuration of your system.
Here's the RESULTS.TXT, I hope it points to the problem:
edit: I can already see that "install to first partition on sdb1" probably didn't mean "install to MBR on sdb" after all.
So how can I get GRUB onto the MBR of sdb? (and assuming this is a bug in Anaconda, should I bother reporting it to Red Hat?)

Code:
                  Boot Info Script 0.60    from 17 May 2011


============================= Boot Info Summary: ===============================

 => Windows is installed in the MBR of /dev/sda.
 => No boot loader is installed in the MBR of /dev/sdb.
 => Syslinux MBR (4.04 and higher) is installed in the MBR of /dev/sdc.

sda1: __________________________________________________________________________

    File system:       ntfs
    Boot sector type:  Windows Vista/7
    Boot sector info:   No errors found in the Boot Parameter Block.
    Operating System:  
    Boot files:        /bootmgr /Boot/BCD

sda2: __________________________________________________________________________

    File system:       ntfs
    Boot sector type:  Windows Vista/7
    Boot sector info:   No errors found in the Boot Parameter Block.
    Operating System:  Windows 7
    Boot files:        /Windows/System32/winload.exe

sda3: __________________________________________________________________________

    File system:       ntfs
    Boot sector type:  Windows Vista/7
    Boot sector info:   No errors found in the Boot Parameter Block.
    Operating System:  
    Boot files:        

sdb1: __________________________________________________________________________

    File system:       ext4
    Boot sector type:  Grub Legacy
    Boot sector info:   Grub Legacy (v0.97-71.fc15) is installed in the boot 
                       sector of sdb1 and looks at sector 32666 on boot drive 
                       #2 for the stage2 file.  A stage2 file is at this 
                       location on /dev/sdb.  Stage2 looks on partition #1 
                       for /grub/grub.conf.
    Operating System:  
    Boot files:        /grub/menu.lst /grub/grub.conf

sdb2: __________________________________________________________________________

    File system:       LVM2_member
    Boot sector type:  -
    Boot sector info:  

sdc1: __________________________________________________________________________

    File system:       vfat
    Boot sector type:  SYSLINUX 4.04 2011-04-18
    Boot sector info:   Syslinux looks at sector 732272 of /dev/sdc1 for its 
                       second stage. SYSLINUX is installed in the syslinux 
                       directory. No errors found in the Boot Parameter Block.
    Operating System:  
    Boot files:        

vg_fedora-lv_swap': ____________________________________________________________

    File system:       
    Boot sector type:  Unknown
    Boot sector info:  
    Mounting failed:   mount: unknown filesystem type ''

vg_fedora-lv_home': ____________________________________________________________

    File system:       
    Boot sector type:  Unknown
    Boot sector info:  
    Mounting failed:   mount: unknown filesystem type ''
mount: unknown filesystem type ''

vg_fedora-lv_root': ____________________________________________________________

    File system:       
    Boot sector type:  Unknown
    Boot sector info:  
    Mounting failed:   mount: unknown filesystem type ''
mount: unknown filesystem type ''
mount: unknown filesystem type ''

============================ Drive/Partition Info: =============================

Drive: sda _____________________________________________________________________

Disk /dev/sda: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders, total 976773168 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    *          2,048       206,847       204,800   7 NTFS / exFAT / HPFS
/dev/sda2             206,848   134,424,575   134,217,728   7 NTFS / exFAT / HPFS
/dev/sda3         134,424,576   976,771,071   842,346,496   7 NTFS / exFAT / HPFS


Drive: sdb _____________________________________________________________________

Disk /dev/sdb: 320.1 GB, 320072933376 bytes
255 heads, 63 sectors/track, 38913 cylinders, total 625142448 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    *          2,048     1,026,047     1,024,000  83 Linux
/dev/sdb2           1,026,048   275,458,047   274,432,000  8e Linux LVM


Drive: sdc _____________________________________________________________________

Disk /dev/sdc: 4007 MB, 4007657472 bytes
255 heads, 63 sectors/track, 487 cylinders, total 7827456 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/sdc1    *            128     7,827,455     7,827,328   b W95 FAT32


"blkid" output: ________________________________________________________________

Device           UUID                                   TYPE       LABEL

/dev/loop0                                              squashfs   
/dev/loop1                                              DM_snapshot_cow 
/dev/loop2                                              squashfs   
/dev/loop3       586414e3-e703-4474-8338-4a823b4184ef   ext4       _Fedora-15-x86_6
/dev/loop4                                              DM_snapshot_cow 
/dev/mapper/live-osimg-min 586414e3-e703-4474-8338-4a823b4184ef   ext4       _Fedora-15-x86_6
/dev/mapper/live-rw 586414e3-e703-4474-8338-4a823b4184ef   ext4       _Fedora-15-x86_6
/dev/mapper/vg_fedora-lv_home 89041be8-7599-47cc-8c50-5bb94c653511   ext4       
/dev/mapper/vg_fedora-lv_root 7d9d7034-66cb-4408-99ca-90a5cc938021   ext4       _Fedora-15-x86_6
/dev/mapper/vg_fedora-lv_swap 394f20fe-6893-4ec0-95be-badf882646f7   swap       
/dev/sda1        6E363FFB363FC33F                       ntfs       System Reserved
/dev/sda2        9AD897D9D897B24D                       ntfs       Local Disk
/dev/sda3        126AE93B6AE91BEB                       ntfs       
/dev/sdb1        3f3127c8-813b-4afa-931d-45ae960d623f   ext4       
/dev/sdb2        s58ghn-DHMA-vyDC-CUpv-mvou-U3KU-Q0cjiG LVM2_member 
/dev/sdc1        9C40-1DC7                              vfat       FEDORA

========================= "ls -R /dev/mapper/" output: =========================

/dev/mapper:
control
live-osimg-min
live-rw
vg_fedora-lv_home
vg_fedora-lv_root
vg_fedora-lv_swap

================================ Mount points: =================================

Device           Mount_Point              Type       Options

/dev/mapper/live-rw /home                    ext4       (rw,noatime,seclabel,barrier=1,data=ordered)
/dev/mapper/live-rw /                        ext4       (rw,noatime,seclabel,barrier=1,data=ordered)
/dev/sdc1        /mnt/live                vfat       (ro,relatime,fmask=0022,dmask=0022,codepage=cp437,iocharset=ascii,shortname=mixed,errors=remount-ro)
/dev/sdc1        /run/initramfs/live      vfat       (ro,relatime,fmask=0022,dmask=0022,codepage=cp437,iocharset=ascii,shortname=mixed,errors=remount-ro)


============================= sdb1/grub/grub.conf: =============================

--------------------------------------------------------------------------------
# grub.conf generated by anaconda
#
# Note that you do not have to rerun grub after making changes to this file
# NOTICE:  You have a /boot partition.  This means that
#          all kernel and initrd paths are relative to /boot/, eg.
#          root (hd1,0)
#          kernel /vmlinuz-version ro root=/dev/mapper/vg_fedora-lv_root
#          initrd /initrd-[generic-]version.img
#boot=/dev/sdb1
default=0
timeout=5
splashimage=(hd1,0)/grub/splash.xpm.gz
hiddenmenu
title Fedora (2.6.38.6-26.rc1.fc15.x86_64)
	root (hd1,0)
	kernel /vmlinuz-2.6.38.6-26.rc1.fc15.x86_64 ro root=/dev/mapper/vg_fedora-lv_root rd_LVM_LV=vg_fedora/lv_root rd_LVM_LV=vg_fedora/lv_swap rd_NO_LUKS rd_NO_MD rd_NO_DM LANG=en_US.UTF-8 SYSFONT=latarcyrheb-sun16 KEYTABLE=us rhgb quiet
	initrd /initramfs-2.6.38.6-26.rc1.fc15.x86_64.img
title Windows 7
	rootnoverify (hd0,0)
	chainloader +1
--------------------------------------------------------------------------------

=================== sdb1: Location of files loaded by Grub: ====================

           GiB - GB             File                                 Fragment(s)

   0.016115189 = 0.017303552    grub/grub.conf                                 1
   0.016115189 = 0.017303552    grub/menu.lst                                  1
   0.015691757 = 0.016848896    grub/stage2                                    1
   0.032161713 = 0.034533376    initramfs-2.6.38.6-26.rc1.fc15.x86_64.img      2
   0.009259224 = 0.009942016    initrd-plymouth.img                            1
   0.013135910 = 0.014104576    vmlinuz-2.6.38.6-26.rc1.fc15.x86_64            1

======================== Unknown MBRs/Boot Sectors/etc: ========================

Unknown BootLoader on vg_fedora-lv_swap'


Unknown BootLoader on vg_fedora-lv_home'


Unknown BootLoader on vg_fedora-lv_root'



=============================== StdErr Messages: ===============================

/home/liveuser/Downloads/boot_info_script.sh: line 2457: cd: /run/initramfs/live
/mnt/live/: No such file or directory
  One or more specified logical volume(s) not found.
  One or more specified logical volume(s) not found.
  One or more specified logical volume(s) not found.
hexdump: /dev/mapper/vg_fedora-lv_swap': No such file or directory
hexdump: stdin: Bad file descriptor.
hexdump: /dev/mapper/vg_fedora-lv_swap': No such file or directory
hexdump: /dev/mapper/vg_fedora-lv_swap': Bad file descriptor
  One or more specified logical volume(s) not found.
  One or more specified logical volume(s) not found.
  One or more specified logical volume(s) not found.
hexdump: /dev/mapper/vg_fedora-lv_home': No such file or directory
hexdump: stdin: Bad file descriptor.
hexdump: /dev/mapper/vg_fedora-lv_home': No such file or directory
hexdump: /dev/mapper/vg_fedora-lv_home': Bad file descriptor
  One or more specified logical volume(s) not found.
  One or more specified logical volume(s) not found.
  One or more specified logical volume(s) not found.
hexdump: /dev/mapper/vg_fedora-lv_root': No such file or directory
hexdump: stdin: Bad file descriptor.
hexdump: /dev/mapper/vg_fedora-lv_root': No such file or directory
hexdump: /dev/mapper/vg_fedora-lv_root': Bad file descriptor
mdadm: No arrays found in config file or automatically

Last edited by anth0ny5; 08-16-2011 at 03:00 AM.
 
Old 08-16-2011, 06:01 AM   #5
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 12,130

Rep: Reputation: 986Reputation: 986Reputation: 986Reputation: 986Reputation: 986Reputation: 986Reputation: 986Reputation: 986
Anaconda has been broken as long as I've been using it. Whether you think it's worth the effort of trying to get the devs to extract their (collective) heads from wherever they inserted them is your choice.
Quote:
I can already see that "install to first partition on sdb1" probably didn't mean "install to MBR on sdb" after all.
No "probably" about it - the MBR exists on the device itself, not any partition. Installing to a partition boot record implies there is some (other) means of chainloading to that partition. Strictly speaking there can only be one MBR per system (M=="Master"), but everyone seems to conveniently ignore that little matter of semantics.

What I don't understand is why you have a broken Win7 boot record. Seems Anaconda has replaced that (as well) - I have seen similar (with Anaconda) in other scenarios. That is certainly a bug - as I said, good luck convincing them they have it wrong.
Personally I'd put the Win7 loader back, and use EasyBCD (free-ware) to chainload the Fedora as-is. This works fine - I'm posting from such a setup.
 
1 members found this post helpful.
Old 08-16-2011, 08:46 AM   #6
yancek
Senior Member
 
Registered: Apr 2008
Distribution: PCLinux, Ubuntu, Slackware
Posts: 4,548

Rep: Reputation: 709Reputation: 709Reputation: 709Reputation: 709Reputation: 709Reputation: 709Reputation: 709
I'm not a Fedora user so I don't know anything about anaconda problems. You should be able to use the Fedora disk to manually install Grub to the mbr of sdb.
 
Old 08-16-2011, 10:16 PM   #7
anth0ny5
LQ Newbie
 
Registered: Mar 2010
Posts: 25

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by syg00 View Post
What I don't understand is why you have a broken Win7 boot record. Seems Anaconda has replaced that (as well) - I have seen similar (with Anaconda) in other scenarios. That is certainly a bug - as I said, good luck convincing them they have it wrong.
Is that bad? Did Anaconda trample over ntldr? Windows 7 is booting fine though; if it matters: sda1 is the "System Reserved Partition" I believe Windows uses for its boot/recovery utility, sda2 is the actual Win7 install, and sda3 is a data partition.

So there's no way/utility I can use to physically write GRUB to the MBR of sdb? In the worst case scenario I guess I'd go back to having GRUB chainload Win7, but I really wanted to avoid chainloading

Quote:
Originally Posted by yancek View Post
I'm not a Fedora user so I don't know anything about anaconda problems. You should be able to use the Fedora disk to manually install Grub to the mbr of sdb.
Any ideas on how to do this? I can run grub-install, but how would I tell it to use the installation on sdb?
I am guessing I need to do something like this:
1) remove grub from sdb1
2) install grub into MBR of sdb
3) tell it to boot from /boot located on sdb1 (assuming it hasn't been overwritten because of #1)
4) tell it to load /root located in the LVG on sdb2, labelled "lv_root"
5) pray, a lot.

How would I go about doing this?
If I needed to re-install because GRUB on sdb1 overwrote my /boot, how could I tell the installer to NOT install GRUB?

edit: from searching around, here's what I can come up with:
Code:
su -
grub-install --boot-directory=<path to /boot on sdb1> /dev/sdb
Will this do what I want?

Last edited by anth0ny5; 08-16-2011 at 10:53 PM.
 
Old 08-16-2011, 11:42 PM   #8
yancek
Senior Member
 
Registered: Apr 2008
Distribution: PCLinux, Ubuntu, Slackware
Posts: 4,548

Rep: Reputation: 709Reputation: 709Reputation: 709Reputation: 709Reputation: 709Reputation: 709Reputation: 709
Your windows boot files are where they should be according to the bootinfo script. windows 7 does not use ntldr.
If your windows 7 is booting there is no reason to change anything. You don't remove Grub from sdb1.


Boot your Fedora CD. Open a terminal and log in as root and run these commands:

root hd1,0)
setup (hd1)
quit

Hit enter after each separate command.

If you're paranoid about this, you could (after logging in as root) run the geometry commands to verify how Grub views the drives. Logged in to a terminal as root enter grub, hit the enter key and you should be at the grub prompt (grub>). Then enter each of these commands and check the output:

geometry (hd0)
geometry (hd1)

hd0 should show the same partitions as sda, hd1 should show the same partitions as sdb.
 
1 members found this post helpful.
Old 08-17-2011, 02:02 AM   #9
anth0ny5
LQ Newbie
 
Registered: Mar 2010
Posts: 25

Original Poster
Rep: Reputation: 0
yancek that worked, thanks. After that I was finally greeted by GRUB and not blinky the cursor. At first it still couldn't locate the kernel, but that was easily fixed by changing all instances of hd1 to hd0 in grub.conf

Thanks everyone, now I have a working multi-disk, multi-boot system, yay!

Last edited by anth0ny5; 08-17-2011 at 02:05 AM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Sharing /home partition in a multi-distro multi boot setup firewiz87 Linux - Distributions 6 08-24-2010 07:11 AM
Install from iso on hard disk in a multi boot system without burning a DVD JZL240I-U Linux - Distributions 9 12-09-2009 04:21 AM
Install Fedora on multi-boot system jz32300 Linux - Newbie 4 06-28-2006 03:38 PM
How to Boot Multi Windows & Multi Linux olkar Linux - Newbie 5 10-03-2005 11:52 AM
GRUB, Multi Linux/Multi Disk Boot gtnorton Linux - Software 1 03-16-2003 03:48 AM


All times are GMT -5. The time now is 08:41 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration