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

Discussions about using Linux guests in VirtualBox.

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

Postby Marc4324234 » 2. Jul 2019, 13:13

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   Expand viewCollapse view
.
`-- 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 10 times
Last edited by Marc4324234 on 2. Jul 2019, 16:48, edited 2 times in total.
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"

Postby mpack » 2. Jul 2019, 15:34

That log is edited / truncated. Please delete it and replace it with a complete log, zipped.
mpack
Site Moderator
 
Posts: 29825
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"

Postby Marc4324234 » 2. Jul 2019, 16:49

Updated the post, thanks.
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"

Postby mpack » 2. Jul 2019, 18:46

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.
mpack
Site Moderator
 
Posts: 29825
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"

Postby Marc4324234 » 2. Jul 2019, 20:51

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 :)
Marc4324234
 
Posts: 3
Joined: 2. Jul 2019, 12:46


Return to Linux Guests

Who is online

Users browsing this forum: No registered users and 27 guests