Booting from Secondary drive

Booting from Secondary drive

Post by Adam J Brinley Cod » Wed, 21 Nov 2001 02:34:08



Hi,

Not specifically a linux question, but can I boot from my primary slave hard
drive (which has linux on, master has win2k)?

If the drive needs to be master, I shall make it secondary master, but how
will it know which drive to boot from?

adam

 
 
 

Booting from Secondary drive

Post by Thomas Sky » Wed, 21 Nov 2001 03:15:32



Quote:> Not specifically a linux question, but can I boot from my primary slave
> hard drive (which has linux on, master has win2k)?

I think so - have you had a look at lilo?

If you install it into the mbr of the primary master drive and tell it to
boot linux from the secondary slave drive, it should work fine - I think.

And if it doesn't - reinstall the system, this time creating a /boot
partition of 1 cylinder size on the primary master drive, install lilo into
the mbr and have linux reside on the slave drive but the kernel be
installed in the /boot directory.

Quote:> If the drive needs to be master, I shall make it secondary master, but how
> will it know which drive to boot from?

If you follow the above scheme, it shouldn't matter, whether you try to
have the drive be master or slave.

/Thomas

 
 
 

Booting from Secondary drive

Post by Dances With Cro » Wed, 21 Nov 2001 10:34:04


On Mon, 19 Nov 2001 19:15:32 +0100, Thomas Skyt staggered into the Black
Sun and said:


>> Not specifically a linux question, but can I boot from my primary
>> slave hard drive (which has linux on, master has win2k)?

>If you install it into the mbr of the primary master drive and tell it
>to boot linux from the secondary slave drive, it should work fine - I
>think.

Except that booting Lose{NT,2K} from LILO may not work.  There's a
better way to do this, detailed at
   http://www.linuxdoc.org/HOWTO/mini/Linux+NT-Loader.html
(works for anything that uses NTLDR to boot, including 2K, not sure
about XP.)  The basic procedure goes like this:

0.  Boot Linux
1.  Use LILO to write the boot sector and loading map somewhere that's
*not* on the MBR of /dev/hda.
2.  Copy the boot sector you wrote to a DOS floppy.  Name this boot
sector something like "LINUX.RAW"
3.  Boot LoseXX.
4.  Copy LINUX.RAW to somewhere on C: and make an entry in
%SYSTEMROOT%\BOOT.INI so that the contents of LINUX.RAW can be executed
from NT's boot-time menu.
5.  Use ATTRIB to set LINUX.RAW to Hidden, System, and Read-Only.
6.  Have a boot disk or two handy for when your filesystem gets
scrozzled by NT acting up.

Quote:>And if it doesn't - reinstall the system, this time creating a /boot
>partition of 1 cylinder size on the primary master drive, install lilo
>into the mbr and have linux reside on the slave drive but the kernel be
>installed in the /boot directory.

Repartitioning a working system like this tends to require payware if
the system uses NTFS.  There is no Free software I know of that can
resize or move NTFS partitions, and the backup/reinstall cycle is a
royal PITA.

--
Matt G|There is no Darkness in Eternity/But only Light too dim for us to see
Brainbench MVP for Linux Admin /
http://www.brainbench.com     /  "He is a rhythmic movement of the
-----------------------------/    penguins, is Tux." --MegaHAL

 
 
 

Booting from Secondary drive

Post by Thomas Sky » Wed, 21 Nov 2001 20:14:11



> On Mon, 19 Nov 2001 19:15:32 +0100, Thomas Skyt staggered into the Black
> Sun and said:

>>> Not specifically a linux question, but can I boot from my primary
>>> slave hard drive (which has linux on, master has win2k)?

>>If you install it into the mbr of the primary master drive and tell it
>>to boot linux from the secondary slave drive, it should work fine - I
>>think.

> Except that booting Lose{NT,2K} from LILO may not work.  There's a
> better way to do this, detailed at

I had no trouble myself booting NT4 and Linux that way! But I must admit
that I was quite happily surprised that NT didn't overwrite the MBR ... but
on the other hand irritated, as I had no chance of getting into NT that way
:-/

Quote:>    http://www.linuxdoc.org/HOWTO/mini/Linux+NT-Loader.html
> (works for anything that uses NTLDR to boot, including 2K, not sure
> about XP.)  The basic procedure goes like this:

> 0.  Boot Linux
> 1.  Use LILO to write the boot sector and loading map somewhere that's
> *not* on the MBR of /dev/hda.
> 2.  Copy the boot sector you wrote to a DOS floppy.  Name this boot
> sector something like "LINUX.RAW"

You forgot to tell him to use dd to grab the bootsector - would you mind
writing how - I'm interested in it too.

Quote:> 3.  Boot LoseXX.
> 4.  Copy LINUX.RAW to somewhere on C: and make an entry in
> %SYSTEMROOT%\BOOT.INI so that the contents of LINUX.RAW can be executed
> from NT's boot-time menu.
> 5.  Use ATTRIB to set LINUX.RAW to Hidden, System, and Read-Only.
> 6.  Have a boot disk or two handy for when your filesystem gets
> scrozzled by NT acting up.

>>And if it doesn't - reinstall the system, this time creating a /boot
>>partition of 1 cylinder size on the primary master drive, install lilo
>>into the mbr and have linux reside on the slave drive but the kernel be
>>installed in the /boot directory.

> Repartitioning a working system like this tends to require payware if
> the system uses NTFS.  There is no Free software I know of that can
> resize or move NTFS partitions, and the backup/reinstall cycle is a
> royal PITA.

:-) What nice words you're using about the small, soft products ...

I thought of repartitioning and reinstalling - not resizing!

/Thomas

 
 
 

Booting from Secondary drive

Post by Josep » Fri, 23 Nov 2001 09:01:58



Quote:> Hi,

> Not specifically a linux question, but can I boot from my primary
> slave hard drive (which has linux on, master has win2k)?

> If the drive needs to be master, I shall make it secondary master,
> but how will it know which drive to boot from?

> adam

Why go through a lot of unnecessary heart ache ?

Put the linux hard disk as pri master, and your beloved win as the
pri slave.

after linux is up and running, change the lilo.conf file to add an
entry for your windows os, and tell it to switch the bios id's around
when booting windows. When windows comes up, your slave and master
would be "reversed" and windows appears to be on pri master.

check the lilo user's gide on how to do this. If you can't figure it
out, here are the relevan enteries from my lilo.conf file

other=/dev/hdb2
        label=NT5
        table=/dev/hdb
     map-drive=0x80
         to=0x81
     map-drive=0x81
         to=0x80

other=/dev/hdb3
        label=win98
        table=/dev/hdb
     map-drive=0x80
         to=0x81
     map-drive=0x81
         to=0x80

hth
bye

 
 
 

Booting from Secondary drive

Post by strawberry flavoured wate » Fri, 23 Nov 2001 09:18:04


Quote:> > Hi,

> > Not specifically a linux question, but can I boot from my primary
> > slave hard drive (which has linux on, master has win2k)?

> > If the drive needs to be master, I shall make it secondary master,
> > but how will it know which drive to boot from?

> > adam

> Why go through a lot of unnecessary heart ache ?

> Put the linux hard disk as pri master, and your beloved win as the
> pri slave.

> after linux is up and running, change the lilo.conf file to add an
> entry for your windows os, and tell it to switch the bios id's around
> when booting windows. When windows comes up, your slave and master
> would be "reversed" and windows appears to be on pri master.

> check the lilo user's gide on how to do this. If you can't figure it
> out, here are the relevan enteries from my lilo.conf file

> other=/dev/hdb2
>         label=NT5
>         table=/dev/hdb
>      map-drive=0x80
>          to=0x81
>      map-drive=0x81
>          to=0x80

> other=/dev/hdb3
>         label=win98
>         table=/dev/hdb
>      map-drive=0x80
>          to=0x81
>      map-drive=0x81
>          to=0x80

> hth
> bye

cool!  i'll try that :)

thanks :)

adam

 
 
 

Booting from Secondary drive

Post by strawberry flavoured wate » Fri, 23 Nov 2001 10:26:01


Quote:> > Hi,

> > Not specifically a linux question, but can I boot from my primary
> > slave hard drive (which has linux on, master has win2k)?

> > If the drive needs to be master, I shall make it secondary master,
> > but how will it know which drive to boot from?

> > adam

> Why go through a lot of unnecessary heart ache ?

> Put the linux hard disk as pri master, and your beloved win as the
> pri slave.

> after linux is up and running, change the lilo.conf file to add an
> entry for your windows os, and tell it to switch the bios id's around
> when booting windows. When windows comes up, your slave and master
> would be "reversed" and windows appears to be on pri master.

> check the lilo user's gide on how to do this. If you can't figure it
> out, here are the relevan enteries from my lilo.conf file

> other=/dev/hdb2
>         label=NT5
>         table=/dev/hdb
>      map-drive=0x80
>          to=0x81
>      map-drive=0x81
>          to=0x80

> other=/dev/hdb3
>         label=win98
>         table=/dev/hdb
>      map-drive=0x80
>          to=0x81
>      map-drive=0x81
>          to=0x80

It didn't work :(

Linux booted okay, and lilo worked okay, but when I selected win2k it went
to a blank screen and hung.

the entry i added was

other=/dev/hdb1
  label=win2k
  table=/dev/hdb
  map-drive=0x80
  to=0x81
  map-drive=0x81
  to=0x80

my hdb drive only has one partition.

any ideas what it could be?

adam

 
 
 

Booting from Secondary drive

Post by Josep » Fri, 23 Nov 2001 14:23:07



>> > Hi,

>> > Not specifically a linux question, but can I boot from my primary
>> > slave hard drive (which has linux on, master has win2k)?

>> > If the drive needs to be master, I shall make it secondary
>> > master, but how will it know which drive to boot from?

>> > adam

>> Why go through a lot of unnecessary heart ache ?

>> Put the linux hard disk as pri master, and your beloved win as the
>> pri slave.

>> after linux is up and running, change the lilo.conf file to add an
>> entry for your windows os, and tell it to switch the bios id's
>> around when booting windows. When windows comes up, your slave and
>> master would be "reversed" and windows appears to be on pri master.

>> check the lilo user's gide on how to do this. If you can't figure
>> it out, here are the relevan enteries from my lilo.conf file

>> other=/dev/hdb2
>>         label=NT5
>>         table=/dev/hdb
>>      map-drive=0x80
>>          to=0x81
>>      map-drive=0x81
>>          to=0x80

>> other=/dev/hdb3
>>         label=win98
>>         table=/dev/hdb
>>      map-drive=0x80
>>          to=0x81
>>      map-drive=0x81
>>          to=0x80

> It didn't work :(

> Linux booted okay, and lilo worked okay, but when I selected win2k
> it went to a blank screen and hung.

> the entry i added was

> other=/dev/hdb1
>   label=win2k
>   table=/dev/hdb
>   map-drive=0x80
>   to=0x81
>   map-drive=0x81
>   to=0x80

> my hdb drive only has one partition.

> any ideas what it could be?

> adam

What happens if you substitute /dev/hdb in place of /dev/hdb1 ?
 
 
 

Booting from Secondary drive

Post by aaaadddaa » Sat, 24 Nov 2001 03:59:03


Quote:> > It didn't work :(

> > Linux booted okay, and lilo worked okay, but when I selected win2k
> > it went to a blank screen and hung.

> > the entry i added was

> > other=/dev/hdb1
> >   label=win2k
> >   table=/dev/hdb
> >   map-drive=0x80
> >   to=0x81
> >   map-drive=0x81
> >   to=0x80

> > my hdb drive only has one partition.

> > any ideas what it could be?

> > adam

> What happens if you substitute /dev/hdb in place of /dev/hdb1 ?

It gives me an error when I run lilo.

Something like "partition not found" or somesuch.

adam

 
 
 

Booting from Secondary drive

Post by William Par » Sat, 24 Nov 2001 11:50:13



Quote:> Hi,

> Not specifically a linux question, but can I boot from my primary
> slave hard drive (which has linux on, master has win2k)?

> If the drive needs to be master, I shall make it secondary master, but
> how will it know which drive to boot from?

If you're booting from MBR of /dev/hda (or HDD1), then yes it works.

If your BIOS can boot from HDD2, then you should also be able to boot
from MBR of /dev/hdb.  But, no experience with this setup.

--

8 CPU cluster, NAS, (Slackware) Linux, Python, LaTeX, Vim, Mutt, Tin

 
 
 

Booting from Secondary drive

Post by Josep » Sat, 24 Nov 2001 11:18:27



>> > It didn't work :(

>> > Linux booted okay, and lilo worked okay, but when I selected
>> > win2k it went to a blank screen and hung.

>> > the entry i added was

>> > other=/dev/hdb1
>> >   label=win2k
>> >   table=/dev/hdb
>> >   map-drive=0x80
>> >   to=0x81
>> >   map-drive=0x81
>> >   to=0x80

>> > my hdb drive only has one partition.

>> > any ideas what it could be?

>> > adam

>> What happens if you substitute /dev/hdb in place of /dev/hdb1 ?

> It gives me an error when I run lilo.

> Something like "partition not found" or somesuch.

> adam

what does fdisk -l /dev/hdb tell you?
 
 
 

Booting from Secondary drive

Post by aaaadddaa » Sun, 25 Nov 2001 00:04:39


Quote:> >> What happens if you substitute /dev/hdb in place of /dev/hdb1 ?

> > It gives me an error when I run lilo.

> > Something like "partition not found" or somesuch.

> > adam
> what does fdisk -l /dev/hdb tell you?

it says:

Disk /dev/hdb: 255 heads, 63 sectors, 5005 cylinders
Units = cylinders of 16065 * 512 bytes

Device     Boot  Start End   Blocks     Id  System
/dev/hdb1   *      1   5004  401945981  7   HPFS/NTFS

adam

 
 
 

Booting from Secondary drive

Post by Josep » Sun, 25 Nov 2001 12:11:17



>> >> What happens if you substitute /dev/hdb in place of /dev/hdb1 ?

>> > It gives me an error when I run lilo.

>> > Something like "partition not found" or somesuch.

>> > adam
>> what does fdisk -l /dev/hdb tell you?

> it says:

> Disk /dev/hdb: 255 heads, 63 sectors, 5005 cylinders
> Units = cylinders of 16065 * 512 bytes

> Device     Boot  Start End   Blocks     Id  System
> /dev/hdb1   *      1   5004  401945981  7   HPFS/NTFS

> adam

Ok, one more try.

When you installed NT, was there a primary bootable partition, and
was it set as active, and was there a bootable os on it already (
msdos perhaps? )  ?? If not, then  NT did  the usual and installed  
it's boot loader into the MBR of that disk, and not into the
partition that win2k is installed on.  So you could try using the
existing chain loader for os2 t do the magic.

other=/dev/hdb1
   label=win2k
   loader=/boot/os2_d.b   ### THE DIFFERENCE!!!
   table=/dev/hdb
   map-drive=0x80
         to=0x81
   map-drive=0x81
   to=0x80

 
 
 

Booting from Secondary drive

Post by aaaadddaa » Mon, 26 Nov 2001 02:02:09


Quote:> Ok, one more try.

> When you installed NT, was there a primary bootable partition, and
> was it set as active, and was there a bootable os on it already (
> msdos perhaps? )  ?? If not, then  NT did  the usual and installed
> it's boot loader into the MBR of that disk, and not into the
> partition that win2k is installed on.  So you could try using the
> existing chain loader for os2 t do the magic.

> other=/dev/hdb1
>    label=win2k
>    loader=/boot/os2_d.b   ### THE DIFFERENCE!!!
>    table=/dev/hdb
>    map-drive=0x80
>          to=0x81
>    map-drive=0x81
>    to=0x80

no luck :(

i guess i shall have to do it the hard/boring way.  backup, format and
reinstall.

ah well.  thanks for your help :)

adam

 
 
 

1. Can Lilo boot a secondary drive partition?

I'm kind of wondering if Lilo, residing on the MBR, can boot
my linux fs, if it resides entirely on a secondary HD.  Anyone
I have to have / on my primary HD in the first 1024 cylinders,
or can I have it on the first 1024 cylinders of the secondary
drive instead?  Do I have to have a linux partition at all on
the primary HD?

John
--
John White

L.A. Kings Cup in '95!  L.A. Lakers - Draft in '95!

2. /dev/random patch for Solaris 8 on x86?

3. lilo - booting from secondary drive

4. Word Processors

5. Secondary Gateway for Secondary Network Card using Secondary IP's

6. CD-ROM Writer

7. More good news for Linux use by big vendors

8. booting off secondary hard drive

9. Booting to master drive on secondary IDE (wd2)

10. LILO: Booting Linux partition residing on a secondary drive

11. How do you boot to FreeBSD if it is installed on a secondary drive?

12. Booting from secondary IDE drive on ODT3.0