LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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 04-26-2021, 03:18 AM   #1
rsp2
LQ Newbie
 
Registered: Apr 2021
Location: India
Distribution: Leap 15.2
Posts: 6

Rep: Reputation: Disabled
Installation of Grub2 on Extended Partition To Leave MBR for Dual-Booting Windows


Hi All,

I am on Dell Inspiron laptop 2014 vintage which I had converted into a dual booting with Windows 10 and OpenSUSE, various versions in the past. Now the Windows is corrupted and I have to reinstall the Dual Boot system.
Recently I had installed Windows 7 and then Leap-15.2 (Gnome Desktop) on a primary partition. Mounted my /home (on a logical partition) on that root and on another logical partition, I installed the KDE Desktop. Grub2 was installed to MBR.
The Windows did not start but both the Desktops on Primary and Logical partitions worked. I installed in the like manner again, this time with Windows 8 and again the windows did not start.
The question that I would like to ask is:

If Grub2 is installed to the Extended partition will it start all the three operating systems?

Thanks & Regards,

RSP2
 
Old 04-26-2021, 04:18 AM   #2
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,153

Rep: Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125
Quote:
Originally Posted by rsp2 View Post
If Grub2 is installed to the Extended partition will it start all the three operating systems?
No.
To be the boot loader in control, grub will have to be installed to the MBR.

Your description is somewhat confusing - installing a second desktop environment does not require a different partition. So are we to assume you installed 2 Linux (maybe 2 of Leap) as you imply elsewhere.
We need more info than "windows did not start". Let's see fstab and the output of this.
Code:
lsblk -f
 
Old 04-26-2021, 04:55 AM   #3
mrmazda
LQ Guru
 
Registered: Aug 2016
Location: SE USA
Distribution: openSUSE 24/7; Debian, Knoppix, Mageia, Fedora, others
Posts: 5,878
Blog Entries: 1

Rep: Reputation: 2078Reputation: 2078Reputation: 2078Reputation: 2078Reputation: 2078Reputation: 2078Reputation: 2078Reputation: 2078Reputation: 2078Reputation: 2078Reputation: 2078
Quote:
Originally Posted by syg00 View Post
To be the boot loader in control, grub will have to be installed to the MBR.
I have Grub on MBR on 0 of 40+ multiboot PCs, only ever on a partition, and also, 0 on the extended. Several of these PCs have Windows XP or Windows 10. All chainload Windows via Grub. Here's a peek at one with Win10:
Code:
# parted -l
Model: ATA ST3750525AS (scsi)
Disk /dev/sda: 750GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos

Number  Start   End     Size    Type      File system     Flags
 1      1049kB  420MB   419MB   primary   ntfs            type=07
 2      420MB   2518MB  2097MB  primary   linux-swap(v1)  type=82
 3      2518MB  2937MB  419MB   primary   ext2            boot, type=83
 4      2937MB  750GB   747GB   extended                  type=05
 5      2937MB  7284MB  4347MB  logical   linux-swap(v1)  type=82
 6      7284MB  57.6GB  50.3GB  logical   ntfs            type=07
 7      57.6GB  57.9GB  264MB   logical   fat16           type=f6
 8      57.9GB  68.4GB  10.5GB  logical   ext4            type=83
...
DFSee Linux  16.7 : Executing: fdisk -r- -w-
Command timestamp : Wednesday 2020-11-11 01:59:44
+---+--+--+-----------------+--------+--------+-----------+----------------------------------------+-----------+
|ID |ux|Dr|Type, description|Format  |Related |VolumeLabel|OS2-LVM/BM / GPT / Crypt / additional in|  Size MiB |
+--[/dev/sda     MBR disk  1]--------+--------+-----------[st3750525as9VP9GT8M]--------------------+-----------+
|01 |  |  |FreeSpace Wasted |-- -- --|-- -- --|- - - - - -|                                        |        1.0|
|01*| 1|  |Prim 07 Inst-FSys|NTFS    |Win NT  |P01WINBOOT |P01 winboot          P01 winboot        |      400.0|
|02 | 2|  |Prim 82 SunS/SWAP|SWAP    |LinuxV1 |SWAPSPACE2 |P02 dummy            P02 dummy          |     2000.0|
|03>| 3|  |Prim 83 LinuxNatv|EXT2    |GRUB    |03linboot  |P03 linboot          P03 linboot        |      400.0|
|04 | 5|  |Log  82 SunS/SWAP|SWAP    |LinuxV1 |SWAPSPACE2 |P05 swapper          P05 swapper        |     4146.0|
|05 | 6|  |Log  07 Inst-FSys|NTFS    |Win NT  |WinSYS     |P06 winsys           P06 winsys         |    48000.0|
|06 | 7|  |Log  f6 Unknown  |FAT16   |mkfs.fat|FATDATA    |P07 FAT DATA E:      P07 FAT DATA E:    |      252.0|
|07*| 8|  |Log  83 LinuxNatv|EXT4    |GRUB    |08os13164  |P08 suse 13164       P08 suse 13164     |    10000.0|
...
 
1 members found this post helpful.
Old 04-26-2021, 05:03 AM   #4
mrmazda
LQ Guru
 
Registered: Aug 2016
Location: SE USA
Distribution: openSUSE 24/7; Debian, Knoppix, Mageia, Fedora, others
Posts: 5,878
Blog Entries: 1

Rep: Reputation: 2078Reputation: 2078Reputation: 2078Reputation: 2078Reputation: 2078Reputation: 2078Reputation: 2078Reputation: 2078Reputation: 2078Reputation: 2078Reputation: 2078
Check in YaST Bootloader to ensure that "Probe Foreign OS" is enabled. Sometimes even if checked, Windows is omitted from Grub's menu on installation, but if YaST is Bootloader is run again after installation with it checked, and any trivial change, such as the timeout value, is made and saved, then Windows will show up on next boot. Installation of a new kernel will produce the same result, as long as the box is checked.
 
1 members found this post helpful.
Old 04-26-2021, 05:05 AM   #5
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,153

Rep: Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125
How does that help answer the OPs concerns ?.
 
1 members found this post helpful.
Old 04-26-2021, 05:49 AM   #6
rsp2
LQ Newbie
 
Registered: Apr 2021
Location: India
Distribution: Leap 15.2
Posts: 6

Original Poster
Rep: Reputation: Disabled
Hi,
Here is the output of both commands.
Probing foreign OS is properly marked in the Yast and Windows appears in the Boot Menu.

Quote:
rsp@dell-linux:~> parted -l
Absolute path to 'parted' is '/usr/sbin/parted', so running it may require superuser privileges (eg. root).
rsp@dell-linux:~> sudo parted -l
[sudo] password for root:
Model: ATA ST1000LM024 HN-M (scsi)
Disk /dev/sda: 1000GB
Sector size (logical/physical): 512B/4096B
Partition Table: msdos
Disk Flags:

Number Start End Size Type File system Flags
1 1049kB 126GB 126GB primary ntfs boot, type=07
3 126GB 227GB 101GB primary ext4 type=83
4 227GB 1000GB 773GB extended type=05
5 227GB 390GB 163GB logical ntfs type=07
6 390GB 837GB 447GB logical ext4 type=83
8 837GB 963GB 126GB logical ext4 type=83
7 963GB 1000GB 37.2GB logical linux-swap(v1) type=82




rsp@dell-linux:~> lsblk -f
NAME FSTYPE LABEL UUID FSAVAIL FSUSE% MOUNTPOINT
sda
├─sda1 ntfs DA3268CA3268AD67
├─sda3 ext4 0b53d075-f4d8-4d80-9ac5-3a2cfd10896a 80.6G 8% /
├─sda4
├─sda5 ntfs WINDATA 745E120D5E11C8AE
├─sda6 ext4 RSP-HOME 3df0e818-597c-4e20-9919-3c8c4043c51d 215.6G 47% /home
├─sda7 swap e124b915-36d2-4d89-986b-19a8b86113c0 [SWAP]
└─sda8 ext4 663fc541-708f-4954-a1e4-3c9b8e412dab
sr0
rsp@dell-linux:~>
Regards,
RSP2
 
Old 04-26-2021, 06:21 AM   #7
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: Slackware, Ubuntu, PCLinux,
Posts: 10,573

Rep: Reputation: 2499Reputation: 2499Reputation: 2499Reputation: 2499Reputation: 2499Reputation: 2499Reputation: 2499Reputation: 2499Reputation: 2499Reputation: 2499Reputation: 2499
I find your post confusing as originally you had windows 10 and Opensuse installed and booting and then your windows 10 was corrupted. Depending upon the problem, if windows is corrupted in some manner Grub won't boot it. More specifics would be needed.

You then indicate that you installed windows 7 and Opensuse again. If your original Opensuse was still working, why did you reinstall andd did you reinstall it to the same partition(s) as previously and install windows 7 to the same partition on which you previously had windows 10?

Did you install windows 8 after Opensuse and if so, did you run grub-mkconfig from Opensuse after the install? Does your Opensuse boot without problems?

Since you have a Legacy system, it is possible to boot a Linux system from windows if that's what you want. You should be able to find a number of sites with explanations with an online search. It's definitely not as simple as installing Grub.

Quote:
I have Grub on MBR on 0 of 40+ multiboot PCs, only ever on a partition, and also, 0 on the extended. Several of these PCs have Windows XP or Windows 10. All chainload Windows via Grub. Here's a peek at one with Win10:
I don't see how that helps the OP. Perhaps if you explained it then how you did this it would be helpful.
 
Old 04-26-2021, 07:05 AM   #8
mrmazda
LQ Guru
 
Registered: Aug 2016
Location: SE USA
Distribution: openSUSE 24/7; Debian, Knoppix, Mageia, Fedora, others
Posts: 5,878
Blog Entries: 1

Rep: Reputation: 2078Reputation: 2078Reputation: 2078Reputation: 2078Reputation: 2078Reputation: 2078Reputation: 2078Reputation: 2078Reputation: 2078Reputation: 2078Reputation: 2078
Quote:
Originally Posted by rsp2 View Post
Probing foreign OS is properly marked in the Yast and Windows appears in the Boot Menu.
Did you try changing the timeout value in YaST Bootloader, saving, then rebooting? If yes, but it does not help, please get the script from https://github.com/arvidjaar/bootinfoscript, and run it like so
Code:
sudo sh bootinfoscript --stdout | susepaste
and provide one of the resulting URLs here for our analysis. It will include the content of /etc/fstab that syg00 asked for in post #2.

From the command output provided, it looks like you have two openSUSE installations, one on /dev/sda3, the other on /dev/sda8. One problem could possibly be having installed on sda8 after windows and after the installation on sda3, while Grub is currently in control of the bootloader of the one you are not booting to run YaST in. It could be the one on sda8 has its Grub on sda8 instead of MBR, but more likely it too installed to MBR, thus overwriting what the one on sda3 put there. The output from bootinfoscript should be enlightening, hopefully enough to solve this.

What is meant by "the dual boot system"? "Dual" in the context of booting means two installed operating systems that can be selected to choose to boot from. It looks like you have three, which is multiboot/multi-boot.
 
1 members found this post helpful.
Old 04-26-2021, 08:18 AM   #9
rsp2
LQ Newbie
 
Registered: Apr 2021
Location: India
Distribution: Leap 15.2
Posts: 6

Original Poster
Rep: Reputation: Disabled
Hi Mmazda,

Your questions answered as below:

1. Did you try changing the timeout value in YaST Bootloader, saving, then rebooting?
Amswer: No.

2. Result of running the bootinfoscript and /etc/fstab:

Quote:
rsp@dell-linux:~/software/cloning-application/bootinfoscript-master> sudo sudo sh bootinfoscript --stdout | susepaste
[sudo] password for root:
Pasted as:
https://susepaste.org/71395797
https://paste.opensuse.org/71395797
Link is also in your clipboard.
rsp@dell-linux:~/software/cloning-application/bootinfoscript-master> cd
rsp@dell-linux:~> sudo cat /etc/fstab
UUID=0b53d075-f4d8-4d80-9ac5-3a2cfd10896a / ext4 defaults 0 1
UUID=3df0e818-597c-4e20-9919-3c8c4043c51d /home ext4 data=ordered 0 2
UUID=e124b915-36d2-4d89-986b-19a8b86113c0 swap swap defaults 0 0
rsp@dell-linux:~>
3. From the command output provided, it looks like you have two openSUSE installations, one on /dev/sda3, the other on /dev/sda8.

Ans: Yes, rigt you are.

4. "From the command output provided, it looks like you have two openSUSE installations, one on /dev/sda3, the other on /dev/sda8. One problem could possibly be having installed on sda8 after windows and after the installation on sda3, while Grub is currently in control of the bootloader of the one you are not booting to run YaST in. It could be the one on sda8 has its Grub on sda8 instead of MBR, but more likely it too installed to MBR, thus overwriting what the one on sda3 put there. The output from bootinfoscript should be enlightening, hopefully enough to solve this."

Ans: Yes there are two Leap 15.2 installations as you have stated. The rest of the reason could be as you mentioned. I am not certain but.

5."What is meant by "the dual boot system"? "Dual" in the context of booting means two installed operating systems that can be selected to choose to boot from. It looks like you have three, which is multiboot/multi-boot."

Ans: Yes. I have three os shown in the Boot Menu: Leap-15.2 on /dev/sda3
Windows 7
Leap-15.2 on /dev/sda8
So, yes the correct terminology is 'Multiboot'

Leap was reinstalled because windows had to be reinstalled. I do not have Windows 10 so I installed Windows 7 which I had. Also have Windows 8.

6. "Did you try changing the timeout value in YaST Bootloader, saving, then rebooting?"

Ans: No

Hope I have clarified all issues?

Regards,

RSP2
 
Old 04-26-2021, 04:06 PM   #10
mrmazda
LQ Guru
 
Registered: Aug 2016
Location: SE USA
Distribution: openSUSE 24/7; Debian, Knoppix, Mageia, Fedora, others
Posts: 5,878
Blog Entries: 1

Rep: Reputation: 2078Reputation: 2078Reputation: 2078Reputation: 2078Reputation: 2078Reputation: 2078Reputation: 2078Reputation: 2078Reputation: 2078Reputation: 2078Reputation: 2078
Quote:
Originally Posted by rsp2 View Post
Leap was reinstalled because windows had to be reinstalled. I do not have Windows 10 so I installed Windows 7 which I had. Also have Windows 8.
You have Win8, but it's not installed, while you have Win7, and it is installed?

Quote:
Quote:
6. "Did you try changing the timeout value in YaST Bootloader, saving, then rebooting?"
Ans: No
Please try adding or subtracting a timeout second in YaST Bootloader, saving, then rebooting, being sure to make this change that you are booted to the installation of Leap on sda3, if it is the one you intend to actually use. Otherwise, make sure it is the other. If you plan to regularly use both, I'm not sure what to suggest, as each time either one updates its grub, it can be expected to usurp control from the other. The result will be you won't know which one the first menu choice will boot without striking the E key on menu arrival to see which partition is root, due to identically labeled menus each will generate.
 
Old 04-26-2021, 04:19 PM   #11
mrmazda
LQ Guru
 
Registered: Aug 2016
Location: SE USA
Distribution: openSUSE 24/7; Debian, Knoppix, Mageia, Fedora, others
Posts: 5,878
Blog Entries: 1

Rep: Reputation: 2078Reputation: 2078Reputation: 2078Reputation: 2078Reputation: 2078Reputation: 2078Reputation: 2078Reputation: 2078Reputation: 2078Reputation: 2078Reputation: 2078
Quote:
Originally Posted by rsp2 View Post
The analysis shows each of the two Leap Grub menus contains menu selections to boot both Windows and the other Leap. These are found via "Advanced options" in each Grub boot menu. Have you tried opening "Advanced options" to boot Windows?
 
Old 04-26-2021, 10:06 PM   #12
rsp2
LQ Newbie
 
Registered: Apr 2021
Location: India
Distribution: Leap 15.2
Posts: 6

Original Poster
Rep: Reputation: Disabled
Hi All,

Many have replied to my original mail and many have asked many questions which I have answered patiently and to the best of my ability. I am not a 'geek' but a writer who is using OpenSuse's latest OS, Leap 15.2 to write books. Being a lay-user, I may not be aware of many aspects of Linux in details. But I am also a long time lay user of Linux and started learning it from the website 'https://www.linuxfromscratch.org' long years back when most current Linux distributions had not yet taken birth.
This was my first post here at the end of which, I asked a question. That question was:
"If Grub2 is installed to the Extended partition will it start all the three operating systems?"
I am sorry to note that no one has answered this question clearly.
I request someone to answer it in simple terms, please.

Thanks & Regards,

RSP2
 
Old 04-26-2021, 10:48 PM   #13
Emerson
LQ Sage
 
Registered: Nov 2004
Location: Saint Amant, Acadiana
Distribution: Gentoo ~amd64
Posts: 7,665

Rep: Reputation: Disabled
See post #2, it is very clear to me.
 
Old 04-26-2021, 10:57 PM   #14
mrmazda
LQ Guru
 
Registered: Aug 2016
Location: SE USA
Distribution: openSUSE 24/7; Debian, Knoppix, Mageia, Fedora, others
Posts: 5,878
Blog Entries: 1

Rep: Reputation: 2078Reputation: 2078Reputation: 2078Reputation: 2078Reputation: 2078Reputation: 2078Reputation: 2078Reputation: 2078Reputation: 2078Reputation: 2078Reputation: 2078
Quote:
Originally Posted by rsp2 View Post
"If Grub2 is installed to the Extended partition will it start all the three operating systems?"
I am sorry to note that no one has answered this question clearly.
I cannot say from first hand experience whether it can or cannot, because I've never installed it there. What my experience does say, is that if Grub can be installed somewhere, it can be used to boot whatever is available to be booted on the system on which installed. Thus, I have to think it can, so, a qualified yes.
 
Old 04-27-2021, 05:43 AM   #15
Emerson
LQ Sage
 
Registered: Nov 2004
Location: Saint Amant, Acadiana
Distribution: Gentoo ~amd64
Posts: 7,665

Rep: Reputation: Disabled
In case of legacy boot the bootloader must be installed on MBR, because this is the only place where BIOS executes it. In case the booloader is installed somewhere else then it must be chainloaded by another booloader.
 
  


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
understanding grub2, mbr, primary/secondary drives, and dual booting demerson3 Debian 7 09-23-2018 03:06 PM
Which program can boot a copy of the MBR (fake MBR) using mbr.bin Xeratul Linux - Software 6 12-03-2010 11:40 PM
slackware 11.0 -- to leave or not to leave out the 2.4 kernel? aquilolumen Slackware - Installation 7 06-30-2007 07:12 PM
Messed up my MBR, now GRUB and Extended Partition Info lost Q-Continuum SUSE / openSUSE 16 05-07-2007 02:29 AM
Leave it on or leave it off? admanb Linux - Hardware 4 03-08-2004 12:49 PM

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

All times are GMT -5. The time now is 11:14 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