Linux install apparently destroyed my Windows MBR or Boot partition (Win7 on a separate hard drive)
Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
You can see where the boot flag on any and every HDD by opening Gparted. Chances are Ubuntu will ask for the root password to open Gparted.
I searched for g-parted within gnome: nada, Ubuntu installed a gnome mines game, but did NOT install g-parted! I have a disk from 2008 that says gparted, but it is apparently non-bootable. When I mounted it, the only thing there is just a gparted.iso file from 2008.
Trying to figure out how to put Ubuntu 20.04 on a bootable thumb drive took me forever (days of reading pages & pages & pages to find something that actually worked) and I don't remember how I did THAT. It's the TIME that's killing me. I just wish I'd never started this - if I had known Linux would break windows, I would never have tried it. I'm so stressed out I feel like my heart is going to burst. This has gone on for 18 - now 19 - days JUST trying to get back into Windows where all my work software is.
How do I find gparted (or get it into a form that will run) to run it to view the flag? I searched everywhere in gnome - why in the world would Ubuntu have installed a GAME instead of Gparted?? Sorry, I guess you can tell how frustrated I'm becoming.
--Anne (fast melting down - if 19 days is fast) Thank you all so much for being here to help me.
.
remove "#" everywhere, but put "#" on first line "#deb cdrom...".
exit is control-X
Code:
GNU nano 4.8 /etc/apt/sources.list
deb cdrom:[Ubuntu 20.04.1 LTS _Focal Fossa_ - Release amd64 (20200731)]/ focal main rest>
# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
# newer versions of the distribution.
deb http://us.archive.ubuntu.com/ubuntu/ focal restricted main universe
# deb-src http://us.archive.ubuntu.com/ubuntu/ focal main restricted
## Major bug fix updates produced after the final release of the
## distribution.
# deb-src http://us.archive.ubuntu.com/ubuntu/ focal-updates main restricted
## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team. Also, please note that software in universe WILL NOT receive any
## review or updates from the Ubuntu security team.
# deb-src http://us.archive.ubuntu.com/ubuntu/ focal universe
# deb-src http://us.archive.ubuntu.com/ubuntu/ focal-updates universe
## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team, and may not be under a free licence. Please satisfy yourself as to
## your rights to use the software. Also, please note that software in
## multiverse WILL NOT receive any review or updates from the Ubuntu
## security team.
# deb-src http://us.archive.ubuntu.com/ubuntu/ focal multiverse
# deb-src http://us.archive.ubuntu.com/ubuntu/ focal-updates multiverse
## N.B. software from this repository may not have been tested as
## extensively as that contained in the main release, although it includes
## newer versions of some applications which may provide useful features.
## Also, please note that software in backports WILL NOT receive any review
## or updates from the Ubuntu security team.
# deb-src http://us.archive.ubuntu.com/ubuntu/ focal-backports main restricted universe >
## Uncomment the following two lines to add software from Canonical's
## 'partner' repository.
## This software is not part of Ubuntu, but is offered by Canonical and the
## respective vendors as a service to Ubuntu users.
# deb http://archive.canonical.com/ubuntu focal partner
deb http://security.ubuntu.com/ubuntu focal-security restricted main universe
# deb-src http://security.ubuntu.com/ubuntu focal-security main restricted
# deb-src http://security.ubuntu.com/ubuntu focal-security universe
# deb-src http://security.ubuntu.com/ubuntu focal-security multiverse
# This system was installed using small removable media
# (e.g. netinst, live or single CD). The matching "deb cdrom"
# entries were disabled at the end of the installation process.
# For information about how to configure apt package sources,
# see the sources.list(5) manual.
I understand that this is pretty much commented out, so it is instructions, except for the first line and the comments are telling you how to activate certain lines by uncommenting them. I know what I'm supposed to to with the sources.list, I just don't know how to get to it. I don't understand enough about Linux yet to know how to find sources.list and edit it. I expected to have TIME to learn Linux at a learning pace, while still getting my work done in Windows. And some of the stuff I would be uncommenting is scary - phrases like "ENTIRELY UNSUPPORTED" and "WILL NOT receive any updates" are kind of unnerving. I don't want to risk ANY harm to this Linux Install right now - my ONLY concern at the moment is getting back into Windows. Even though I understand WHAT is being asked, I don't know HOW to do it. --Anne
.
I searched for g-parted within gnome: nada, Ubuntu installed a gnome mines game, but did NOT install g-parted! I have a disk from 2008 that says gparted, but it is apparently non-bootable.
It is not g-parted, but gparted. Older installs might have it as parted.
It might be a sub folder/choice of the system. Applications>settings>gparted (a guess since I have never used gnome)
Quote:
I'm so stressed out I feel like my heart is going to burst. This has gone on for 18 - now 19 - days JUST trying to get back into Windows where all my work software is.
Chances are you can select the HDD you want to boot from, by pressing F10 or F11 or F12.
Since you've said you have your data on an external drive it is safe.
I know what I'm supposed to to with the sources.list, I just don't know how to get to it.
Copy and paste the command in post 31 above by JSB. I've never used the nano text editor so can't help with that. If you don't understand it, you can use the vi text editor by copying and entering the command below.
Quote:
sudo vi /etc/apt/sources.list
When the sources.list opens, put your computer mouse aside, you won't need it. Hit the i key on the keyboard, use the arrow keys on the keyboard to go to the beginning of the line you want to comment out and enter the hash mark (#) and hit the Del key. Use the arrow keys on the keyboard to go to the beginning of the other lines listed in post 25 above and remove the hash mark. When you finish, it the Esc key in the upper left of the keyboard, enter a colon ( : ) then hit the w and q keys consecutively and hit Enter and that should edit and save the changes.
If you still have the USB/DVD which you used to install Ubuntu, boot that and it has gparted on it already. Open a terminal and simply enter:
Code:
sudo gparted
YOu can install it easily on the installed Ubuntu with:
Quote:
sudo apt install gparted
Better to use GParted from the install USB/DVD. GParted has an online manual at the link below if you have trouble with it.
It didn't. That's commonly referred to as a PEBKAC error.
Something which should have been done is to take a look at the EFI partition to see if windows is actually installed EFI. You can do that by creating a mount point then mounting the partition from Ubuntu. Copy and paste the following commands consecutively.
Quote:
sudo mkdir /mnt/sda1
sudo mount /dev/sda1 /mnt/sda1
After doing that you can either open the file manager in Ubuntu and navigate to /mnt/sda1. You should see a folder name Microsoft if windows is EFI. Or you could stay in the terminal and run the following to show the output:
Quote:
sudo ls /mnt/sda1/EFI/
If you don't see a Microsoft folder then your windows is not EFI and the EFI directory was likely created when you installed Ubuntu.
From your first post:
A windows 7 install wouldn't have created an efi partition. A windows 8 or 10 or a linux system installed in uefi mode would have. How big is this efi partition?. Yours isn't the first thread I've seen on here where windows 7 came installed on an efi system in legacy mode that linux was installed in efi mode. An efi partition is suppose to be a fat partition, if it is ntfs probably came from the manufacture that way.
It was a refurbished off-lease Lenovo machine. this is the windows disk...(sorry, I couldn't past the image & the text was not selectable)
Thank you for showing me how to get this information without even more time spent trying to make a G-parted Live CD. Well, it looks like it is EFI with a GPT Partition Table, but my BIOS looks like legacy MBR. The boot partition (1st) is 105 MB and IS a FAT32 File System. Did they install Win7 wrong? It's been working fine for several years. I just lost access to windows when Ubuntu installed itself. Does the fact that windows was installed EFI make it harder to get it to boot again (or to get grub(?) to boot it? How can I get back to Windows?
Quote:
Originally Posted by Post the ouput of
[CODE
sudo parted -l[/CODE]
Code:
xxx@YODA:~$ sudo parted -l
[sudo] password for xxx:
Model: ATA Hitachi HDS72105 (scsi)
Disk /dev/sda: 500GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags:
Number Start End Size File system Name Flags
1 1049kB 106MB 105MB fat32 boot, esp
2 106MB 240MB 134MB Microsoft reserved partition msftres
3 240MB 133GB 133GB ntfs msftdata
4 133GB 343GB 210GB ntfs Basic data partition msftdata
Model: ATA WDC WD5000AAKX-2 (scsi)
Disk /dev/sdb: 500GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Disk Flags:
Number Start End Size Type File system Flags
1 1049kB 2002MB 2001MB primary ext4 boot
2 2003MB 318GB 316GB extended
5 2003MB 52.0GB 50.0GB logical ext4
6 52.0GB 68.0GB 16.0GB logical linux-swap(v1)
7 68.0GB 318GB 250GB logical ext4
Model: ATA WDC WD10EADX-22T (scsi)
Disk /dev/sdc: 1000GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Disk Flags:
Number Start End Size Type File system Flags
1 1049kB 2000MB 1999MB primary ext4
2 2001MB 318GB 316GB extended
5 2001MB 52.0GB 50.0GB logical ext4
6 52.0GB 68.0GB 16.0GB logical linux-swap(v1)
7 68.0GB 318GB 250GB logical ext4
3 318GB 1000GB 682GB primary ntfs
xxx@YODA:~$
When I try to close the prior "nano" terminal, which never gave me a prompt at the end; I'm told a process is still running. Is it safe to close it anyway?
Code:
GNU nano 4.8 /etc/apt/sources.list
deb cdrom:[Ubuntu 20.04.1 LTS _Focal Fossa_ - Release amd64 (20200731)]/ focal main rest>
# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
# newer versions of the distribution.
deb http://us.archive.ubuntu.com/ubuntu/ focal restricted main universe
# deb-src http://us.archive.ubuntu.com/ubuntu/ focal main restricted
## Major bug fix updates produced after the final release of the
## distribution.
# deb-src http://us.archive.ubuntu.com/ubuntu/ focal-updates main restricted
......
deb http://security.ubuntu.com/ubuntu focal-security restricted main universe
# deb-src http://security.ubuntu.com/ubuntu focal-security main restricted
# deb-src http://security.ubuntu.com/ubuntu focal-security universe
# deb-src http://security.ubuntu.com/ubuntu focal-security multiverse
# This system was installed using small removable media
# (e.g. netinst, live or single CD). The matching "deb cdrom"
# entries were disabled at the end of the installation process.
# For information about how to configure apt package sources,
# see the sources.list(5) manual.
JUST A BLINKING CURSOR BOX HERE, NO PROMPT (been about 30 minutes or more) Is it safe to close the terminal anyway?
Thanks, --Anne
I'm so confused and frustrated. Ah, so it's waiting for me to edit it in-situ! Never having done anything like that, I'd feel better with some kind of text editor.
So I can close that terminal safely, even tho it says it is processing something?
Last edited by AnneF; 01-03-2021 at 06:17 PM.
Reason: add sentence
It is not g-parted, but gparted. Older installs might have it as parted.
It might be a sub folder/choice of the system. Applications>settings>gparted (a guess since I have never used gnome)
Chances are you can select the HDD you want to boot from, by pressing F10 or F11 or F12.
Since you've said you have your data on an external drive it is safe.
Yes, I already tried that and I also moved the windows disk to the top of the boot sequence. It starts trying to do something with loading windows files, but then goes black and falls thru to boot Linux.
I searched for g-parted, gparted, and parted. But it's okay, yancek showed me how to install it and it appears to have installed correctly, although I haven't tried it yet.
Thanks for advice about running it from the install media (USB Live thumbdrive) when making changes to the HDD from which I'm running gparted.
.
Last edited by AnneF; 01-04-2021 at 03:29 PM.
Reason: spelling
GNU nano 4.8 /etc/apt/sources.list
deb cdrom:[Ubuntu 20.04.1 LTS _Focal Fossa_ - Release amd64 (20200731)]/ focal main rest>
Well done! This is the you want to edit.
Since the # tells your computer to ignore that line, in the above quote you want to put a # mark at the beginning of the line which starts deb cdrom: and remove the # from lines which begin deb-src
To do this there is/ should be a curser, in the top left hand corner of the terminal, press the down key till it is immediately (appears as an underline) under the d, then insert a # As previously suggested the mouse shouldn't have any effect........ use the keyboard.
Now move the curser under the # where the line has deb-src the and press delete.
Keep repeating this untill all lines which currently begin # deb-src no longer have the # at the beginning.
When you are happy with what you have done exit the file using ctrl-x
You may have to restart your electronic marvel for the changes to be effective.
xxx@YODA:~$ sudo parted -l
[sudo] password for xxx:
Model: ATA Hitachi HDS72105 (scsi)
Disk /dev/sda: 500GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags:
Number Start End Size File system Name Flags
1 1049kB 106MB 105MB fat32 boot, esp
2 106MB 240MB 134MB Microsoft reserved partition msftres
3 240MB 133GB 133GB ntfs msftdata
4 133GB 343GB 210GB ntfs Basic data partition msftdata
Model: ATA WDC WD5000AAKX-2 (scsi)
Disk /dev/sdb: 500GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Disk Flags:
Number Start End Size Type File system Flags
1 1049kB 2002MB 2001MB primary ext4 boot
2 2003MB 318GB 316GB extended
5 2003MB 52.0GB 50.0GB logical ext4
6 52.0GB 68.0GB 16.0GB logical linux-swap(v1)
7 68.0GB 318GB 250GB logical ext4
Both of these HDD's have boot flags, but the following does not
Quote:
Code:
Model: ATA WDC WD10EADX-22T (scsi)
Disk /dev/sdc: 1000GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Disk Flags:
Number Start End Size Type File system Flags
1 1049kB 2000MB 1999MB primary ext4
2 2001MB 318GB 316GB extended
5 2001MB 52.0GB 50.0GB logical ext4
6 52.0GB 68.0GB 16.0GB logical linux-swap(v1)
7 68.0GB 318GB 250GB logical ext4
3 318GB 1000GB 682GB primary ntfs
Quote:
When I try to close the prior "nano" terminal, which never gave me a prompt at the end; I'm told a process is still running. Is it safe to close it anyway?
I wouldn't.
Did you use ctrl-X, or try to close the terminal using the x in the top right hand corner?
I'll edit the source.list file tomorrow. I'm so exhausted and my brain so fried that I'm afraid I'll make silly mistakes tonight that could turn out to be serious.
Thank you so much for all of your time and help. --Anne
.
No not like this.
Plese remove "#" from line with "deb". put "#" in front of "deb cdrom".
Than command "sudo apt-get update".
Quote:
Originally Posted by AnneF
Code:
GNU nano 4.8 /etc/apt/sources.list
deb cdrom:[Ubuntu 20.04.1 LTS _Focal Fossa_ - Release amd64 (20200731)]/ focal main rest>
# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
# newer versions of the distribution.
deb http://us.archive.ubuntu.com/ubuntu/ focal restricted main universe
# deb-src http://us.archive.ubuntu.com/ubuntu/ focal main restricted
## Major bug fix updates produced after the final release of the
## distribution.
# deb-src http://us.archive.ubuntu.com/ubuntu/ focal-updates main restricted
## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team. Also, please note that software in universe WILL NOT receive any
## review or updates from the Ubuntu security team.
# deb-src http://us.archive.ubuntu.com/ubuntu/ focal universe
# deb-src http://us.archive.ubuntu.com/ubuntu/ focal-updates universe
## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team, and may not be under a free licence. Please satisfy yourself as to
## your rights to use the software. Also, please note that software in
## multiverse WILL NOT receive any review or updates from the Ubuntu
## security team.
# deb-src http://us.archive.ubuntu.com/ubuntu/ focal multiverse
# deb-src http://us.archive.ubuntu.com/ubuntu/ focal-updates multiverse
## N.B. software from this repository may not have been tested as
## extensively as that contained in the main release, although it includes
## newer versions of some applications which may provide useful features.
## Also, please note that software in backports WILL NOT receive any review
## or updates from the Ubuntu security team.
# deb-src http://us.archive.ubuntu.com/ubuntu/ focal-backports main restricted universe >
## Uncomment the following two lines to add software from Canonical's
## 'partner' repository.
## This software is not part of Ubuntu, but is offered by Canonical and the
## respective vendors as a service to Ubuntu users.
# deb http://archive.canonical.com/ubuntu focal partner
deb http://security.ubuntu.com/ubuntu focal-security restricted main universe
# deb-src http://security.ubuntu.com/ubuntu focal-security main restricted
# deb-src http://security.ubuntu.com/ubuntu focal-security universe
# deb-src http://security.ubuntu.com/ubuntu focal-security multiverse
# This system was installed using small removable media
# (e.g. netinst, live or single CD). The matching "deb cdrom"
# entries were disabled at the end of the installation process.
# For information about how to configure apt package sources,
# see the sources.list(5) manual.
I understand that this is pretty much commented out, so it is instructions, except for the first line and the comments are telling you how to activate certain lines by uncommenting them. I know what I'm supposed to to with the sources.list, I just don't know how to get to it. I don't understand enough about Linux yet to know how to find sources.list and edit it. I expected to have TIME to learn Linux at a learning pace, while still getting my work done in Windows. And some of the stuff I would be uncommenting is scary - phrases like "ENTIRELY UNSUPPORTED" and "WILL NOT receive any updates" are kind of unnerving. I don't want to risk ANY harm to this Linux Install right now - my ONLY concern at the moment is getting back into Windows. Even though I understand WHAT is being asked, I don't know HOW to do it. --Anne
.
Afer I logged off yesterday, I got thinking (always dangerous with me) and became suspicious that I may of helped drag you down a rabbit hole into fixing problems you didn't innitially want fixed. So I went back and checked your first post and found.
Quote:
Originally Posted by AnneF
There are 3 hard drives, with Win7 Pro 64-bit on 500GB Disk0
I'm desperate because all my work software is on the window disk drive.
I have Acronis True Image files of Partition C (Win7 System), as well as backups of Partition D (my data) and I have tried to restore the C partition (including track 0) by booting from CD and restoring an image. This did not work, I suppose because the problem is not in Partition C, but in the two preceding (but hidden if I remember correctly) first two partitions. When I tried to boot from CD and "Repair" the Win7 install (I don't remember seeing anything that would allow me to "restore" the MBR or Boot Loader), that did not work either.
I tried to re-install Windows7, but apparently the CD I have won't do a clean install.
I do have an old Windows XP CD that IS an install CD - is the boot info the same in both Win7 & XP?
I had been concerned that Windows would not play nice with Linux - I had no idea that installing Linux would kill Windows like this.
Can any of you help me with steps 1,2,3 etc., in plain English,--AnneF
.
Maybe, not being a ubuntu user, either, you can update grub so that at the relevant screen you can choose to boot into windoze. Let's see whether it is possible. My reference to this suggestion is https://itsfoss.com/update-grub/
type
Code:
sudo update-grub
when it has finished, you may be able to get to the choose windoze from ubuntu. To check you'll need to reboot. I offer no guarentees this will work.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.