Tuesday, August 1, 2017

wubi - boot-repair fails (UEFI and pre-installed Windows 8)



I have bought a new laptop, Toshiba Satellite NB10t-A-101, with pre-installed Windows 8, after one day of figuring out how to install Ubuntu in UEFI I finally managed to do it (which wasn´t easy, as M$, Intel and Toshiba have made it more difficult with this model).

It installed correctly. I created new partitions (making space beforehand in Windows 8). However after the installation the Windows boot manager turns on, with both Windows 8 and Ubuntu options. After selecting Ubuntu I am getting the same WUBI error as described here: Installing Ubuntu Alongside a Pre-Installed Windows with UEFI



 Windows failed to start. A recent hardware or software change might be the 
cause. To fix the problem:

1. Insert your Windows Installation disc and restart your computer.
2. Choose your language settings, and then click "Next."
3. Click "Repair your computer."

If you do not have this disc, contact your system administrator or computer

manufacturer for assistance.

File: \ubuntu\winboot\wubildr.mbr
Status: 0xc000007b
Info: The application or operating system couldn't be loaded because a
required file is missing or contains error.


Which is already strange, as I thought the installation was in EFI mode (note- the secure boot option was disabled since the beginning, so this shouldn´´t be the cause).
However after going to the "repair" options, the Windows menu appears (the same menu that allows to enter UEFI configuration), and in the "boot from device" option one additional figure appears- "ubuntu" which boots directly into the previously installed Ubuntu (14.04.1 LTS).




At this point I hoped the boot-repair would help. I followed the instructions from here: https://help.ubuntu.com/community/UEFI ("Converting Ubuntu into EFI mode"), unfortunately it does not help and I am getting this error:



 An error occurred during the repair.

Please write on a paper the following URL:
http://paste.ubuntu.com/8012282/

In case you still experience boot problem, indicate this URL to:
boot.repair@gmail.com


You can now reboot your computer.
Please disable SecureBoot in the BIOS.

A broken Wubi has been detected. Please fix it this way:
https://wiki.ubuntu.com/WubiGuide#Cannot_boot_into_Ubuntu


After rebooting I am getting the same initial error (missing WUBI file) and can only enter Ubuntu as described above.
Why is Ubuntu still looking for the WUBI? How can I repair the boot options, maintaining dual-boot with Windows?

(unfortunately I still need Windows for one program that won´t emulate, also the shop salesman told me I would loose warranty if I delate Windows)



I´m a beginner user and getting to this point was very hard- please, use simple explanations :)



EDIT:
Photograps of the boot process.
After the error message I can go to the other windows menu and "boot from device"



enter image description here
enter image description here




enter image description here



enter image description here



I did a quick look in the manual for the laptop and F12 (confirmed to be working) should have been the right key according to instructions for booting from external media. You should probably check the manual yourself.





There is the possibility that the UEFI firmware of the laptop does something else than what is expected according to the output from efibootmgr -v.




BootOrder: 0006,0000,2003,2001
[...]
Boot0006* ubuntu HD(2,200800,82000,2f11f25e-4303-11e3-be2a-0c54a5038f2e)File(EFIubuntushim‌​x64.efi


You should check if there is a firmware update available to update and check again after the update if it fixed your issue.






Another possbibility is that the default bootloader (\EFI\BOOT\BOOTx64.EFI on each HDDs ESP) is always booted (seems to be the case). Check if you can change this behaviour. A fully functional firmware should be able boot the ubuntu or Windows Boot Manager entries (as seen in the efibootmgr -v output) instead of the default one. I found a related post in a blog.



My general advice is too back up \EFI\BOOT\BOOTx64.EFI and replace it. I prefer gummiboot (tested, works), rEFInd is also possbile. I don't know what boot-repair does or suggest for this.



This really seems to be a firmware issue and installing another distribution does not seem to improve on this (I also found a forum post for Fedora with a similar issue).





You con only boot the \EFI\BOOT\BOOTx64.EFI file on a harddrive with this laptop, so you need to replace it with something, that can boot more than just Windows. Running boot-repair will not help or make confusion worse.





  1. Get gummiboot



    Download gummiboot from the Arch Linux repositories. (Everything is fine, we are just doing Linus Torvalds style package management. You can find the download link on that page far on the right under Package Actions > Download From Mirror)



    Mount the EFI System Partition (ESP) and backup all existing files on the ESP (e.g. use zip or tar). You can put the backup file at the root of the partition, there should be enough space.



    Extract gummibootx64.efi from the package (it's under /usr/lib/gummiboot/) and copy it as \EFI\BOOT\BOOTx64.EFI to your ESP.


  2. Configure gummiboot to boot GRUB




    Create folders along the path loader/entries/ at the root of your ESP and create a file named ubuntu-grub.conf with the following content:



    title          Ubuntu GRUB
    efi \EFI\ubuntu\grubx64.efi


    You also need to add the file loader.conf in loader/ to make gummiboot work.



    default        Ubuntu GRUB
    timeout 4



    default is the title of the default entry to boot. Edit appropriately if you have chosen another title.


  3. Reboot



    That's it. Gummiboot will automatically find and create menu entries to boot Windows.



boot - How can I recover my RAID 5 array after removing 3 or 4 of 7 disks?



I'd like to undo what I've mistakenly done. From Disks I removed 4 of 7, 2 TB disks from the software RAID 5 array. I am unable to bootup and come to this:




error: disk 'mduuid/long UUID number' not found.
Entering rescue mode...
grub rescue> blinking cursor




I removed the last 3 or 4 disks from the array; can I just add them back and be able to boot? Here is my output from ls:





grub rescue> ls
(hd0) (hd0,msdos2) (hd0,msdos1) (hd1) (hd1,msdos2) (hd1,msdos1) (hd2) (hd2,msdos2) (hd2,msdos1) (hd3) (hd3,msdos2) (hd3,msdos1) (hd4) (hd4,msdos2) (hd4,msdos1) (hd5) (hd5,msdos2) (hd5,msdos1) (hd6) (hd6,msdos2) (hd6,msdos1) (md/1) (md/0)




I had a swap RAID5 partition as well. Any help saving my data would be AMAZING.



Reference: Grub2/Troubleshooting



EDIT





grub rescue> cat /proc/mdstat
Unknown command 'cat'.




I don't see a way to delete my question, and the options for closing do not apply. The answer to this is either to simply enter the repair function when Live Booting and mark all the drive partitions that were removed as part of md0 and md1 again (swap and RAID5 ext4), or the answer is very complicated and requires data recovery. Neither were enticing. It's probably best to focus more on not doing this sort of thing in the future than trying to fix it anyway. Fresh start.


grub2 - Can't Install Ubuntu in UEFI mode; the live USB I made only boots in legacy mode

I have an ASUS x451CA notebook bought for work reasons. I have Win10 installed and I want to have a dual boot machine.



My installation of Windows 10 was completed with no issues, but when I installed Ubuntu my nightmare began.



First, my BIOS only recognizes the bootable usb I made with yumi in legacy mode; a UEFI option to boot appears, but when I select it it doesn't boot, I just get brought back to BIOS.




My notebook has no secure boot nor fast boot enabled, much less these options exist in BIOS. I disabled the legacy mode wile I'm in BIOS. It let me choose the UEFI option, but when the system restarts I'm brought back to the BIOS menu. The legacy mode install of Ubuntu runs without problems, but I'm blocked from entering Windows, the system wont find it in the GRUB menu.



Trying to solve this problem I installed boot repair, but the program says that it can fix GRUB only in UEFI mode, which I can't enable.



On my PC I have a dual boot with Win10 and Ubuntu 18.04, but in my PC I have 2 HDs where one runs a boot file separately that runs perfectly. But not in my notebook with only one HD.



How can I solve this problem?

dpkg - Can't uninstall PHPmyadmin in Ubuntu 16.04



My PHPmyadmin (PMA) install was stuck. I started a new session and when doing apt-get purge phpmyadmin I got:





E: Could not get lock /var/lib/dpkg/lock - open (11: Resource
temporarily unavailable).



E: Unable to lock the administration directory (/var/lib/dpkg/), is
another process using it?




I ran these in Google and found two issues here; Highest answers suggest removing lock file (as well as it's cached version), but that didn't help:






This answer should be tried as well for Ubuntu 16.04, I would advise to try it second:



cd /var/lib/dpkg/info/
sudo rm -r phpmyadmin.*
sudo apt-get clean
sudo apt-get update
sudo phpdismod mcrypt mbstring
sudo service apache2 restart

sudo sed -i 's/Include \/etc\/phpmyadmin\/apache.conf/ /g' /etc/apache2/apache2.conf
sudo apt-get purge phpmyadmin -y
sudo apt autoremove

system installation - Specific install instructions for a retina macbook pro

I'd like to install Ubuntu as my primary OS on a Retina Macbook Pro.


As I'm unaware of the issues I'll face I've been trying to find instructions before starting. I've been searching for a while and I'm starting to get more confused instead of less.


Has someone got a specific guide that I should use to install 13.04 or 13.10 with (I'd prefer to use 13.10 as I intend to use it to develop software).

12.04 - Added one extra drive, old dual boot stopped working



After some search, I didn't found exactly what my problem is, or at least I sould not relate it to any past questions I found.



Old setup




HDD with 2 partitions, grub booting ubuntu on one and win7 on the other. Everything went just fine.



New setup



One/two months ago I bought an SSD and I'm now writing this from its Win10. It has only this partition.



HDD got its Win7 partition formated but not the Ubuntu's. Problem is: when I try to boot (hotkey at the boot menu) from the HDD, it doesn't work anymore.



My understanding of the problem




I didn't wipe out the entire HDD contents, only the Win7 partition, so I thought even if Windows wouldn't boot anymore (obviously), Ubuntu would. Well and I don't think I got the knowledge to fix this up because I don't know if I can fix it as it is now or if I must wipe out the ubuntu partition and start over, or if I have to wipe grub from that drive (and I don't even know how to do this), lots of questions are popping!



What I want to learn



Okay now, the desired result is: Windows 10 booting from the SSD as it is now. Ubuntu booting from HDD partition #2 (if I recall the order number). HDD partition #1 serving as storage for Win10.



I don't care if boot process is either:




  • From the HDD, like "pc turns on, hdd starts grub, I choose, grub does his things" or


  • From boot hotkey, like "pc turns on, I press the boot device hotkey, choose drive, OS boots"



I just need it working as soon as possible. Thanks in advance.






Update: I managed to boot using the grub prompt, but I got to tty. Then as I found no problem there, I tried to reboot. When the Ubuntu logo (the loading screen) showed up was my last moment of happiness: it stopped there. Maybe something went wrong with video drivers, my video card or monitor?







fdisk -l output



Disk /dev/sda: 1000.2 GB, 1000204886016 bytes
255 heads, 63 sectors/track, 121601 cylinders, total 1953525168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk identifier: 0xf4ca1ca3



Device Boot Start End Blocks Id System
/dev/sda1 * 2048 206847 102400 7 HPFS/NTFS/exFAT
/dev/sda2 206848 1495039999 747416576 7 HPFS/NTFS/exFAT
/dev/sda3 1495042046 1953523711 229240833 5 Extended
Partition 3 does not start on physical sector boundary.
/dev/sda5 1945526272 1953523711 3998720 82 Linux swap / Solaris
/dev/sda6 1495042048 1945526271 225242112 83 Linux



Partition table entries are not in disk order



Disk /dev/sdb: 120.0 GB, 120034123776 bytes
255 heads, 63 sectors/track, 14593 cylinders, total 234441648 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x6597ec03




Device Boot Start End Blocks Id System
/dev/sdb1 * 2048 1026047 512000 7 HPFS/NTFS/exFAT
/dev/sdb2 1026048 234438655 116706304 7 HPFS/NTFS/exFAT



Disk /dev/sdc: 8004 MB, 8004304896 bytes
255 heads, 63 sectors/track, 973 cylinders, total 15633408 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x027e5a9a



Device Boot Start End Blocks Id System
/dev/sdc1 * 2048 15633407 7815680 c W95 FAT32 (LBA)



I would reinstall GRUB onto your HDD.





  1. Boot into liveUSB or liveCD

  2. Select "preview ubuntu" or find a way to get to the desktop w/o installing

  3. Open a terminal

  4. Run lsblk

  5. Using the output of lsblk, get the disk of the HDD (either /dev/sda or /dev/sdb probably).

  6. Run grub-install /dev/sdX where X is the letter seen previously

  7. Restart



If you still cannot boot into ubuntu, follow the first answer on this post.




After this, you can mess with the partitions using GParted. Search askUbuntu for more info on that.


grub2 - Can I set Grub to not boot a default OS?



I'd like the computer to wait at the Grub screen for me to make a choice, rather than picking one option and running with it. Is there a way to have no default operating system in Grub?



You can set GRUB_TIMEOUT to a very big value or to -1 (infinite). This is by default set at 10 seconds. To change it, edit /etc/default/grub file using the following command in terminal:




gksu gedit /etc/default/grub


After you finished to edit that file, save it and don't forget to update your Grub using the following command:



sudo update-grub

11.10 - Can't boot from USB after installing Ubuntu

I bought a Samsung series 5 notebook and a very strange thing happened: I installed Ubuntu 11.10 from a usb pen drive but when I restarted (...