Installing on External Hard Disk - Where does Grub 2 go

I had raised some querries in respect of installing 12.1 on external hard disk refer to Thread : http://forums.opensuse.org/english/get-technical-help-here/install-boot-login/471969-installing-suse-12-1-alongside-suse-11-4-a.html. One was regarding a separate partition dedicated to Grub (recommended for Grub 2.

Due to hardware problem that installation is lost and I have a replacement. The SDB article “Installation on external hard disk” has not been upgraded for 12.2 as yet. I plan to keep at least two primary partitions for Windows and keep OpenSUSE 12.2 on logical partitions in the extended partition. Request recommendations on deployment strategy for Grub 2.

PrakashC

Depends on the order of your chainloading.
If Windows is your first bootloader, then IMO GRUB2 can be anywhere.
But if you boot GRUB2 first and openSUSE is on a detachable disk then you will likely want to place it somwhere on your internal drives, the exception if you intend to never remove your external drive(s).

IMO,
TSU

Hi tsu2,

I have not detailed the problem sufficiently in first post in the current thread. Here it goes:

I have an internal HDD (160 GB) devoted to Windows (Vista Home Ed). The booting order is set up as (1) DVD/Optical Drive, (2.) External HDD on USB and (3.) Internal HDD. The system is that if the External HDD (it has separate power point) is not plugged in or switched on the Windows boots normally. So one thing is clear that Grub does not go onto internal HDD.

The first two partitions on the external HDD (1 TB) I am reserving for Windows. After booting into Windows I switch on the Ext. HDD and access these partitions. So if any part (or if necessary the whole) of Grub 2 will go to the MBR of Ext. HDD. That will certainly incude an option to chain load windows!

However, I wish to experiment with various flavours of Linux on logical partitions in the extended partition on the Ext. HDD. To enable such a set up without having to reinstall/repair Grub each time, a separate partition for Grub 2 has been recommended. What would be OpenSUSE 12.2 and YAST requirements in such a set up?

Thanks for the “patient hearing”,

PrakashC

I tried to install 12.2 on external HDD. Had done it successfully for 12.1 with Grub (Legacy) going to the external disk as desired. With 12.2 I could not find the option to locate the Grub on a specific hard disk!! As I have mentioned in my earlier posts I do not want it on the internal HDD.

Has anyone any idea how to do it (and safely please!)

PrakashC

Hi,
Further to the above post, I have gone through openSUSE 12.2 Reference document. The chapter 9 still is covering Grub Legacy and has nothing on the Grub 2 use which is the default selection!!

PrakashC

And did you report it in bugzilla? If not, no amount of exclamation marks here is going to change anything.

I just started bootloader configuration on 12.2 and after I selected GRUB2 it offered standard selection of bootloader location (MBR, root, …, explicit partition selection). It appears straight away.

Hi
Thanks. Reported bug.
Re Grub 2 The option to install in MBR automatically selects the internal hard disk (sda) whereas I wish to install it to external hard disk (sdb). And to be doubly sure I am checking the drive identification. There is no way to change the hard disk to which the Grub 2 MBR installation will be made.

PrakashC

http://paste.opensuse.org/view/raw/53358790

Hi arvidjaar,

Tried your suggestion. Deselected the internal hdd MBR for writing MBR and selected to write Grub 2 to /boot partition on the external disk. The installation (it apperars) went through OK, but now the BIOS does not recognise the external hdd as bootable! The BIOS setup shows that there is no disk on USB. Of course the Windows partition is reachable after booting Vista from internal disk. Partedmagic shows all the partitions are OK (including those for 12.2 created during install.

Will try to fix the MBR with Vista disk before more experiments. Also checking out a blog by jdmcdaniel3 on the Grub 2 installation.

PrakashC

Hi,

Refer to above post. Attempt to “repair” MBR on external HDD, using Windows Vista Install DVD failed. The program, just as the BIOS, did not detect the drive! Any suggestions please?
The 12.2 installation program at some point offers an option to write generic MBR to the disk. Would that work?

Checked jdmcdaniel’s blog in re of Grub 2. It addresses Windows 7 and efi filesystem and not of use to me.

Also checked Grub 2 official documentation and (to me) it appears to say that it (Grub 2) will write/be written (if selected to write to MBR) to the MBR of first disk only! Am I correct in this? If yes, and Grub 2 is installed in a logical partition (and not in the MBR) how does the BIOS hand over control to Grub2.

I also note that Grub 2 identifies disks by UUIDs. That should simplify matters for the boot loader in respect of booting sequence set up BIOS.

Of course I only wish to leave my first disk sda (primary master) untouched and install 12.2 on external hard disk with Grub 2 as boot loader. Knowing how to do it and how it works is the bonus!

PrakashC

Sorry! I meant “It addresses Windows 7 with UEFI BIOS and not of much use to me.”

PrakashC

I have different renditions of openSUSE installed on two drives and each Grub1 or Grub2 is pointing to its own " / " (root) partition.
The first openSUSE is installed to MBR and the next openSUSE is installed to its " / " (root) partition.

Have a look at this Arch Linux website.

The Master Boot Record (MBR) occupies the first 512 bytes of the first hard disk, and is the first thing loaded by the BIOS to hand over control to a program capable of booting the desired operating system. In general, a bootloader is installed in the MBR, removing its previous content.

On 2012-10-12 16:46, PrakashC wrote:
>
> Hi,
> Further to the above post, I have gone through openSUSE 12.2 Reference
> document. The chapter 9 still is covering Grub Legacy and has nothing
> on the Grub 2 use which is the default selection!!

So, report in in Bugzilla, as a documentation issue.


Cheers / Saludos,

Carlos E. R.
(from 12.1 x86_64 “Asparagus” at Telcontar)

On 2012-10-19 18:28, Carlos E. R. wrote:
> On 2012-10-12 16:46, PrakashC wrote:
>>
>> Hi,
>> Further to the above post, I have gone through openSUSE 12.2 Reference
>> document. The chapter 9 still is covering Grub Legacy and has nothing
>> on the Grub 2 use which is the default selection!!
>
> So, report in in Bugzilla, as a documentation issue.

Correction. GRUB 2 is documented, chapter 10 of the reference book.


Cheers / Saludos,

Carlos E. R.
(from 12.1 x86_64 “Asparagus” at Telcontar)

Hi,
Yes, I eventually found :embarrassed:(embarrassed) Grub 2 in Chapter 10 of the Reference. However, it does not contain info I need. In fact the now the problem has become a little more complex. Let me restate the matter in detail.

I have a Seagate FA GoFlex Desk - 2000 (2 TB) external hard disk. I use it with a Dell Dimension C521 desk top. The internal HDD of 160 GB is dedicated to running Windows Vista Home Premium (32 bit) OS. The PC BIOS can boot off the USB. The GoFlex drive has Seagates pre installed instant back up program etc. I used shrink volume to reduce the single partition to half the size (1 TB) in order to install Linux distributions in remaining space. Till this point the drive was recognised as bootable by the BIOS.
I wished to first install open SUSE 12.2 with Grub 2 as boot manager. The plan was to set up BIOS booting sequence to internal DVD, external HDD and last the internal HDD. This way if the external drive is not connected or switched on the system boots into Windows and if the external disk is connected the boot manager comes into play. This had worked with earlier version installs 11.4 and 12.1 with Legacy Grub. Those installations were lost due to external HDD crash. The present drive is a replacement. So I do not have Linux installation available on my PC.
When installing 12.2, I opted to install Grub 2 to the /boot partition which is a primary partition (the second on the external drive). The option to write to MBR of internal HDD was unchecked. There was no option to write to MBR of external drive. The install appeared to have gone OK and this partition shows up with bootable flag in GParted. “BUT” the external drive is no longer bootable! BIOS does not recognise its presence nor does Windows Vista bootrec program when I tried to repair possibly damaged MBR. The first primary partition containing the Seagate proprietary software is still available to windows OS. Gparted can see all the partitions. Only I cant boot off the external drive now!
My understanding of the situation:

  1. Grub 2 identifies drives by UUID. The disk sda is (always?) the SATA primary master. The external disk on USB is shown as sdb or sdf , which does not matter much as the UUID is used to identify it.

  2. The booting sequence in BIOS set up should determine which drive the computer boots off from. Yet when installing 12.2 from DVD the installation programme (Yast) will write only to MBR of sda.

  3. My problem of the drive not being recognised or detected by BIOS is related to something written to MBR when installing 12.2. I recall an option to write “generic MBR” to the drive, but I had not checked or selected it.

Possible recovery methods:

  1. 1.If the problem is only with MBR of external drive, finding a way to repair it should do the trick. With Grub 2 installed in the /boot partition, which is flagged as bootable, the system should work the same way as it would if it was sda.

    1. In view of earlier failure to repair MBR with Vista disc, I could try reinstalling or repairing 12.2 and selecting the option to write generic MBR to the disk “ONLY IF IT IS TO THE EXTERNAL DISK”.

Any suggestions please.

PrakashC

Is it possible that openSUSE formatted it as GPT? Could you boot any live Linux and show results of “fdisk -l /dev/sdX”, where /dev/sdX is your external disk?

I was certain that open SUSE did format the disk as GPT, primarily because all data on the first partition is intact and accessible to Windows Vista. But I did check and the results are:

Result of fdisk -l /dev/sdb

Disk /dev/sdb: 200.4 GB, 2xxxxxx bytes
255 heads, 63 sectors/track, 243201 cylinders, total 3907xxxxx sectors
Units = sector of 1*512 bytes
Sector size (logical/physical) 512 bytes /512 bytes
I/O size (minimum/optimum) 512 bytes / 512 bytes
Disk identifier )x00008baf

Device Boot Start End Blocks Id System
/dev/sdb1 63 1953733822 9968668800 7 HPFS/NTFS/exFAT
/dev/sdb2 * xxxxx xxxxxxxxxxx xxxxxxxx 83 Linux
/dev/sdb3 xxxxxxx xxxxxxxxxxx xxxxxxxx f W95 Ext’d (LBA)
/dev/sdb5 xxxxxxxx xxxxxxxxxx xxxxxxxx 82 Linux Swap/Solaris
/dev/sdb6 xxxxxxxx xxxxxxxxxx xxxxxxxx 83 Linux

I also checked my sda and it is on the same lines!

By the way I noticed that Gparted also has the facility to write generic MBR to a disk and it should be able to do the trick. Any warning advice on the matter? I would not like to mess up or complicate matters further.

PrakashC

I’ve run into something similar with the full 12.2 dvd iso. I have a Dell notebook with single hda drive that I use and need to boot windows xp, and Ubuntu via wubi.

I installed 12.2 onto an external usb drive (sdb), giving the whole drive, and lvm partitioning to the 12.2 installer. I’ve seen previous installs where there was an option to select which drive (sda or sdb) to place the bootloader on.

However, I didn’t get this prompt on this particular 12.2 install, and from reading above, it appears that at least in the way I installed 12.2, it’s writing it’s grub (grub2) data to both hda and hdb.

I can get the full grub menu (suse 12, windows xp, ubuntu) if I plug the usb drive in, but it’s not always convenient to haul that extra drive around.

Booting without the external drive just kicks me into the grub error> console

I have backups, and recovery disks, and would be interested in opinions on restoring the windows mbr and trying to add the usb suse option as a 3rd entry, or I wouldn’t mind putting/keeping grub(2)? as the main sda mbr as long as I can always boot windows xp and wubi’s ubuntu boot (e.g. I’m not bothered by having an entry for suse that won’t work, if the usb drive is not there).

For reference, I have Fedora 17 on a different usb drive, and when I want to boot it, I just plug that drive in and boot from usb.

Did 12.2 install remove the ability to write it’s grub loader to external drive only? I’m wondering if I missed a prompt, or the UI selector for which volume to write the loader to changed?

Thanks for any input.

OK, I should have read ch. 10 before installing 12.2, my bad there. But I have many books and links on installing opensuse from pre 12.2 versions that mention going through the previous install steps pre - 12.2’s grub 2 implementation method but using the latest opensuse distribution, that may now be difficult with removable media installs.

What I’m considering is restoring the windows mbr with either the gparted or easybcd utility with the opensuse 12.2 usb drive disconnected, which will get the windows xp boot back (when external usb drive with 12.2 is not attached), then there are some steps here to remount the ubuntu wubi files: How To Restore the Wubi Ubuntu Bootloader - How-To Geek

Any suggestions on how to get a full bootable 12.2 on external usb that will leave the host windows mbr intact (when the external suse drive is not attached) would be helpful. I’ll try to see what fedora 17 is doing to allow that. Thanks.