Main Menu

bootloader

Started by fernand, June 01, 2012, 15:54:22 PM

Previous topic - Next topic

fernand

Helo, I'm new on this site. I'd registered for some questions about a bootloader. On my Pc I've 2 operating systems. On the one side windows xp and on the other Linux(Debian). By the end of the installation of Debian, the installer asked me where can I put the bootloader? It propose two places, in the MBR of the harddisc. But this possibility I didn't like because afterwards I can't boot windows xp anymore. Important to know that I've two OS on a same harddisc. My first partition belong to windows xp ntfs. On the other partitions I've Debian ext3, two swap partitions and a FAT partition. On the other place I might to give an address like sda(0.1) for installing the bootloader. My question is which address I can put to boot windows xp and debian. For example sda (0.1) 0 represented
the harddisc where windows is located and the number 1 the ohter partition where Debian is on. The menu indicate that debian is on the sda 7 but this is is illogic because I've only 5 partitions. Please can someone tell me the number to put in parenthis to indicate the exact address that the bootloader will be installed on the debian partition in the way that I can afterwards choose between windows xp and debian. I were happy for a solution. Greetings Fernand   

Elmar

#1
hi,

when you install debian, then it should automatically create a grub entry to boot windows. so its no problem when you install grub to the mbr. you will be still able to boot windows.

Quote from: fernand on June 01, 2012, 15:54:22 PM
... The menu indicate that debian is on the sda 7 but this is is illogic because I've only 5 partitions.

sda1-4 is reserved for primary and extended partitions. the first logical partition is sda5. sda7 is the 3rd logical partition.

best regards
elmar

EDIT: added "and extended" to the answer

fernand

hi,
thx for the prompt answer, but when the installer asked me to put the bootloader in the MBR, first I
agreed, but the result were that the bootloader of windows were overwritten and I couldn't start windows.
So what can I do or exist an alternative to boot from Debian in a way that I can choose to boot one of my
two Os. Thank you in advance for an answer.
Fernand

Elmar

windows is started by the boot sector of the windows partition. it doesn't matter what program is in the mbr. so there is only a configuration problem in the grub config.

what happened exactly and what message did you see when you tried to start windows?

fernand

Hi, the debian installer asked me if I want to put the mbr, it offers two options
yes o no, if I push yes I can see only 3 entries after booting: Debian and Debian rescue and Acronis a save program, but windows xp didn't appear. If I push no in the last question of the debian-installer, a window at the bottom open and nothing is write inside, in this line I must put the address like sda (0,1) I don't know what I can
write in this window to boot Debian in their own partition,
I hope that I've described my problem so that you can find a solution,
Fernand     

Elmar

#5
then you have to create the entry for windows

when debian is up then open an editor as root and add to file /etc/grub.d/40_custom the following


menuentry "Windows" {
insmod chain
set root=(hd0,1)
chainloader +1
}


personally i would use my boot manager, but i am sure there will be some troubles with the linux installation on the logical partition (because of the way how the logical partition is created). i always prefer primary partitions.

regards
elmar

EDIT: run "update-grub" to apply the new menu entry

fernand

Hi , I'm newbie on Linux. You can help me by putting your file. On my Pc in debian
I'm now in the file /etc/grub.d/40_custom, but this file is write protected, I can't
write your code inside...
   

Elmar

Quote from: fernand on June 01, 2012, 20:14:52 PM
Hi , I'm newbie on Linux. You can help me by putting your file. On my Pc in debian
I'm now in the file /etc/grub.d/40_custom, but this file is write protected, I can't
write your code inside...   

i dont know what you installed, so maybe the following does not work

open a terminal. when you installed the gnome desktop then press ALT-F2 and enter "gnome-terminal"
then try "sudo gedit /etc/grub.d/40_custom"

fernand

hi, so I put your code in the 40_custom file
must I reboot now or what's the following to do
Fern

Elmar


fernand

Hi Elmar, I've reboot, but unfortunately windows xp don't appear in the bootmenu!

Elmar

whats the content of the 40_custom file?

fernand

the content is the following:
#!/bin/sh
exec tail -n +3 $0
#This file provides an easy way to add custom menu entries. Simply type the
#menu entries you want to add after this command. Be careful not to change
#the 'exex tail' line above
menuentry "Windows" {
insmod chain
set root= (hd0,1)
chainloader +1
}
that's all..

Elmar

i dont know if it makes a difference, but you posted a "space" after the "set root="
try it without the space

i dont have grub installed to test that.

fernand

I've in the file no space, but indeed by copying the file to your post I've do
a space.... 

fernand

Hi, I remember me years before I try to install an OS on the harddisc where
windows xp was yet installed. The consecuence were that after I couldn't start anymore windows. So I visit your website and installed your plop, In this way
I could again start windows. I don't know if this information is relevant for my boot-problem, so you are informed about...   

Elmar

Quote from: fernand on June 01, 2012, 22:13:40 PM
Hi, I remember me years before I try to install an OS on the harddisc where
windows xp was yet installed. The consecuence were that after I couldn't start anymore windows. So I visit your website and installed your plop, In this way
I could again start windows. I don't know if this information is relevant for my boot-problem, so you are informed about...   

thanks for the info, but thats not important for the grub.

i know now what i forgot to say. run "sudo update-grub" in a terminal. then it should work.


fernand

Hi Elmar, it works!!
Thank you very much for your patience and help.
By the way is it possible to ask your help also by other problems
than bootloader what concerns linux-features
greetings

Elmar

Quote from: fernand on June 02, 2012, 08:50:39 AM
Hi Elmar, it works!!

:)


Quote from: fernand on June 02, 2012, 08:50:39 AM
By the way is it possible to ask your help also by other problems
than bootloader what concerns linux-features
greetings

normally i give only linux support for my plop linux. when you have a problem and find no solution in the web, then its better to ask the community of the linux distribution that you use.

best regards
elmar

fernand


manbearpig

Quote from: Elmar on June 01, 2012, 16:47:26 PM
hi,

when you install debian, then it should automatically create a grub entry to boot windows. so its no problem when you install grub to the mbr. you will be still able to boot windows.

Quote from: fernand on June 01, 2012, 15:54:22 PM
... The menu indicate that debian is on the sda 7 but this is is illogic because I've only 5 partitions.

sda1-4 is reserved for primary partitons. the first logical partition is sda5. sda7 is the 3rd logical partition.

best regards
elmar

actually , sda 1 thru 4 can been logical partitions , if so created that way by a partitioning utility like G-parted ...

Elmar

#21
Quote from: manbearpig on June 04, 2012, 02:17:17 AM
actually , sda 1 thru 4 can been logical partitions , if so created that way by a partitioning utility like G-parted ...

no, a logical partition can't be sda1-4. a logical partition resists in an extended partition. an extended partition is a partition that has an own partition table in the first sector and can have 4 partition records. a record can be a logical partition or again an extended partition.
sda1-4 represents the 4 partition records in the partition table of the mbr. the 4 records can be primary partitions and extended partitions (an extended partition is not a logical partition). to not confuse fernand i simplified my answer and didn't say that it also can be an extended partition. ok, fully correct is sda1-4 is reserved for primary and extended partitions. but logical partitions is definitely wrong. they can't be sda1-4, because the definition of a logical partition is, that it is inside of an extended partition.


manbearpig

Quote from: Elmar on June 04, 2012, 06:24:08 AM



no, a logical partition can't be sda1-4.


actually yes it/they can , if the partitions in question were so named sda1 , sda2 , sda3 etc...  if they are placed on the hard drive "that way"  and named as such , then they can be...  i've done it....





Quotea logical partition resists in an extended partition. an extended partition is a partition that has an own partition table in the first sector and can have 4 partition records. a record can be a logical partition or again an extended partition.

um, what????  i don't quite follow your meaning here....


Quotesda1-4 represents the 4 partition records in the partition table of the mbr.

of "the mbr" ????  (master boot record) are you sure on that one???

yeah sure , sda/hda 1-4 would represent "4 partition records" , but i would have to think that out of the whole hard disk...

QuoteThe MBR may contain one or more of:

    A partition table describing the partitions of a storage device. In this context the boot sector may also be called a partition sector.
    Bootstrap code: instructions to identify the configured bootable partition then load and execute its volume boot record

Quotethe 4 records can be primary partitions and extended partitions (an extended partition is not a logical partition).

well , let's start from square one there , you have four logical partitions , then because of partitioning constraints/rules after four logicals , one is required to create extended partitions if extras are needed...

Quotefully correct is sda1-4 is reserved for primary and extended partitions. but logical partitions is definitely wrong. they can't be sda1-4, because the definition of a logical partition is, that it is inside of an extended partition.

see previous reply , oh they can be...

http://en.wikipedia.org/wiki/Disk_partitioning#PC_partition_types


Elmar

#23
i think you dont understand the meaning of primary, extended and logical partition, however believe what you want. you are wrong.

the only (silly) ways that sda1-4 could be used to access logical partitions are
1) change the dev nodes of sda1-4
or
2) change the node numbers in the kernel

but both would not represent whats really on the hard disk sectors.

manbearpig


Quotei think you dont understand the meaning of primary, extended and logical partition, however believe what you want. you are wrong.

i do understand , but you believe what?

no i am not wrong , but i do think that possibly there is a misunderstanding of the terminology here ... lol

Quotethe only (silly) ways that sda1-4 could be used to access logical partitions are

"silly ways"???   aren't you going against your own words now???  an extended partition can be named (sda1 , 2 , 3 , ) i've done it before with gparted... true!! it was a little suprising to me that things ended up that way , which i later changed because of too much confusion with installation and what not... but still...
Quote
1) change the dev nodes of sda1-4
or
2) change the node numbers in the kernel


ok , wait what??  change the nodes or alter the kernel ??  what kernel???  for kernel , isn't that a more system/distro specific  ???

Quotebut both would not represent whats really on the hard disk sectors


well it's really not hard for one to read/write to a hard drive with something like Gparted or even Windows installer, so ....... what not to see????

manbearpig





http://ubuntuforums.org/showthread.php?t=1667915


clearly , "sda2" is shown in the screenshots...  so am I still wrong???

Elmar

Quote from: manbearpig on June 05, 2012, 08:47:39 AM

Quotei think you dont understand the meaning of primary, extended and logical partition, however believe what you want. you are wrong.

i do understand , but you believe what?

no i am not wrong , but i do think that possibly there is a misunderstanding of the terminology here ... lol

i think you interchange the meaning of extended and logical partition.


Quote from: manbearpig on June 05, 2012, 08:47:39 AM
Quotethe only (silly) ways that sda1-4 could be used to access logical partitions are

"silly ways"???   aren't you going against your own words now???  an extended partition can be named (sda1 , 2 , 3 , ) i've done it before with gparted... true!! it was a little suprising to me that things ended up that way

in which way i am against my own words? sda1-4 can be only a  primary or an extended partition


Quote from: manbearpig on June 05, 2012, 08:47:39 AM
Quote
1) change the dev nodes of sda1-4
or
2) change the node numbers in the kernel


ok , wait what??  change the nodes or alter the kernel ??  what kernel???  for kernel , isn't that a more system/distro specific  ???

the thread was started with linux. so from what kernel do you think i am talking about? you can change the kernel of every linux distro.

Quote from: manbearpig on June 05, 2012, 08:47:39 AM
Quotebut both would not represent whats really on the hard disk sectors
well it's really not hard for one to read/write to a hard drive with something like Gparted or even Windows installer, so ....... what not to see????

i dont understand what you want to say. when you want to know whats really on the hard disk, then you have to look with a hexeditor on the hard disk and not gparted.

Elmar

Quote from: manbearpig on June 05, 2012, 09:01:51 AM

clearly , "sda2" is shown in the screenshots...  so am I still wrong???

sda2 is an EXTENDED partition!!! and not a LOGICAL partition
sda5 and sda6 are logical partitions

manbearpig

Quote
i think you interchange the meaning of extended and logical partition.

i know that i didn't...


Quote

in which way i am against my own words? sda1-4 can be only a  primary or an extended partition

in reply ...

Quoteno, a logical partition can't be sda1-4. a logical partition resists in an extended partition. an extended partition is a partition that has an own partition table in the first sector and can have 4 partition records. a record can be a logical partition or again an extended partition.
sda1-4 represents the 4 partition records in the partition table of the mbr. the 4 records can be primary partitions and extended partitions (an extended partition is not a logical partition). to not confuse fernand i simplified my answer and didn't say that it also can be an extended partition. ok, fully correct is sda1-4 is reserved for primary and extended partitions. but logical partitions is definitely wrong. they can't be sda1-4, because the definition of a logical partition is, that it is inside of an extended partition.


Quote
the thread was started with linux. so from what kernel do you think i am talking about? you can change the kernel of every linux distro.

i don't know , what kernel are you talking about??? 



manbearpig





Quotesda2 is an EXTENDED partition!!! and not a LOGICAL partition


um No Elmar , I have "sda2 " on my machine that i am posting from now , and it is Not an extended partition , It is logical...


Quote
sda5 and sda6 are logical partitions


how do you (with respect) figure that????

Elmar

Quote from: manbearpig on June 05, 2012, 09:14:40 AM
Quotesda2 is an EXTENDED partition!!! and not a LOGICAL partition
um No Elmar , I have "sda2 " on my machine that i am posting from now , and it is Not an extended partition , It is logical...

on your images, what word do you see beside sda2? extended or logical? do you still think sda2 is a logical partition?

check the partition id of sda2 it will be
05h = Extended
or
0Fh = Extended LBA


Quote from: manbearpig on June 05, 2012, 09:14:40 AM
Quote
sda5 and sda6 are logical partitions

how do you (with respect) figure that????

because a partition is a logical partition when it is defined with the partition table of an extended partition.

manbearpig

#31
Quoteon your images, what word do you see beside sda2? extended or logical? do you still think sda2 is a logical partition?


http://shareimage.ro/images/hacdc309kuivthqb65f9.png

Quotecheck the partition id of sda2 it will be
05h = Extended
or
0Fh = Extended LBA

where exactly is that found in gparted????

Elmar

#32
previous post: the image gives an 403 forbidden http error

Quote from: manbearpig on June 05, 2012, 09:37:26 AM
where exactly is that found in gparted????

i dont know if gparted is able to show the partition id.

either you use "fdisk /dev/sda -l"  or you check the id with a hex editor.

manbearpig

#33

manbearpig

Quote from: Elmar on June 05, 2012, 09:48:49 AM
previous post: the image gives an 403 forbidden http error

Quote from: manbearpig on June 05, 2012, 09:37:26 AM
where exactly is that found in gparted????

i dont know if gparted is able to show the partition id.

either you use "fdisk /dev/sda -l"  or you check the id with a hex editor.


what "hex editor" in linux????


my links should work , i can see them fine on my end....

Elmar

the image works now.

sda2 is there a primary partition. do you want to waste my time?

manbearpig

Quote from: Elmar on June 05, 2012, 09:57:19 AM
the image works now.

sda2 is there a primary partition. do you want to waste my time?


what are you talking about????   primary , sda2 , logical!!!!!

manbearpig

look man , I've already proven you wrong ! , now not that i want to gloat or say hahahaha , but just accept the fact that i did , or at the least that i know what i'm talking about ...

i'm not trying to be insulting here , just saying.... :)   

Elmar

Quote from: manbearpig on June 05, 2012, 09:59:08 AM
Quote from: Elmar on June 05, 2012, 09:57:19 AM
the image works now.

sda2 is there a primary partition. do you want to waste my time?


what are you talking about????   primary , sda2 , logical!!!!!

i do no longer feed the troll

Elmar

Quote from: manbearpig on June 05, 2012, 10:01:41 AM
look man , I've already proven you wrong ! , now not that i want to gloat or say hahahaha , but just accept the fact that i did , or at the least that i know what i'm talking about ...

i'm not trying to be insulting here , just saying.... :)

the only thing you proved is that you dont know much about partitions

manbearpig

Quote from: Elmar on June 05, 2012, 10:02:21 AM
Quote from: manbearpig on June 05, 2012, 09:59:08 AM
Quote from: Elmar on June 05, 2012, 09:57:19 AM
the image works now.

sda2 is there a primary partition. do you want to waste my time?


what are you talking about????   primary , sda2 , logical!!!!!

i do no longer feed the troll

why do you call me a "troll"???


Quotethe only thing you proved is that you dont know much about partitions

well now , let's not be insulting??? , ok?  i'm just simply trying to have a conversation about disk partitioning and such....  not to start a flame war...


if i may ask , where are you from anyway...??