After installing 11.4 on external hard disk, no booting from primary disk

Hello,

I have a laptop, with Suse 11.4 installed and Windows 7, on hda.

Now I got an external hard drive (hdc), and I installed also Suse 11.4
there (hdc1 - hdc3); there was an initial question about it:
'How can I install a new *independent* Suse 11.4 on a second hard disk?
(swap problem) - Page 2' (http://tinyurl.com/3aw2fcb)
but that is likely no longer relevant.

The installation process installed the boot-loader on hda. So well,
seemed necessary to me
(though I would have preferred not to mess at all with hda; see below
for further comments).
Summarising the boot process before installation, it just mentioned the
typical two Suse boot-entries
plus the two windows-entries. This looked suspicious, no mentioning
about the old Suse on hda and
how to boot that, but it also mentioned "boot order: first hda, then
hdc", and so I hoped the boot process
would enable me to choose between hda and hdc, and just maintaining for
sda the old boot capabilities
(4 different kernel versions, plus windows). But that was not the case,
and apparently the old boot-sequence
has been just erased and replaced.

So now I need to add the boot option for the Linux's on sda. Going to
Boot Loader Settings in Yast
(this all happens with the newly installed system, on hdc; no access to
hda except of reading the
files).
I have to add something. "Image Section" and "Other Systems" might be
appropriate. But instead of
starting with "Image Section" from scratch, perhaps better to clone and
modify something --- however
I don't see how to tell the system that the action takes place on sda
?!
"OtherSystem" apparently only offers sda3 (where the boot-information
should be), but then there is not much
to say, just to set the "block offset". Now I guess the old
boot-information was destroyed by the installation
(which I think shouldn't happen), and thus this won't work, I guess?

Perhaps I have to copy the original information from yast in sda?
According to
'SDB:Installation on external hard drive - openSUSE'
(http://en.opensuse.org/SDB:Installation_on_external_hard_drive)
one should proceed like that. Unfortunately, that page doesn't
give information on how to do that outside of the boot process.
Inside the boot process, I saw no chance to use that page, since
I can't see the page, don't have access to any information other than
what the boot-process allows (just clicking on some buttons), and
finally, I assumed the installation process would be reasonable,
knowing
that there is already a Suse-Linux, and if it would disable accesss to
the
old Suse, the process would warn me about that
It is also not clear to me whether the above page is still relevant
(up-to-date).

But mainly the task should be easy now, since I have still the old
grub/yast-etc.
information, and I just needed to transfer/add this information.

Hope this problem can be fixed.

Thanks for your attention!

Oliver


-- 
kullmann
------------------------------------------------------------------------



0
kullmann
8/5/2011 11:46:03 AM
opensuse.org.help.install 14389 articles. 0 followers. Follow

25 Replies
919 Views

Similar Articles

[PageSpeed] 24

Further investigations:

On sdc (the secondary hard disk):

Code:
--------------------
    
  linux-dta1:/boot/grub # more device.map
  (hd0)   /dev/disk/by-id/ata-WDC_WD5000BEVT-75A0RT0_WD-WXB1A60V9698
  (hd1)   /dev/disk/by-id/usb-WD_Ext_HDD_1021_5743415A4134363439323938-0:0
  
--------------------

On sda (the primary hard disk):

Code:
--------------------
    
  linux-dta1:/media/33d4f3d1-1a52-450f-80cc-7f5f823d03f6/boot/grub # more device.map
  (hd0)   /dev/disk/by-id/ata-WDC_WD5000BEVT-75A0RT0_WD-WXB1A60V9698
  
--------------------


That looks good to me: The new installation extended the old one. So
linux-dta1:/boot/grub/device.map
seems correct to me.

Then apparently all what needs to be done is to change menu.lst?! First
on sdc:

Code:
--------------------
    
  linux-dta1:/boot/grub # cat menu.lst
  # Modified by YaST2. Last modification on Fri Aug  5 09:34:40 BST 2011
  # THIS FILE WILL BE PARTIALLY OVERWRITTEN by perl-Bootloader
  # Configure custom boot parameters for updated kernels in /etc/sysconfig/bootloader
  default 0
  timeout 8
  gfxmenu (hd1,1)/boot/message
  ###Don't change this comment - YaST2 identifier: Original name: linux###
  title Desktop -- openSUSE 11.4 - 2.6.37.6-0.7
  root (hd1,1)
  kernel /boot/vmlinuz-2.6.37.6-0.7-desktop root=/dev/disk/by-id/usb-WD_Ext_HDD_1021_5743415A4134363439323938-0:0-part2 resume=/dev/disk/by-id/usb-WD_Ext_HDD_1021_5743415A4134363439323938-0:0-part1 splash=silent quiet showopts vga=0x317
  initrd /boot/initrd-2.6.37.6-0.7-desktop
  ###Don't change this comment - YaST2 identifier: Original name: failsafe###
  title Failsafe -- openSUSE 11.4 - 2.6.37.6-0.7
  root (hd1,1)
  kernel /boot/vmlinuz-2.6.37.6-0.7-desktop root=/dev/disk/by-id/usb-WD_Ext_HDD_1021_5743415A4134363439323938-0:0-part2 showopts apm=off noresume edd=off powersaved=off nohz=off highres=off processor.max_cstate=1 nomodeset x11failsafe vga=0x317
  initrd /boot/initrd-2.6.37.6-0.7-desktop
  ###Don't change this comment - YaST2 identifier: Original name: windows 1###
  title windows 1
  rootnoverify (hd0,0)
  chainloader +1
  ###Don't change this comment - YaST2 identifier: Original name: windows 2###
  title windows 2
  rootnoverify (hd0,1)
  chainloader +1
  
--------------------


And on sda:

Code:
--------------------
    
  linux-dta1:/media/33d4f3d1-1a52-450f-80cc-7f5f823d03f6/boot/grub # cat menu.lst
  # Modified by YaST2. Last modification on Sun Jul 31 02:17:01 BST 2011
  # THIS FILE WILL BE PARTIALLY OVERWRITTEN by perl-Bootloader
  # Configure custom boot parameters for updated kernels in /etc/sysconfig/bootloader
  default 6
  timeout 8
  gfxmenu (hd0,5)/boot/message
  ##YaST - activate
  ###Don't change this comment - YaST2 identifier: Original name: linux###
  title Desktop -- openSUSE 11.4 - 2.6.39.3-0.5
  root (hd0,5)
  kernel /boot/vmlinuz-2.6.39.3-0.5-desktop root=/dev/disk/by-id/ata-WDC_WD5000BEVT-75A0RT0_WD-WXB1A60V9698-part6 resume=/dev/disk/by-id/ata-WDC_WD5000BEVT-75A0RT0_WD-WXB1A60V9698-part5 splash=silent quiet showopts vga=0x317
  initrd /boot/initrd-2.6.39.3-0.5-desktop
  ###Don't change this comment - YaST2 identifier: Original name: failsafe###
  title Failsafe -- openSUSE 11.4 - 2.6.39.3-0.5
  root (hd0,5)
  kernel /boot/vmlinuz-2.6.39.3-0.5-desktop root=/dev/disk/by-id/ata-WDC_WD5000BEVT-75A0RT0_WD-WXB1A60V9698-part6 showopts apm=off noresume edd=off powersaved=off nohz=off highres=off processor.max_cstate=1 nomodeset x11failsafe vga=0x317
  initrd /boot/initrd-2.6.39.3-0.5-desktop
  ###Don't change this comment - YaST2 identifier: Original name: linux###
  title Desktop -- openSUSE 11.4 - 2.6.38.8-0.5
  root (hd0,5)
  kernel /boot/vmlinuz-2.6.38.8-0.5-desktop root=/dev/disk/by-id/ata-WDC_WD5000BEVT-75A0RT0_WD-WXB1A60V9698-part6 resume=/dev/disk/by-id/ata-WDC_WD5000BEVT-75A0RT0_WD-WXB1A60V9698-part5 splash=silent quiet showopts vga=0x317
  initrd /boot/initrd-2.6.38.8-0.5-desktop
  ###Don't change this comment - YaST2 identifier: Original name: failsafe###
  title Failsafe -- openSUSE 11.4 - 2.6.38.8-0.5
  root (hd0,5)
  kernel /boot/vmlinuz-2.6.38.8-0.5-desktop root=/dev/disk/by-id/ata-WDC_WD5000BEVT-75A0RT0_WD-WXB1A60V9698-part6 showopts apm=off noresume edd=off powersaved=off nohz=off highres=off processor.max_cstate=1 nomodeset x11failsafe vga=0x317
  initrd /boot/initrd-2.6.38.8-0.5-desktop
  ###Don't change this comment - YaST2 identifier: Original name: linux###
  title openSUSE 11.4 - 2.6.37.6-0.5 (default)
  root (hd0,5)
  kernel /boot/vmlinuz-2.6.37.6-0.5-default root=/dev/disk/by-id/ata-WDC_WD5000BEVT-75A0RT0_WD-WXB1A60V9698-part6 resume=/dev/disk/by-id/ata-WDC_WD5000BEVT-75A0RT0_WD-WXB1A60V9698-part5 splash=silent quiet showopts vga=0x317
  initrd /boot/initrd-2.6.37.6-0.5-default
  ###Don't change this comment - YaST2 identifier: Original name: failsafe###
  title Failsafe -- openSUSE 11.4 - 2.6.37.6-0.5 (default)
  root (hd0,5)
  kernel /boot/vmlinuz-2.6.37.6-0.5-default root=/dev/disk/by-id/ata-WDC_WD5000BEVT-75A0RT0_WD-WXB1A60V9698-part6 showopts apm=off noresume edd=off powersaved=off nohz=off highres=off processor.max_cstate=1 nomodeset x11failsafe vga=0x317
  initrd /boot/initrd-2.6.37.6-0.5-default
  ###Don't change this comment - YaST2 identifier: Original name: linux###
  title Desktop -- openSUSE 11.4 - 2.6.37.6-0.5
  root (hd0,5)
  kernel /boot/vmlinuz-2.6.37.6-0.5-desktop root=/dev/disk/by-id/ata-WDC_WD5000BEVT-75A0RT0_WD-WXB1A60V9698-part6 resume=/dev/disk/by-id/ata-WDC_WD5000BEVT-75A0RT0_WD-WXB1A60V9698-part5 splash=silent quiet showopts vga=0x317
  initrd /boot/initrd-2.6.37.6-0.5-desktop
  ###Don't change this comment - YaST2 identifier: Original name: failsafe###
  title Failsafe -- openSUSE 11.4 - 2.6.37.6-0.5 (desktop)
  root (hd0,5)
  kernel /boot/vmlinuz-2.6.37.6-0.5-desktop root=/dev/disk/by-id/ata-WDC_WD5000BEVT-75A0RT0_WD-WXB1A60V9698-part6 showopts apm=off noresume edd=off powersaved=off nohz=off highres=off processor.max_cstate=1 nomodeset x11failsafe vga=0x317
  initrd /boot/initrd-2.6.37.6-0.5-desktop
  ###Don't change this comment - YaST2 identifier: Original name: windows 1###
  title windows 1
  rootnoverify (hd0,0)
  chainloader +1
  ###Don't change this comment - YaST2 identifier: Original name: windows 2###
  title windows 2
  rootnoverify (hd0,1)
  chainloader +1
  
--------------------


It looks as if one only needed to merge these two files. Hopefully it
is possible to have first a section for

Code:
--------------------
    gfxmenu (hd0,5)/boot/message
--------------------

and then a section for

Code:
--------------------
    gfxmenu (hd1,1)/boot/message
--------------------


Otherwise, if only either hd0 or hd1 can be accessed, not both, how
would one manage all
these boot possibilities?

Hope somebody can shed light on that.

Another possible problem: If I change now menu.lst, on sdc, then this
might be okay for Yast on sdc:
although the change didn't go through it, it's in the files.
However Yast on sda will be taken by surprise: once Yast on sdc did its
job, then I guess information is
written on the boot-sector, and this then is no longer in sync with
what Yast on sda has in its files?

And furthermore: After having updated menu.lst, then likely I should
run yast to write that information
to the boot-sector; how to do this?

Oliver


-- 
kullmann
------------------------------------------------------------------------
kullmann's Profile: http://forums.opensuse.org/member.php?userid=60214
View this thread: http://forums.opensuse.org/showthread.php?t=463737

0
kullmann
8/5/2011 1:06:03 PM
kullmann;2371708 Wrote: 
> 
> 
> On sdc (the secondary hard disk):
> > 
Code:
--------------------
  >   > 
  > linux-dta1:/boot/grub # more device.map
  > (hd0)   /dev/disk/by-id/ata-WDC_WD5000BEVT-75A0RT0_WD-WXB1A60V9698
  > (hd1)   /dev/disk/by-id/usb-WD_Ext_HDD_1021_5743415A4134363439323938-0:0
  > 
--------------------
> > 
> 
> On sda (the primary hard disk):
> > 
Code:
--------------------
  >   > 
  > linux-dta1:/media/33d4f3d1-1a52-450f-80cc-7f5f823d03f6/boot/grub # more device.map
  > (hd0)   /dev/disk/by-id/ata-WDC_WD5000BEVT-75A0RT0_WD-WXB1A60V9698
  > 
--------------------
> > 
> 

If you intend to regularly use this external USB drive, you can add the
(hd1) entry to device.map on your primary disk.


> And furthermore: After having updated menu.lst, then likely I should run
> yast to write that information
> to the boot-sector; how to do this?

The answer here is clearly NO. Changing the boot menu is much easier
than you think. It does not require to reinstall the bootloader. You can
safely copy/paste boot entries from one menu.lst to the other. Another
possibility is to install and use 'updategrub'
(http://tinyurl.com/3zrjq5g). But it doesn't seem to be really helpful
here.


-- 
please_try_again
------------------------------------------------------------------------
please_try_again's Profile: http://forums.opensuse.org/member.php?userid=10877
View this thread: http://forums.opensuse.org/showthread.php?t=463737

0
please
8/5/2011 2:56:04 PM
Thanks. I found that out myself meanwhile (sort of --- some questions
remain):
I went to Yast/Boot Loader, and there under "Other" I used "Edit
Configuraton Files"
(namely boot/grub/menu.lst).
I copied there the main entry from the old menu.lst for the primary
disc --- and it works!
Switched now back and forth between the two operating systems, and all
works!
Thanks!

However I do not understand when you say
> 
> Changing the boot menu is much easier than you think. It does not
> require to reinstall the bootloader. You can safely copy/paste boot
> entries from one menu.lst to the other.
> 
There are now *two* /boot/grub/menu.lst in the system: one for sda, one
for sdc. The one for sdc was changed via
Yast, and it is the one which is reflected in the (real) boot menu.
While the one for sda did not change, and has
no bearing on the (real) boot menu. So something must have triggered
the activation of the right menu.lst.
I assumed that this happened via Yast, while just changing a file
shouldn't have this effect?
The three files involved, /boot/grub/device.map, /boot/grub/menu.lst,
and /etc/grub.conf do not seem to say
anything about which of the two menu.lst to use.
If it would be always just the one where one booted, then after booting
sda the boot menu should reflect
that menu.lst, but it doesn't?


-- 
kullmann
------------------------------------------------------------------------
kullmann's Profile: http://forums.opensuse.org/member.php?userid=60214
View this thread: http://forums.opensuse.org/showthread.php?t=463737

0
kullmann
8/5/2011 4:16:03 PM
On 08/05/2011 11:16 AM, kullmann wrote:
> There are now *two* /boot/grub/menu.lst in the system: one for sda, one
> for sdc. The one for sdc was changed via
> Yast, and it is the one which is reflected in the (real) boot menu.
> While the one for sda did not change, and has
> no bearing on the (real) boot menu. So something must have triggered
> the activation of the right menu.lst.
> I assumed that this happened via Yast, while just changing a file
> shouldn't have this effect?
> The three files involved, /boot/grub/device.map, /boot/grub/menu.lst,
> and /etc/grub.conf do not seem to say
> anything about which of the two menu.lst to use.
> If it would be always just the one where one booted, then after booting
> sda the boot menu should reflect
> that menu.lst, but it doesn't?

GRUB loading is controlled by the BIOS as it selects the boot disk. Once GRUB is 
loaded, it will read the configuration files from that disk. Unless your 
configuration files are really strange, your system is booting /dev/sdc.
0
Larry
8/5/2011 4:55:18 PM
kullmann;2371788 Wrote: 
> 
> The three files involved, /boot/grub/device.map, /boot/grub/menu.lst,
> and /etc/grub.conf do not seem to say
> anything about which of the two menu.lst to use.

That's right. This information is stored in Grub stage1, the part
installed in the bootsector of the partition or in MBR, wherever you
installed the bootloader (stage1). I have a script which looks for all
Grub stage1 installed and shows in which partition they expect to find
Grub stage2 (including menu.lst). 

The latest version is 3.4.2, available here:
http://www.unixversal.com/linux/openSUSE/findgrub-3.4.2.tgz
I haven't updated  the info yet in the findgrub thread. 
The different ways to install findgrub are described in this post:
'Looking for Grub and Windows bootloader in all partitions. - Page 8'
(http://tinyurl.com/6b786fn). The findgrub link is outdated. Use the
first link above (3.4.2).

I suggest installing updategrub (which includes findgrub),as it is
easier and up to date. 

You should add your USB drive to device.map, because findgrub is
reading this file. Otherwise it will try to guess BIOS names (hd0, hd1).
But it skips USB drives because it's impossible to determine the right
order for such devices. I explained why in the latest posts in the
thread.

kullmann;2371788 Wrote: 
> If it would be always just the one where one booted, then after booting
> sda the boot menu should reflect
> that menu.lst, but it doesn't?

You can also chainload one Grub from the other and vice versa.
updategrub would add such entries (again it requires a consistent
device.map).


-- 
please_try_again
------------------------------------------------------------------------
please_try_again's Profile: http://forums.opensuse.org/member.php?userid=10877
View this thread: http://forums.opensuse.org/showthread.php?t=463737

0
please
8/5/2011 5:16:04 PM
It seems strange that the boot-information is taken from sdc and not
from sda.
Even if, after booting sda, I go to Yast and it says it "installs boot
loader", this has
no effect, and the information on sdc is taken.

I need to change that: having a second Suse-Linux on the external hard
disk was merely
as a back-up, and for the possibility to try out things. But this is a
laptop, and thus
many times that external disk isn't there.

Now when booting without sdc, I get an error message. I guess that's
because it needs
the boot-files from sdc (and it doesn't look into sda).

The updategrub-documentation doesn't seem to speak about that (how to
control where
the boot-files to be found). Or is it SETBOOTFLAG which should be set
to yes ?
But apparently this relates only to Windows, and thus seems not
related.


-- 
kullmann
------------------------------------------------------------------------
kullmann's Profile: http://forums.opensuse.org/member.php?userid=60214
View this thread: http://forums.opensuse.org/showthread.php?t=463737

0
kullmann
8/5/2011 11:36:03 PM
kullmann;2371955 Wrote: 
> 
> The updategrub-documentation doesn't seem to speak about that (how to
> control where
> the boot-files to be found). Or is it SETBOOTFLAG which should be set
> to yes ?
> But apparently this relates only to Windows, and thus seems not
> related.

The updategrub documentation is about updategrub. I added findgrub to
this package because it is easier to install that way and the two
scripts are related. If you install updategrub, you'll have findgrub in
/usr/bin. And you just need to type* findgrub* to see the relationship
between the stage1 and stage2 of Grub(s) on your machine. Here's an
example on the machine I'm typing on (ArchLinux actually) - as you can
see I have several Grubs installed.  


Code:
--------------------
    # *findgrub*
  Find Grub Version 3.4.2 - Written for openSUSE Forums
  
  - reading MBR on disk /dev/sdb                       ... --> Grub  found in sdb MBR     => sda11  0x83 (openSUSE)
  - searching partition /dev/sdb1      (FAT16)         ... --> Windows NT/2K/XP Loader found in /dev/sdb1
  
  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  You can add the following entry to /boot/grub/menu.lst :
  
  ###Don't change this comment - YaST2 identifier: Original name: WindowsBootLoader###
  title Windows on /dev/sdb1
  rootnoverify (hd1,0)
  map (hd1) (hd0)
  map (hd0) (hd1)
  chainloader +1
  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  
  - skipping partition  /dev/sdb2      (FreeBSD)      
  - skipping partition  /dev/sdb3      (FreeBSD)      
  * - reading bootsector  /dev/sdb4   *  (Extended)      ... --> Grub  found in /dev/sdb4   => sda11  0x83 (openSUSE)*
  - skipping partition  /dev/sdb5      (swap)         
  - reading bootsector  /dev/sdb6      (LINUX)         ... --> Grub  found in /dev/sdb6   => sdb6   0x83 (Mandriva)
  - reading bootsector  /dev/sdb7      (LINUX)         ...
  - reading bootsector  /dev/sdb8      (LINUX)         ...
  - reading bootsector  /dev/sdb9      (LINUX)         ...
  - reading bootsector  /dev/sdb10     (LINUX)         ...
  - reading bootsector  /dev/sdb11     (LINUX)         ...
  - reading bootsector  /dev/sdb12     (LINUX)         ...
  - reading bootsector  /dev/sdb13     (LINUX)         ...
  
  - reading MBR on disk /dev/sda                       ... --> Grub2 found in sda MBR     => sda6   0x83 (Ubuntu)
  - searching partition /dev/sda1      (FAT16)         ... --> Windows NT/2K/XP Loader found in /dev/sda1
  
  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  You can add the following entry to /boot/grub/menu.lst :
  
  ###Don't change this comment - YaST2 identifier: Original name: WindowsBootLoader###
  title Windows on /dev/sda1
  rootnoverify (hd0,0)
  chainloader +1
  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  
  - skipping partition  /dev/sda2      (FreeBSD)      
  - skipping partition  /dev/sda3      (FreeBSD)      
  - reading bootsector  /dev/sda4      (Extended)      ... --> Grub  found in /dev/sda4   => sdb6   0x83 (Mandriva)
  - skipping partition  /dev/sda5      (swap)         
  - reading bootsector  /dev/sda6      (LINUX)         ... --> Grub2 found in /dev/sda6   => sda6   0x83 (Ubuntu)
  - reading bootsector  /dev/sda7      (LINUX)         ...
  - reading bootsector  /dev/sda8      (LINUX)         ...
  - reading bootsector  /dev/sda9      (LINUX)         ...
  - reading bootsector  /dev/sda10     (LINUX)         ...
  - reading bootsector  /dev/sda11     (LINUX)         ... --> Grub  found in /dev/sda11  => sda11  0x83 (openSUSE)
  - reading bootsector  /dev/sda12     (LINUX)         ...
  - reading bootsector  /dev/sda13     (LINUX)         ...
  - reading bootsector  /dev/sda14     (LINUX)         ...
  - reading bootsector  /dev/sda15     (LINUX)         ... --> Grub  found in /dev/sda15  => sda15  0x83 (Mandriva)
  - reading bootsector  /dev/sda16     (LINUX)         ...
  - reading bootsector  /dev/sda17     (LINUX)         ...
  - reading bootsector  /dev/sda18     (LINUX)         ...
  - reading bootsector  /dev/sda19     (LINUX)         ... --> Grub  found in /dev/sda19  => sda19  0x83 (Mandriva)
  - reading bootsector  /dev/sda20     (LINUX)         ...
  
  - reading MBR on disk /dev/sdc                       ...
  
  ********************************************************************************
  WARNING: /boot/grub/device.map not found.
  Displayed BIOS device mapping may be incorrect!
  ********************************************************************************
  
  Press <enter> to Exit findgrub...
  
--------------------


As you can see, I don't have a device.map on ArchLinux (I'm bad). So
findgrub issues a warning. The partitions (or MBR) in red show the
locations of the bootloaders (stage1) and the partitions in green where
they look for stage2 (including menu.lst). stage1 and stage2 don't have
to be on the same drive, as the line in bold illustrates - although in
most cases they will. I have a very strange configuration - as @lwfinger
would say - because I write very strange scripts. ;)  Usually, stage1
and stage2 will be on the same hd. 

You can install/reinstall Grub stage1 anytime - it's highly recommended
to have a consistent device.map while doing that - and you can tell it
to use any stage2 from any partition (provided it is there).  For
example, if I want the Grub bootloader installed on sdb4 to read
menu.lst from sdb6, I would just type the following: 


Code:
--------------------
    
  # *su -l*
  # *grub*
  GNU GRUB  version 0.97  (640K lower / 3072K upper memory)
  
  [ Minimal BASH-like line editing is supported.  For the first word, TAB
  lists possible command completions.  Anywhere else TAB lists the possible
  completions of a device/filename. ]
  
  grub> *find /boot/grub/stage2*
  (hd0,10)
  (hd0,14)
  (hd0,18)
  (hd1,5)
  
  grub> *root (hd1,5)*
  Filesystem type is ext2fs, partition type 0x83
  
  grub> *setup (hd1,3)*
  Checking if "/boot/grub/stage1" exists... yes
  Checking if "/boot/grub/stage2" exists... yes
  Checking if "/boot/grub/e2fs_stage1_5" exists... yes
  Running "embed /boot/grub/e2fs_stage1_5 (hd1,3)"... failed (this is not fatal)
  Running "embed /boot/grub/e2fs_stage1_5 (hd1,5)"... failed (this is not fatal)
  Running "install /boot/grub/stage1 (hd1,3) /boot/grub/stage2 p /boot/grub/menu.lst "... succeeded
  Done.
  
  grub> *quit *
  
--------------------


Notice:
    
- in Legacy Grub notation, sda1 = (hd0,0), sda2 = (hd0,1), etc. sdb1
  = (hd1,0), sdb2 = (hd1,1), etc.
- the errors (in red) are normal while installing Grub in a partition
  bootsector, because there is no room for stage1_5 there.
- the name "Mandriva" is not reliable, because it uses the same
  bootloader as ArchLinux and older Debian. But "openSUSE" here means
  "openSUSE", because its stage1 is recognizable. 
- I'm not using YaST :(.


-- 
please_try_again
------------------------------------------------------------------------
please_try_again's Profile: http://forums.opensuse.org/member.php?userid=10877
View this thread: http://forums.opensuse.org/showthread.php?t=463737

0
please
8/6/2011 12:36:03 AM
kullmann;2371955 Wrote: 
> It seems strange that the boot-information is taken from sdc and not
> from sda.
> Even if, after booting sda, I go to Yast and it says it "installs boot
> loader", this has
> no effect, and the information on sdc is taken.

My tip: forget about YaST! lol!


kullmann;2371955 Wrote: 
> 
> Now when booting without sdc, I get an error message. I guess that's
> because it needs
> the boot-files from sdc (and it doesn't look into sda).
> 

It's easy to fix. But I'll need to see findgrub's output.


-- 
please_try_again
------------------------------------------------------------------------
please_try_again's Profile: http://forums.opensuse.org/member.php?userid=10877
View this thread: http://forums.opensuse.org/showthread.php?t=463737

0
please
8/6/2011 12:36:03 AM
Here is the output of findgrub:

Code:
--------------------
    
  root-0:kullmann> findgrub 
  Find Grub Version 3.4.2 - Written for openSUSE Forums
  
  - reading MBR on disk /dev/sda                       ...basename: missing operand
  Try `basename --help' for more information.
  --> Grub  found in sda MBR     => 2      0x (openSUSE)
  - searching partition /dev/sda1      (NTFS)          ... --> Windows7/Vista Loader found in /dev/sda1
  
  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  You can add the following entry to /boot/grub/menu.lst :
  
  ###Don't change this comment - YaST2 identifier: Original name: WindowsBootLoader###
  title Windows on /dev/sda1
  rootnoverify (hd0,0)
  chainloader +1
  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  
  - searching partition /dev/sda2      (NTFS)          ...
  - reading bootsector  /dev/sda3   *  (Extended)      ... --> Grub  found in /dev/sda3   => sda6   0x83 (openSUSE)
  - skipping partition  /dev/sda5      (swap)         
  - reading bootsector  /dev/sda6      (LINUX)         ...
  - reading bootsector  /dev/sda7      (LINUX)         ...
  
  - reading MBR on disk /dev/sdc                       ...
  - skipping partition  /dev/sdc1      (swap)         
  - reading bootsector  /dev/sdc2      (LINUX)         ...
  - reading bootsector  /dev/sdc3      (LINUX)         ...
  
  ********************************************************************************
  WARNING: /dev/sdc is NOT in /boot/grub/device.map
  Displayed BIOS device mapping may be incorrect!
  ********************************************************************************
  
  Press <enter> to Exit findgrub...
  
  root-0:kullmann> cat /boot/grub/device.map
  (hd0)   /dev/disk/by-id/ata-WDC_WD5000BEVT-75A0RT0_WD-WXB1A60V9698
  (hd1)   /dev/disk/by-id/usb-WD_Ext_HDD_1021_5743415A4134363439323938-0:0
  
--------------------


Does this make sense? Looks slightly strange to me.


-- 
kullmann
------------------------------------------------------------------------
kullmann's Profile: http://forums.opensuse.org/member.php?userid=60214
View this thread: http://forums.opensuse.org/showthread.php?t=463737

0
kullmann
8/6/2011 9:26:02 PM
It is strange. 

  
- it encounters something it didn't expect while trying to read Grub
  in the MBR of sda ...  I'll like to know what (so I could correct it).
  
- you don't seem to have any Grub bootloader installed on sdc
- why sda and sdc and no sdb?
  

Could you please post the ouput of the 2 last commands: 


Code:
--------------------
    
  su -l
  fdisk -l
  findgrub -M
--------------------


I have to try to remember what was the original problem or scroll up in
this thread.


-- 
please_try_again
------------------------------------------------------------------------
please_try_again's Profile: http://forums.opensuse.org/member.php?userid=10877
View this thread: http://forums.opensuse.org/showthread.php?t=463737

0
please
8/6/2011 9:56:03 PM
Code:
--------------------
    
  linux-vp82:~ # fdisk -l
  
  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
  I/O size (minimum/optimal): 512 bytes / 512 bytes
  Disk identifier: 0x02c8b5aa
  
  Device Boot      Start         End      Blocks   Id  System
  /dev/sda1            2048      206847      102400    7  HPFS/NTFS/exFAT
  /dev/sda2          206848   104859647    52326400    7  HPFS/NTFS/exFAT
  /dev/sda3   *   104859648   976773119   435956736    f  W95 Ext'd (LBA)
  /dev/sda5       104861696   109080575     2109440   82  Linux swap / Solaris
  /dev/sda6       109082624   151027711    20972544   83  Linux
  /dev/sda7       151029760   976752639   412861440   83  Linux
  
  Disk /dev/sdc: 2000.4 GB, 2000396746752 bytes
  255 heads, 63 sectors/track, 243201 cylinders, total 3907024896 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: 0x001a85c3
  
  Device Boot      Start         End      Blocks   Id  System
  /dev/sdc1            2048     8386559     4192256   82  Linux swap / Solaris
  /dev/sdc2         8386560   218097663   104855552   83  Linux
  /dev/sdc3       218097664  3907024895  1844463616   83  Linux
  linux-vp82:~ # findgrub -M
  Find Grub Version 3.4.2 - Written for openSUSE Forums
  
  --- DEVICE.MAP: sda is PCI drive hd0
  --- DEVICE.MAP: looking for /dev/sda in /boot/grub/device.map:
  --- DEVICE.MAP: - /dev/sda
  --- DEVICE.MAP: - /dev/disk/by-id/ata-WDC_WD5000BEVT-75A0RT0_WD-WXB1A60V9698 -> hd0
  --- DEVICE.MAP: - /dev/disk/by-id/scsi-SATA_WDC_WD5000BEVT-_WD-WXB1A60V9698
  --- DEVICE.MAP: - /dev/disk/by-id/wwn-0x50014ee6004b2e74
  --- DEVICE.MAP: - /dev/disk/by-path/pci-0000:00:1f.2-scsi-0:0:0:0                               
  --- DEVICE.MAP: => sda - found in device.map - is now hd0                                       
  --- DEVICE.MAP:                                                                                 
  --- DEVICE.MAP: sdc is PCI drive                                                                
  --- DEVICE.MAP: looking for /dev/sdc in /boot/grub/device.map:                                  
  --- DEVICE.MAP: - /dev/sdc                                                                      
  --- DEVICE.MAP: => sdc - missing in device.map - set to                                         
  --- DEVICE.MAP:                                                                                 
  ********************************************************************************                
  
--------------------


The remaining problem is that I don't want to boot from sdc (don't know
why *here*
it is always sdc, while otherwise it is sdb), but from sda (since sdc
is only plugged
in some times).


-- 
kullmann
------------------------------------------------------------------------
kullmann's Profile: http://forums.opensuse.org/member.php?userid=60214
View this thread: http://forums.opensuse.org/showthread.php?t=463737

0
kullmann
8/6/2011 10:06:02 PM
kullmann;2372290 Wrote: 
> 
> The remaining problem is that I don't want to boot from sdc (don't know
> why *here*
> it is always sdc, while otherwise it is sdb), but from sda (since sdc
> is only plugged
> in some times).

We will get the problem fixed.
As I said before, findgrub cannot guess BIOS names for USB drives (I
guess nobody could). Could you please edit /boot/grub/device.map and add
the correct entry for your USB drive (as in 'post #3'
(http://tinyurl.com/445l2wh))?

You have to edit this file as root of course. Then could you post the
output of: 


Code:
--------------------
    findgrub -m
--------------------


-- 
please_try_again
------------------------------------------------------------------------
please_try_again's Profile: http://forums.opensuse.org/member.php?userid=10877
View this thread: http://forums.opensuse.org/showthread.php?t=463737

0
please
8/6/2011 10:16:03 PM
You want to have Grub installed in MBR of sda reading menu.lst from sda6
(you root partition), right? (just like another instance of Grub
installed in sda3 already does).


-- 
please_try_again
------------------------------------------------------------------------
please_try_again's Profile: http://forums.opensuse.org/member.php?userid=10877
View this thread: http://forums.opensuse.org/showthread.php?t=463737

0
please
8/6/2011 10:16:03 PM
I believe /boot/grub/device.map is already correct --- its content was
already given in post #10.
Here again:

Code:
--------------------
    
  (hd0)   /dev/disk/by-id/ata-WDC_WD5000BEVT-75A0RT0_WD-WXB1A60V9698                              
  (hd1)   /dev/disk/by-id/usb-WD_Ext_HDD_1021_5743415A4134363439323938-0:0                        
  
--------------------

The line for hd1 was copied from the  /boot/grub/device.map in sdc.


-- 
kullmann
------------------------------------------------------------------------
kullmann's Profile: http://forums.opensuse.org/member.php?userid=60214
View this thread: http://forums.opensuse.org/showthread.php?t=463737

0
kullmann
8/6/2011 10:26:02 PM
please_try_again;2372295 Wrote: 
> You want to have Grub installed in MBR of sda reading menu.lst from sda6
> (you root partition), right? (just like another instance of Grub
> installed in sda3 already does).

Yes, that looks correct to me.
(To say in from a user-perspective: Optimally, I could boot the Linux'
at sda and sdc, and the windows,
and if sdc is not available, then that's just ignored. If handling of a
non-existing sdc is a problem, then
I just want the old setting back, where the boot process doesn't know
that sdc also has a bootable
Linux, and then it would be good to know how to temporarily activate
the Linux on sdc.
Perhaps getting the old setting back could be achieved by just
resetting the old MBR (those 512 bytes are stored).)


-- 
kullmann
------------------------------------------------------------------------
kullmann's Profile: http://forums.opensuse.org/member.php?userid=60214
View this thread: http://forums.opensuse.org/showthread.php?t=463737

0
kullmann
8/6/2011 10:26:03 PM
Yes, you're right. findgrub is confused because of the missing sdb.


-- 
please_try_again
------------------------------------------------------------------------
please_try_again's Profile: http://forums.opensuse.org/member.php?userid=10877
View this thread: http://forums.opensuse.org/showthread.php?t=463737

0
please
8/6/2011 10:26:03 PM
OK. Open a terminal and type that in bold) : 


Code:
--------------------
    # *su -l*
  # *grub*
  grub> *find /boot/grub/stage2*
  (hd0,5)
  (hd1,1) (?)
  
  grub> *root (hd0,5)*
  Filesystem type is ext2fs, partition type 0x83
  
  grub> *setup (hd0)*
  grub> *quit*
  
--------------------


Then type *findgrub* again (just curious).


-- 
please_try_again
------------------------------------------------------------------------
please_try_again's Profile: http://forums.opensuse.org/member.php?userid=10877
View this thread: http://forums.opensuse.org/showthread.php?t=463737

0
please
8/6/2011 10:36:03 PM
When you reboot, Grub in MBR will load stage2 (including the menu) from
your first HD and you can safely remove your USB drive.


-- 
please_try_again
------------------------------------------------------------------------
please_try_again's Profile: http://forums.opensuse.org/member.php?userid=10877
View this thread: http://forums.opensuse.org/showthread.php?t=463737

0
please
8/6/2011 10:36:03 PM
please_try_again;2372300 Wrote: 
> Yes, you're right. findgrub is confused because of the missing sdb.

I just looked into the hardware information by Yast:
there is an sdb, a "multi-card". This must be the Zalman notebook
cooler
(powered by usb; and apparently one can actually use its usb-plug,
which
should then be transferred to the laptop). So perhaps the problem is
that
that usb-device is "there" (plugged-in) and "not there" (not
plugged-in) at
the same time.


-- 
kullmann
------------------------------------------------------------------------
kullmann's Profile: http://forums.opensuse.org/member.php?userid=60214
View this thread: http://forums.opensuse.org/showthread.php?t=463737

0
kullmann
8/6/2011 10:36:03 PM
kullmann;2372308 Wrote: 
> I just looked into the hardware information by Yast:
> there is an sdb, a "multi-card". This must be the Zalman notebook
> cooler
> (powered by usb; and apparently one can actually use its usb-plug,
> which
> should then be transferred to the laptop). So perhaps the problem is
> that
> that usb-device is "there" (plugged-in) and "not there" (not
> plugged-in) at
> the same time.

Yes it's something like that. And it it were not the Zalman notebook
cooler, it would be some card reader or whatever USB device that the
kernel would handle as a block device. I have to find a way to emulate
the situation so that I can get rid of them. But the output of *fdisk -l
*you posted before was complete? You didn't remove anything?


-- 
please_try_again
------------------------------------------------------------------------
please_try_again's Profile: http://forums.opensuse.org/member.php?userid=10877
View this thread: http://forums.opensuse.org/showthread.php?t=463737

0
please
8/6/2011 10:46:03 PM
kullmann;2372315 Wrote: 
> A bit strange that addition of Windows on sda1 is recommended, since it
> is already
> included in the menu.lst on sda. So well ...

No, this is not strange. findgrub doesn't read nor try to correct the
menu. It only reads bootsectors and display information.

Now here's what you wanted: 

kullmann;2372315 Wrote: 
> 
> > 
Code:
--------------------
  >   > 
  > linux-vp82:~ # findgrub
  > Find Grub Version 3.4.2 - Written for openSUSE Forums             
  > - reading MBR on disk /dev/sda                       ... --> Grub  found in sda MBR     => sda6   0x83 (openSUSE)
  > 
--------------------
> > 
> 

Anything else for you? :)

BTW, Could you post the output of this command for me: 


Code:
--------------------
    find /dev/ -name "sd?" -ls
--------------------


-- 
please_try_again
------------------------------------------------------------------------
please_try_again's Profile: http://forums.opensuse.org/member.php?userid=10877
View this thread: http://forums.opensuse.org/showthread.php?t=463737

0
please
8/6/2011 10:56:02 PM
please_try_again;2372305 Wrote: 
> OK. Open a terminal and type that in bold) : 
> > 
Code:
--------------------
  >   > # *su -l*
  > # *grub*
  > grub> *find /boot/grub/stage2*
  > (hd0,5)
  > (hd1,1) (?)
  > 
  > grub> *root (hd0,5)*
  > Filesystem type is ext2fs, partition type 0x83
  > grub> *setup (hd0)*
  > grub> *quit*
  > 
--------------------
> > 
> Then type *findgrub* again (just curious).

The output of the first two commands was as expected; the output of
"setup"
unfortunately disappeared. But looked sensible.

Then

Code:
--------------------
    
  linux-vp82:~ # findgrub
  Find Grub Version 3.4.2 - Written for openSUSE Forums             
  - reading MBR on disk /dev/sda                       ... --> Grub  found in sda MBR     => sda6   0x83 (openSUSE)
  - searching partition /dev/sda1      (NTFS)          ... --> Windows7/Vista Loader found in /dev/sda1
  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  You can add the following entry to /boot/grub/menu.lst :
  ###Don't change this comment - YaST2 identifier: Original name: WindowsBootLoader###
  title Windows on /dev/sda1
  rootnoverify (hd0,0)
  chainloader +1
  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  - searching partition /dev/sda2      (NTFS)          ...
  - reading bootsector  /dev/sda3   *  (Extended)      ... --> Grub  found in /dev/sda3   => sda6   0x83 (openSUSE)
  - skipping partition  /dev/sda5      (swap)         
  - reading bootsector  /dev/sda6      (LINUX)         ...
  - reading bootsector  /dev/sda7      (LINUX)         ...
  - reading MBR on disk /dev/sdc                       ...
  - skipping partition  /dev/sdc1      (swap)         
  - reading bootsector  /dev/sdc2      (LINUX)         ...
  - reading bootsector  /dev/sdc3      (LINUX)         ...
  Press <enter> to Exit findgrub...
  
--------------------


A bit strange that addition of Windows on sda1 is recommended, since it
is already
included in the menu.lst on sda. So well ...


-- 
kullmann
------------------------------------------------------------------------
kullmann's Profile: http://forums.opensuse.org/member.php?userid=60214
View this thread: http://forums.opensuse.org/showthread.php?t=463737

0
kullmann
8/6/2011 10:56:02 PM
please_try_again;2372313 Wrote: 
>  But the output of *fdisk -l *you posted before was complete? You didn't
> remove anything?

Absolutely, nothing removed.


-- 
kullmann
------------------------------------------------------------------------
kullmann's Profile: http://forums.opensuse.org/member.php?userid=60214
View this thread: http://forums.opensuse.org/showthread.php?t=463737

0
kullmann
8/6/2011 10:56:02 PM
I now booted and tested (a bit) all three installed operating systems --
all working.
And when the external disk is not there, then one can nevertheless boot
the other two systems.
Hurra (hurrah)!

Regarding the output of your command, the "sdc" now became an "sdb"
(!):
First when the external disk was unplugged from the beginning, and only
then booted:

Code:
--------------------
    
  root-0:kullmann> find /dev/ -name "sd?" -ls
  18    0 brw-rw----   1 root     disk              Aug  7 00:07 /dev/sda
  root-0:kullmann> find /dev/ -name "sd?" -ls
  101287    0 brw-rw----   1 root     disk              Aug  7 00:14 /dev/sdb
  18    0 brw-rw----   1 root     disk              Aug  7 00:07 /dev/sda
  
--------------------

And when the external disk is booted from the beginning (before boot),
similarly:

Code:
--------------------
    
  root-0:kullmann> find /dev/ -name "sd?" -ls
  1796    0 brw-rw----   1 root     disk              Aug  7 00:16 /dev/sdb
  3077    0 brw-rw----   1 root     disk              Aug  7 00:16 /dev/sda
  
--------------------

Now in Yast/Hardware Information there is no sdc anymore (and no
"multi-card").

THANKS!

Oliver


-- 
kullmann
------------------------------------------------------------------------
kullmann's Profile: http://forums.opensuse.org/member.php?userid=60214
View this thread: http://forums.opensuse.org/showthread.php?t=463737

0
kullmann
8/6/2011 11:36:03 PM
You're welcome. 
Do not update the kernel  when your USB device is plugged in - and if
you happened to change BIOS boot order! I don't trust the
bootloader_entry script too much (the one rewriting the Grub menu after
a kernel update).


-- 
please_try_again
------------------------------------------------------------------------
please_try_again's Profile: http://forums.opensuse.org/member.php?userid=10877
View this thread: http://forums.opensuse.org/showthread.php?t=463737

0
please
8/6/2011 11:56:03 PM
Reply: