Launching Linux

Launching Linux

Post by George Bel » Tue, 28 May 2002 06:53:37



I was just wondering - is it possible to launch Linux on a PC without
LILO?  Say if you installed the kernel on the first partition of your
first hdd, if it in fact is partitioned.  I have the first 20 or so Mb
of my hard drive partitioned and formatted in fat16 with dos installed
and I launch Linux from a compressed kernel stored there.  I was asking
myselfe if this was absolutely necessary, or do I have to because the
launching of the os by the bios loading the first sector of the hard
drive expects a fat(windows) kind of file system and/or expects to find
it in a certain directory.  Thanks for any insights.
 
 
 

Launching Linux

Post by Madhusudan Sing » Tue, 28 May 2002 03:58:56


On Sunday 26 May 2002 21:53, George Bell, purporting to be

Quote:> I was just wondering - is it possible to launch Linux on a PC without
> LILO?  Say if you installed the kernel on the first partition of your
> first hdd, if it in fact is partitioned.  I have the first 20 or so Mb
> of my hard drive partitioned and formatted in fat16 with dos installed
> and I launch Linux from a compressed kernel stored there.  I was asking
> myselfe if this was absolutely necessary, or do I have to because the
> launching of the os by the bios loading the first sector of the hard
> drive expects a fat(windows) kind of file system and/or expects to find
> it in a certain directory.  Thanks for any insights.

I think that the bootloader is a hardware requirement. Even windoze has a
"bootloader" that can be seen by pressing F8.

You could simulate the same effect by setting a timeout of a low value with
LILO or GRUB.

(Check if the timeout of zero means actually zero or just its opposite -
infinity).

 
 
 

Launching Linux

Post by Stefan Viljoe » Wed, 29 May 2002 02:01:07



Quote:> I was just wondering - is it possible to launch Linux on a PC without
> LILO?  Say if you installed the kernel on the first partition of your

Hmm - well I once had contact with a PC that had only Linux installed. It
just booted straight up no LILO prompt. I think it had mandrake on or
something. I guess when you install you have an option of installing a
boatloader like LILO or grub, and if you opt not to install a bootloader (i.
e. you will only be using Linux on that computer)  it does still install
boot code to the bootsector of the disk, but this directly loads the Linux
kernel (after a few inits) instead of asking if you want to boot Linux or
some other OS

Stefan

 
 
 

Launching Linux

Post by John-Paul Stewar » Wed, 29 May 2002 02:54:09





> > I was just wondering - is it possible to launch Linux on a PC without
> > LILO?  Say if you installed the kernel on the first partition of your

> Hmm - well I once had contact with a PC that had only Linux installed. It
> just booted straight up no LILO prompt. I think it had mandrake on or
> something. I guess when you install you have an option of installing a
> boatloader like LILO or grub, and if you opt not to install a bootloader (i.
> e. you will only be using Linux on that computer)  it does still install
> boot code to the bootsector of the disk, but this directly loads the Linux
> kernel (after a few inits) instead of asking if you want to boot Linux or
> some other OS

ALL PCs, regardless of O/S, require a bootloader.  In Linux
you can choose LILO, GRUB, and possibly others.  In Windows
you don't really have a choice, MS ships one of their own to
use.

The Linux bootloaders can be configured not to give you a
prompt, but that doesn't mean they aren't there.  For LILO,
in /etc/lilo.conf you can set 'delay=0' to have it
automatically boot the default image without delay.  Or you
can use 'delay=x' to wait x tenths of a second for the user
to make a choice before booting the default image if no
input is given.  Or you can use 'prompt' and omit the delay
to wait forever for input and do no automatic booting.
Similar options exist for other bootloaders.

But the bootloader is _mandatory_.  If you do not install
one, your only way to boot Linux will be from floppy.  On a
dual-boot system, you'd still be able to boot the other O/S
from the hard drive.  On a Linux-only machine with no
bootloader, you will always require a boot floppy.

Just to stress it one more time:  a bootloader of some sort
is mandatory if you want to boot Linux directly from a hard
drive.

J-P Stewart

 
 
 

Launching Linux

Post by George Bel » Wed, 29 May 2002 22:58:05






>>>I was just wondering - is it possible to launch Linux on a PC without
>>>LILO?  Say if you installed the kernel on the first partition of your

>>Hmm - well I once had contact with a PC that had only Linux installed. It
>>just booted straight up no LILO prompt. I think it had mandrake on or
>>something. I guess when you install you have an option of installing a
>>boatloader like LILO or grub, and if you opt not to install a bootloader (i.
>>e. you will only be using Linux on that computer)  it does still install
>>boot code to the bootsector of the disk, but this directly loads the Linux
>>kernel (after a few inits) instead of asking if you want to boot Linux or
>>some other OS

> ALL PCs, regardless of O/S, require a bootloader.  In Linux
> you can choose LILO, GRUB, and possibly others.  In Windows
> you don't really have a choice, MS ships one of their own to
> use.

> The Linux bootloaders can be configured not to give you a
> prompt, but that doesn't mean they aren't there.  For LILO,
> in /etc/lilo.conf you can set 'delay=0' to have it
> automatically boot the default image without delay.  Or you
> can use 'delay=x' to wait x tenths of a second for the user
> to make a choice before booting the default image if no
> input is given.  Or you can use 'prompt' and omit the delay
> to wait forever for input and do no automatic booting.
> Similar options exist for other bootloaders.

> But the bootloader is _mandatory_.  If you do not install
> one, your only way to boot Linux will be from floppy.  On a
> dual-boot system, you'd still be able to boot the other O/S
> from the hard drive.  On a Linux-only machine with no
> bootloader, you will always require a boot floppy.

> Just to stress it one more time:  a bootloader of some sort
> is mandatory if you want to boot Linux directly from a hard
> drive.

> J-P Stewart

O.K. so the bootloader is mandatory regardless of os.  I get the
impression from all this that the bootloader must exist on the first
sector of the first hard drive, an area one normally cannot see in one's
file system, and the one already there when you buy a new hard disk
launches windows | dos built in.  Just simply out of curiousity, is
there some way to use the original bootloader that ships with the hard
drive to launch linux without modifying this sector AND only having the
linux os installed, say by installing the LILO on the first partition,
or using GRUB?  Thanks.
 
 
 

Launching Linux

Post by John-Paul Stewar » Wed, 29 May 2002 23:46:25



> O.K. so the bootloader is mandatory regardless of os.  I get the
> impression from all this that the bootloader must exist on the first
> sector of the first hard drive, an area one normally cannot see in one's
> file system, and the one already there when you buy a new hard disk
> launches windows | dos built in.  Just simply out of curiousity, is
> there some way to use the original bootloader that ships with the hard
> drive to launch linux without modifying this sector AND only having the
> linux os installed, say by installing the LILO on the first partition,
> or using GRUB?  Thanks.

There is nothing on the disk as it ships.  No bootloader.
Nothing at all.

When one installs any operating system, the O/S installs its
bootloader.  On Linux systems that's typically LILO or
GRUB.  Solaris/x86 comes with its own bootloader.  Windows
comes with one, too.  It doesn't come with the disk, but the
O/S.  (Buying a disk with an O/S already on it doesn't
change the fact that the bootloader is part of the O/S.)

Have you ever done (on a DOS or Windows O/S) a 'dir c:\ /ah'
to show the hidden files in the root directory of the
bootable partition?  You'll see a file called io.sys with
the Hidden, System, and Read-Only attributes set.  That file
essentially contains the DOS bootloader.  From Windows 95
onwards you could press F8 to get a menu of a handful of
boot choices.  That's the only interface to the bootloader.
But non-DOS operating systems can't be booted by it.

Since there is no bootloader that ships with the drive, it
can't be used to boot Linux.

You can install LILO to some point other than the MBR, if
you have another bootloader in there.  For example, at one
point I had Win95, Solaris/x86, and Linux all triple-booting
on one machine.  The Solaris bootloader was in the MBR.  It
gave me options to boot Solaris, Linux, or Windows.  It
would then "chain boot" LILO when I opted to boot Linux.  Or
it would "chain boot" the Windows bootloader.  AFAIK, you
can have the NT bootloader chain boot LILO.  But the
Win95/98/Me bootloaders aren't that sophisticated.

This all getting quite complex.  Can I suggest taking a read
through the LILO docs plus the Mini-HOWTO at

http://www.tldp.org/HOWTO/mini/LILO.html

to get some background info.  After reading those examples,
if you still have questions, post back here.  Somebody will
help you out if I can't.

J-P Stewart

 
 
 

Launching Linux

Post by Stefan Viljoe » Thu, 30 May 2002 02:51:04






> > > I was just wondering - is it possible to launch Linux on a PC without
> > > LILO?  Say if you installed the kernel on the first partition of your

> > Hmm - well I once had contact with a PC that had only Linux installed.
It
> > just booted straight up no LILO prompt. I think it had mandrake on or
> > something. I guess when you install you have an option of installing a
> > boatloader like LILO or grub, and if you opt not to install a bootloader
(i.
> > e. you will only be using Linux on that computer)  it does still install
> > boot code to the bootsector of the disk, but this directly loads the
Linux
> > kernel (after a few inits) instead of asking if you want to boot Linux
or
> > some other OS

> ALL PCs, regardless of O/S, require a bootloader.  In Linux
> you can choose LILO, GRUB, and possibly others.  In Windows
> you don't really have a choice, MS ships one of their own to
> use.

Thanks JP - I stand corrected.

Stefan Viljoen

 
 
 

Launching Linux

Post by Peter Mitche » Thu, 30 May 2002 22:37:14


Actually IO.SYS (in some versions IBMBIO.SYS) is part of Windows (or
DOS) operating system. The boot loader is installed by fdisk.

The first sector of the hard disk contains the partition table, and
some code that loads the first sector of the first active partition,
then runs it. In DOS and Windows this is the DOS boot sector, and it
is structured like the first sector of a floppy disk. In Linux you can
put Lilo in the first sector of the hard disk, or in the first sector
of a partition (the first active partition if you want to run it).

While I don't know all the details about how it gets it, the lilo
stuff can be too big to fit in one sector, and lilo uses some other
stuff even before it loads the kernel.

Even a DOS floppy has a boot loader of sorts. Ths DOS boot sector
loads IO.SYS from the file system, making assumptions about where it
is. However Linux is capable of booting from a floppy without a boot
loader.

A hard disk without the initial boot loader would be like an enormous
floppy. However when the kernel boots from a floppy it can find out
about the hard disk partitions etc from the partition table. With the
kernel starting in sector 1 there would be no space for a partition
table, so it couldn't find out about the disk partitions.

Hope this helps

Peter

 
 
 

Launching Linux

Post by John-Paul Stewar » Fri, 31 May 2002 04:56:34



> Actually IO.SYS (in some versions IBMBIO.SYS) is part of Windows (or
> DOS) operating system. The boot loader is installed by fdisk.

I presume you're talking about DOS 'fdisk /mbr' here.

AFAIK the BIOS point to the master boot record (MBR) on
bootup, looking for a bootloader.  The code in the MBR
(first sector on first physical disk) then points the system
to the first sector of the bootable partition.  (DOS fdisk
requires a partition be marked "Active" in order to boot
from it.  One and only one can be active.)  In order to boot
from the partition it must be active and be a "system"
partition.  I.e., formatted with 'format /s' or formatted
and then the system transferred with the 'sys' command.
This "system" partition will contain io.sys in the first
sector, AFAIK, so it can be found by the code in the MBR.
Then io.sys will load DOS, ending with (typically) loading
command.com to give a command prompt.

Quote:> The first sector of the hard disk contains the partition table, and
> some code that loads the first sector of the first active partition,
> then runs it.

Agreed.

Quote:> In DOS and Windows this is the DOS boot sector, and it
> is structured like the first sector of a floppy disk.

This is where I disagree....  When booting from a floppy
disk the BIOS itself is directly responsible for the boot
process.  And all the BIOS does is start reading from the
first sector and trying to execute that code.  The DOS
bootloader on the HD simply points the BIOS to the
appropriate partition of the HD.

LILO performs a similar function, but also more.

Quote:> In Linux you can put Lilo in the first sector of the
> hard disk, or in the first sector of a partition (the
> first active partition if you want to run it).

True.

Quote:> While I don't know all the details about how it gets it, the lilo
> stuff can be too big to fit in one sector, and lilo uses some other
> stuff even before it loads the kernel.

> Even a DOS floppy has a boot loader of sorts. Ths DOS boot sector
> loads IO.SYS from the file system, making assumptions about where it
> is. However Linux is capable of booting from a floppy without a boot
> loader.

AFAIK, it is the BIOS that makes those assumptions about
where to find io.sys.  It is presumed to be at the start of
the floppy disk.  If the BIOS finds a Linux kernel there,
the BIOS doesn't know one O/S from another and happily boots
whatever it finds.  The bootloader is needed on the HD to
cope with partitions, etc.

Quote:> A hard disk without the initial boot loader would be like an enormous
> floppy.

Huh??  How's that??  A hard disk without a bootloader would
be unbootable because the BIOS makes no assumptions about
how to boot from a HD.  It does, however, make assumptions
about finding an MBR with a partition table.

Quote:> However when the kernel boots from a floppy it can find out
> about the hard disk partitions etc from the partition table. With the
> kernel starting in sector 1 there would be no space for a partition
> table, so it couldn't find out about the disk partitions.

That's a bit of oversimplification, I think.  If that's the
way you want to look at it, I guess that works.

J-P Stewart

 
 
 

1. SGI launches Linux supercomputer

http://www.vnunet.com/News/1137880

Altix 3000 Series claimed to be the world's most powerful Linux-based
system
High performance computing company Silicon Graphics (SGI) claims to
have developed the world's most powerful Linux-based system range.

Analysts said that the power of Linux-based systems will increase
further this year.

The SGI Altix 3000 Series combines up to 64 Intel Itanium 2 64-bit
processors, and uses SGI's NUMAflex global shared memory architecture
to create a single supercomputer.

2. Windows NT as a gateay to a Linux Server

3. Launching Linux without XWINDOW

4. color depth and video ram

5. HP Thailand launches Linux laptop for $450 -- INFOWORLD.com

6. HELP: ORACLE 7.1 under Solaris 2.5

7. using nt loader to launch linux

8. Having problems with dbx

9. Launching linux without XWin

10. Using IBM boot manager to launch linux

11. launching linux app from windows?

12. Metrowerks Launches Linux(r) OS Development Tool Suite for Sharp Zaurus(tm) PDA

13. KNode won't launch from kicker panel (but launches fine from CL)