LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This 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


Reply
  Search this Thread
Old 01-06-2021, 10:02 AM   #61
colorpurple21859
LQ Veteran
 
Registered: Jan 2008
Location: florida panhandle
Distribution: Slackware Debian, Fedora, others
Posts: 7,345

Rep: Reputation: 1588Reputation: 1588Reputation: 1588Reputation: 1588Reputation: 1588Reputation: 1588Reputation: 1588Reputation: 1588Reputation: 1588Reputation: 1588Reputation: 1588

Quote:
I'm not sure why you are messing with the sources.list file
That started when attempting to install the boot-info script to get more info on the system.

Another thought
open a terminal
Code:
sudo nano /etc/grub.d/40_custom
add this after what is already there
Code:
menuentry 'windows 7'{
ntldr (hd0,1)/bootmgr
boot
}
run
Code:
sudo upddate-grub
reboot, you should now see the grub menu with an entry for windows.
If windows doesn't boot, at the grub menu hightligh the windows 7 entry, press e for edit, change the (hd0,1) as per post 58.
If you find one that works, change the /etc/grub.d/40_custom to the one that works and rerun update-grub. If you get a "ntldr" not found message, grub is installed in uefi mode.

Last edited by colorpurple21859; 01-06-2021 at 10:23 AM.
 
Old 01-06-2021, 01:23 PM   #62
quickbreakfast
Member
 
Registered: Oct 2015
Location: northern territory
Distribution: slackware 15
Posts: 335

Rep: Reputation: Disabled
Quote:
Originally Posted by AnneF View Post
Have you returned the cables back to their original configuration? If so what happened?

-----------------I HAVEN'T RECABLED ANYTHING,
-----------------I JUST REARRANGED THE BOOT ORDER
I offer my humble apologies. I mis read what was posted.
 
Old 01-06-2021, 01:39 PM   #63
quickbreakfast
Member
 
Registered: Oct 2015
Location: northern territory
Distribution: slackware 15
Posts: 335

Rep: Reputation: Disabled
I also missed in post #37 that sda1 is 105MB fat32, while neither sdb or sdc has a fat32 partition.

Quote:
Originally Posted by AnneF View Post
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:~$
so need to humbly apologise again.

The absence, or presence, of a fat32 partition is possibly creating a conflict preventing one OS from booting. Alas I'm not experienced enough to even suggest a cure.
 
Old 01-06-2021, 03:51 PM   #64
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: Slackware, Ubuntu, PCLinux,
Posts: 10,492

Rep: Reputation: 2488Reputation: 2488Reputation: 2488Reputation: 2488Reputation: 2488Reputation: 2488Reputation: 2488Reputation: 2488Reputation: 2488Reputation: 2488Reputation: 2488
Quote:
The absence, or presence, of a fat32 partition is possibly creating a conflict preventing one OS from booting.
That partition is the EFI partition as shown in the first post by the OP. The most likely scenario is that Ubuntu was booted and installed in UEFI mode while windows 7 is in all likelihood, installed in Legacy mode and Grub UEFI won't boot it. The OP was asked to mount and post the information on what is on that partition in an least two posts and never did so we really have no idea how the 2 systems were installed.
 
Old 01-07-2021, 08:54 AM   #65
auge
Member
 
Registered: May 2002
Location: Germany
Distribution: CentOS, Debian, LFS
Posts: 100
Blog Entries: 1

Rep: Reputation: Disabled
Considering the information in your fdisk -l Output:

To me it looks like there is an UEFI esp on the 500GB Hitachi disk and some ntfs-partitions. Then there are 2 other disks with a classic partition-table, one with an MBR.

Before you decide to make a new or different bootloader-config, please try to select the boot-device in your bios-splash-screen between the 500GB Hitachi Disk and the 500GB WD Disk. Assuming you never changed BIOS-settings regarding the use of EFI and both OS once worked, you most likely can use both parallely. There should be a hotkey like "Press F8 for BIOS-Bootscreen" or inside the BIOS-Menu a slection of the boot-order.

It is quite unusual that Win7 uses EFI and then your fresh Linux-Install does not, perhaps you did not have all these disks connected during install(?). Anyways you need to isolate next if the working Linux-System uses efi. When you have a folder /sys/firmware/efi and there is something inside, you came up with EFI.

When it is not: unplug all disks except the Hitachi 500GB and look if it boots into Windows. Then you have a windows-efi-config.
 
Old 01-07-2021, 09:12 AM   #66
colorpurple21859
LQ Veteran
 
Registered: Jan 2008
Location: florida panhandle
Distribution: Slackware Debian, Fedora, others
Posts: 7,345

Rep: Reputation: 1588Reputation: 1588Reputation: 1588Reputation: 1588Reputation: 1588Reputation: 1588Reputation: 1588Reputation: 1588Reputation: 1588Reputation: 1588Reputation: 1588
open a terminal, post the output of
Code:
cat /sys/firmware/efi
 
Old 01-07-2021, 02:37 PM   #67
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: Slackware, Ubuntu, PCLinux,
Posts: 10,492

Rep: Reputation: 2488Reputation: 2488Reputation: 2488Reputation: 2488Reputation: 2488Reputation: 2488Reputation: 2488Reputation: 2488Reputation: 2488Reputation: 2488Reputation: 2488
Quote:
please try to select the boot-device in your bios-splash-screen between the 500GB Hitachi Disk
Done and failed to boot with a black screen. See post 38.

Quote:
It is quite unusual that Win7 uses EFI and then your fresh Linux-Install does not
I think it would be more than unusual but certainly possible. If the OP had simply mounted that partition with the step by step instructions posted in post 18 and posted that info here, it would have been obvious which system(s) were using EFI as there would have been separate folders for Microsoft and ubuntu if both systems were EFI. The OP never did that.

The sda drive shows as a GPT drive with the output from parted while the others show msdos, the ones with Ubuntu on them which looks like two separate installs. sda1 has the required boot/esp flags.

Additionally, the OP indicated that when she tried to download a windows 7 iso she was informed that is was an OEM install and refused to download (post 56).

The OP could have also saved a lot of the hassle trying to get GParted and boot repair if using the Ubuntu install iso. GParted is on it and it's entirely possible to download boot repair on the Ubuntu iso/usb and wouldn't have had the problem with sources.list as it is a read-only medium and can't be changed.

The OP hasn't been back for 2 days so...
 
Old 01-07-2021, 03:43 PM   #68
colorpurple21859
LQ Veteran
 
Registered: Jan 2008
Location: florida panhandle
Distribution: Slackware Debian, Fedora, others
Posts: 7,345

Rep: Reputation: 1588Reputation: 1588Reputation: 1588Reputation: 1588Reputation: 1588Reputation: 1588Reputation: 1588Reputation: 1588Reputation: 1588Reputation: 1588Reputation: 1588
Following the instructions in post 61 would create a window boot entry, The grub menu would show up, determined if grub is loaded in efi or legacy when attempting to boot windows(no ntldr error in efi mode) and if grub is legacy mode and window is installed in legacy mode should boot with some trial and error.

Last edited by colorpurple21859; 01-07-2021 at 03:45 PM.
 
Old 01-07-2021, 06:13 PM   #69
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: Slackware, Ubuntu, PCLinux,
Posts: 10,492

Rep: Reputation: 2488Reputation: 2488Reputation: 2488Reputation: 2488Reputation: 2488Reputation: 2488Reputation: 2488Reputation: 2488Reputation: 2488Reputation: 2488Reputation: 2488
Quote:
Following the instructions in post 61 would create a window boot entry,
I expect so and if the OP had bothered to follow the detailed instructions by another member in post 18, anyone reading this thread would have known if Ubuntu/windows 7 were Legacy or UEFI.
 
Old 01-08-2021, 07:47 AM   #70
auge
Member
 
Registered: May 2002
Location: Germany
Distribution: CentOS, Debian, LFS
Posts: 100
Blog Entries: 1

Rep: Reputation: Disabled
Quote:
Originally Posted by yancek View Post
See post 38. [...]The OP hasn't been back for 2 days so...
Ah! Okay, I didn't realize this is already on Page 5 ;-)

Cheers
 
Old 01-16-2021, 04:32 PM   #71
AnneF
Member
 
Registered: Oct 2020
Location: North Carolina Mountains
Distribution: Just making the switch to Linux
Posts: 78

Original Poster
Rep: Reputation: Disabled
Ref #66
Quote:
Originally Posted by colorpurple21859 View Post
open a terminal, post the output of
Code:
cat /sys/firmware/efi
xxx@YODA:~$ cat /sys/firmware/efi
cat: /sys/firmware/efi: No such file or directory
xxx@YODA:~$

I also tried at boot:

grub> ntldr (hd0,1)/bootmgr

but got various unsuccessful responses with various partitions, for (hd0,1) it was that it couldn't find the file.

I also tried:

sudo update-grub

which was successful, but didn't change anything that I could see - still wouldn't boot windows with ubuntu booting first.
.

Last edited by AnneF; 01-16-2021 at 04:44 PM. Reason: addition
 
Old 01-16-2021, 04:50 PM   #72
AnneF
Member
 
Registered: Oct 2020
Location: North Carolina Mountains
Distribution: Just making the switch to Linux
Posts: 78

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by auge View Post
Ah! Okay, I didn't realize this is already on Page 5 ;-)

Cheers

Family member in hospital - out of town for a while. I have a grandson with primary progressive multiple sclerosis (this type of MS is a lot like ALS).


--Anne
.
 
Old 01-16-2021, 05:04 PM   #73
AnneF
Member
 
Registered: Oct 2020
Location: North Carolina Mountains
Distribution: Just making the switch to Linux
Posts: 78

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by ...Now follow the instructions at this site to repair the MBR (or google and pick a random site that explains how to fix the windows 7 MBR using a windows cd).

[URL
https://www.techwalla.com/articles/how-to-repair-the-mbr-on-windows-7[/URL]

If you dont have the windows 7 cd you can get the ISO from Microsoft and make a new one.

https://www.microsoft.com/en-us/soft...nload/windows7

If you don't know the windows product key its normally on the laptop somewhere, so have a look for the genuine windows sticker with a bunch of letters and numbers on it.

Hopefully that is helpful, if not I apologise and maybe someone else can help you.
Sorry, I thought I had replied to this a while back.

I already have backups of my windows7 system drive (TrueImage) and data drive (Secondcopy).

I bought this PC off-lease from a refurbisher a few years ago and I'm not sure they gave me the right (hand-labeled) repair CD. When I try to use it, I'm told it is not the right CD.

When I try to download an ISO from the sites you mentioned, I'm told my product key is from a pre-installed system and it won't allow me to download.
Anne

Last edited by AnneF; 01-16-2021 at 05:59 PM.
 
Old 01-16-2021, 05:56 PM   #74
AnneF
Member
 
Registered: Oct 2020
Location: North Carolina Mountains
Distribution: Just making the switch to Linux
Posts: 78

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by yancek View Post
Done and failed to boot with a black screen. See post 38.

The OP could have also saved a lot of the hassle trying to get GParted and boot repair if using the Ubuntu install iso. GParted is on it and it's entirely possible to download boot repair on the Ubuntu iso/usb and wouldn't have had the problem with sources.list as it is a read-only medium and can't be changed.
I'm not quite understanding all of this. I did boot from the USB ISO try-or-install thumbdrive and I ran GPARTED from it to get the information I posted about the drives in this thread.

You're saying I can download boot repair (onto or from?) the Ubuntu iso/usb (the one I made and installed from?).

(I think sources.list is fixed - I did everything with that that y'all told me to with that and it appeared to be successful, I think. At least it stopped looking for a CD.)

The part about modifying grub (post #18) with the "ntldr (hd0,1)/bootmgr ' I didn't do - because using that cmd in a terminal didn't work ("no such file found") and I didn't want to put it into the boot script if it wasn't even working in the terminal.

I don't understand what you are saying about boot repair from the Ubuntu installation thumb drive. How could that replace the win7 boot partition? If Ubuntu can boot windows7, could you please tell me the steps to do it? Could Ubuntu boot windows even if windows is unable to boot itself from it's own boot partition?

I'm concerned so many of the terminal instructions don't seem to complete successfully. I'm also having other anomalies: Firefox has stopped rendering pages correctly, I can't seem to "find" Abiword to install it, plus other things. I'm wondering if I should just make a current backup of my data, and Firefox bookmarks & passwords, and just make a new install USB with Kubuntu on it? I think Abiword comes with it, and I need a new install of Firefox and I don't know how to do these things in Ubuntu (apparently not "connected" to repositories). Since so many "sudo" cmds aren't working, maybe there is something wrong with my install. Maybe a new install would see windows7 & fix grub?

If I do this, since gparted says my win7 is installed as EFI, should I install Kubuntu NOT as "legacy" but as the other choice (UEFI?).

(Win10 was originally on this machine and when they replaced it with Win7, apparently they didn't do it correctly.)

If I have the same results with Kubuntu, I'll just have to buy another machine. I'd still like to use Linux, but after this experience, I'm afraid Linux will destroy my new machine's OS also.

Thanks,
Anne
.
 
Old 01-16-2021, 06:09 PM   #75
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: Slackware, Ubuntu, PCLinux,
Posts: 10,492

Rep: Reputation: 2488Reputation: 2488Reputation: 2488Reputation: 2488Reputation: 2488Reputation: 2488Reputation: 2488Reputation: 2488Reputation: 2488Reputation: 2488Reputation: 2488
In order to help others to help you, it would be useful if we could first determine if you have mixed installs, EFI Ubuntu and Legacy windows 7. Boot into Ubuntu and open a terminal and copy/paste each of the commands below into the terminal consecutively, hit the Enter key after each line. When you enter sudo su, you will be prompted for your primary user password so enter it and then hit the Enter key, your prompt should then be white. If you first enter sudo su, you will not need sudo for the other commands. When you have done that, post the output of the last command, ls /mnt/sda1/EFI. This will NOT repair anything but will give us useful information on which to try to help:

Quote:
sudo su
mkdir /mnt/sda1
mount /dev/sda1 /mnt/sda1
ls /mnt/sda1/EFI
If you want to get data off the drive from windows on the D partition (that is sda4) repeat the process as shown below while still in the terminal with sudo su enabled:

Quote:
mkdir /mnt/sda4
mount /dev/sda4 /mnt/sda4
ls /mnt/sda4
After you run the last command, it should show a list of directories/files on your data partition. You should then have no problem copying that data FROM the hard drive to another hard drive or flash/usb drive. It would be best if the hard drive/flash drive you are copying TO is formatted ntfs.

You can also access your C drive in a similar manner by repeating the commands above and entering sda3 in place of sda1/sda4 in the above commands. Understand that the steps outlined above are one time only and if you reboot Ubuntu, you will have to repeat the process so before trying to save data, have another disk available to copy to. If you try to access sda3, change the last ls command to the one below so that you can see your user name directory and the directories/files there.

Quote:
ls /mnt/sda3/Users

Last edited by yancek; 01-16-2021 at 06:11 PM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Partition/format advice: SSD + HDD, MBR/GPT mixture, win7 x64 dual-boot dad_ Linux - Hardware 6 01-17-2015 12:34 PM
UEIF Dual Boot Win7 & CentOS only boots Win7 wigglytoes Linux - General 3 12-30-2013 05:53 AM
Debian,Raid1, boot and totally destroyed hard drive replacement test Doctor_House Linux - Server 0 03-19-2013 03:44 AM
Dual-boot Linux Mint and XP destroyed XP MBR Shoebox49 General 13 05-11-2012 08:59 AM
Which program can boot a copy of the MBR (fake MBR) using mbr.bin Xeratul Linux - Software 6 12-03-2010 11:40 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 11:07 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration