Can't boot from HD, DVD no problem (Secure Boot?)

I have a problem that can be described similarly as the OP of this thread, though the situation seems to be different somewhat, hence my reason for posting a new thread. The situation is as follows:

I’ve purchased a new system on which I want to run openSUSE 13.1. The system is manufactured by Acer and is a Aspire TC-603. It’s not a laptop but a tower model. It came pre-installed with Windows 8 so I expected Secure Boot to be present and sure enough, it is. I didn’t want to dual boot the system because I don’t use Windows so I set about looking for ways to completely disable Secure Boot so I could install openSUSE unmolested. Acer was helpful enough to provide the following way to turn off Secure Boot in the BIOS: Windows 8 Desktops - How to disable Secure Boot.
I followed those instructions and following that, I could boot from the install DVD and access the installer.

I proceeded to use the installer to completely repartition the disk to suit my needs, removing all partitions present. I set up encrypted partitions for the areas that can/will hold data. I then went through the installer and pretty much accepted all the defaults. OpenSUSE installed without complaints or problems and rebooted as is normal. However, the system appears to be unable to find Grub2. The system sits there only showing a cursor flashing in the top left position of the screen.
Booting from the install DVD works though and if I select the option there to boot from HD, openSUSE start normally and I can work with the system.

My question is: what step have I missed or where did I go wrong to enable booting from the HD? More importantly, is there a fix that I can use without having to install openSUSE again?

Here is the output from parted for the disk concerned.

# parted -l
Model: ATA ST1000DM003-1CH1 (scsi)
Disk /dev/sda: 1000GB
Sector size (logical/physical): 512B/4096B
Partition Table: gpt

Number  Start   End     Size    File system  Name     Flags
 1      735MB   2887MB  2152MB               primary
 2      2887MB  35.1GB  32.2GB  ext4         primary  boot, legacy_boot
 3      35.1GB  45.8GB  10.7GB               primary
 4      45.8GB  56.6GB  10.7GB               primary
 5      56.6GB  1000GB  944GB                primary


Yesterday, I did a complete reinstall of openSUSE 13.1 to the system. This time, I created a separate boot partition on the disk to see if that would help the BIOS to find the boot loader. However, no such luck. When booting from the HD, the system prompts me to insert bootable media in the specified drive. Booting from the install DVD still works though and allows me to boot from the hard disk.

CSM is enabled in the BIOS, Secure Boot is disabled. Grub2 is installed and set not to boot from MBR but to boot from partition, as is the default.
Do I need grub2-efi instead of grub2 if CSM is enabled?

No, I don’t think that combination can boot.

You obviously have done what Acer’s instruction video told you to, but the video actually tells you to do more than just disable SecureBoot: You are also instructed to disable UEFI (you do that by enabling CSM).

That would have been fine, had you also fully repartitioned your harddisk pending your enabling CSM, but you didn’t (yes, I agree - it is not too obvious, but you need to wipe the partition table to switch from GPT to MBR). Remnants of GPT partitioning were left on the disk, so when installing OpenSuse, it installed according to what it found on the disk: A GPT partition. CSM, however, is looking for an MBR partition. (Yes, GPT has a protective MBR partition, so a hybrid is possible, but that has to be tailored using e.g. gdisk - which I have never done).

I see three ways to resolve this, each having its own set of assets and drawbacks. Other members in these forums may have other ideas as well:

  • Go back and disable CSM i your BIOS (but leave SecureBoot disabled). That would leave you in a pure UEFI/GPT environment, which in my view is sensible, as MBR cannot cope with disks > 2TiB (approx. 2.2TB) in size. Also, GPT partitioning is easier than MBR as everything are primary partitions, and you can have virtually any number of them (in chunks of 128). You may need a fresh installation *) of openSUSE, since it was installed for another BIOS configuration than what you now enabled. It doesn’t take long to try without a reinstallation, though.
  • Keep you BIOS setup as-is and wipe your disk completely clean and do a reinstall. This would enable good-old MBR, and will limit your disk size to 2TiB. When you add more disks in your setup, it may be possible that a mix of MBR partitioned and GPT partitioned disks will work, though. You will want GPT some time in the future to cope with large disks, and I don’t think it matters if you connect external disks over USB. I haven’t tested that, however, nor have I studied any documentation in that particular respect. But it is my understanding as of now. Others need to supply info here, or you look it up/test it for yourself.

A disk-wiping command to be used for wiping your disk’s partition table can be (to be run as root)

[INDENT=3]

su -
gdisk /dev/sda
z
w

[/INDENT]
[INDENT=2]NOTE: THIS WILL DESTROY ALL DATA ON YOUR DISK! You can see http://rodsbooks.com/gdisk/gdisk.html for more info on gdisk.
[/INDENT]

  • Again, using gdisk, enable the hybrid MBR/GPT partition table (see the link above). This will also need a reinstall *), since an MBR-boot must be enabled.

*) It is possible (I’m guessing here, but I would look into it - as reinstalling grub isn’t very time consuming) that you can do a grub reinstall, and that is all that needs to be done. The rest of your installation is probably ok. The same may even be true for the uppermost alternative, as grub takes care of loading linux (=the booting process), and that is what you are struggling with. See https://forums.opensuse.org/content.php/128-Re-install-Grub2-from-DVD-Rescue for a way to do that.

Note: If you choose to try and reinstall Grub as in the link provided, you should note that

mount /proc
mount /sys

is probably not needed for openSUSE 13.1 (see comments in the the link of Jan 13th and 14th 2014). However, if you need them, you will need do enter them in the following way:

mount --bind /proc /mnt/proc
mount --bind /sys /mnt/sys

Give it a try and see how it works.

Good luck!

dayfinger

Hey dayfinger,

First and foremost: many thanks for your elaborate reply. I think I understand most of it but I would just like to clarify one point, if I may.
You mention the following:

That would have been fine, had you also fully repartitioned your harddisk pending your enabling CSM, but you didn’t (yes, I agree - it is not too obvious, but you need to wipe the partition table to switch from GPT to MBR). Remnants of GPT partitioning were left on the disk, so when installing OpenSuse, it installed according to what it found on the disk: A GPT partition. CSM, however, is looking for an MBR partition.

I was under the impression that I had fully repartitioned my disk as follows:

I proceeded to use the installer to completely repartition the disk to suit my needs, removing all partitions present.

** My question is: am I wrong in assuming that this would also completely wipe the partition table on the disk?**

For the moment, I’m going to assume I was wrong and am looking with interest to option 1, and then trying to reinstall Grub, to see if that clears things up. If not, it’s not a problem to reinstall the system from scratch.

Again, many thanks!

You are welcome.

Yes - that is where you were wrong. As I said, it is not obvious. The “problem” is that in a GPT partitioning scheme, the GPT partition table is preceeded by an MBR partition table dubbed “Protective MBR table”. That construction makes a lot of sense for the coming years when the world will make the move from MBR to GPT: None of the old MBR partitioning tools knows anything about GPT, and they are all able to create an MBR table. If there is no MBR table, these tools consideres such a disk as unpartitioned and will overwrite whatever being present - maybe even without warning since the disk (wrongly) would be known to be empty. Thus, an MBR table is written prior to the GPT table to protect the GPT table from these tools.

Modern disk partitioning tools, being GPT aware, needs to see the GPT table following the (“protective”) MBR table to identify a GPT partitioned disk.


So, when you were go back from UEFI (which knows about GPT partitions) to CMS (which knows nothing about GPT), the BIOS will locate the protective MBR table and be happy with that. The GPT partition table (which is still there as you have not removed it) will sit there silently, doing nothing. The protective MBR will point to the first 4 partitions on the disk that is within 2TiB addressing. How the tiny details work out when you break that 2TiB limit, I do not know.

Actually, this happens because the partitioning tool you use from openSUSE 13.1 do know about GPT, and handles it properly. (These tools cannot automatically wipe the GPT partition table just because CMS is in effect as there is no technical reason that stops CMS/BIOS to use GPT as well, except that such support needs to be implemented at some level - even if such implementation is a manual one).

Thus, in order to go back from GPT to MBR partitioning, you need to physically erase/wipe both the (protective) MBR partition table and the GPT partition table so the old tools can start afresh, and the openSUSE installation procedure (that knows both GPT and pure MBR setups) doesn’t get confused by the GPT table following the MBR table. After wiping both tables, disk partitioning tools will default to MBR-only partitioning when used under CMS mode, and properly create an old-fashioned MBR setup during disk partitioning.

Good luck!

dayfinger

Thanks again. This actually clarifies a lot because I had real trouble understanding why it wouldn’t boot, despite setting CMS enabled in the BIOS and repartitioning the disk. I’ve been reading up on UEFI, GPT and Secure Boot but I’ve not yet seen it explained as clearly and succinctly as you have done here in terms of disk structure.

Just a quick update.

It appears that Acer is a bit odd, when it comes to booting with CSM disabled and Secure Boot also disabled. :sarcastic:

I went for dayfinger’s option 1, which was:

Go back and disable CSM in your BIOS (but leave SecureBoot disabled).

When I do that, the system will not boot from DVD, even if the first boot device is set to CD/DVD in the BIOS. All it does is ignore the boot device I set and attempts to boot from the HD anyway, which causes it to casually inform me:

Reboot and select proper Boot Device.
or Insert Boot Media in selected device and press a key

It appears that Acer requires CSM to be enabled in order to boot from anything besides the HD, as also mentioned here: http://www.mysysadmintips.com/windows/simple-how-tos/422-acer-xc600-how-to-boot-from-cd
It appears that tougher measures are needed to get openSUSE to boot normally, like I intended. I’ll be looking into gdisk next.

Hi !

With both CSM and Secure Boot disabled, you should be booting in ‘plain’ UEFI mode,
which should in general work with the openSUSE DVD.

Can you make sure that you actually boot in UEFI mode in that case?
(should hopefully be obvious from the boot options of your BIOS).

On the other hand you could well partition your hard disk the old style (using MBR)
and boot the system using CSM, if the size of your hard disk is 2 TB or less.
What’s the size of your hard disk?

However, there are further restrictions then, with respect to the maximum number (4 as far as I remember)
of primary partitions on that hard disk.

Good luck
Mike

Oops missed you 1st post.

Your hard disk has size 1TB.

OK, to get your PC running I suggest the following:

Turn on CSM again using your BIOS.

Then boot from the DVD (which should again work then).

Install openSUSE.

OpenSUSE should then boot from hard disk as well.

If you would like to provide for more then one root and more than one home partition,
or if you would like to provide for dual-booting with other OSs in the future, ask.

Good luck
Mike

If your PC still shouldn’t boot from your hard disk,
post current output of ‘parted -l’ again.

If the partition table still is ‘gpt’ and not ‘msdos’
then you need to wipe your hard disk before installation.

Hi Mike,

Thanks for your response.

It is my understanding that CSM and Secure Boot disabled, should enable booting in plain UEFI mode. However, the Acer BIOS doesn’t mention this explicitly, unfortunately. So I can’t be 100% sure but seeing that it is looking for the GPT partition (I know this because it fails to boot), I suspect it is.

For some reason Acer ignores or disables booting from anything but the HD when CSM is disabled.

This problem has now been solved, with the aid of dayfinger. Many thanks, again!

What I did was the following:

First I looked at the partition table to see what kind of animal it was:

# parted -l
Model: ATA ST1000DM003-1CH1 (scsi)
Disk /dev/sda: 1000GB
Sector size (logical/physical): 512B/4096B
Partition Table: gpt

Number  Start   End     Size    File system  Name     Flags
 1      735MB   2887MB  2152MB               primary
 2      2887MB  35.1GB  32.2GB  ext4         primary  boot, legacy_boot
 3      35.1GB  45.8GB  10.7GB               primary
 4      45.8GB  56.6GB  10.7GB               primary
 5      56.6GB  1000GB  944GB                primary

The partition table was GPT, not MBR as indicated by dayfinger. That explained the no booting from HD and why it complained it couldn’t find the OS. With the system in CSM mode, the openSUSE partitioner had correctly modified the MBR but left the GPT partition table in tact. Examination with fdisk (which now has experimental GPT support) revealed that these were the original partitions of the pre-installed Windows 8.

Next, I tried disabling CSM with the intention of reinstalling grub2, this time in GPT mode as per dayfinger’s suggestion. As I explained in a previous post, the system refuses to boot from anything but the HD with CSM disabled. And since the HD wasn’t bootable, it was impossible to reinstall just Grub2. It seems a complete repartition and reinstall were the only way out of this mess.

For the purpose of correcting the partition tables, I downloaded the latest live CD of Gparted, which has GPT support and gdisk on it. A very valuable tool!

I went back into the BIOS, enabled CSM once again, putting the system in traditional MBR mode. I started the system from the Gparted live CD. When loaded, I opened a terminal and started gdisk.

sudo gdisk /dev/sda

Through the menu, I went to “expert options” by hitting the “x” key. There, I chose option “z” which “zaps” all partition data on the disk. It also asked it it should reset the MBR, to which I answered “yes”. With “w” I wrote the changes to disk and this meant the end of my old MBR partition table and the GPT partition table.

I rebooted the computer, entered the BIOS and switched it back to CSM enabled.

I rebooted again, booted from the openSUSE 13.1 installation DVD, partitioned my disk with 3 primary partitions, one extended, in which I created two more logical partitions. I enabled encryption for /swap, /home, /tmp, and /var/tmp, each with their own partition. The root partition I left unencrypted. The installer finished without problems and after the reboot, the system could boot normally from the HD as I had intended/hoped. A check with parted revealed the partitioning I had done with the installer and showed that the partition table was plain old msdos.

Case closed as far as I’m concerned. Thanks, especially to dayfinger!

On Wed 15 Jan 2014 10:16:10 AM CST, joopberis wrote:

This problem has now been solved, with the aid of dayfinger. Many
thanks, again!

What I did was the following:

First I looked at the partition table to see what kind of animal it was:

Code:

parted -l

Model: ATA ST1000DM003-1CH1 (scsi)
Disk /dev/sda: 1000GB
Sector size (logical/physical): 512B/4096B
Partition Table: gpt

Number Start End Size File system Name Flags
1 735MB 2887MB 2152MB primary
2 2887MB 35.1GB 32.2GB ext4 primary boot, legacy_boot
3 35.1GB 45.8GB 10.7GB primary
4 45.8GB 56.6GB 10.7GB primary
5 56.6GB 1000GB 944GB primary

The partition table was GPT, not MBR as indicated by dayfinger. That
explained the no booting from HD and why it complained it couldn’t find
the OS. With the system in CSM mode, the openSUSE partitioner had
correctly modified the MBR but left the GPT partition table in tact.
Examination with fdisk (which now has experimental GPT support) revealed
that these were the original partitions of the pre-installed Windows 8.

Next, I tried disabling CSM with the intention of reinstalling grub2,
this time in GPT mode as per dayfinger’s suggestion. ‘As I explained in
a previous post’ (http://tinyurl.com/nfyj52b), the system refuses to
boot from anything but the HD with CSM disabled. And since the HD wasn’t
bootable, it was impossible to reinstall just Grub2. It seems a complete
repartition and reinstall were the only way out of this mess.

For the purpose of correcting the partition tables, I downloaded the
latest live CD of ‘Gparted’ (http://gparted.sourceforge.net/index.php),
which has GPT support and gdisk on it. A very valuable tool!

I went back into the BIOS, enabled CSM once again, putting the system in
traditional MBR mode. I started the system from the Gparted live CD.
When loaded, I opened a terminal and started gdisk.

Code:

sudo gdisk /dev/sda

Through the menu, I went to “expert options” by hitting the “x” key.
There, I chose option “z” which “zaps” all partition data on the disk.
It also asked it it should reset the MBR, to which I answered “yes”.
With “w” I wrote the changes to disk and this meant the end of my old
MBR partition table and the GPT partition table.

I rebooted the computer, entered the BIOS and switched it back to CSM
enabled.

I rebooted again, booted from the openSUSE 13.1 installation DVD,
partitioned my disk with 3 primary partitions, one extended, in which I
created two more logical partitions. I enabled encryption for /swap,
/home, /tmp, and /var/tmp, each with their own partition. The root
partition I left unencrypted. The installer finished without problems
and after the reboot, the system could boot normally from the HD as I
had intended/hoped. A check with parted revealed the partitioning I had
done with the installer and showed that the partition table was plain
old msdos.

Case closed as far as I’m concerned. Thanks, especially to dayfinger!

Hi
You now have to pay for gparted, plus the version on sourcefoge has
a usb bug, so not recommend to use that version by the developers.

The openSUSE Rescue CD has all the necessary tools as well, gparted,
gdisk etc. It efi boots as well. If you install on a USB device, it’s
also persistent. So you can add applications to your tool kit etc as
required and they will be there next time you boot.


Cheers Malcolm °¿° SUSE Knowledge Partner (Linux Counter #276890)
openSUSE 13.1 (Bottle) (x86_64) GNOME 3.10.2 Kernel 3.11.6-4-desktop
If you find this post helpful and are logged into the web interface,
please show your appreciation and click on the star below… Thanks!

Hi Malcolm,

Pay for Gparted? I didn’t have to pay when I downloaded it yesterday. Plus the site says, all the way at the bottom:

Free Software

GParted is free software.
You have the freedom to run, copy, distribute, study, change, and improve GParted.
You do not have to pay money to use GParted.
GParted is distributed under the GNU General Public License version 2 or (at your option) any later version.

I was unaware that openSUSE also had a rescue CD, which is of course a very convenient tool to have. Thanks for that info.

Hi
Ahh, I was thinking of partition magic, my bad and lack of caffeine and nicotine…

Oh, I know what that’s like. Especially lack of caffeine… :yawn: