[NTLUG:Discuss] cfdisk and bootable partition flag

Leroy Tennison leroy_tennison at prodigy.net
Thu Jan 12 06:30:10 CST 2006


Terry wrote:

>df
>will tell you where /boot is, (if you don't see /boot, it'll just be / )
>and that's the partition that contains the kernel you are booting.
>
>On 1/11/06, ntlug at levelofdetail.com <ntlug at levelofdetail.com> wrote:
>  
>
>>I'm on a Linux-only machine using SUSE 9.2. I boot from the first of two
>>IDE hard disks - /dev/hda.
>>
>>I'm not currently having a problem, but am trying to understand the boot
>>process better. I've tried both fdisk and cfdisk and in neither one do I
>>get an indication of which is the bootable partition on the drive. Why
>>is this? How can I find which partition I'm booting from?
>>
>>Would there ever be a reason to toggle between two partitions as the
>>boot partition?
>>
>>Another curiosity -
>>
>>When I
>>
>>   cfdisk -P /dev/hdb
>>
>>the header info of cfdisk indicates that I'm look at /dev/hda.
>>
>>Any help is appreciated.
>>
>>Ed
>>
>>
>>_______________________________________________
>>https://ntlug.org/mailman/listinfo/discuss
>>
>>    
>>
>
>
>
>--
><><
>
>_______________________________________________
>https://ntlug.org/mailman/listinfo/discuss
>
>  
>
This is an interesting discussion, it made me do some research and 
possibly find the answers.  First of all, don't depend on the asterisk 
reported by fdisk, it shows which partition is bootable but doesn't mean 
that this is the partition used by grub to boot.  The reason I know this 
is that my hard disk has the following partitions:

DOS (marked bootable, fdisk shows the asterisk)
NetWare
Linux (/dev/hda3 mounted as /boot) - this is where my GRUB configuration 
boots from
Extended
Linux root partition
Linux swap partition
An extra Linux partition

To get the answers below, I read 'info grub', particularly the sections 
titled 'Images' and Installation (particularly the subsection Installing 
GRUB using grub-install).  You really ought to read the whole info entry 
to get a good picture of GRUB.

(From Images) Installation of GRUB writes a Stage1 file to the MBR which 
is exactly 512 bytes.  That's not enough room for much intelligence so 
the location of Stage2 is encoded as actual physical hard disk locations.

(From Installing GRUB using grub-install) There are notes here about 
grub-install assuming a location off of root but which can be overriden 
with a command line parameter.  I am discerning from this that, at 
installation, GRUB is told where to locate critical files such as 
grub.conf (or menu.lst) and that this is how GRUB knows where to boot from.





More information about the Discuss mailing list