Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

LILO/boot options, and runtime/services questions.

5 views
Skip to first unread message

LRW

unread,
Apr 14, 2003, 9:31:15 AM4/14/03
to
I used to be a RedHat user, but decided to go with a real Linux
distrobutions and have taken up Slack' 9. Well, I have a couple of
questions if I may.

1st, startup services and runtime.
In RedHat I used SysV (if I recall) that edited the rc.d/inet.d file
(I think) for when you wanted to define what services to start and
stop.
I looked for the init.d (inet.d...can never remember the spelling when
I'm not in front of it) but it doesn't seem to exist.

How do I edit the services to start at bootup? Specific example: I
want to get Apache to startup at bootup so I don't have to use
"#apachectl start" all the time.

If someone could just point me to a MAN to read, I'd be very happy. =)
But I don't even know what to look for at the moment.

The other question I have regards MBR bootup. I thought even as I
started writing this that it was a LILO issue, but now I'm thinking
not.
I have Win2000Pro on drive 0 and Slackware on drive 1. (hda1 and hdc1
respectively.)
Without the startup floppy the PC will boot into Win2K and with
floppy, Linux.
When I set up Slack I selected to have the boot files copied to...not
the MBR but the 3rd option, "superblock" I think it was called?
So I was just wondering, will I be able to fdisk and turn the bootable
flag to on on the hdc1 drive and give it the option to be able to boot
from either OS, or will that just allow me to only boot to Linux and
I'll be locked out of Win2K (unless I DOS "fdisk mbr") ?

Was hoping I could get some advice on that too.

Thanks for any help, even if it's just a "RTFM" with a mention of
which "M" to read. =)
Liam
dr...@NOSPAHMcelticbear.com

@lenta.ru big bang mojo

unread,
Apr 14, 2003, 9:40:18 AM4/14/03
to
LRW wrote:

> I used to be a RedHat user, but decided to go with a real Linux

So did I :-)

> How do I edit the services to start at bootup? Specific example: I
> want to get Apache to startup at bootup so I don't have to use
> "#apachectl start" all the time.

# chmod +x /etc/rc.d/rc.apache

or something of this kind

> If someone could just point me to a MAN to read, I'd be very happy. =)
> But I don't even know what to look for at the moment.

http://www.slackware.com/book/

and the daily FAQ posting at this newsgroup.

Sincerely,
bbm

LRW

unread,
Apr 14, 2003, 2:19:19 PM4/14/03
to
(Thanks "bbm" for the Slackware "book" link!)

So, regarding dualbooting. An update. I found this on the Slackware
site thanks to a reply to my post, instructing one how to dual-boot
with WinNT.
Since I'm using Win2000Pro, I figure it should be the same steps, yes?

Lemme remention what I've got going, and what the Slackware site says,
and ask opinions if this is going to work well for me or if there are
additional suggestions I should follow.

I've Win2K installed 1st on hda1. It has control of the MBR record as
it boots to that OS automatically.
I've Slackware 9 on hdc1, and boot to it using a floppy disk.
What concerns me is the part in the instructions below regarding
"grabbing" the 1st 512 kb of the Linux partition...what does that do
and will it work if I'm using 2 separate disks, not just partitions?

When I installed Linux, I did use the "superblock" method vs. MBR
method.

Anyway, if anyone has any suggestiosn for me before I follow the
instructions below, I'd greatly appreciate it.
Thanks!
Liam

Windows NT
This is the second most common dual booting situation. Windows NT
presents several more problems than dual booting between Windows 9x
and Linux. The one we are most concerned with is if the Master Boot
Record is overwritten with LILO, NT will not boot successfully.
Therefore, we must use the OS Loader that comes with Windows NT. The
steps below show how you should setup a Windows NT and Linux dual boot
system.


Install Windows NT

Install Linux, making sure LILO is installed to the superblock of the
Linux partition

Get the first 512 bytes of the Linux root partition and store it on
the Windows NT partition

Edit C:\BOOT.INI under Windows NT to add a Linux option

Installing Windows NT should be fairly straightforward, as should
installing Linux. From there, it gets a little more tricky. Grabbing
the first 512 bytes of the Linux partition is easier than it sounds.
You will need to be in Linux to accomplish this. Assuming your Linux
partition is /dev/hda2, issue this command:

# dd if=/dev/hda2 of=/tmp/bootsect.lnx bs=1 count=512

That's it. Now you need to copy bootsect.lnx to the Windows NT
partition. Here's where we run into another problem. Linux does not
have stable write support for the NTFS filesystem. If you installed
Windows NT and formatted your drive as NTFS, you will need to copy
this file to a FAT floppy and then read from it under Windows NT. If
you formatted the Windows NT drive as FAT, you can simply mount it
under Linux and copy the file over. Either way, you will want to get
/tmp/bootsect.lnx from the Linux drive to C:\BOOTSECT.LNX on the
Windows NT drive.

The last step is adding a menu option to the Windows NT boot menu.
Under Windows NT open a command prompt.

C:\WINNT>cd \
C:\>attrib -r -a -s -h boot.ini
C:\>edit boot.ini

Add this line to the end of the file:

C:\bootsect.lnx="Slackware Linux"

Save the changes and exit the editor. When you reboot Windows NT, you
will have a Linux option on the menu. Choosing it will boot into
Linux.

Andrei Osin

unread,
Apr 14, 2003, 2:36:08 PM4/14/03
to
LRW wrote:
> How do I edit the services to start at bootup? Specific example: I
> want to get Apache to startup at bootup so I don't have to use
> "#apachectl start" all the time.

# chmod +x /etc/rc.d/rc.httpd

> Was hoping I could get some advice on that too.

/usr/doc/Linux-mini-HOWTOs/LILO

B-Man

unread,
Apr 14, 2003, 9:05:47 AM4/14/03
to

"LRW" <li...@celticbear.com> wrote in message >
I have some advice, You are in the right ballpark on dual booting with
Win2000 and Slack. I have almost the same setup, seperate drives for both
OS'es.

Since you have installed LILO to the Superblock of hdc1, what you need is
to grab the first 512 bytes of that drive, and create a file that Win2000's
boot loader can use to point to the Slack partition.

You need to do 2 things. create the file, and edit boot.ini in win2000
If you mounted hda1 in slack it's real simple,
in Slackware # dd if=/dev/hdc1 of=/dev/hda1/bootsect.lnx bs=1 count=512
that command will create a file named bootsect.lnx and write it to the root
directory on your win2000 drive. you will need to change the OF= section
to something else if you don't have access to your hda1 in slackware.

next you boot into win2000, and edit "boot.ini" file. add the line
C:\bootsect.lnx="Slackware Linux" and save.
just remember that boot.ini is a system, hidden file, so you may have to
change your options in file manager to be able to view it.


Remember that anything you do anything to lilo in slack, you will have to
grab the 512 bytes again to see the changes.


good luck,

bman

Martin Boening

unread,
Apr 15, 2003, 4:30:33 AM4/15/03
to
Hi there,

li...@celticbear.com (LRW) writes:

[...]

>1st, startup services and runtime.
>In RedHat I used SysV (if I recall) that edited the rc.d/inet.d file
>(I think) for when you wanted to define what services to start and
>stop.
>I looked for the init.d (inet.d...can never remember the spelling when
>I'm not in front of it) but it doesn't seem to exist.

Its 'init.d' for the SYSV startup files themselves and rc[0-6].d/rcS.d
for actually starting/killing Services using K<xx><service> and
S<yy><service> scripts - the numerals representing the runlevel - if
its anything like the SYSV init that comes with Reliant UNIX or
SUN Solaris. You can use this mechanism in Slackware too, if you
haven't disabled the rc.sysvinit script in /etc/rc.d. AFAIK, the
SYSV init doesn't edit any scripts, BTW. Rather, the sysadmin
links a script from init.d to a S or K script in the appropriate
runlevel rc?.d to have the service started or killed as required.
In Redhat, it may be that some config script does that and hides
the action from the user - that, I don't know.

>How do I edit the services to start at bootup? Specific example: I
>want to get Apache to startup at bootup so I don't have to use
>"#apachectl start" all the time.

You create a rc.something script in /etc/rc.d and have it run at
startup. To do this, you can either add the script to rc.M (or rc.4,
if your service is only supposed to run at that runlevel), taking
one of the calls therein as example, or add it to rc.local (where
customizations _should_ be added). In that case you will need to
check in your own startup script if the system is entering the
appropriate runlevel, as it is called by rc.M and rc.M runs for
any runlevel between 1 and 6, according to the "source".

If you wish to just start one of the "standard" services coming with
Slackware, just check if:
- there is a rc.<something> script that has no exectue bit set
in the permissions - to start that service, add the execute bit
and things should be on 'go'. E.g. rc.samba
- the requested service would be started by some existing rc-script,
but the relevant "code" has been commented out. Remove the comment
characters to actiate at next boot. E.g. BIND in rc.inet2.

Apache is started through rc.httpd, BTW. This is an example of a
mixture of BSD init with its rc-scripts - as used by Slackware - and
a SYSV init like starting procedure (rc.http has to be called with
argument 'start' to actually start the service and with argument
'stop' to stop it). Actually, it would probably best be called
as 'Sxxhttp' start or 'Kxxhttp stop', these being located in rc3.d
or rc0.d or whereever - except that sysvinit isn't "REQUIRED", if
I remember correctly.

>If someone could just point me to a MAN to read, I'd be very happy. =)
>But I don't even know what to look for at the moment.

Well, some starting points might be 'man init', 'man inittab' and
perusing the inittab of your slackware system and the rc.scripts
in /etc/rc.d.

>The other question I have regards MBR bootup. I thought even as I
>started writing this that it was a LILO issue, but now I'm thinking
>not.
>I have Win2000Pro on drive 0 and Slackware on drive 1. (hda1 and hdc1
>respectively.)
>Without the startup floppy the PC will boot into Win2K and with
>floppy, Linux.
>When I set up Slack I selected to have the boot files copied to...not
>the MBR but the 3rd option, "superblock" I think it was called?
>So I was just wondering, will I be able to fdisk and turn the bootable
>flag to on on the hdc1 drive and give it the option to be able to boot
>from either OS, or will that just allow me to only boot to Linux and
>I'll be locked out of Win2K (unless I DOS "fdisk mbr") ?

I think it won't quite work like that because disk 0 is the disk
your system knows as the boot device for HD boot and disk 1 isn't even
looked at in this respect. So marking /dev/hdc1 an active partition
won't do anything.

The tedious procedure is to mark the LINUX boot/root partition on
/dev/hdc active and to mark the W2K partition on /dev/hda as active.
Then, on system start, enter the bios and select the disk containing
the operating system you wish to start as the HD boot device. As I
said, this is tedious and only works if your BIOS supports making a
a hard disk other than the primary master a HD boot device.

What I do is, according to the documentation, DANGEROUS, but it
works for me: on my work machine I have written LILO to the MBR of the
boot device (/dev/hda). (In lilo.conf global, I therefore have
"boot = /dev/hda"). Linux, on my system, resides on /dev/hdb, so
in lilo.conf all the LINUX boot configs look similar to this:
---
image = /boot/vmlinuz
root = /dev/hdb1
label = linux
read-only # Non-UMSDOS filesystems should be mounted read-only for checking
---
I currently don't have a system on /dev/hda, not having gotten around
to installing Win XP yet, so there is no boot config for /dev/hda at all.
Using this setup boots LINUX from /dev/hdb1 just fine and I don't expect
any problem booting XP from /dev/hda, once it's installed. (I have a
dual boot system with only one disk drive and that combination of
OSes running without a problem).

As someone pointed out, you can also copy the boot sector of /dev/hdc1
to W2K and integrate it into the boot manager of W2K. I did something
like that using NT once and soon found out that it was too tedious and
error-prone because every time, your LILO setup changes in any way, you
need to remember to copy the boot sector to W2K again. However, if you
are not adventurous, that is the safe route because you avoid messing
with the MBR on /dev/hda.

Speaking of man pointers, I recommend 'man lilo', 'man lilo.conf',
all the docs in /usr/doc/lilo-* (in my case /usr/doc/lilo-22.5, but
that version of LILO is not the current Slackware mainstream but
rather an "extra").

Hope this helps a bit.

Have fun,
Martin
--
Martin Boening, mb...@t-online.de

The primary requisite for any new tax law is for it to exempt enough
voters to win the next election.

0 new messages