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)

  • I think you are using Ubuntu 15.10 as there is no Ubuntu 15.01 till now. I suggest you to edit your question and include the right Ubuntu version which you had dual-booted with Windows 10 ! – Gautam Vashisht Nov 04 '16 at 18:07
  • Welcome to Ask Ubuntu! **;-)"" Boot the 16.04 DVD, take "Try Ubuntu", go to a terminal and type gparted --list, then [edit] your question and provide the output and leave a comment @fabby – Fabby Nov 04 '16 at 21:01
  • @Gautam It's 15.10, indeed. Edited. – deluxecheese Nov 05 '16 at 00:57
  • @Fabby thanks. I also tried that, but the same mount error happens, so I can't get inside any OS. I edited the question to reflect this. – deluxecheese Nov 05 '16 at 02:22
  • @deluxecheese: the gparted --list won't help you directly: it will help us determine what's wrong... so [edit] your question and provide the output to that. Please help us help you! ;-) – Fabby Nov 05 '16 at 09:17
  • @Fabby, what I meant is that I tried to access Try Ubuntu, but it fails with the same error as described in section C.2. above. Thus, I can't go inside an OS to open a terminal. Is there a counterpart to that command in grub CLI? – deluxecheese Nov 05 '16 at 09:24

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
  • 34,259
  • Thanks, @Fabby. I updated my findings above. I am able to decrypt with the passphrase I provided at set up, which tells me that the encryption was completed fully. I still see a light at the end of this tunnel, but I'm just not familiar with grub and all the more with an encrypted disk. >.< with the new info, what can I do after being able to decrypt the disk? – deluxecheese Nov 05 '16 at 10:29
  • @deluxecheese Answer updated... Please don't thank me! ;-) If this answer did help, just click the little grey at the left of this text right now turning it into beautiful green. If you do not like the answer, click on the little grey down-arrow below the number, and if you really like the answer, click on the little grey ☑ and the little up-arrow... If you have any further questions, just ask another one! ;-) – Fabby Nov 05 '16 at 10:53
  • Thanks for mentioning RecuperaBit! It should be noted that my software will be useful only for copying files from the NTFS partition, it won't have any effect on the Linux partitions nor it will make the drive bootable again. – Andrea Lazzarotto Nov 12 '16 at 19:28
  • 1
    @AndreaLazzarotto: Now that I know it exists it will be mentioned everywhere! (also old answers when I get to them). Expect more users soon! :P ;-) – Fabby Nov 13 '16 at 16:56