LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   editing bot loader of ubuntu (https://www.linuxquestions.org/questions/linux-newbie-8/editing-bot-loader-of-ubuntu-667123/)

tarunmadiraju 09-02-2008 12:37 PM

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

Steel_J 09-02-2008 01:10 PM

Use this guide.

It contains everything you need to know by section:

https://help.ubuntu.com/community/WindowsDualBoot

Nylex 09-02-2008 01:12 PM

Also, please type properly. Posts can be hard to read with all the contracted words.

dasy2k1 09-02-2008 03:17 PM

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

tarunmadiraju 09-03-2008 03:34 AM

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

syg00 09-03-2008 05:12 AM

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 ???.

tarunmadiraju 09-03-2008 05:53 AM

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[ex:(hd0,0)] to be given in the menu.lst file...
so kindly suggest me the appropriate partition....by analyzing my previous post...

syg00 09-03-2008 06:21 AM

Answer the questions asked.

yancek 09-03-2008 09:57 AM

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?

tarunmadiraju 09-03-2008 01:01 PM

Quote:

Originally Posted by syg00 (Post 3268181)
Answer the questions asked.

i gave you the best possible info if u have understood the previous posts.......

tarunmadiraju 09-03-2008 01:05 PM

Quote:

Originally Posted by yancek (Post 3268342)
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

tarunmadiraju 09-03-2008 01:26 PM

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

tarunmadiraju 09-03-2008 01:26 PM

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

Nylex 09-03-2008 01:41 PM

Read the GRUB documentation to find out what each of the commands does.

yancek 09-03-2008 03:13 PM

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


All times are GMT -5. The time now is 10:35 PM.