[Resolved] After restoring Ubuntu from a backup I get a boot error "invalid independent elf magic"

Discussions about using Linux guests in VirtualBox.
Post Reply
Marc4324234
Posts: 3
Joined: 2. Jul 2019, 12:46

[Resolved] After restoring Ubuntu from a backup I get a boot error "invalid independent elf magic"

Post by Marc4324234 »

I have an Ubuntu folder which I've restored from a backup into my Windows filesystem. When restored this is the structure.

Code: Select all

.
`-- Ubuntu 18.04
    |-- Logs
    |   |-- VBox.log
    |   |-- VBox.log.1
    |   |-- VBox.log.2
    |   |-- VBox.log.3
    |   `-- VBoxHardening.log
    |-- Snapshots
    |   |-- {519d68d1-6e79-40f8-9e7c-542cdeaab389}.vdi
    |   |-- {9ab0a0a1-d35d-4d9c-a732-7bb6d05da5f9}.vdi
    |   |-- {bfe2a091-621a-404e-a868-3fcbc788fb19}.vdi
    |   `-- {e410c5e5-8606-4494-9040-4bc7afd53b52}.vdi
    |-- Ubuntu 18.04.vbox
    |-- Ubuntu 18.04.vbox-prev
    `-- Ubuntu 18.04.vdi
3 directories, 12 files

Oddly the backup is from git. I used this mostly out of interest to see how it would handle large binary files, and since I'm in a home environment where nothing is critical. It backed up every file just fine so far as I can tell, the reason I'm mentioning it is in case the cause of my issue might be due to git creating incorrect file permissions, or text file line endings. My gut feeling is git (I've reset VM files before which worked fine, albeit never the entire folder) is not the issue here but I didn't want to leave it out just in case.

After restoring the backup and using the "Add" mechanism in VirtualBox, all seems fine - it imports correctly without errors, showing me the correct structure of the snapshot tree and so on.

When starting the machine it "works" in that it does actually run a VM instead of crashing at VirtualBox level but within the VM I then get put into grub rescue mode almost immediately and see the error "invalid independent elf magic". Looking online I can't see any answers to that which apply to my situation.

Any thoughts? I'm happy to provide more information.

Thanks!
Attachments
VBox.zip
(28.36 KiB) Downloaded 17 times
Last edited by Marc4324234 on 2. Jul 2019, 16:48, edited 2 times in total.
mpack
Site Moderator
Posts: 39156
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: After restoring Ubuntu files from a backup I get a boot error "invalid independent elf magic"

Post by mpack »

That log is edited / truncated. Please delete it and replace it with a complete log, zipped.
mpack
Site Moderator
Posts: 39156
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: After restoring Ubuntu files from a backup I get a boot error "invalid independent elf magic"

Post by mpack »

I see this very obvious error in the log.
00:00:05.313832 VMMDev: Guest Log: BIOS: Booting from Hard Disk...
00:00:05.404667 VDI: Out of range access (5372248064) in image C:\Virtual Machines\Ubuntu 18.04\Ubuntu 18.04.vdi, image size 243269632
00:00:05.404850 VDI: Out of range access (5372263424) in image C:\Virtual Machines\Ubuntu 18.04\Ubuntu 18.04.vdi, image size 243269632
00:00:05.405214 VDI: Out of range access (5372280832) in image C:\Virtual Machines\Ubuntu 18.04\Ubuntu 18.04.vdi, image size 243269632
00:00:05.405355 VDI: Out of range access (5372295680) in image C:\Virtual Machines\Ubuntu 18.04\Ubuntu 18.04.vdi, image size 243269632
00:00:05.405754 VDI: Out of range access (5372313600) in image C:\Virtual Machines\Ubuntu 18.04\Ubuntu 18.04.vdi, image size 243269632
00:00:05.405914 VDI: Out of range access (5372327936) in image C:\Virtual Machines\Ubuntu 18.04\Ubuntu 18.04.vdi, image size 243269632
00:00:05.406291 VDI: Out of range access (5372346368) in image C:\Virtual Machines\Ubuntu 18.04\Ubuntu 18.04.vdi, image size 243269632
00:00:05.406428 VDI: Out of range access (5372360192) in image C:\Virtual Machines\Ubuntu 18.04\Ubuntu 18.04.vdi, image size 243269632
00:00:17.879431 Changing the VM state from 'RUNNING' to 'SUSPENDING'
I'm going to take a wild stab in the dark and guess that your backup medium was a FAT formatted drive, which is therefore incapable of handling files greater than 2GB/4GB (depending on the implementation).

[Later] I just checked the numbers, and the reported 243269632 bytes (I assume the size is in bytes!) is nowhere near the 2GB or 4GB boundaries. Still, the VDI has obviously been truncated: perhaps you simply ran out of space on the backup medium.
Marc4324234
Posts: 3
Joined: 2. Jul 2019, 12:46

Re: After restoring Ubuntu files from a backup I get a boot error "invalid independent elf magic"

Post by Marc4324234 »

After creating another virtual machine and attaching the existing VDI it seems like you're correct. Strange that git reports no errors and appears to have all the files, but I suppose it's not really meant for large binaries and it's not really a Virtual Box issue.

Thanks for your help :)
Post Reply