grub-legacy no longer available / grub-mkrescue problem




grub-legacy no longer available / grub-mkrescue problem

Postby Kevin » 7. Jul 2019, 12:51

Hi,

I tried to follow video 2; Alas, there is no grub-legacy package available for my system (Ubuntu 18.04, UEFI-System) anymore.

Code: Select all
sudo apt install grub-legacy
[sudo] Passwort für kevin:
Paketlisten werden gelesen... Fertig
Abhängigkeitsbaum wird aufgebaut.       
Statusinformationen werden eingelesen.... Fertig
Paket grub-legacy ist nicht verfügbar, wird aber von einem anderen Paket
referenziert. Das kann heißen, dass das Paket fehlt, dass es abgelöst
wurde oder nur aus einer anderen Quelle verfügbar ist.
Doch die folgenden Pakete ersetzen es:
  grub-coreboot:i386 grub-coreboot grub2-common:i386 grub-pc:i386
  grub-ieee1275:i386 grub-efi-ia32:i386 grub-efi-amd64:i386 grub2-common
  grub-pc grub-ieee1275 grub-efi-ia32 grub-efi-amd64

E: Für Paket »grub-legacy« existiert kein Installationskandidat.



Despite of this, I still do have a grub-mkrescue command:

Code: Select all
mkdir -p iso/boot/grub
cp mykernel.bin iso/boot/
echo 'set timeout=80' > iso/boot/grub/grub.cfg
echo 'set default=0' >> iso/boot/grub/grub.cfg
echo '' >> iso/boot/grub/grub.cfg
echo 'menuentry "My Operating System" {' >> iso/boot/grub/grub.cfg
echo '  multiboot /boot/mykernel.bin' >> iso/boot/grub/grub.cfg
echo '  boot' >> iso/boot/grub/grub.cfg
echo '}' >> iso/boot/grub/grub.cfg
grub-mkrescue --output=mykernel.iso iso
xorriso 1.4.8 : RockRidge filesystem manipulator, libburnia project.

Drive current: -outdev 'stdio:mykernel.iso'
Media current: stdio file, overwriteable
Media status : is blank
Media summary: 0 sessions, 0 data blocks, 0 data,  324g free
Added to ISO image: directory '/'='/tmp/grub.Bxh26O'
xorriso : UPDATE : 286 files added in 1 seconds
Added to ISO image: directory '/'='/home/kevin/workspaces/kernel/iso'
xorriso : UPDATE : 290 files added in 1 seconds
ISO image produced: 4444 sectors
Written to medium : 4444 sectors at LBA 0
Writing to 'stdio:mykernel.iso' completed successfully.
rm -rf iso

but it seems it does not generate an image bootable by Virtualbox. Resulting message is "cannot read boot medium". Same with qemu. I also tried enabling UEFI boot in Virtualbox, as it seems that grub2 does no longer support booting with bios and I fear that what I create is a uefi-boot image?!? But simply enabling uefi boot also did not fix the problem (still cannot read boot medium).

The iso file I create can be loopmounted, the directory structure on it is:
Code: Select all
.
├── boot
│   ├── grub
│   │   ├── fonts
│   │   │   └── unicode.pf2
│   │   ├── grub.cfg
│   │   ├── locale
│   │   │   ├── de.mo
│   │   │   ├── en_AU.mo
│   │   │   ├── en_CA.mo
│   │   │   ├── en_GB.mo
│   │   │   └── en@quot.mo
│   │   ├── roms
│   │   └── x86_64-efi
│   │   <hundreds of mod files>
│   └── mykernel.bin
├── boot.catalog
├── efi.img
├── mach_kernel
└── System
    └── Library
        └── CoreServices
            ├── boot.efi
            └── SystemVersion.plist




What can I do to boot the kernel image? I think grub2 needs to load some of those mods in the grub.cfg, right? But I do not see a single line of grub, no error, no prompt nothing.

Theoretically multiboot is kind of a standard, as far as I understand. So I should be able to use another bootloader like syslinux, as long as it supports multiboot, right?


I tried to find out about that, but at the moment I'm stuck.
Kevin
 
Posts: 3
Joined: 7. Jul 2019, 10:51

by Advertising » 7. Jul 2019, 12:51

Advertising
 

Re: grub-legacy no longer available / grub-mkrescue problem

Postby Kevin » 7. Jul 2019, 15:07

Hi,

to whom it may concern:

I figured it out!

Everything is all right, seems you don't need to have grub-legacy! What I had to install was

grub-pc-bin

see:
https://superuser.com/questions/603051/ ... able-image
and https://wiki.osdev.org/Bare_Bones

for the madness of grub failing without error message!

(Try not executing your orders without giving any notice as a soldier, and you might get an idea of why it is generally a very bad idea to fail silently...)
Kevin
 
Posts: 3
Joined: 7. Jul 2019, 10:51



Similar topics


Return to Boot-Process

Who is online

No registered users

cron