| Summary: | drakboot crash on removable drive: not a F2FS filesystem (no superblock) | ||
|---|---|---|---|
| Product: | Mageia | Reporter: | Antonin Roussel <antonin.roussel> |
| Component: | RPM Packages | Assignee: | Mageia Bug Squad <bugsquad> |
| Status: | RESOLVED INVALID | QA Contact: | |
| Severity: | normal | ||
| Priority: | Normal | CC: | davidwhodgins, fri, ouaurelien |
| Version: | 8 | Keywords: | NEEDINFO |
| Target Milestone: | --- | ||
| Hardware: | i586 | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Source RPM: | drakxtools-18.45-1.mga8.src.rpm | CVE: | |
| Status comment: | |||
| Attachments: |
lspcidrake -v
blkid fstab modprobe.conf grub.cfg |
||
|
Description
Antonin Roussel
2021-03-27 15:04:48 CET
Created attachment 12531 [details]
lspcidrake -v
Created attachment 12532 [details]
blkid
Created attachment 12533 [details]
fstab
Created attachment 12534 [details]
modprobe.conf
Created attachment 12535 [details]
grub.cfg
(In reply to Antonin Roussel from comment #0) > Le programme « drakboot » a planté avec l'erreur suivante : > > grub2-install failed: Installation pour la plate-forme i386-pc. > grub2-install : attention : ../grub-core/fs/f2fs.c:813:not a F2FS Hi, you try to install Mageia on a F2FS volume in Legacy BIOS mode. You can do this as long as you add at the very beginning of the disk a small partition name GRUB BIOS BOOT and with a 1 MB size. This is normally done by installer in automatic mode. But, you choose to apply a custom mode. Please try again. CC:
(none) =>
ouaurelien Reporter, could you please reply to the previous question? If you don't reply within two weeks from now, I will have to close this bug as OLD. Thank you. Status:
NEW =>
NEEDINFO Thank you I have created a 1 MB leading partition, and have tried again my net install, with same error. So was wondering if my 1 MB partition is good. It is now FAT32 with label GRUB_BIOS_B (truncated). From another system (GRUB4DOS), I managed to boot in the fresh installed system in order to set a correct MBR with that command which could not terminate: # mount /dev/sdb1 /mnt/setmbr # grub2-install --target=i386-pc --debug --boot-directory=/mnt/setmbr/boot /dev/sdb # grub2-install --target=i386-pc --debug --force --boot-directory=/mnt/setmbr/boot /dev/sdb That was the _force_ setup of /boot/ directory in this 1 MB partition (sic). I Understand the setup started with the MBR before /boot/ directory. Inspired from https://www.linuxsecrets.com/archlinux-wiki/wiki.archlinux.org/index.php/GRUB.1.html#Install_to_external_USB_stick Sorry for the mess. My need for booting from that F2FS volume is gone. So this bug report can be closed, or tested further. Remaining question, why have I not seen a command for MBR setting only? The empty first partition has to be type x00, aka "BIOS boot or Empty partition" in diskdrake. CC:
(none) =>
davidwhodgins Thank you for your tips. Despite, the previous step was stable, I had hard time to try again checking my leading partition type from mcc.mga<8, changing the partition type (and partitions table too). Rebuilding partition table with fdisk ended slightly broken. So I simply tried again from scratch, discovered on partition stage, the select box to choose the hard drive on which install Mageia... \o/ hurrah! (If this select box had a blue glow like radio buttons or check boxes, it would have made me less blind) "Pourquoi faire simple quand on peut faire compliqué ?" Shadock - Jacques Rouxel KISS Status:
NEEDINFO =>
RESOLVED I guess the 1MB partition is due to a part of grub2 need somewhere to reside? BIOS boot partition seem not be needed when there is am ESP partition instead, right? So for making a USB stick system to be able to boot from both legacy and EFI systems a partition for /boot/EFI should fulfil both needs. I think this check should be added to diskdrake for the manual partitioning step. - It do already check and warn for some other things. WDYT? CC:
(none) =>
fri When booting in bios firmware mode, grub2 has to be loaded from a part of the drive that is not in a normal file system. - If the drive uses the mbr style partition layout (aka dos style), grub2 will be stored in and loaded from the part of the first track immediately following the first sector, where the master boot record and primary partition table are stored. - If the drive uses the gpt style partition layout, grub2 will be stored in and loaded from a "BIOS boot or Empty partition". I.E. space reserved for use by grub2, that does not contain any type of a normal file system. When booting in uefi firmware mode, one of the partitions must be a vfat partition, the EFI system partition, where the bootloader will be stored, that will be selected, loaded, and started by the uefi firmware. The partition has to have a fat (vfat, fat12, etc.) file system that the uefi firmware knows how to read. If the drive uses a mbr partition table, it's type must be 0xEF. If the drive uses a gpt partition table the gpt partition table entry must also have the flags boot and esp set, and have the GUID type set to C12A7328-F81F-11D2-BA4B-00A0C93EC93. ================================================================ So the "BIOS boot or Empty partition" partition is only needed if booting in bios firmware mode, and using a gpt partition table. The drak boot loader install tools will detect whether they are running in a system that's been booted in bios or uefi firmware mode, and set up grub2 or grub2-efi, as appropriate. It will not do both. For bios firmware mode with a mbr partition table, it's technically possible to install grub2 to a partition instead of the mbr, but the drak tools do not support this. They did with grub legacy, but not with grub2. When that is being done manually, the file system type has to be one that leaves space in the first track of the partition that grub2 can use. f2fs is not one of the types that leaves the needed space unused. I suspect the problem initially reported was due to using a gpt partition table and bios firmware mode and not having a proper "BIOS boot or Empty partition". Ah, thanks :) The problem initially reported was due to using _customized_partition_mode_ during installation on a Legacy BIOS laptop. I selected the whole F2FS disk to make a single partition, expecting a MBR space would be left by design. The reason why I did not select the default whole disk option on the F2FS disk, was I have not seen the disk select box which default choice was the laptop disk. Wikipedia may display a nice picture about GRUB2 boot files https://en.wikipedia.org/wiki/BIOS_boot_partition Changing to invalid, since f2fs is not intended to be used on the entire device (not in a partition) and have that device used for the boot loader, so this was not a Mageia bug that needed to be fixed. A word of caution about using the entire device for any file system. When I was first experimenting with lvm, I tried using an entire device (a usb stick) as a lvm physical volume. Found out the hard way that booting into windows with that device connected, windows would silently overwrite the first sector creating an empty partition table. I think that was windows 98. No idea if windows still does that or not, as I haven't used it in years. Resolution:
FIXED =>
INVALID |