LinuxQuestions.org
Help answer threads with 0 replies.
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 08-02-2009, 06:43 AM   #1
joeBuffer
Member
 
Registered: Jul 2009
Distribution: Ubuntu 9.04
Posts: 328

Rep: Reputation: 42
Angry The exact process of booting from a logical partition ...


I apologize if this has been asked a hundred times, but I searched through the threads and posts here and did not find an answer that helped me at all.
What is the exact process of booting from a logical partition?
I have read several things, and all are confusing to me and I can't find a good answer.
Here's what I know and an example:
I've read this is easily possible ... some things I've read said something about it being complex and that you have to chainload. Some things I've read said it's very easy, but it has something to do with booting from the extended partition. Others said, no you use the logical partition itself. I can't clear up what anyone is talking about ...
When using openSUSE 11.1, the Live CD ... and trying to install it. It will give me problems when trying to boot from a logical partition, not to mention I don't want to do something wrong and add data or anything where it shouldn't be. I don't know what I'm doing, at all, and I can't understand people's explanations of this.
When using openSUSE, you can choose (when configuring GRUB using the graphical installation) "boot from extended partition" and use "custom boot partition: sda(1,2,3,whatever)" and it will work. If you choose to boot from the logical partition only, and don't check "boot from extended partition", it will say "no operating system found" when booting. What exactly is happening here, I'm completely lost. Choosing "boot from extended partition" can't cause any problems of any kind, can it? What is the proper way of doing things in this situation, what is really happening?
 
Old 08-02-2009, 07:01 AM   #2
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Arch/XFCE
Posts: 17,802

Rep: Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738
Booting from a logical partition is no different than booting from a primary. You simply have to get control transferred to the boot code on the partition. In GRUB, that is what the chainloader does.

But, you can't boot from an extended partition---in fact, you can't do anything with an extended---it simply acts as a container** for the logicals.

The fundamental truth is simply that any physical drive which the BIOS tries to boot must have boot code in the MBR (defined as the first sector or the drive---regardless of partitions). If you also put boot code on a partition, the MBR boot code (or more typically the config file) has to point to that partition.

The link below in my sig is old, but still might be useful. Also search here for member "Saikee" and look at his links.


**
An extended partition is actually just the beginning of a linked list---it points the system to the beginning of the first logical partition. The boot sector of the first logical has a mini partition table pointing to the actual partition and to the next logical----this daisy chain continues to the maximum number of logicals allowed.
 
Old 08-02-2009, 07:20 AM   #3
joeBuffer
Member
 
Registered: Jul 2009
Distribution: Ubuntu 9.04
Posts: 328

Original Poster
Rep: Reputation: 42
I know using fdisk, if you use a to mark a partition as active, and you mark the extended partition as active, it will give you a warning ... warning: extended partition.
When I am installing openSUSE, say I have it this way:
2 is extended partition, 5 is /boot, 6 is swap, 7 is /
If I don't choose "boot from extended partition" on the menu, but choose to boot from custom partition: 5, it will not boot.
By default, it sets it so that the boot partition gets marked as active, using openSUSE's installer.
I have to check "boot from extended partition" AND "boot from custom partition: 5" or it WILL NOT WORK. I have no idea what I'm doing, I've looked at sites, I've read documentation on partitioning, I do not understand what is happening. What is the difference between picking "boot from extended partition" and "custom partition: 5"?
What happens when you choose to boot from extended partition and select custom partition: 5. By default it was setting it so that "boot from extended partition" and "custom partition: 1", which is a windows xp recovery partition (not for myself, but I was thinking about getting a new computer and giving this one away with windows xp on it). what happened in that case? This may seem like I want you to put a web site of information here, but I'm telling you I've seen these websites, I've seen this information, over and over and over again I've read things on this and none of it is specific as to what to do or what is happening, it's worded in a strange way and I see conflicting information on all of this (unless it's just openSUSE's way of doing things that is confusing me). It's ridiculous. Why would it mark my first partition as active, and change the contents slightly (which it did, it slightly altered the size!) by default!? I have read and read and read on this, I have no idea what this is doing, this is ridiculous.

I should add that when not choosing boot from extended partition , it will mark the extended partition as active, which would be the problem ... so you have to inform that you're booting from a logical partition?? If so, what are you doing to inform it that you are booting from a logical, and not the extended? It just marks the logical as active instead of the extended? It's confusing to me that if you choose to make 5 the /boot partition, but don't choose "boot from extended partition", it will mark the extended partition as active and try to boot.

So the reason that it marked the first partition and changed it's size slightly by default is because it installed the stage 2 bootloader there?

Last edited by joeBuffer; 08-02-2009 at 09:19 AM.
 
Old 08-02-2009, 07:30 AM   #4
joeBuffer
Member
 
Registered: Jul 2009
Distribution: Ubuntu 9.04
Posts: 328

Original Poster
Rep: Reputation: 42
I thought I had a pretty firm understanding of this, and now I'm very lost.
What I'm saying is, I have trouble understanding openSUSE and extended partitions, but I have not had any problems with doing things this way using anything but openSUSE. I've installed this way before, and it was easy. Using primary partitions it's easy, using Ubuntu and logical partitions, it's easy. Installing openSUSE this way, I'm wondering what it is I'm doing when I do something. I'm used to either using fdisk or using fdisk to set things up and having the installer take care of the rest, sort of.

Last edited by joeBuffer; 08-02-2009 at 07:50 AM.
 
Old 08-02-2009, 09:17 AM   #5
joeBuffer
Member
 
Registered: Jul 2009
Distribution: Ubuntu 9.04
Posts: 328

Original Poster
Rep: Reputation: 42
I just installed and updated openSUSE 11.1 using the "boot from extended partition" option and the "custom partition: 5" option. Obviously I think I understood what I was doing, but what it does by default was confusing to me.
I had one funny thing happen, only ... I was doing something, and twice the theme I had on here went away all of a sudden. Then I went to change it back, and it said possibly something's already running. Anyways, I restarted again, changed it back when it did it again, didn't receive a message, and now it seems to be working fine.
I'm sure I understood how to do it, then when thinking I had it wrong because of the way it does things by default, I went reading other stuff, and got confused by the way things were worded, and people's posts. So I had a good understanding, and it's just openSUSE that confused me. I'm sure I have it fixed, now, and understand what to do ...
I was just starting to think that maybe I really misunderstood what I was doing, and was relying on the installer more in the past than it seemed like I was, except I thought "I've used Gentoo and LFS and made the partitions myself and never had a problem, so it must be the way it is with openSUSE and I'm not really confused".

Last edited by joeBuffer; 08-02-2009 at 09:23 AM.
 
Old 08-03-2009, 07:58 AM   #6
joeBuffer
Member
 
Registered: Jul 2009
Distribution: Ubuntu 9.04
Posts: 328

Original Poster
Rep: Reputation: 42
pixellany, or someone:
Using those choices for installation, which are the default choices using the openSUSE installation, it has done what I was talking about:
it marked my extended partition as active.
Can any problems be caused by this? It seems to be working fine, except when I use themes, the themes aren't showing up correctly in the theme selection window, but they do show up correctly otherwise (when selected). Also, I did have the problem I mentioned a couple of times, where it changed over suddenly to another theme (but not in the panel) and gave me messages that something could already be running. But it has gone away now.
Is it possible using the choices I already wrote down here, that any sort of problem could be caused? I guess I have to do more reading ...
again, I chose the default "boot from extended partition", but changed the "custom boot partition" to 5. The second (extended partition) is marked as active.

Last edited by joeBuffer; 08-03-2009 at 08:00 AM.
 
Old 08-03-2009, 08:15 AM   #7
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Arch/XFCE
Posts: 17,802

Rep: Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738
I don't see how there would be any connection between themes and marking partitions as active.......

Linux does not use the active flag, so you might as well try turning it off.

Quote:
I chose the default "boot from extended partition"
This really puzzles me---I don't believe you can actually use an extended partition for anything---it is only the beginning of a linked list of the logical partitions.

What is the overall boot setup? i.e. what is in the MBR? Are you chainloading to the Linux partitions? Assuming that GRUB is in the MBR, please post the contents of the relevant /boot/grub/menu.lst (Take out all the commented lines to keep it concise.)
 
Old 08-03-2009, 08:19 AM   #8
joeBuffer
Member
 
Registered: Jul 2009
Distribution: Ubuntu 9.04
Posts: 328

Original Poster
Rep: Reputation: 42
Code:
3 timeout 15

  5 gfxmenu (hd0,4)/message

  9 title openSUSE 11.1 - 2.6.27.25-0.1
 10     root (hd0,4)
 11     kernel /vmlinuz-2.6.27.25-0.1-default root=/dev/disk/by-id/ata-WDC_WD800JD-22JNC0_WD-WMAM966    19155-part7 resume=/dev/disk/by-id/ata-WDC_WD800JD-22JNC0_WD-WMAM96619155-part6 splash=silent sh    owopts vga=0x31a
 12     initrd /initrd-2.6.27.25-0.1-default
 13 

 15 title Failsafe -- openSUSE 11.1 - 2.6.27.25-0.1
 16     root (hd0,4)
 17     kernel /vmlinuz-2.6.27.25-0.1-default root=/dev/disk/by-id/ata-WDC_WD800JD-22JNC0_WD-WMAM966    19155-part7 showopts ide=nodma apm=off noresume nosmp maxcpus=0 edd=off powersaved=off nohz=off     highres=off processor.max_cstate=1 x11failsafe vga=0x31a
 18     initrd /initrd-2.6.27.25-0.1-default
no line numbers, of course, i just copied and pasted from vim ...

Last edited by joeBuffer; 08-03-2009 at 08:20 AM.
 
Old 08-03-2009, 08:21 AM   #9
joeBuffer
Member
 
Registered: Jul 2009
Distribution: Ubuntu 9.04
Posts: 328

Original Poster
Rep: Reputation: 42
The theme errors don't make any sense to me, I was just wondering if maybe I don't know what I'm talking about ... I'd be surprised.
What I'm talking about is the default for the installation, the only other thing it did by default (when I didn't tinker with the grub setup options), was use the active flag on the first partition.
It always sets the active flag.

Last edited by joeBuffer; 08-03-2009 at 08:22 AM.
 
Old 08-03-2009, 11:26 AM   #10
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Arch/XFCE
Posts: 17,802

Rep: Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738
(Referring to your grub config file)

Assuming that this is the config file tied to the GRUB installed in the MBR, then you don't have any chainloading going on---i.e. you are booting directly into the 5th partition, which is mounted to /boot.

If you want to dig a bit further, do this:
Code:
[root@mherring-08140091110 printer]# dd if=/dev/sda bs=64 count=1|hexdump -C
1+0 records in
1+0 records out
00000000  eb 48 90 00 00 00 47 52  55 42 16 08 1c 7c d7 49  |.H....GRUB...|.I|
00000010  00 00 00 00 1c 7c d7 49  25 8a 25 8a 01 00 80 60  |.....|.I%.%....`|
00000020  5f 80 3b 01 b8 c0 07 8e  d0 bc 00 08 fb 52 53 06  |_.;..........RS.|
00000030  56 fc 8e d8 31 ed 60 b8  00 12 b3 36 cd 10 03 02  |V...1.`....6....|
00000040
64 bytes (64 B) copied, 5.3081e-05 seconds, 1.2 MB/s
What this does is dump the first 64 bytes of the MBR. If you have GRUB there, you'll get something similar.
 
Old 08-03-2009, 11:36 AM   #11
joeBuffer
Member
 
Registered: Jul 2009
Distribution: Ubuntu 9.04
Posts: 328

Original Poster
Rep: Reputation: 42
Code:
bash-3.1$ sudo dd if=/dev/sda bs=64 count=1 | hexdump -C
Password:
00000000  31 c0 8e d0 bc 00 7c 8e  c0 8e d8 bf 1e 06 be 1e  |1.м.|..ؿ...|
00000010  7c 50 57 b9 e2 01 f3 a4  b9 00 02 f3 ab cb 80 fa  ||PW....|
00000020  8f 7e 02 b2 80 52 52 bb  94 07 8d af 2a 00 8a 46  |.~..RR...*..F|
00000030  04 66 8b 7e 08 66 03 3e  b3 06 84 c0 74 0b 80 7e  |.f.~.f.>..t..~|
00000040
1+0 records in
1+0 records out
64 bytes (64 B) copied, 0.000343102 s, 187 kB/s

Last edited by joeBuffer; 08-03-2009 at 11:43 AM.
 
Old 08-03-2009, 10:50 PM   #12
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Arch/XFCE
Posts: 17,802

Rep: Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738
OK, so you don't have GRUB in the MBR.....But it does not look like the Windows MBR code either---(Ref: http://www.ata-atapi.com/hiwmbr.html

First, to double-check: One hard drive? Please run "fdisk -l" (no quotes, "ell", not "one", run it as root) and post the results here.
 
Old 08-03-2009, 11:04 PM   #13
joeBuffer
Member
 
Registered: Jul 2009
Distribution: Ubuntu 9.04
Posts: 328

Original Poster
Rep: Reputation: 42
Code:
joebuffer@linux-voes:~> sudo /sbin/fdisk -l /dev/sda
root's password:

Disk /dev/sda: 80.0 GB, 80026361856 bytes
255 heads, 63 sectors/track, 9729 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x8f800000

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1               1         911     7310488+   c  W95 FAT32 (LBA)
Partition 1 does not end on cylinder boundary.
/dev/sda2   *         912        9729    70830585    f  W95 Ext'd (LBA)
/dev/sda5             912         943      257008+  83  Linux
/dev/sda6             944        1204     2096451   82  Linux swap / Solaris
/dev/sda7            1205        3814    20964793+  83  Linux
/dev/sda8            3815        3846      257008+  83  Linux
/dev/sda9            3847        6279    19543041   83  Linux
 
Old 08-03-2009, 11:18 PM   #14
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Arch/XFCE
Posts: 17,802

Rep: Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738
Hmmmmmm......

What is on the first partition? (7+ GB, FAT32)

Was Windows ever on this machine?

Do you recall ever installing **anything** to the MBR?

(The noise you hear is me running out of ideas.......)
 
Old 08-04-2009, 08:37 AM   #15
joeBuffer
Member
 
Registered: Jul 2009
Distribution: Ubuntu 9.04
Posts: 328

Original Poster
Rep: Reputation: 42
It's a Windows XP recovery partition. I don't use it, but I want to keep it there so that if I give this computer away I can give it away with Windows XP. I've been thinking about getting a new one.
I do recall choosing to install it to the MBR, actually.
When I installed openSUSE, I went to the GRUB configuration:
I chose:
1: one option, that was there by default, and it wasn't a big deal, it was something that wouldn't cause problems - I just can't think of what it was.
2: install to the MBR.
then I put a 15 second timeout on it, so it would wait 15 seconds to boot.

Then I chose "boot from extended partition" and "custom boot partition: 5"
If I don't check the "boot from extended partition" and choose "custom boot partition: 5", it will say "no operating system found" when I try to boot. By default, it has "boot from extended partition" and "custom boot partition: 1" checked and configured.
I have not had a problem partitioning my system, and believing I understand what I'm doing, until I tried to use a custom configuration with openSUSE - but I've pretty much gone step by step and either let the installation take care of it (sort of), or just marked the boot partition as active.

I'm not an expert on partitioning, but I didn't think I'd run into trouble really, especially using openSUSE.
I'll have to do some more reading, anyways, I don't like not knowing the details. I thought I understood more than I did, now I'm confused.

Last edited by joeBuffer; 08-04-2009 at 08:43 AM.
 
  


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
creating logical volume of exact specified size devkpict Linux - Software 1 07-16-2009 03:59 AM
booting windows from logical partition vic11r Linux - Software 1 12-04-2006 11:57 AM
dual booting winxp on a logical partition bys Linux - General 6 08-10-2005 04:54 PM
Booting XP on a RAID 5 logical partition garyoneilluk Linux - General 1 12-09-2002 04:41 AM
How does moving partition effect the booting process? concoran Linux - General 9 10-20-2001 02:58 AM


All times are GMT -5. The time now is 07:02 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