Thisisnotanid 0 Junior Poster in Training

Hi everyone!

I am new to Ubuntu and Linux in general, and as is to be expected from such a disposition, have landed myself in trouble. I installed Ubuntu with WUBI and later created a new .disk file with larger capacity to accommodate the growing needs of my system. The new hard disk image has 11.04 on it (as does the old one), and it started shutting down unexpectedly a while back. Whenever I tried booting into that installation it took me to the grub command line. I tried many things to try to boot into the OS, but it always gave me some error along the lines of boot initrd missing (or some important boot realted file missing).


Luckily, I had kept my previous .disk file containing an exact copy of the system when it was made. I renamed that to root.disk and it booted perfectly! Though it seemed that it was also going to suffer the same fate if I hadn't asked the system to repair broken packages and update grub-bootlader through safe mode. Everything's fine with the old disk image now, but I would really like to fix the new image I created or at the very least try to recover the new files I created on that image.

Certain guides I've looked at provide very good solutions but require using the LiveCD, which I can't since for some reason when I try to it gives me the error message along the lines of "input output error, cannot mount loop0/dev/or something" Also, when I upgraded to 11.04, halevt didn't install properly giving the error message about sub-process exit status code 100. Now every time I install something with the terminal, it gives the same error message concerning halevt. I don't know if that helps or not.


Any help would be appreciated!

Dani AI

Generated

A focused recovery checklist for based on the symptoms you describe.

Wubi’s virtual disk lives under C:\ubuntu\disks\root.disk; when grub drops to a prompt or a Live session reports loopback I/O errors the usual root cause is NTFS/host-volume corruption rather than an internal Ubuntu bug. First action: boot Windows and run a full check on the host volume (for example chkdsk C: /r) so Windows can repair NTFS metadata before you touch the image. (wiki.ubuntu.com)

If the file is still present but won’t mount, preserve it immediately (don’t run destructive repairs on the original). Try a straight copy to an external drive; if that fails with I/O errors, make an image with GNU ddrescue so you recover good blocks and keep a retry log. Example (run from a Linux live USB with gddrescue installed):

sudo apt-get update && sudo apt-get install gddrescue
sudo ddrescue -f -n /mnt/windows/ubuntu/disks/root.disk /mnt/usb/root_copy.img /mnt/usb/ddrescue.log
sudo ddrescue -d -r3 /mnt/windows/ubuntu/disks/root.disk /mnt/usb/root_copy.img /mnt/usb/ddrescue.log

Use ddrescue’s mapfile — it lets you resume/retry without re-reading the failing sectors. (gnu.org)

Work on the image copy, not the original. Attach it as a loop device, run the ext checker, mount read-only, and copy your data out (rsync is handy):

sudo losetup --find --show /path/to/root_copy.img   # returns /dev/loopX
sudo e2fsck -f -y /dev/loopX
sudo mount -o loop,ro /path/to/root_copy.img /mnt/recover
sudo rsync -av /mnt/recover/home/ /safe/place/

losetup and e2fsck are the standard tools for these steps; run them only on the copied image. (manpages.debian.org)

If filesystem checks fail to restore useful structure, use recovery tools (TestDisk/PhotoRec or extundelete) against the image to carve or recover files. Separately, the package you called “halevt” is a legacy HAL event handler and is known to fail during dpkg post-install scripts on some installs; purge it if apt keeps erroring, but back up /var/lib/dpkg/info before removing package-info files manually. (github.com)

If anything in these steps is unclear, prioritise: (1) run chkdsk from Windows, (2) copy or image the root.disk, (3) recover from the image.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.