Unix Technical Forum

Is it possible to boot Linux off an extended partition using GRUB?

This is a discussion on Is it possible to boot Linux off an extended partition using GRUB? within the Linux Operating System forums, part of the Unix Operating Systems category; --> Thank you....


Go Back   Unix Technical Forum > Unix Operating Systems > Linux Operating System

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 01-18-2008, 08:15 PM
Scott Simpson
 
Posts: n/a
Default Is it possible to boot Linux off an extended partition using GRUB?

Thank you.

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 01-18-2008, 08:15 PM
Douglas Mayne
 
Posts: n/a
Default Re: Is it possible to boot Linux off an extended partition using GRUB?

On Sun, 31 Dec 2006 15:46:18 -0800, Scott Simpson wrote:

> Thank you.

Q. Is it possible to boot Linux off an extended partition using GRUB?

A. Yes. For best results, install grub's "stage 1" in the MBR.

Are you having some difficulty with an existing setup, or are you planning
your partition layout?

More info...
Once grub is loaded, it can read all of the filesystems it has been
compiled with. For example, it can read partitions which contain different
GNU/Linux distributions.

Grub is installed, per the usual drill:

# grub --no-floppy
grub> root (hdx,y)
grub> setup (hdx)
grub> quit

Note: Substitute values appropriate for your system. Be extra careful when
changing the bootloader, or working directly with partitions.

--
Douglas Mayne
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 01-18-2008, 08:15 PM
CBFalconer
 
Posts: n/a
Default Re: Is it possible to boot Linux off an extended partition using GRUB?

Scott Simpson wrote:
>
> Thank you.


You're welcome. For what?

--
Some informative links:
<http://members.fortunecity.com/nnqweb/> (newusers)
<http://www.catb.org/~esr/faqs/smart-questions.html>
<http://www.caliburn.nl/topposting.html>
<http://www.netmeister.org/news/learn2quote.html>
<http://cfaj.freeshell.org/google/> (taming google)


Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 01-18-2008, 08:15 PM
Scott Simpson
 
Posts: n/a
Default Re: Is it possible to boot Linux off an extended partition using GRUB?

Douglas Mayne wrote:

> On Sun, 31 Dec 2006 15:46:18 -0800, Scott Simpson wrote:
>
>> Thank you.

> Q. Is it possible to boot Linux off an extended partition using GRUB?
>
> A. Yes. For best results, install grub's "stage 1" in the MBR.
>
> Are you having some difficulty with an existing setup, or are you planning
> your partition layout?


I'm planning my partition layout. I just ordered a Lenovo notebook. I assume
it will come with

partition 1: hibernate partition
partition 2: windows xp

I plan on shrinking windows XP and putting Linux root on partition 3. I'll
make partition 4 extended and create a swap partition in it. Also, I'd like
to experiment with other Linux distributions so I'd like to put another
Linux root in the extended partition. That is why I want to know if grub
can boot off it. Thank you.

> More info...
> Once grub is loaded, it can read all of the filesystems it has been
> compiled with. For example, it can read partitions which contain different
> GNU/Linux distributions.
>
> Grub is installed, per the usual drill:
>
> # grub --no-floppy
> grub> root (hdx,y)
> grub> setup (hdx)
> grub> quit
>
> Note: Substitute values appropriate for your system. Be extra careful when
> changing the bootloader, or working directly with partitions.


Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 01-18-2008, 08:15 PM
John Thompson
 
Posts: n/a
Default Re: Is it possible to boot Linux off an extended partition using GRUB?

On 2006-12-31, Scott Simpson <Scott.Simpson@computer.org> wrote:

You can boot linux from a logical partition contained within an extended
partition, if that's what you're asking.

--

John (john@os2.dhs.org)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #6 (permalink)  
Old 01-18-2008, 08:15 PM
Scott Simpson
 
Posts: n/a
Default Re: Is it possible to boot Linux off an extended partition using GRUB?

John Thompson wrote:

> On 2006-12-31, Scott Simpson <Scott.Simpson@computer.org> wrote:
>
> You can boot linux from a logical partition contained within an extended
> partition, if that's what you're asking.
>


That's what I'm asking. Danka shoen.

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #7 (permalink)  
Old 01-18-2008, 08:15 PM
Timothy Murphy
 
Posts: n/a
Default Re: Is it possible to boot Linux off an extended partition using GRUB?

Scott Simpson wrote:

> I'm planning my partition layout. I just ordered a Lenovo notebook. I
> assume it will come with
>
> partition 1: hibernate partition
> partition 2: windows xp
>
> I plan on shrinking windows XP and putting Linux root on partition 3. I'll
> make partition 4 extended and create a swap partition in it. Also, I'd
> like to experiment with other Linux distributions so I'd like to put
> another Linux root in the extended partition. That is why I want to know
> if grub can boot off it. Thank you.


I'd be much more inclined to have a small boot partition /boot on hda3,
and have the root partition / on an extended partition.
Then if you try other distributions they can share the same /boot .

--
Timothy Murphy
e-mail (<80k only): tim /at/ birdsnest.maths.tcd.ie
tel: +353-86-2336090, +353-1-2842366
s-mail: School of Mathematics, Trinity College, Dublin 2, Ireland
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #8 (permalink)  
Old 01-18-2008, 08:16 PM
csola
 
Posts: n/a
Default Linux and OS/2 together...

I would like to install software in the following order:

Bootmanager (eCS or Grub?...)
eCS - first winchester (HPFS)
Linux (Ubuntu 6.10) - first winchester (ext3)
Linux swap - first winchester
Comon data - first winchester (FAT32)
eCS users programs - second winchester (JFS)
eCS data - second winchester (JFS)

1. winchester 40GB
2. winchester 80GB

How do I go about doing this?

csola
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #9 (permalink)  
Old 01-18-2008, 08:16 PM
Douglas Mayne
 
Posts: n/a
Default Re: Linux and OS/2 together...

On Fri, 05 Jan 2007 16:58:22 +0100, csola wrote:

> I would like to install software in the following order:
>
> Bootmanager (eCS or Grub?...)
> eCS - first winchester (HPFS)
> Linux (Ubuntu 6.10) - first winchester (ext3)
> Linux swap - first winchester
> Comon data - first winchester (FAT32)
> eCS users programs - second winchester (JFS)
> eCS data - second winchester (JFS)
>
> 1. winchester 40GB
> 2. winchester 80GB
>
> How do I go about doing this?
>
> csola
>

Caveat: I am not running OS/2 or Ubuntu.

I recommend the grub bootloader because it is a very flexible bootloader.
First, realize that grub is not tied to any one OS. It can be thought of
as a self-contained, mini-OS whose job is to load other OSs. A quick
review of the grub manual is a good starting point:
http://www.gnu.org/software/grub/manual/grub.html

You also need to know he partitioning rules in the PC world. Here is a
quick summary of the basic rules for disc partitioning (in the PC world):
1. There can be a maximum of 4 primary partitions.
2. Windows likes to be on partition 1.
3. A primary partition can be assigned to be an "extended partition."
4. An extended partiton can contain more partition entries
(not limited to 4).
4.A. Partitions within the extended partition are referred
to as "logical partitions."
4.B. The first logical partition is always the number 5
because the first 4 numbers are reserved for primary
partitions.

Also, keep in mind that grub counts devices and partitions
starting at zero. Most OSs begin counting with 1.

Lay out your partitioning plans and boot strategy on paper before
starting. You can then use the paper as a checklist as you proceed with
through the various setup. Grub is a flexible bootloader, but it doesn't
read HPFS directly (AFAIK). However, you should be able to chainload to
the bootstrap code, because it is similar to NTFS (AFAIK). Let's skip that
for now. Here is a plan for a common dual boot setup (using IDE devices)

Location Grub nomen Used For Size or % Comments
MBR (hd0) bootstrap 512b Use grub
hda1 (hd0,0) OS/2 ?
hda2 (hd0,1) Ubuntu ? grub "lives" here also
hda3 (hd0,2) extended part remainder
hda5 (hd0,4) Ubuntu swap ?
:
:

Steps:
1. Install OS/2 and make sure it boots.
2. Install Ubuntu, allowing it to setup the grub loader at the MBR.
3. Boot Ubuntu and check if it has setup fstab to automatically mount
partitions with compatible filesystems at boot. If not, they can be
manually mounted (man mount).
4. Reboot and see if OS/2 is listed an option on the menu.

As indicated above, Ubuntu's setup may do a lot of things for
you automatically. If not, you can fix it up later. As far as dual
booting, check that an appropriate stanza in grub's configuration file to
boot OS/2. Perhaps, something like this:

#begin menu.lst stanza
title OS/2
rootnoverify (hd0,0)
makeactive
chainloader +1
# end menu.lst


The grub manual has specific advice for OS/2 which may supercede the above
general chainloading technique. You may need to experiment to make sure
this works. The interactive grub shell makes this easy to test. Remember
to backup first, too. The odds of damaging your setup are highest when
making changes at the partition and loader level.

--
Douglas Mayne
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #10 (permalink)  
Old 01-18-2008, 08:16 PM
Dushan Mitrovich
 
Posts: n/a
Default Re: Linux and OS/2 together...

csola <csola@startadsl.hu> wrote:
> I would like to install software in the following order:
>
> Bootmanager (eCS or Grub?...)
> eCS - first winchester (HPFS)
> Linux (Ubuntu 6.10) - first winchester (ext3)
> Linux swap - first winchester
> Comon data - first winchester (FAT32)
> eCS users programs - second winchester (JFS)
> eCS data - second winchester (JFS)
>
> 1. winchester 40GB
> 2. winchester 80GB
>
> How do I go about doing this?


I did this sort of thing a few years ago with two differences: didn't use
FAT32 nor JFS, only HPFS. Also, my organization was different, putting
all the eCS stuff on one disk (what you call a winchester) and all the
Linux stuff on the other.

To the best of my recollection here's how my procedure went:

- started with a working eCS 1.1 on HardDisk 1 that has IBM Boot Manager
installed. If you're starting from scratch, I'd install eCS first.

- used LVM from eCS to delete all partitions on HD2

- used LVM from eCS to create, all on HD2
7 MB for MBR
Primary for /boot
Logical for swap

- specified that the Linux install the MBR at the beginning of HD2, and
NOT on HD1 -- on HD1 it would overwrite the IBM Boot Manager

- used LVM from eCS to add Linux to the Boot Manager

- when booting, the BM now included Linux, and selecting it brought up
the GRUB boot manager, from which I could pick Linux or DOS

The advantage of this organization is that all of HD1 is HPFS (except for
a small Primary partition formatted FAT for DOS), and all of HD2 is for-
matted ext3 (or Reiser) or SWAP. I didn't need a separate 'common' par-
tition formatted FAT32 because the Linux kernal was reconfigured to be
able to read and write to HPFS.

Others can probably give more, and more authoritative, details.

- Dushan Mitrovich

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 02:39 PM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com