Installing on External Hard Disk - Where does Grub 2 go

The way I do it on a laptop. Is I remove the HDD from the laptop, then install Suse with only the usb drive installed, choosing to have Grub2 installed to / part. Do the install, do all updates, reboot , then when everything is updated … shutdown. Put HDD back in laptop, and with usb drive still plugged in, start Suse.

Update grub following this method, remembering that the usb drive was sda, but likely now is sdb :

su -
fdisk -l (confirm Suse / part)
grub2-install /dev/sdb
grub2-mkconfig -o /boot/grub2/grub.cfg

Also, in YaST … change bootloader setting to match this configuration.

I do the same thing on my desktop, which has 3 HDD … I install Suse with only the HDD it is bound for plugged in.
Then I plug the other HDDs back in, and move grub using the above method.
I use the bios setting to change the drive I want to boot into … the drives are all visible to each other afterwards, so not an issue sharing music , etc amongst various OSes.

Hope this helps, works for me … YMMV :slight_smile:

Thanks, that’s one way. I was able to recover my internal drive’s bootability with easybcd. I don’t think the dvd version of 12.2 was meant to be run off of a removable media so the installer just wrote the grub files to all the drives it saw. Will do some more testing when I can put some scratch drives in place. Thanks.

You have control of the installer, it will put it where you tell it to put it. It also tells you where it intends to put it before you accept the scheme

Going through the posts ofslatey and paladin666, I no longer felt lonely! Others are doingsimilar set ups. Opening up a laptop or desk top to disconnect aninternal hard disk to avoid writing to its MBR and then resettingdrive identifiers seems to me an unnecessary round about and complexmethod. I had merely unchecked the option to write to MBR of theinternal drive to achieve this end! My problem is that how do I getit to write (and properly) to the MBR of external drive. Of courseone problem is that the entire disk is not dedicated to Linux and thefirst partition is NTFS.

By the way, I did not try tomanually change the drive identity in the option to write to the MBR,merely unchecked it as there was no menu to select the drive. Theproblem could be with Yast for not providing such an option! Or atleast guiding the user to manually amend the drive? If anyoneexperienced in these matters examines the issue and if puts in a bugreport it could be an improvement in future versions!

I am still waiting for helpguidance to solve my immediate problem (I) if at all the MBR of theexternal drive is bad, (ii) whether or not to try to repair it and(III) if to repair it how?

PrakashC

I am afraid I can’t say why you BIOS does not see external disk. Have you tried to post this question on hardware forums of your system manufacturer? Still, try to download bootinfoscript/bootinfoscript at master · arvidjaar/bootinfoscript · GitHub, make it executable (chmod +x bootinfoscript) and run with both drives connected. It will create file RESULTS.txt. Please paste output here (in tags code please!)

I already did answer you that such option exists. OK, I thought that may be it was installation-only problem, so I started installation. On summary screen clicked bootloader. And here you are - it offers you boot drive selection right away:
http://paste.opensuse.org/view/download/76964772

I had checked the selection screen posted i.e. Custom Boot Partition. It does not write Grub to MBR of sdb. I checked it by entering Boot Loader options. I stopped further experiments as the BIOS had stopped recognising the external HDD. However, it now occurs to me that it should not have any effect on trying to re-install 12.2. Will come back after further trials.
Thanks.

PrakashC

Hi,
As stated in previous mail, I went through the installation process just one step short of actual writing to disk. Tried out all options and examined the resulting info on the last screen showing selected installation details. What I found is :

a) There is no option to write to “MBR” of second disk. I cannot say if this is a feature of Grub 2 itself or of the installer Yast.
b) The boot loader options contains field for Optional Kernel Command Line Parameter. In my case it reads “resume=/dev/disk/by-id/ata-ST2000DM001-9YN164-Z1F01ZM3-part5 splash=silent quiet showopts”. The UUID is of my internal drive. The UUID of my external drive is scsi-SSeagate_FA_GoFlex_NA0L4TLH. What ever options I select in the previous screen regarding placement of Grub 2, this line (in the boot loader options) does not change. Should it be amended manually?
c) The options for selection of location of Grub 2 are not mutually exclusive. One can select all including one custom partition. The final screen under the head booting lists all the selected options. Not very clear as there is no conceivable (to my understanding) reason to install the boot loader in more than one location. Grub 2 or Yast problem (if at all a problem)?
d) Again in the bootloader options screen an option exists to write generic MBR to the disk. However which disk it will write to is not clear! Going by other factors this would most probably be the “sda”.
e)Since I wish to install the bootloader Grub 2 on the external disk I should select the Custom Partition option and select the /boot partition sdb2 or sdf2 and opt to flag the partition as bootable. But without any thing else in the MBR of external disk will Grub 2 get loaded at all.

PrakashC

Installing to /dev/sdb installs in MBR of disk sdb.

b) What ever options I select in the previous screen regarding placement of Grub 2, this line (in the boot loader options) does not change. Should it be amended manually?

It is unrelated to bootloader. It is swap device you have selected (or created) during disk partitioning step.

c) The options for selection of location of Grub 2 are not mutually exclusive.

I can’t say what YaST2 does in this case. It is possible to install bootloader in multiple locations, although probably not every combination makes sense.

d) Again in the bootloader options screen an option exists to write generic MBR to the disk. However which disk it will write to is not clear!

Summary screen shows this information. YaST2 tries to detect “primary” boot disk. Usually it is sda indeed.

e) But without any thing else in the MBR of external disk will Grub 2 get loaded at all.

See answer to a).

Of course it does. Did you ever try it?

Please start a separate thread.

Hi arvidjaar,

I had been relying on the information shown on the preview page. Now I have gone through the install process a number of times. I have tried both sdb and sdb2 in the custom boot partition selection. What I find is that :
a) There is no option to write to MBR of second disk in the Yast program.
b) Selecting sdb in the Custom Boot partition does not write Grub 2 to the MBR of the sdb. Of course in the course of installation something has been written to the MBR which has caused it to be no longer visible to BIOS (setup).
c) Selecting option in bootloader options to write generic MBR to sdb has not helped. The drive is still not visible to BIOS.
d) Usually at the end of the installation the program ejects the installtion medium (DVD) before going into reboot. With 12.2 this is not happening! And, if I remove the disk the system boots to sda (Windows) since BIOS is not seeing sdb. If I do not remove the DVD I go back into installation program!!

I also found the Threads “How to boot the MBR of an secondary disk with Grub” and “Looking for Grub and Windows Boot loaders in all partitions”. A lot has been discussed but no answer to my problem.

As for repair of the MBR, I have requested Seagate support for info on the factory installed “MBR” and if a generic MBR would work. Hope they give me a useable reply. The only venue available at the moment is the GParted MBR.

PrakashC

It does - I have tested it. It looks like your HDD and/or BIOS do not like what is written there. That’s bad. Hopefully you get answer and solution from Seagate. I appreciate if you would update this thread if you manage to make your disk visible again.

Nothing conclusive yet, as I need to do further testing with the notebooks and usb, but on a desktop system, some interesting observations: Adding an IDE drive to an ECS motherboard that has both SATA and IDE drive connectors, 12.2 will detect any connected drives (sda and sdb not hdx as the motherboard may be doing IDE to sata translation, etc.). So in this scenario, unplugging the SDA SATA drive completely, not just disabling it from the BIOS boot and hdd detection, enabled me to install 12.2, to the IDE drive which it saw as sda.

12.2 or grub2 doesn’t appear to know whether a drive is ever going to be removed or not, so if it see’s the drive at all, (sdx) (hdx not seen or tried), even if not seen by the BIOS, it will overwrite it’s grub files to sda ** if automatic YaST config ** is enabled. If it is not enabled, then you can possibly just have it write to sdb (I’ve read this, but have not tested this config yet).

As far as USB drives and booting go, I agree with the others, that the USB device must be supported by the bios reliably, and be able to boot with precedence over the internal hdd, so this could be a vendor specific computer. I do not think that with manual non YaST configuration that 12.2 is doing anything different than Fedora 17 (which has it’s share of confusion/grub2 issues as well), except Fedora 17 has no auto config so you know exactly where it will write the grub2 boot info, and even if it does write it in two places, the second place is for redundancy, it knows which to boot off of (sda or sdb or first available boot drive), where I’m not sure yet, if Opensuse, if/when it writes the grub2 boot info to multiple drives, really knows which one to boot, under all conditions (e.g. USB attached and available, both drives available, or USB not attached). That last case can be nasty if you let YaST autoconfig write to sda with unattached USB, since it overwrites the existing MBR and until fixed, requires that attached USB drive to boot the OS’s on the internal drive.

Hi,

I am back to update on the status of attempts. The problem gets more curious! I have tried the following:

a) Installed 12.1 on the Ext HDD opting to write Grub (Legacy) to MBR, as I had done successfully in the past. The idea was that if the problem is with grub 2 I could use Grub Legacy of 12.1 to boot. The install was OK. The system did not shut down and reboot, but did what appears to be a partial reboot and the configuration went through OK. However the system still would not boot. The BIOS set up still indicates “device not present”. Conclusion : The problem is not connected to Grub 2 unless it has written something to the Partition Table in the MBR.

b) Was the disk detected by BIOS before the first installation of 12.2? I do not know since I did not check it!

c) Thought MBR may be damaged/corrupted. Tried to repair it using Vista install DVD. The program did not detect the external drive!

d) I had, in the meantime, asked Seagate for help. Their suggestion was to use “Diskpart” to “Clean” the disk, re-initialise and format. I went through the process but the disk is still not detected by BIOS. The partition table, I believe, is not affected by this process. Have not tried to re-write the partition table.

e) Considering that the problem could be due to some error made by me in BIOS set up, ran the reset to factory defaults option. The disk still did not show up in the set up.

f) Checked with Dell site if any BIOS upgrade had been posted, negative. Down loaded the BIOS file afresh and tried re-install. Failed with a message saying “Memory Allocation Error”.

g) Posted problem in Dell forum also and waiting for suggestions/advice.

PrakashC

Hi Everybody,

As mentioned in my previous posts, I had asked Seagate Support for help/advice. The final reply I have received is really surprising.:open_mouth:
The last three posts are as follows:

“The drive is working as per normal, We do not support these external drives to work as boot drives. Please kindly use the drive as a normal external drive, if you need a boot drive for your linux it would be best to get a internal drive.”

"I am quite surprised at the contents of your mail! And I hope it is either an error in my reading or in the transcription at your end!

First reason is that the original drive (we purchased) NA0J4GKP was recognised by BIOS and I could boot off OSes installed on it. The warranty replacement NA0L4TLH not being recognised or detected by BIOS is therefore a new development. The statement that Seagate does not support external drives to work is boot drives is perplexing. Through out the industry BIOS systems have been upgraded to enable booting computer systems from USB devices especially to support booting off external devices!

If you meant that a specific Model series is not supported then how was the first drive (NA0J4GKP) able to be used for booting. Or is it that there is something wrong with the “Seagate Certified repaired Drive” I received in warranty exchange.

By the way I went in for an external HDD since Dell Dimension C521 does not have space/bay for a second HDD. if your mail is correctly understood, there is no Seagate product that I could use for the purpose!"

“Thank you for your response, yes you have read my email correctly, we do not support our External drives to be used as a bootable drive, Please use the drive as a external drive. I do apologize but we do not test or support these external drives to be used as your boot drive for your computer.”

The problem is with the drive itself. There is obviously something peculiar if not wrong. Any suggestions as regards proper forum to take up the matter?

PrakashC

On 2012-11-01 17:26, PrakashC wrote:

> “Thank you for your response, yes you have read my email correctly, we
> do not support our External drives to be used as a bootable drive,
> Please use the drive as a external drive. I do apologize but we do not
> test or support these external drives to be used as your boot drive for
> your computer.”

Wow.

Well, clearly do not buy external drives from them. I never do. Instead,
I buy an enclosure and a HD separately.

The problem will be, I guess, the chipset of the enclosure.


Cheers / Saludos,

Carlos E. R.
(from 11.4 x86_64 “Celadon” (Minas Tirith))

Hi,

I have racked my brains on the problem and tried to understand the “installation of Grub 2” documentation/articles. Briefly my position is as follows:

A. My system internal HDD is dedicated to “Windows” as the PC is shared and it wont do to complicate issue for others not all that “technically” inclined.
B. The external HDD, thanks to Seagate policy, is not bootable.
C. Grub 2 can be installed on CDROM or USB Flash (even floppy) drives for rescue purposes. Even otherwise Grub 2 can be installed on a flash drive. However, for that purpose one has to be using Unix like OS, Which is what I do not have on my system at present!
D. Latest, I tried installing 12.2 on the external HDD opting to write Grub 2 to the USB Flash drive. Things went OK till (a) making initrd file and (b) installing Grub to the flash drive. I could not make out what was the problem in initrd creation. As far as the Grub installation goes the message was that there was too little space for embedding Grub. The installation had to be aborted. The flash drive is presently formatted for FAT.
E. I will format the flash drive as NTFS (or should I go in for ext3 or 4) and try again.
F. What I especially require guidance is in respect of “initrd” error.

Thanks
Prakash C

Is your flash drive partitioned? Could you show “fdisk -l” for it? To embed you need either MBR formatted driver with enough space between MBR and first partition or GPT formatted drive with special partition.

What I especially require guidance is in respect of “initrd” error.

Well, this requires that you at least show error message and explain under which conditions you get it.

On 2012-11-09 15:16, PrakashC wrote:

> D. Latest, I tried installing 12.2 on the external HDD opting to write
> Grub 2 to the USB Flash drive. Things went OK till (a) making initrd
> file and (b) installing Grub to the flash drive. I could not make out
> what was the problem in initrd creation. As far as the Grub
> installation goes the message was that there was too little space for
> embedding Grub. The installation had to be aborted. The flash drive is
> presently formatted for FAT.

FAT? I’m unsure you can install grub in there. About the space for
embeddding, I read an explanation of that in the mail list yesterday.

> F. What I especially require guidance is in respect of “initrd” error.

If you have a new kernel, there is a bug.


Cheers / Saludos,

Carlos E. R.
(from 11.4 x86_64 “Celadon” (Minas Tirith))