LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 07-01-2019, 11:17 AM   #1
centguy
Member
 
Registered: Feb 2008
Posts: 635
Blog Entries: 1

Rep: Reputation: 48
chainload


recently i think about the concept of dual boot.
To boot up a Windows under legacy grub,

Quote:
title Windows
rootnoverify (hd0,0)
chainloader +1
Question: Does this boot Windows directly or it chainloads
to the Windows's bootloader which then boots up Windows.

In reality Windows can be booted up, but I cannot tell
if it is the first interpretation or the second.

If the second, then how can the Windows bootloader
be found both in MBR (i.e., hd0) and in /dev/sda1 (i.e., (hd0,0) ).
Does it means in the old days, windows installation installs
the bootloader to two places: one to MBR and second
to the first sector of the first
partition?

This is an academic question that intrigues me.
 
Old 07-01-2019, 01:01 PM   #2
ehartman
Senior Member
 
Registered: Jul 2007
Location: Delft, The Netherlands
Distribution: Slackware
Posts: 1,674

Rep: Reputation: 888Reputation: 888Reputation: 888Reputation: 888Reputation: 888Reputation: 888Reputation: 888
Quote:
Originally Posted by centguy View Post
Question: Does this boot Windows directly or it chainloads
to the Windows's bootloader which then boots up Windows.
grub doesn't know how to boot up windows, so it chains TO the Windows bootloader.
BTW: lilo does it the same way (with a bit different syntax);
Code:
# MS bootable partition config begins
other = /dev/sda1
  label = MS-Win
  table = /dev/sda
# MS bootable partition config ends
which chains to the bootloader on partition sda1
 
Old 07-01-2019, 03:59 PM   #3
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: Slackware, Ubuntu, PCLinux,
Posts: 10,539

Rep: Reputation: 2496Reputation: 2496Reputation: 2496Reputation: 2496Reputation: 2496Reputation: 2496Reputation: 2496Reputation: 2496Reputation: 2496Reputation: 2496Reputation: 2496
Quote:
Does it means in the old days, windows installation installs
the bootloader to two places: one to MBR and second
to the first sector of the first
partition?
Some of the windows boot code would go in the MBR and the majority of the boot code/files in the bootable partition. Same with Grub or Grub2 on Legacy systems.
 
Old 07-01-2019, 08:50 PM   #4
centguy
Member
 
Registered: Feb 2008
Posts: 635

Original Poster
Blog Entries: 1

Rep: Reputation: 48
Thank yancek:

Quote:
Some of the windows boot code would go in the MBR and the majority of the boot code/files in the bootable partition. Same with Grub or Grub2 on Legacy systems.
It is remarkable that Linux bootloaders can work with the second majority part of Windows's bootloader
so to allow a proper chainloading to the "partial" Windows bootloader.
Amazing..
 
Old 07-01-2019, 08:55 PM   #5
centguy
Member
 
Registered: Feb 2008
Posts: 635

Original Poster
Blog Entries: 1

Rep: Reputation: 48
Thanks also to ehartman
for a useful statement:

grub doesn't know how to boot up windows


I mark this as solved.
 
Old 07-02-2019, 05:13 AM   #6
ehartman
Senior Member
 
Registered: Jul 2007
Location: Delft, The Netherlands
Distribution: Slackware
Posts: 1,674

Rep: Reputation: 888Reputation: 888Reputation: 888Reputation: 888Reputation: 888Reputation: 888Reputation: 888
Quote:
Originally Posted by centguy View Post
grub doesn't know how to boot up windows
Essential all other O/S'es but Unix/Linux are treated as "other" which have to be chainloaded to their own bootloader. grub wouldn't know what files to search for and how the file system those files are IN works.
 
Old 07-05-2019, 03:03 AM   #7
emma199
LQ Newbie
 
Registered: Jul 2019
Posts: 2

Rep: Reputation: Disabled
Thanks for the information.
 
  


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
grub1 floppy chainload grub2 pavel989 Linux - General 3 02-02-2010 10:58 AM
chainload extended partition with grub legacy mk27 Linux - Software 4 12-03-2009 07:30 PM
[SOLVED] how can a boot sector be repaired to then allow grub to install for chainload booting james2b Linux - Newbie 20 10-08-2009 09:07 PM
So I want to chainload? betula Linux - Desktop 16 08-04-2009 04:46 AM
Chainload an OS Ashrack Linux - Software 9 01-23-2007 07:14 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

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