This is my first time installing Ubuntu and I could really use your help.
I had a Windows 10 (BIOS Legacy) installation on my laptop and decided to dual boot with Ubuntu 16.4 from a USB, not using EFI(UEFI), but legacy installation again as well.
After shrinking my C: partition by 50GB, I restarted Windows a couple of times, disabled quick startup and ran chkdsk on C:.
Later when opening the Ubuntu installer, I could see only "Install Ubuntu alongside FreeDOS", not "Windows 10", so the installer couldn't detect Windows, but silly me, I thought that this would fix itself when I install Ubuntu.
I decided to use the "Something else" option and gave 2GB for swap, and 48GB for root.
Now when starting my laptop, I can select Ubuntu, FreeDOS and Windows Recovery Environment (which if I choose doesn't boot Windows, but displays only "One key recovery partition has damaged, so do not launch the main application" and I think this loader is there because my laptop is Lenovo and they have these one key recovery options).
I should mention that I can access all my files from Ubuntu in the partition where Windows is installed "C:"(/sda2), so I'm guessing I should be able to boot Windows again.
This is my log after running boot-repair: http://paste.ubuntu.com/25594317/
Output of sudo lsblk -o NAME,FSTYPE,SIZE,MOUNTPOINT,LABEL
NAME FSTYPE SIZE MOUNTPOINT LABEL
sr0 1024M
sda 931,5G
├─sda4 ntfs 1000M PBR_DRV
├─sda2 ntfs 150G /media/blaskowitz/F05A1F705A1F32B8
├─sda7 ext4 48,1G /
├─sda5 ntfs 729,6G Local Disk
├─sda3 1K
├─sda1 vfat 1000M
└─sda6 swap 1,9G [SWAP]
Output of fdisk -l
Disk /dev/sda: 931,5 GiB, 1000204886016 bytes, 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
Disklabel type: dos
Disk identifier: 0xd9fa2484
Device Boot Start End Sectors Size Id Type
/dev/sda1 * 2048 2050047 2048000 1000M b W95 FAT32
/dev/sda2 2050048 316624895 314574848 150G 7 HPFS/NTFS/exFAT
/dev/sda3 316626942 1951475711 1634848770 779,6G f W95 Ext'd (LBA)
/dev/sda4 1951475712 1953523711 2048000 1000M 2 XENIX root
/dev/sda5 421484544 1951475711 1529991168 729,6G 7 HPFS/NTFS/exFAT
/dev/sda6 316626944 320624639 3997696 1,9G 82 Linux swap / Solaris
/dev/sda7 320626688 421480447 100853760 48,1G 83 Linux
Partition 3 does not start on physical sector boundary.
Partition table entries are not in disk order.
I just looked at my partition table and it seems that your Windows OS partitions' boot flag was removed. It you look at what you posted, the *
on /dev/sda1
is only 1G and is marked as BOOT. Unless you loaded your bootloader on that partition.
If we take a look at your partition table, we see that you have 2 partitions that are NTFS which is the format windows uses. You have /dev/sda2
and /dev/sda5
. Figure out which one of those 2 is the one with the windows installation by mounting them. Once you figure out which one has the windows installation then you can set a boot flag on it:
being the partition number that has the windows installation on it, you have 2 and 5 available.
We can start by mounting both of them, one at a time and checking their contents.
I know you already mentioned that your files are in /dev/sda2
but im writing these instructions for others who have it different.
mkdir ~/MOUNT
<- This will create a temporary directory for us to mount our partition in your home folder. So the path of this folder will be/home/user/MOUNT
so you can browse to it via file manager GUI.sudo mount -t ntfs -o uid=user,gid=user /dev/sda2 ~/MOUNT
<- This will mount the second partition as NTFS in the directory we just created. As well as mounting it as your current username that way you can browse to it freely. If theuid
and orgid
are not added for your user, it will mount asroot
and onlyroot
can browse to it.- If the command completed without error, you should be able to browse in the directory from a file manager and check if it contains your windows installation.
sudo umount /dev/sda2
<- This will unmount your partition.
Now repeat the same steps (1-4) for /dev/sda5
if /dev/sda2
was not where Windows was installed.
Before we make any changes, lets update grub first then reboot and see if that helped (see #5).
Now that you figured out which partition has the Windows installation, and updating grub prior did not have an effect, you can try to manually set a boot flag on your windows partition.
sudo fdisk /dev/sda
- In the menu, press
a
and it will ask which partition to add a boot flag. Which ever you find out has the windows installation, that will be the number you will enter. - Once you have made your choice, you can press
P
to print out the current partition table and make sure the partition you typed has been marked with an*
in theBoot
column. - Once you have verified that everything is correct, you can press
w
to write changes to the partition table and exit. - Now we need to update grub with
sudo update-grub
orsudo update-grub2
, depending on the version of grub you are using.
Let us know if you need more help!
No comments:
Post a Comment