Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.debian.user > #202685 > unrolled thread
| Started by | Daniel Fishman <quantera@gmail.com> |
|---|---|
| First post | 2018-11-22 19:30 +0100 |
| Last post | 2018-11-23 00:10 +0100 |
| Articles | 11 — 5 participants |
Back to article view | Back to linux.debian.user
Unable to boot BIOS/GPT system. Daniel Fishman <quantera@gmail.com> - 2018-11-22 19:30 +0100
Re: Unable to boot BIOS/GPT system. Daniel Fishman <quantera@gmail.com> - 2018-11-22 20:10 +0100
Re: Unable to boot BIOS/GPT system. Georgi Naplatanov <gosho@oles.biz> - 2018-11-22 20:40 +0100
Re: Unable to boot BIOS/GPT system. Daniel Fishman <quantera@gmail.com> - 2018-11-22 21:40 +0100
Re: Unable to boot BIOS/GPT system. Georgi Naplatanov <gosho@oles.biz> - 2018-11-22 20:10 +0100
Re: Unable to boot BIOS/GPT system. Steve McIntyre <steve@einval.com> - 2018-11-22 20:30 +0100
Re: Unable to boot BIOS/GPT system. Daniel Fishman <quantera@gmail.com> - 2018-11-22 21:30 +0100
Re: Unable to boot BIOS/GPT system. Pascal Hambourg <pascal@plouf.fr.eu.org> - 2018-11-23 07:40 +0100
Re: Unable to boot BIOS/GPT system. "Thomas Schmitt" <scdbackup@gmx.net> - 2018-11-23 09:20 +0100
Re: Unable to boot BIOS/GPT system. Pascal Hambourg <pascal@plouf.fr.eu.org> - 2018-11-23 21:10 +0100
Re: Unable to boot BIOS/GPT system. Pascal Hambourg <pascal@plouf.fr.eu.org> - 2018-11-23 00:10 +0100
| From | Daniel Fishman <quantera@gmail.com> |
|---|---|
| Date | 2018-11-22 19:30 +0100 |
| Subject | Unable to boot BIOS/GPT system. |
| Message-ID | <wX1TH-6Z7-1@gated-at.bofh.it> |
Hello, I am trying to install Debian on a 4TB external HDD. Since I want to boot the HDD (also) on old systems which support only BIOS, and since the HDD is larger than 2TB, I decided to go with GPT partition table and BIOS boot (or, in other words: BIOS/GTP). I partitioned the HDD accordingly (see the details below), and installed Debian. During a pre-installation configuration the installer recognized BIOS boot partition, I configured the root partition as ext4 and installed grub into the disk's MBR. But when (after an installation) I am trying to boot the HDD, I receive an error message: 'error: unknown filesystem' and drop into a grub rescue mode. What is the problem here and how it can be solved? It seems as though grub's Stage 1.5 loader (that is - core.img, which is supposed to be embedded in BIOS boot partition) doesn't contain modules needed to read ext4 filesystem, which seems very strange. Following are a bit more details about the partitions: I used the following command to partition the HDD: parted -s /dev/sdb mklabel gpt mkpart BIOS_boot ext2 1MiB 2MiB \ mkpart swap linux-swap 2MiB 16000MiB mkpart data ext2 16000MiB 100% \ set 1 bios_grub [root@arch]# parted /dev/sdb unit MiB print Model: WD Elements 25A1 (scsi) Disk /dev/sdb: 3815415MiB Sector size (logical/physical): 512B/4096B Partition Table: gpt Disk Flags: Number Start End Size File system Name Flags 1 1.00MiB 2.00MiB 1.00MiB bios_grub 2 2.00MiB 16000MiB 15998MiB linux-swap(v1) 3 16000MiB 3815414MiB 3799414MiB Debian's installation was done on x64 BIOS-only system.
[toc] | [next] | [standalone]
| From | Daniel Fishman <quantera@gmail.com> |
|---|---|
| Date | 2018-11-22 20:10 +0100 |
| Message-ID | <wX2wp-7se-1@gated-at.bofh.it> |
| In reply to | #202685 |
> > Hi Daniel, > > in case of BIOS and GPT you have to create a partition for second stage > of GRUB. If I can remember correctly its size should be less than 50MB. > > HTH > > Kind regards > Georgi I created it - this is the first partition (the one with bios_grub flag). I did things similarly to the description here: https://bit.ly/2utVdNr
[toc] | [prev] | [next] | [standalone]
| From | Georgi Naplatanov <gosho@oles.biz> |
|---|---|
| Date | 2018-11-22 20:40 +0100 |
| Message-ID | <wX2Zr-7Cu-3@gated-at.bofh.it> |
| In reply to | #202688 |
On 11/22/18 9:08 PM, Daniel Fishman wrote: > >> >> Hi Daniel, >> >> in case of BIOS and GPT you have to create a partition for second stage >> of GRUB. If I can remember correctly its size should be less than 50MB. >> >> HTH >> >> Kind regards >> Georgi > > I created it - this is the first partition (the one with bios_grub flag). > I did things similarly to the description here: https://bit.ly/2utVdNr Can you try to create all the partitions through Debian's installer. I have a suspicion that partition type may be wrong for BIOS partition. You have specified ext2 as file system for BIOS grub which may mean Linux partition instead of BIOS grub partition (ef02 BIOS boot).
[toc] | [prev] | [next] | [standalone]
| From | Daniel Fishman <quantera@gmail.com> |
|---|---|
| Date | 2018-11-22 21:40 +0100 |
| Message-ID | <wX3Vw-8d3-9@gated-at.bofh.it> |
| In reply to | #202691 |
> Can you try to create all the partitions through Debian's installer. I > have a suspicion that partition type may be wrong for BIOS partition. > > You have specified ext2 as file system for BIOS grub which may mean > Linux partition instead of BIOS grub partition (ef02 BIOS boot). > In the end, it was actually the lack of /boot partition that caused the problem (as Steve McIntyre explained in another message in this thread).
[toc] | [prev] | [next] | [standalone]
| From | Georgi Naplatanov <gosho@oles.biz> |
|---|---|
| Date | 2018-11-22 20:10 +0100 |
| Message-ID | <wX2wp-7se-3@gated-at.bofh.it> |
| In reply to | #202685 |
On 11/22/18 8:24 PM, Daniel Fishman wrote: > Hello, > > I am trying to install Debian on a 4TB external HDD. Since I want > to boot the HDD (also) on old systems which support only BIOS, > and since the HDD is larger than 2TB, I decided to go with GPT > partition table and BIOS boot (or, in other words: BIOS/GTP). > I partitioned the HDD accordingly (see the details below), and > installed Debian. During a pre-installation configuration the > installer recognized BIOS boot partition, I configured the root > partition as ext4 and installed grub into the disk's MBR. But > when (after an installation) I am trying to boot the HDD, I receive > an error message: 'error: unknown filesystem' and drop into a > grub rescue mode. > > What is the problem here and how it can be solved? It seems as > though grub's Stage 1.5 loader (that is - core.img, which is > supposed to be embedded in BIOS boot partition) doesn't contain > modules needed to read ext4 filesystem, which seems very strange. > > > Following are a bit more details about the partitions: > > I used the following command to partition the HDD: > > parted -s /dev/sdb mklabel gpt mkpart BIOS_boot ext2 1MiB 2MiB \ > mkpart swap linux-swap 2MiB 16000MiB mkpart data ext2 16000MiB 100% \ > set 1 bios_grub > > [root@arch]# parted /dev/sdb unit MiB print > Model: WD Elements 25A1 (scsi) > Disk /dev/sdb: 3815415MiB > Sector size (logical/physical): 512B/4096B > Partition Table: gpt > Disk Flags: > > Number Start End Size File system Name Flags > 1 1.00MiB 2.00MiB 1.00MiB bios_grub > 2 2.00MiB 16000MiB 15998MiB linux-swap(v1) > 3 16000MiB 3815414MiB 3799414MiB > > > Debian's installation was done on x64 BIOS-only system. > Hi Daniel, in case of BIOS and GPT you have to create a partition for second stage of GRUB. If I can remember correctly its size should be less than 50MB. HTH Kind regards Georgi
[toc] | [prev] | [next] | [standalone]
| From | Steve McIntyre <steve@einval.com> |
|---|---|
| Date | 2018-11-22 20:30 +0100 |
| Message-ID | <wX2PL-7z4-1@gated-at.bofh.it> |
| In reply to | #202685 |
quantera@gmail.com wrote: > >I am trying to install Debian on a 4TB external HDD. Since I want >to boot the HDD (also) on old systems which support only BIOS, >and since the HDD is larger than 2TB, I decided to go with GPT >partition table and BIOS boot (or, in other words: BIOS/GTP). >I partitioned the HDD accordingly (see the details below), and >installed Debian. During a pre-installation configuration the >installer recognized BIOS boot partition, I configured the root >partition as ext4 and installed grub into the disk's MBR. But >when (after an installation) I am trying to boot the HDD, I receive >an error message: 'error: unknown filesystem' and drop into a >grub rescue mode. > >What is the problem here and how it can be solved? It seems as >though grub's Stage 1.5 loader (that is - core.img, which is >supposed to be embedded in BIOS boot partition) doesn't contain >modules needed to read ext4 filesystem, which seems very strange. ... >Number Start End Size File system Name Flags > 1 1.00MiB 2.00MiB 1.00MiB bios_grub > 2 2.00MiB 16000MiB 15998MiB linux-swap(v1) > 3 16000MiB 3815414MiB 3799414MiB I'd expect that Grub won't be able to reliably work with that setup - partition 3 goes past the 2TB mark, so the BIOS won't be able to map it properly. Don't forget, when grub is reading the disk all it can rely on are BIOS calls. Add yourself a small-ish /boot partition first and you may be OK. -- Steve McIntyre, Cambridge, UK. steve@einval.com "Further comment on how I feel about IBM will appear once I've worked out whether they're being malicious or incompetent. Capital letters are forecast." Matthew Garrett, http://www.livejournal.com/users/mjg59/30675.html
[toc] | [prev] | [next] | [standalone]
| From | Daniel Fishman <quantera@gmail.com> |
|---|---|
| Date | 2018-11-22 21:30 +0100 |
| Message-ID | <wX3LP-89H-1@gated-at.bofh.it> |
| In reply to | #202690 |
> > I'd expect that Grub won't be able to reliably work with that setup - > partition 3 goes past the 2TB mark, so the BIOS won't be able to map > it properly. Don't forget, when grub is reading the disk all it can > rely on are BIOS calls. Add yourself a small-ish /boot partition first > and you may be OK. > Thanks, indeed this was the problem - after adding a boot partition the HDD now boots on BIOS-only machines. Unfortunately, it does not boot on UEFI machines. Seems that I have to start experimenting with hybrid UEFI+BIOS boot...
[toc] | [prev] | [next] | [standalone]
| From | Pascal Hambourg <pascal@plouf.fr.eu.org> |
|---|---|
| Date | 2018-11-23 07:40 +0100 |
| Message-ID | <wXdi9-5GP-3@gated-at.bofh.it> |
| In reply to | #202696 |
Le 22/11/2018 à 21:24, Daniel Fishman a écrit :
>>
>> I'd expect that Grub won't be able to reliably work with that setup -
>> partition 3 goes past the 2TB mark, so the BIOS won't be able to map
>> it properly. Don't forget, when grub is reading the disk all it can
>> rely on are BIOS calls. Add yourself a small-ish /boot partition first
>> and you may be OK.
>
> Thanks, indeed this was the problem - after adding a boot partition
> the HDD now boots on BIOS-only machines.
So these machines have a broken BIOS implementation.
> Unfortunately, it does not boot on UEFI machines.
Of course not. EFI boot requires a FAT-formatted EFI partition and
grub-efi-{amd64|ia32} depending on the firmware architecture (not the CPU).
If the EFI firmware can boot in legacy BIOS compatibility mode, it may
require to set the boot flag on the protective GPT partition entry in
the protective MBR. Use parted disk_set pmbr_boot or fdisk -t dos.
[toc] | [prev] | [next] | [standalone]
| From | "Thomas Schmitt" <scdbackup@gmx.net> |
|---|---|
| Date | 2018-11-23 09:20 +0100 |
| Message-ID | <wXeQV-6K1-1@gated-at.bofh.it> |
| In reply to | #202704 |
Hi, Pascal Hambourg wrote: > If the EFI firmware can boot in legacy BIOS compatibility mode, it may > require to set the boot flag on the protective GPT partition entry in the > protective MBR. According to user reports on grub-devel mailing list about grub-mkrescue ISOs, the boot flag must not be set on the protective MBR partition. But some BIOS implementations wont't regard the medium as bootable if there is no boot flag set at all. The compromise that finally worked for those who tested, was to create an MBR partition of type 0x00 starting at LBA 0, having only one block, and bearing the boot flag. The tested EFIs and operating systems still recognized GPT if an additional partiton of type 0x00 was present. But doubts remain. YMMV. The decision with grub-mkrescue was to omit the boot flag by default and to leave it to the user whether add-on xorrisofs option --mbr-force-bootable shall cause the boot flag to be set on a dummy partition. Have a nice day :) Thomas
[toc] | [prev] | [next] | [standalone]
| From | Pascal Hambourg <pascal@plouf.fr.eu.org> |
|---|---|
| Date | 2018-11-23 21:10 +0100 |
| Message-ID | <wXpW2-5n0-9@gated-at.bofh.it> |
| In reply to | #202705 |
Le 23/11/2018 à 09:11, Thomas Schmitt a écrit : > > Pascal Hambourg wrote: >> If the EFI firmware can boot in legacy BIOS compatibility mode, it may >> require to set the boot flag on the protective GPT partition entry in the >> protective MBR. > > According to user reports on grub-devel mailing list about grub-mkrescue > ISOs, the boot flag must not be set on the protective MBR partition. Yes, the protective partition should have the boot flag cleared for compliance with the GPT specification. But that's the theory, and there is the practice. For example I have come across an UEFI firmware implementation on a very old Intel board which required the boot flag to be cleared for EFI boot but set for legacy BIOS boot... > But some BIOS implementations wont't regard the medium as bootable if there > is no boot flag set at all. IME, many Dell and HP's are among these. > The compromise that finally worked for those who tested, was to create an > MBR partition of type 0x00 starting at LBA 0, having only one block, and > bearing the boot flag. Indeed it worked for me too, and even allowed booting either in EFI or BIOS mode with the above board. At least until parted (or, I guess, any other libparted-based partition manager such as partman, the partitioning program part of the Debian installer) is used on the disk and resets the partition table to a standard protective MBR. Same if you set up a hybrid MBR with gdisk. So make sure to never use parted & Co. on such a disk or make sure you set the boot flag again afterwards.
[toc] | [prev] | [next] | [standalone]
| From | Pascal Hambourg <pascal@plouf.fr.eu.org> |
|---|---|
| Date | 2018-11-23 00:10 +0100 |
| Message-ID | <wX6gF-1m3-9@gated-at.bofh.it> |
| In reply to | #202690 |
Le 22/11/2018 à 20:19, Steve McIntyre a écrit : > quantera@gmail.com wrote: >> >> I am trying to install Debian on a 4TB external HDD. Since I want >> to boot the HDD (also) on old systems which support only BIOS, >> and since the HDD is larger than 2TB, I decided to go with GPT >> partition table and BIOS boot (or, in other words: BIOS/GTP). >> I partitioned the HDD accordingly (see the details below), and >> installed Debian. During a pre-installation configuration the >> installer recognized BIOS boot partition, I configured the root >> partition as ext4 and installed grub into the disk's MBR. But >> when (after an installation) I am trying to boot the HDD, I receive >> an error message: 'error: unknown filesystem' and drop into a >> grub rescue mode. >> >> What is the problem here and how it can be solved? It seems as >> though grub's Stage 1.5 loader (that is - core.img, which is >> supposed to be embedded in BIOS boot partition) doesn't contain >> modules needed to read ext4 filesystem, which seems very strange. > > ... > >> Number Start End Size File system Name Flags >> 1 1.00MiB 2.00MiB 1.00MiB bios_grub >> 2 2.00MiB 16000MiB 15998MiB linux-swap(v1) >> 3 16000MiB 3815414MiB 3799414MiB > > I'd expect that Grub won't be able to reliably work with that setup - > partition 3 goes past the 2TB mark, so the BIOS won't be able to map > it properly. Don't forget, when grub is reading the disk all it can > rely on are BIOS calls. Add yourself a small-ish /boot partition first > and you may be OK. The limit of EDD BIOS calls which uses 64 bit LBA addressing is way beyond 2 TiB. But that specific BIOS implementation may be broken and unable to read beyond that limit. So indeed a boot or root partition at the beginning of the disk may help.
[toc] | [prev] | [standalone]
Back to top | Article view | linux.debian.user
csiph-web