0

A. Background

I was trying to install 16.04 using a bootable disk on a machine that originally dual boots with Windows 10 and Ubuntu 15.10.

This machine's factory OS is Windows 8.

B. Here's what I did just before the boot problems

  1. While configuring the set up, I selected the option Erase and Install Ubuntu
  2. I reached the step where I have just selected encrypt disk, but left the erase checkbox unticked. I supplied a password and pressed continue.
  3. At this stage, I cancelled the set up by rebooting. I haven't reached any actual installation process.

C. Here's what happens after

Now, I can't boot into either Windows 10 or Ubuntu 15.10. No bootable disks are recognized.

  1. From the BIOS setup, I can only see Network boot options and the 16.04 bootable disk, if it's inserted to my USB slot.

  2. Booting from the 16.04 bootable disk via Try Ubuntu or Install Ubuntu both returns...

    Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(1,0)
    CPU: 6 PID: 1 Comments: swapper/0 Not tainted 4.4.0-31-generic #50-ubuntu
    Hardware name: ...
    Call Trace:
     ...dump_stack
     ...panic
     ...mount_block_root
     ...mount_root
     ...prepare_namespace 
     ...kernel_init_freeable 
     ...? rest_init
     ...kernel_init
     ...ret_from_fork
     ...? rest_init
    Kernel offset: disabled
    end Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(1,0)
    
  3. I tried to access grub command line via the same 16.04 bootable disk. I can see that I have hd0, hd1, and hd2. Hd2 looks like my 1TB HDD which originally was split into a Windows 10 partition and a Ubuntu 15.10 partition. Now, I still see the partitions to be intact with ls (hd2, but it returns an error. It says:

    Possible partitions are:
    
    Device hd2: error: file '/boot/grub/x86_64-efi/tar.mod' not found.
    error: file '/boot/grub/x86_64-efi/sfs.mod' not found.
    error: file '/boot/grub/x86_64-efi/nilfs2.mod' not found.
    error: file '/boot/grub/x86_64-efi/minix.mod' not found.
    error: file '/boot/grub/x86_64-efi/afs.mod' not found.
    error: file '/boot/grub/x86_64-efi/affs.mod' not found.
    No known filesystem detected - Sector size 512B - Total size 976762584Kib
      Partition hd2,gpt1: Filesystem type fat, UUID... - Partition start at 1024Kib... Total size 499712KiB
      Partition hd2,gpt2: Filesystem type extra* - Last modification time... , UUID... - Partition start at 525312Kib... Total size 499712KiB
      Partition hd2,gpt3: No known filesystem detected - Partition start at 1025024KiB - Total size 975736832Kib
    

D. Steps I have applied so far

  1. Disable secure boot. Result: I didn't see any behavior change in the boot process

  2. Use cryptomount in grub.

    Section B.2. above, apparently was applied at once even though the actual Ubuntu installation hasn't started. I confirmed this by mounting my disk, as follows in grub CLI:

    grub> insmod luks 
    grub> cryptomount -a
    Attempting to decrypt master key...
    Enter passphrase for hd2, gpt3...:
    Slot 0 opened
    

    The passphrase I used here is the same as the one I provided in Section B.2. above.

    Now, when I perform an ls (, I can see: crypt0, proc, memdisk, hd0, hd1, and hd2.

    I don't know what I should do next to eventually mount a working OS (whether a live 16.04 USB or my current Windows or 15.10 OS)

    These are just my guesses: It looks like the reason the boot is not detected is because my disk is now encrypted. It is not recognized since the module responsible to ask the passphrase and decrypt the disk is somehow not being loaded first.

  3. After cryptomount above, mount using mode normal

    grub> set root=(crypt0)
    grub> insmod normal
    grub> normal
    

    I got greeted again by the grub bootloader. I tried Try Ubuntu, but it is now returning the following error:

    error: no server is specified.
    allow magic is broken at... 
    aborted. Press any key to exit.
    

    After pressing a key, it goes back to the BIOS asking for boot options.

    Any configuration that I have missed?

E. Here's what I hope to fix

My priority is to have access to my Windows files again. Copying files which I can read using a separate machine should be sufficient.

Being able to boot into my Windows 10 OS would be great (but not necessary for this question)

1 Answers1

2

With great security comes great responsibility...

While doing the encryption, you stopped it (probably by rebooting) so you have a partially encrypted disk.

The best thing you can do right now is to:

  • wipe everything with dban
  • re-install
  • restore your back-up

If you don't have a backup:

  1. buy 2 new HDD,
  2. install Ubuntu on one,
  3. dd the partially encrypted HDD to the second new one
  4. try recovering the copy of the partially encrypted one by using:
  5. Know that it'll be a tedious job reconstructing files by hand.
  6. make another copy from the original damaged one and restart the process but unencrypt the volume to recover the encrypted files.

Why?

  • You don't want to damage a damaged disk even further, so that's why you need a new HDD to install Ubuntu on and another one to make a copy and work on the copy so that if you make a mistake you can always go back.

  • you need to repeat the process twice:

    • once to recover the encrypted files
    • once for the unencrypted files.

And please start making backups now!

Fabby
  • 35,017