LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   Problem with booting up (https://www.linuxquestions.org/questions/linux-general-1/problem-with-booting-up-4175564154/)

aggelalex 01-17-2016 04:53 AM

Problem with booting up
 
Hello everyone!
Some days before I tried to install android X86 6.0 to a 8GB partition. I the installer, I selected to edit my partitions and selected gpt. I made a partition to install it. I didn't nailed it, and when trying to boot back to Deepin (my primary OS), BIOS showed me the boot menu, I don't knew why. I selected to boot into my hard drive, but after 3 seconds I was back to the boot menu. I guess I mixed up gpt with... something else? I tried to use boot repair, but this shows up all the time:

Code:

Filesystem repair requires to unmount partitions. Please close all your programs. Then close this window.
And is quite annoying, because it comes up again after half a munite. I tried closing all my programs, but that didn't help.

Here is the magic boot summary:
http://paste.ubuntu.com/14543926/

PLS help, I need my PC.

aggelalex 01-17-2016 05:37 AM

I managed to make Boot-repair work in some way, but it says that the EFI partition was deleted, and now I have to create one at the start of the disk, but windows is there in ntfs and can't be moved.

oldtechaa 01-17-2016 06:56 AM

Android really belongs in a virtual machine anyway. I know that won't help you right now, but for the future... As for your current problem, I've never really used any Ubuntu, and I've never used UEFI, so I'm little help otherwise.

aggelalex 01-17-2016 07:16 AM

Actually I tried to install it in Virtualbox, but the mouse was recognized as touch by Android, so there wasn't any mouse pointer. Actually I think that my HDD hoax happened when installing Android X86, because at the partition management tool I selected GPT. Also Deepin 15 is now based on Debian, looks like the moderator did wrong and added the Ubuntu icon. Anyway, if you don't know much about UEFI it's OK, after all no one knows everything ;) . But if you could ask somebody else to help me, that would realy realy help!

oldtechaa 01-17-2016 07:38 AM

For one, VirtualBox has mouse settings you could try changing. Also, how would you feel about a reinstall? I can't see what's going on there, and how your partitions are, and exactly what's corrupted, so you could try a reinstall and see what the installer tries to do in the way of partitioning.

aggelalex 01-17-2016 08:56 AM

Well, I think anyone can see that I don't know much about vbox :| ... But, I tried installing Lubuntu in free space, and I got this error:

Quote:

The attempt to mount a file system with type vfat in SCSI1 (0,0,0), partition #5 (sda) at /boot/efi failed.

You may resume partitioning from the partitioning menu.
Also, that link of pastebin I provided (http://paste.ubuntu.com/14543926/) says it all (I think) about my HDD and my partitions, it was generated by boot-repair.

yancek 01-17-2016 09:33 AM

Are you able to boot anything now from the hard drive? Your boot repair script shows you are using MBR and that windows 7 is installed using MBR. My understanding is that if you use GPT with windows, you must use UEFI. If you use UEFI, you need a FAT32 partition for EFI at the beginning of the drive. You don't have that which means your systems (windows and Deepin) where not using UEFI/GPT. Selecting GPT with Android was a mistake.

Your output shows Grub in the MBR of sda with correct boot entries for Deepin and windows. At the top of the output, it shows sda5 (Deepin) as an ext4 filesystem, just below that it also shows sda5 as EFI System partition. It shows also that sda3 is a BIOS boot partition which is used with Linux systems using GPT. Have you tried the recommendation at the bottom of the boot repair? I don't use UEFI/GPT so I'm not sure how you would resovle these problems. The link below, under General Principles explains some of the reasons your are having problems.

https://help.ubuntu.com/community/UEFI

aggelalex 01-17-2016 10:26 AM

Ya, I am not able to boot, and I have UEFI. But the partition is missing and I can't move windows so that I create one.

I'm now in Lubuntu Live

aggelalex 01-17-2016 01:58 PM

I executed this found in the wiki Yaneck sent me:
Code:

cd /media
sudo mkdir sda5
sudo mount /dev/sda5 sda5
sudo chroot sda5
su alex
[ -d /sys/firmware/efi ] && echo "EFI boot on HDD" || echo "Legacy boot on HDD"

And the output is:
Code:

Legacy boot on HDD
which is bacause there is no /sys/firmware/efi folder in there. Which means I have legacy boot (I guess). But I mixed things up. OMG, can somebody help me?

yancek 01-17-2016 08:11 PM

The info in the boot repair output shows you are using or were using MBR which is what the output you posted from that command indicates. You should not have selected GPT for Android because windows needs UEFI with GPT, at least from everything I've read. You don't want to create an EFI partition, that will complicate things even further. I don't use UEFI myself but I would suggest you turn off anything relating to UEFI in the BIOS and review the information at the link I posted earlier.

colorpurple21859 01-17-2016 08:49 PM

To boot a gpt disk in an mbr situation need a partition flagged as bios_grub. The partition doesn't need to be very large, an unformated 2mb parition will work. The partition is where grub-install --force /dev/sda will install the mbr boot code on the gpt disk that the mbr bios can find.

aggelalex 01-18-2016 12:15 PM

Yes, but I have a problem. I made /dev/sda3 unformatted 2mb and flaged it as bios_grub and then ran
Code:

grub-install --force --target=amd64 /dev/sda3
but this returns
Code:

grub-install: error: /usr/lib/grub/amd64/modinfo.sh doesn't exist. Please specify --target or --directory.
. What am I doing wrong?

colorpurple21859 01-18-2016 12:24 PM

just run grub-install --force /dev/sda grub will find the 2mb partition. If you get the no efi partition error then grub-install --force --target=i386-pc /dev/sda

aggelalex 01-18-2016 12:44 PM

Code:

lubuntu@lubuntu:~$ grub-install --force /dev/sda
Installing for i386-pc platform.
grub-install: error: cannot open directory `/boot/grub/i386-pc': No such file or directory.
lubuntu@lubuntu:~$ grub-install --force --target=amd64 /dev/sda
grub-install: error: /usr/lib/grub/amd64/modinfo.sh doesn't exist. Please specify --target or --directory.
lubuntu@lubuntu:~$

Found out that there is no `/usr/lib/grub/amd64` or `/boot/grub/i386-pc` myself too

colorpurple21859 01-18-2016 01:31 PM

you most likely have grub-efi installed instead of grub-pc, which IMO would indicate that lubuntu was installed in efi mode.
Quote:

I managed to make Boot-repair work in some way, but it says that the EFI partition was deleted, and now I have to create one at the start of the disk, but windows is there in ntfs and can't be moved
I don't think the efi partition has to be first on the hard drive, hard to say since every computer manufacture efi-boot-bios is different. you could try efi mode again if you have room somewhere to create a 200-300mb efi partition, or apt-get install grub-pc to continue on with trying to boot in mbr-bios mode, however I think with apt-get install grub-pc grub-efi will be uninstalled.


All times are GMT -5. The time now is 06:35 PM.