Home
Forum
Blog
News
TopSite
Calendar
Profile
Search
Help
Board Menu
New posts
New Replies
Users
Help
Personal Menu
Welcome Guest
User:
Pass:
Auto-Login:
Register!
Calendar
Jan
Feb
Mar
Apr
May
Jun
Jul
Aug
Sep
Oct
Nov
Dec
2007
2008
2009
2010
2011
2012
2013
Su
Mo
Tu
We
Th
Fr
Sa
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
Today's Birthdays:
Devo (22) oene666 (45) rambow (32) Neophyte (53) sddfeee1 (28)
Welcome,
Guest
. Please
login
or
register
.
Did you miss your
activation email?
September 09, 2010, 10:01:04 am
Kubuntu Forums
|
Important Information
|
Documentation
|
How To's
| Topic:
HOW TO: GRUB Methods - Toolkit
0 Members and 1 Guest are viewing this topic.
« previous
next »
Pages:
1
2
[
3
]
Author
Topic: HOW TO: GRUB Methods - Toolkit (Read 38180 times)
Detonate
Kubuntu Overload
Offline
Posts: 1512
Re: HOW TO: GRUB Methods - Toolkit
«
Reply #30 on:
July 30, 2008, 06:01:38 pm »
They both do the same thing. I just wondered if I was missing something, and one method was better than the other. I have already played with it, and it works both ways. I'm using the Kubuntu Grub now, as the primary with the configfile entry booting mandriva.
Logged
Floyd
"Never too old to learn"
Ault, CO, USA
Registered Linux User
436727
Qqmike
Kubuntu Veteran
Offline
Posts: 3654
Re: HOW TO: GRUB Methods - Toolkit
«
Reply #31 on:
July 30, 2008, 07:32:39 pm »
The chainloader method does require that GRUB be installed to the boot sector of the Kubuntu partition (which is not a bad idea anyway, even if you don't use it immediately).
The configfile method requires nothing special--it's ready to go. What it says, of course, is "show me the menu.lst located at (hdx,y)/boot/grub," (then you will make your choice). So then you see two menu.lst's. Not a bad idea setting the default the way you want it on the 2nd menu.lst and setting its timeout to 2 seconds (gives you time to intervene,e.g., with the "c" key, should you want to).
So, to answer your question, you are not missing anything--I think you got it about as well as I understand it. Two ways to do it, one about as good as the other.
However, should you reinstall Kubuntu to that same partition, configfile is safer (=> failsafe). When you re-install Kubuntu to the same partition (or install a new Kubuntu there), the installation of GRUB in the first sector may not work. I haven't tested this. The old GRUB stage_1 will still be there in the first 512 bytes of the Kubuntu partition, but will it "connect" to stage_2 in the Kubuntu root filesystem (that gives you your menu.lst)? I doubt that it will work. You would then have to reinstall GRUB to (hdx,y) using the new Kubuntu installation (using root -- setup -- quit, as usual).
I like configfile, and that's what I use. It always works. And I use a separate GRUB partition (that's also posted here in the Replies under this how-to). The GRUB partition contains ONLY the GRUB files and the menu.lst -- and all OSs are booted by configfile (except XP, which is booted by chainloader).
Also, as an academic note, if you scroll down through this how-to, there's a post about chainloading from GRUB to LILO (LILO is an option upon installation using the Alternate install CD where you would specify to install LILO to the boot sector).
Logged
You never quite know what a Penguin
is thinking. If he asks you for a cup of tea,
ask him what kind he prefers.
Detonate
Kubuntu Overload
Offline
Posts: 1512
Re: HOW TO: GRUB Methods - Toolkit
«
Reply #32 on:
July 30, 2008, 08:12:33 pm »
I read the whole thread!! I have not used LILO in many, many, years.
Logged
Floyd
"Never too old to learn"
Ault, CO, USA
Registered Linux User
436727
Qqmike
Kubuntu Veteran
Offline
Posts: 3654
Re: HOW TO: GRUB Methods - Toolkit
«
Reply #33 on:
February 06, 2009, 01:55:52 pm »
Major revision/re-write of the original GRUB Toolkit.
HOW TO: GRUB Methods
Toolkit for Installation, Rescue, Repair - Fixing Common GRUB problems
Includes the first post—the original post--and Reply #1
It now includes 12,000 words, about 3x the original.
(If copied to OOo Writer, in 12-pt type, 3/4-inch margins, it's about 35 pages.)
The full Table of Contents appears in the original post.
It is now a fairly comprehensive, intermediate-level GRUB tutorial,
and includes many useful, special methods/techniques/tips.
It includes RECOMMENDED methods for setting up a dual boot of two Kubuntu/Linux OSs and for XP and Kubuntu/Linux, and addresses fixing most booting problems.
Several other tutorial posts in this thread have been deleted, as their topics have been re-written and included in the first two posts (the OP and Reply #1).
TABLE OF CONTENTS—abbreviated (see OP for complete TOC)
GRUB ERRORS: See Reply #23
REFERENCES: Listed at the end of this Table of Contents
SECTION 1
Basics
--- Introduction: What is GRUB? Two key components that make GRUB work.
--- Abbreviations, Notation, GRUB devices (hdx,y), Linux devices sdxn, UUIDs
--- Getting information about drives, GRUB files, menu.lst, fstab, UUIDs, version #'s
--- IMPORTANT: Exploring your hard drive(s)
fdisk, geometry, Tab-completion
SECTION 2
GRUB facts
How GRUB works, MBR, GRUB files, image directory, “first BIOS boot drive”
SECTION 3
Re-installing GRUB: the cure for many problems.
--- Re-installing/installing GRUB
SECTION 4
Menu.lst (everything you need for editing)
SECTION 5
Dual-booting
Installing two or more Linux operating systems RECOMMENDED method
SECTION 6
Windows topics
--- Vista, dual-booting with XP and/or Kubuntu/Linux, see this definitive guide:
http://apcmag.com/dualboot
--- XP
Installing XP & Kubuntu: How to set up dual booting
Re-installed XP and now can't boot Kubuntu
When XP is on a non-first hard drive
--- Special Situations
-- How to avoid installing GRUB to the MBR of your Windows XP drive
-- Two drives, a Windows drive and a Kubuntu drive, GRUB is in the Windows MBR,
but sometimes you must remove the Kubuntu drive
and Windows won’t boot when you do.
- - - - - - - - - - Reply #1 Topics Start Here- - - - - - - - - -
The following topics are located in the next post -- Reply#1
SECTION 7 (see Reply #1)
Getting a copy of GRUB files: 4 ways to get GRUB files
SECTION 8 (see Reply #1)
Rescue booting or by menu.lst
GRUB booting methods => booting in an emergency at grub>
--- Configfile -- Booting
--- Chainloading
--- Booting directly using kernel & initrd; Tab-completion
--- Boot into Kubuntu using the edit function “e” on a broken boot menu
SECTION 9 (see Reply#1)
Making and using a separate GRUB partition
SECTION 10 (see Reply #1)
Rescuing Your System, Emergencies, Fixing Boot problems
Special Topic:
Use GRUB to Chainload LILO
See Reply #17 of this thread
REFERENCES
Logged
You never quite know what a Penguin
is thinking. If he asks you for a cup of tea,
ask him what kind he prefers.
Qqmike
Kubuntu Veteran
Offline
Posts: 3654
Quick Course -- Re: HOW TO: GRUB Methods - Toolkit
«
Reply #34 on:
February 07, 2009, 03:44:52 pm »
GRUB Quick Course
– solves 80-90+% of GRUB problems
when you have a problem ... the following is usually all you need to know
GRUB survival
> Check menu.lst as root: spelling, syntax, then device references (hdx,y) and UUIDs.
> Reinstall GRUB from the controlling OS GRUB files (in (hdx,y)) to the MBR of the first BIOS boot drive: sudo grub to get the GRUB prompt, then 3 quick commands: root (hdx,y), setup (hd0), quit.
> If it goes not to (hd0) but to an external drive or flash drive or to the MBR of another internal drive, same drill, different step: root (hdx,y), setup (hd1), quit (or (setup (hd2), etc.).
> If you ever need to know the correct GRUB devices (hdx,y) for partitions or (hdx) for drives, simply get a grub prompt (sudo grub from an OS or from a Live Linux CD) and do a tab-completion with the geometry command: grub>geometry (hd<press the TAB key now>; => explore each drive with grub>geometry (hd0), grub>geometry (hd1), etc.
> If you put XP on a non-first HD, shame on ya, then use the map dance in its menu.lst;
> If Vista is involved, go here and stay there:
Vista *** The definitive dual-booting guide: Linux, Vista and XP step-by-step
http://apcmag.com/dualboot
=> No need really for a 35-page manual
Logged
You never quite know what a Penguin
is thinking. If he asks you for a cup of tea,
ask him what kind he prefers.
ArcSyn
Always Learning
Offline
Posts: 2
Re: HOW TO: GRUB Methods - Toolkit
«
Reply #35 on:
April 01, 2009, 10:51:09 pm »
I need some help and trying to understand and read through just the OP is starting to hurt my head. I'm pretty new to dual/triple booting with GRUB and Linux so I think I've gotten in over my head.
Here's my setup:
1 HDD (150GB)
Primary Partition 1 - WinXP
Primary Partition 2 - Win7
Extended Partition - Linux
Logical Drive 3 - /home
Logical Drive 4 - /
Logical Drive 5 - /swap
WinXP and Win7 were installed first. EasyBCD was used to set up the bootloader to boot WinXP by default. When I installed Linux, it installed GRUB (which is fine) but the options are all wierd.
My default is now Kubuntu, and then there's another 3 different options for Kubuntu, then "Other Windows Vista/Longhorn installation". If I select "Other Windows" it loads the EasyBCD bootloader which is still set to WinXP by default.
How do I edit GRUB to remove the EasyBCD bootloader and put a simple 3 option WinXP, Win7, Kubuntu GRUB menu?
Eventually I want to virtualize WinXP in Kubuntu so then I'll change the default from WinXP to Kubuntu. Yeah, for never having done this before I feel like I bit off more than I should have.
Logged
Qqmike
Kubuntu Veteran
Offline
Posts: 3654
Re: HOW TO: GRUB Methods - Toolkit
«
Reply #36 on:
April 02, 2009, 07:41:20 am »
My best guess:
You say GRUB is installed to the MBR of that drive and that it brings up the boot menu (/boot/grub/menu.lst) in Kubuntu. Good.
First thing I'd try is to simply edit that menu.lst (as root--see the how-to) to include two entries for XP & 7, trying to boot each by a direct chainload:
title XP
root (hd0,0)
chainloader +1
title 7
root (hd0,1)
chainloader +1
Now, in principle, that *should* do it. When you select 7, though, you MAY get another boot menu coming from 7 offering you XP, I'm not sure. When 7 first came out, there was something "strange" about how when called, it would also then give you the option of loading XP; that is, 7 would try to take over the Windows side of the boot management.
I don't know. Don't use 7 or Vista (I have an old XP installed in dual boot and I never use it).
Here:
Vista *** The definitive dual-booting guide: Linux, Vista, Windows 7, and XP step-by-step
http://apcmag.com/dualboot
That is the current bible on the new Windows systems.
Logged
You never quite know what a Penguin
is thinking. If he asks you for a cup of tea,
ask him what kind he prefers.
ArcSyn
Always Learning
Offline
Posts: 2
Re: HOW TO: GRUB Methods - Toolkit
«
Reply #37 on:
April 02, 2009, 08:41:04 pm »
Ok, here's what I've got so far:
sudo fdisk -l
Code:
Device Boot Start End Blocks Id System
/dev/sda1 * 1 11808 94847728+ 7 HPFS/NTFS
/dev/sda2 11809 15632 30716280 7 HPFS/NTFS
/dev/sda3 15633 19457 30724312+ 5 Extended
/dev/sda5 15633 16269 5116671 83 Linux
/dev/sda6 16270 18947 21511003+ 83 Linux
/dev/sda7 18948 19457 4096543+ 82 Linux swap / Solaris
/boot/grub/menu.lst (original)
Code:
title Ubuntu 8.10, kernel 2.6.27-7-generic
uuid 2ac9c8f6-707b-4126-828c-b6d60bcff44c
kernel /boot/vmlinuz-2.6.27-7-generic root=UUID=2ac9c8f6-707b-4126-828c-b6d60bcff44c ro quiet splash
initrd /boot/initrd.img-2.6.27-7-generic
quiet
title Ubuntu 8.10, kernel 2.6.27-7-generic (recovery mode)
uuid 2ac9c8f6-707b-4126-828c-b6d60bcff44c
kernel /boot/vmlinuz-2.6.27-7-generic root=UUID=2ac9c8f6-707b-4126-828c-b6d60bcff44c ro single
initrd /boot/initrd.img-2.6.27-7-generic
title Ubuntu 8.10, memtest86+
uuid 2ac9c8f6-707b-4126-828c-b6d60bcff44c
kernel /boot/memtest86+.bin
quiet
### END DEBIAN AUTOMAGIC KERNELS LIST
# This is a divider, added to separate the menu items below from the Debian
# ones.
title Other operating systems:
root
# This entry automatically added by the Debian installer for a non-linux OS
# on /dev/sda1
title Windows Vista/Longhorn (loader)
root (hd0,0)
savedefault
makeactive
chainloader +1
/boot/grub/menu.lst (modified)
Code:
title Ubuntu 8.10
uuid 2ac9c8f6-707b-4126-828c-b6d60bcff44c
kernel /boot/vmlinuz-2.6.27-7-generic root=UUID=2ac9c8f6-707b-4126-828c-b6d60bcff44c ro quiet splash
initrd /boot/initrd.img-2.6.27-7-generic
quiet
title Windows XP
root (hd0,0)
makeactive
chainloader +1
title Windows 7
root (hd0,1)
makeactive
chainloader +1
title Ubuntu 8.10, kernel 2.6.27-7-generic (recovery mode)
uuid 2ac9c8f6-707b-4126-828c-b6d60bcff44c
kernel /boot/vmlinuz-2.6.27-7-generic root=UUID=2ac9c8f6-707b-4126-828c-b6d60bcff44c ro single
initrd /boot/initrd.img-2.6.27-7-generic
title Ubuntu 8.10, memtest86+
uuid 2ac9c8f6-707b-4126-828c-b6d60bcff44c
kernel /boot/memtest86+.bin
quiet
### END DEBIAN AUTOMAGIC KERNELS LIST
# This is a divider, added to separate the menu items below from the Debian
# ones.
# title Other operating systems:
# root
# This entry automatically added by the Debian installer for a non-linux OS
# on /dev/sda1
# title Windows Vista/Longhorn (loader)
# root (hd0,0)
# savedefault
# makeactive
# chainloader +1
Fortunately, I can access all three operating systems just fine, so long as I want to jump through some hoops. I want to fix it up though so I don't have to.
When I choose the WinXP option (hd0,0) it loads the original Windows 7 bootloader (similar to Vista's) which gives me the option of XP or Win7. I can load either from this menu just fine like I used to before I installed Kubuntu.
If I choose the Win7 option (hd0,1) it crashes out that there's no boot information (will have to try it again for the actual verbage) and I have to restart.
I'm assuming that GRUB installed itself in my Linux partition, and left my Windows bootloader where it was rather than overwriting it. I'm just not sure how to go about fixing that though. I looked at the "dual booting Vista and Linux (Vista installed first) site and it basically has my current situation as the "solution".
Logged
Qqmike
Kubuntu Veteran
Offline
Posts: 3654
Re: HOW TO: GRUB Methods - Toolkit
«
Reply #38 on:
April 02, 2009, 09:10:37 pm »
title Windows XP
root (hd0,0)
makeactive
chainloader +1
title Windows 7
root (hd0,1)
makeactive
chainloader +1
Correct, except they should be placed after these lines:
### END DEBIAN AUTOMAGIC KERNELS LIST
# This is a divider, added to separate the menu items below from the Debian
# ones.
title Other operating systems:
root
NOW place those two boot stanzas.
------------------------
"I'm assuming that GRUB installed itself in my Linux partition, and left my Windows bootloader where it was rather than overwriting it."
I don't think so. That is, it looks like GRUB got installed into the MBR of that drive and thus DID overwrite the Windows bootloader (that was previously installed in the MBR of that drive). (GRUB may or may not also be in the boot sector of the Kubuntu partition--it probably is not installed there.)
So, your setup looks correct. GRUB looks correct. GRUB is working as it should. This is a Windows issue. Now, you have to deal with that thing that 7 does wrt the Windows bootloader(s).
GRUB has done its thing: it passes control (through chainloading) to the Windows XP bootloader (which is in the boot sector (= sector 1) of the XP partition). GRUB is working OK.
Now, as to "how to" fix that thing that 7 seems to do, I don't know. Yours is not the first report of such, maybe a google will come up with some ideas how to do surgery on the Windows bootloaders. Your question is, "How does one boot 7 directly from the GRUB boot menu?" I thought the chainloader should work, but it didn't. Reason: It failed to boot 7 directly because--apparently--7 did not install its Windows bootloader to the boot sector of the 7 partition (either that, or that is not how 7 is setup to do the bootloading; it seems that 7 passes control first to XP).
Logged
You never quite know what a Penguin
is thinking. If he asks you for a cup of tea,
ask him what kind he prefers.
MoonRise
Kubuntu Veteran
Offline
Posts: 3187
No moon, no man.
Re: HOW TO: GRUB Methods - Toolkit
«
Reply #39 on:
May 17, 2009, 09:01:09 am »
Thanks Q! This little bit helped 100%!
Quote
XP on a non-first hard drive: (hdx,y), x > 1
Suppose Kubuntu is on your first BIOS boot drive hd0, and GRUB (from Kubuntu) is installed to the MBR (hd0); thus, your PC boots from hd0 using GRUB.
Later, you wish to install Windows on a second hard drive, (hd1), and you wish to set things up so GRUB controls the booting through its boot menu.
Example
To give a specific example, let’s say Windows XP goes into (hd1, 0) (the first partition of your second hard drive). (This method also works when Windows is on any non-first hard drive, (hdx,y), where x > 1.)
To boot XP from your boot menu, edit /boot/grub/menu.lst (in Kubuntu) to include the following boot entry for XP:
title Microsoft Windows XP
map (hd0) (hd1) # Map hd1 to hd0
map (hd1) (hd0)
rootnoverify (hd1,0) # rootnoverify ensures no attempt is made to mount Windows
chainloader +1
Logged
Qqmike
Kubuntu Veteran
Offline
Posts: 3654
Re: HOW TO: GRUB Methods - Toolkit
«
Reply #40 on:
May 17, 2009, 09:25:10 am »
Hi MoonRise -- Glad it helped!
Logged
You never quite know what a Penguin
is thinking. If he asks you for a cup of tea,
ask him what kind he prefers.
Pages:
1
2
[
3
]
Kubuntu Forums
|
Important Information
|
Documentation
|
How To's
| Topic:
HOW TO: GRUB Methods - Toolkit
« previous
next »
Jump to:
Please select a destination:
-----------------------------
Important Information
-----------------------------
=> Announcements
===> Administrative Announcements
===> Kubuntu Announcements
=> Documentation
===> How To's
===> Experimentation/Customization/Optimization
===> Kubuntu User Testimonies
===> Bugs
-----------------------------
Newbie Support
-----------------------------
=> Help the New Guy
-----------------------------
Kubuntu Discussion
-----------------------------
=> Kubuntu 10.04 Lucid Lynx (LTS)
===> Pre-installation
===> Post-installation
===> Hardware Support
===> Software Support
===> Network Support
===> Soapbox
===> Pre-Release Testing
=> Kubuntu 9.10 Karmic Koala
===> Install and Boot
===> Software Support
===> Hardware Support
===> Network Support
=> Kubuntu 10.10 Maveric Meerkat (under development)
===> Pre-Release Testing
=> Previous Kubuntu Releases
===> Kubuntu 9.04 Jaunty Jackalope
=====> Installation and Boot
=====> Software Support
=====> Hardware Support
=====> Network Support
=====> Processor Specific Support
=======> 64 Bit Processor Support
=======> Power PC Support
===> Kubuntu 8.10 Intrepid Ibex
=====> Installation and Boot
=====> Software Support
=====> Hardware Support
=====> Network Support
===> Kubuntu 8.04 Hardy Heron
=====> Installation and Boot
=====> Software Support
=====> KDE4 Support
=====> Hardware Support
=====> Network Support
=====> Processor Specific Support
=======> 64 Bit Processor Support
=======> Power PC Support
=====> New Feature Requests
===> Kubuntu 7.10 Gutsy Gibbon
=====> Installation and Boot
=====> Software Support
=====> Hardware Support
=====> Network Support
=====> Processor Specific Support
=======> 64 Bit Processor Support
=======> Power PC Support
=====> Grab Bag (Formally New Feature Requests)
===> Kubuntu 7.04 Feisty Fawn
=====> Installation and Boot
=====> Software Support
=====> Hardware Support
=====> Network Support
=====> Processor Specific Support
=======> 64 Bit Processor Support
=======> Power PC Support
===> Kubuntu 6.06 Dapper Drake (LTS)
=====> Installation and Boot
=====> Software Support
=====> Hardware Support
=====> Network Support
=====> Processor Specific Support
=======> 64 Bit Processor Support
=======> Power PC Support
=====> New Feature Requests
=> Desktop Support
===> KDE Support
===> XFCE Environment Help
===> Gnome
===> Other
=> Kubuntu Transitioners
=> Everything Else
-----------------------------
General
-----------------------------
=> Miscellaneous Linux Info
===> Geek News
===> Coding/Scripting
===> Gaming
===> Artwork
===> Audio/Video
=> Community Cafe
===> Distribution Showdown
===> Classifieds
===> Social/Casual Talk
=> KubuntuForums Feedback
===> Site Improvements
===> Forum Ideas
===> Dynamic FAQ
-----------------------------
Multilingual Kubuntu Support
-----------------------------
=> Kubuntu Español
===> Noticias De Kubuntu
===> Instalacion y Arranque
===> Soporte de Software
===> Soporte de Hardware
===> Misceláneos/Chat General
=> French Support
===> Installation et Premier Lancement
===> Support Logiciel
===> Support Matériel
===> Général
Powered by SMF 1.1.11
|
SMF © 2006-2009, Simple Machines LLC
Page created in 0.259 seconds with 15 queries.
Loading...
Online Users
81
users online:
69
Guests
1
Anonymous
11
Visible:
skunkarific
,
The Liquidator
,
leen2911
,
Annorax
,
motoburn
,
sithlord48
,
hobzz1
,
GreyGeek
,
oshunluvr
,
aqeeliz
,
linuxforall
Last click
Site Stats
239145
Posts:
46423 Topics
192722 Replies
47
Blog:
Created by Members
230
Images:
Inside the Image Gallery
24
Files:
Inside the Downloads Area
9
Sites:
Inside the Top Site List
7
Reviews:
Inside the Reviews Area
17301
Reg. Members:
Last:
ananth013
Browsed Pages:
MKPortal
M1.1.1 ©2003-2006
mkportal.it
Page generated in 0.0459 seconds with 10 queries