LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
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 09-02-2008, 01:37 PM   #1
tarunmadiraju
LQ Newbie
 
Registered: Aug 2008
Posts: 14

Rep: Reputation: Disabled
editing bot loader of ubuntu


gud eve.... i have 2 hard disks...and i have installed 2 operating systems with 1st hdd xp n 2nd hdd ubuntu...
1--sata--windows xp(OS)
2--ide---linux UBUNTU 8.04
my primary boot option is xp presently....

i want to know how to edit the menu.lst file in linux to add windows to its boot loader... i mean i m unable 2 find the appropriate partition......i.e. (hd 0,0) or sumthn else.... so i jst wanna add my windows xp to ubuntu boot file....

i also want to know if der is any possiblity to add ubuntu to windows boot loader...if so hw can v do dat...

thnk u
 
Old 09-02-2008, 02:10 PM   #2
Steel_J
Member
 
Registered: Oct 2004
Location: Montreal, Canada
Distribution: Kubuntu 10.04, Mint 8 and Puppy 4.3.1
Posts: 355
Blog Entries: 1

Rep: Reputation: 31
Use this guide.

It contains everything you need to know by section:

https://help.ubuntu.com/community/WindowsDualBoot
 
Old 09-02-2008, 02:12 PM   #3
Nylex
LQ Addict
 
Registered: Jul 2003
Location: London, UK
Distribution: Slackware
Posts: 7,464

Rep: Reputation: Disabled
Also, please type properly. Posts can be hard to read with all the contracted words.
 
Old 09-02-2008, 04:17 PM   #4
dasy2k1
Member
 
Registered: Oct 2005
Location: 127.0.0.1
Distribution: Ubuntu 12.04 X86_64
Posts: 958

Rep: Reputation: 35
if you post your /boot/grub/menu.lst or /boot/grub/grub.conf (2 names for the same file)
(in [code] ... [/code] tags to make it easier to read)

then somone can probably talk you through it
 
Old 09-03-2008, 04:34 AM   #5
tarunmadiraju
LQ Newbie
 
Registered: Aug 2008
Posts: 14

Original Poster
Rep: Reputation: Disabled
menu.lst file and partitions

title Ubuntu 8.04.1, kernel 2.6.24-19-generic
root (hd0,6)
kernel /boot/vmlinuz-2.6.24-19-generic root=UUID=8f1cb464-3cc0-4794-af25-27f64193d2c0 ro quiet splash acpi=off
initrd /boot/initrd.img-2.6.24-19-generic
quiet

title Ubuntu 8.04.1, kernel 2.6.24-19-generic (recovery mode)
root (hd0,6)
kernel /boot/vmlinuz-2.6.24-19-generic root=UUID=8f1cb464-3cc0-4794-af25-27f64193d2c0 ro single
initrd /boot/initrd.img-2.6.24-19-generic

title Ubuntu 8.04.1, memtest86+
root (hd0,6)
kernel /boot/memtest86+.bin
quiet

title Windows xp
root (hd0,1)
makeactive
chainloader +1

***********************************************************************

Disk /dev/sda: 160.0 GB, 160041885696 bytes
255 heads, 63 sectors/track, 19457 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x22ba22ba

Device Boot Start End Blocks Id System
/dev/sda1 * 2433 19457 136753312+ f W95 Ext'd (LBA)
/dev/sda5 2433 8511 48829536 7 HPFS/NTFS
/dev/sda6 14591 19457 39094146 7 HPFS/NTFS
/dev/sda7 8512 14335 46781248+ 83 Linux
/dev/sda8 14336 14590 2048256 82 Linux swap / Solaris

Partition table entries are not in disk order

Disk /dev/sdb: 250.0 GB, 250059350016 bytes
255 heads, 63 sectors/track, 30401 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x3da23da1

Device Boot Start End Blocks Id System
/dev/sdb1 * 1 3824 30716248+ 7 HPFS/NTFS
/dev/sdb2 3825 30400 213471720 f W95 Ext'd (LBA)
/dev/sdb5 3825 11473 61440561 7 HPFS/NTFS
/dev/sdb6 11474 19122 61440561 7 HPFS/NTFS
/dev/sdb7 19123 26771 61440561 7 HPFS/NTFS


**********************************************************************


this is how my memory partitions are organized...now according to this tell me what should be placed in the root line.....
title Windows xp
root (hd0,1)
makeactive
chainloader +1

pls let me know as early as possible
 
Old 09-03-2008, 06:12 AM   #6
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 15,038

Rep: Reputation: 1913Reputation: 1913Reputation: 1913Reputation: 1913Reputation: 1913Reputation: 1913Reputation: 1913Reputation: 1913Reputation: 1913Reputation: 1913Reputation: 1913
What currently boots - the Windows bootloader or grub (i.e. which menu do you see) ???.
What operating system(s) successfully loads once you select it ???.
 
Old 09-03-2008, 06:53 AM   #7
tarunmadiraju
LQ Newbie
 
Registered: Aug 2008
Posts: 14

Original Poster
Rep: Reputation: Disabled
as i have 2 different hard disks for each operating system...i do not know how to edit the windows boot file...i know how to edit the linux boot file but i am unable to understand the exact partition[exhd0,0)] to be given in the menu.lst file...
so kindly suggest me the appropriate partition....by analyzing my previous post...
 
Old 09-03-2008, 07:21 AM   #8
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 15,038

Rep: Reputation: 1913Reputation: 1913Reputation: 1913Reputation: 1913Reputation: 1913Reputation: 1913Reputation: 1913Reputation: 1913Reputation: 1913Reputation: 1913Reputation: 1913
Answer the questions asked.
 
Old 09-03-2008, 10:57 AM   #9
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: PCLinux, Slackware
Posts: 6,976

Rep: Reputation: 1283Reputation: 1283Reputation: 1283Reputation: 1283Reputation: 1283Reputation: 1283Reputation: 1283Reputation: 1283Reputation: 1283
In your first post you indicate you have xp on one drive and Ubuntu on another drive. It also shows the first drive (sda) containing one extended partition and four logical partitions with Ubuntu on sda7. You have two windows partitions on the drive (sda5 and sda6)with Ubuntu which are both logical partitions. I assume your xp is on sdb1 as that is the only primary partition on that drive and is marked active (bootable). Assuming you have installed Grub to the mbr of sda, the entry in menu.lst for windows should be:

titile windows xp
rootnoverify (hd1,0)
map (hd0) (hd1)
map (hd1) (hd0)
chainloader +1

If you haven't installed Grub to the mbr on sda, you need to do do:

sudo grub #you will get a grub prompt (grub> where you enter the following:

root (hd0,6)
setup (hd0)
quit

You have sda1 marked active even though it's just an extended partition. I also am not sure if you will be able to access the data on sda5 and sda6 or if those are just data partitions? Windows will boot from a logical partition if you have another version of windows on a primary on the same drive. Don't know if it works if the primary is on another drive? You referred in your original post to xp on the first and Ubuntu on the second drive. I'm not sure if that is just the way you refer to them but your Ubuntu sees it the opposite, with Ubuntu on sda and xp on sdb. If you have switched boot priorit in the BIOS since posting the fdisk this won't work!

Since you indicated you were currently booting from windows, I assume you know how to boot Ubuntu from xp bootloader?
 
Old 09-03-2008, 02:01 PM   #10
tarunmadiraju
LQ Newbie
 
Registered: Aug 2008
Posts: 14

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by syg00 View Post
Answer the questions asked.
i gave you the best possible info if u have understood the previous posts.......
 
Old 09-03-2008, 02:05 PM   #11
tarunmadiraju
LQ Newbie
 
Registered: Aug 2008
Posts: 14

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by yancek View Post
In your first post you indicate you have xp on one drive and Ubuntu on another drive. It also shows the first drive (sda) containing one extended partition and four logical partitions with Ubuntu on sda7. You have two windows partitions on the drive (sda5 and sda6)with Ubuntu which are both logical partitions. I assume your xp is on sdb1 as that is the only primary partition on that drive and is marked active (bootable). Assuming you have installed Grub to the mbr of sda, the entry in menu.lst for windows should be:

titile windows xp
rootnoverify (hd1,0)
map (hd0) (hd1)
map (hd1) (hd0)
chainloader +1

If you haven't installed Grub to the mbr on sda, you need to do do:

sudo grub #you will get a grub prompt (grub> where you enter the following:

root (hd0,6)
setup (hd0)
quit

You have sda1 marked active even though it's just an extended partition. I also am not sure if you will be able to access the data on sda5 and sda6 or if those are just data partitions? Windows will boot from a logical partition if you have another version of windows on a primary on the same drive. Don't know if it works if the primary is on another drive? You referred in your original post to xp on the first and Ubuntu on the second drive. I'm not sure if that is just the way you refer to them but your Ubuntu sees it the opposite, with Ubuntu on sda and xp on sdb. If you have switched boot priorit in the BIOS since posting the fdisk this won't work!

Since you indicated you were currently booting from windows, I assume you know how to boot Ubuntu from xp bootloader?


thank you very much...i ll try and let you know if it worked or not...newy thnks 4 helpin me
 
Old 09-03-2008, 02:26 PM   #12
tarunmadiraju
LQ Newbie
 
Registered: Aug 2008
Posts: 14

Original Poster
Rep: Reputation: Disabled
firstly thanks a lot for helping me...the piece of code u gave me worked...

can u explain me how dis worked...

title windows xp
rootnoverify (hd1,0)
map (hd0) (hd1)
map (hd1) (hd0)
chainloader +1
 
Old 09-03-2008, 02:26 PM   #13
tarunmadiraju
LQ Newbie
 
Registered: Aug 2008
Posts: 14

Original Poster
Rep: Reputation: Disabled
firstly thanks a lot YANCEK for helping me...the piece of code u gave me worked...

can u explain me how dis worked...

title windows xp
rootnoverify (hd1,0)
map (hd0) (hd1)
map (hd1) (hd0)
chainloader +1
 
Old 09-03-2008, 02:41 PM   #14
Nylex
LQ Addict
 
Registered: Jul 2003
Location: London, UK
Distribution: Slackware
Posts: 7,464

Rep: Reputation: Disabled
Read the GRUB documentation to find out what each of the commands does.
 
Old 09-03-2008, 04:13 PM   #15
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: PCLinux, Slackware
Posts: 6,976

Rep: Reputation: 1283Reputation: 1283Reputation: 1283Reputation: 1283Reputation: 1283Reputation: 1283Reputation: 1283Reputation: 1283Reputation: 1283
Grub doesn't actually read or boot windows, it chainloads them. The map commands are to make windows think it's on the first drive which it needs because of its large ego. Best thing to do though is as Nylex suggests, read the manual. You can get detailed explanations from the Grub Manual. Here's a link to it:

http://www.gnu.org/software/grub/man...ode/index.html
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
GRUB loader editing.. pl. help me urgnt sarath888 Linux - Software 4 02-20-2008 12:26 AM
Installed FC5> Wrote over Ubuntu MBR: How do i add Ubuntu Partition to Grub Loader Free_beer Ubuntu 4 10-02-2006 07:11 PM
Updating or editing grub loader newbie Mike Linux - Newbie 1 03-17-2004 07:49 PM
Editing boot loader Negativ13 Linux - Newbie 3 12-21-2002 03:33 AM


All times are GMT -5. The time now is 11:27 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration