Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
# Overrides the default mapping between harddisk names and the BIOS'
# harddisk order. Use with caution.
# Specifies the boot device. This is where Lilo installs its boot
# block. It can be either a partition, or the raw device, in which
# case it installs in the MBR, and will overwrite the current MBR.
# Specifies the device that should be mounted as root. (`/')
# Enable map compaction:
# Tries to merge read requests for adjacent sectors into a single
# read request. This drastically reduces load time and keeps the
# map smaller. Using `compact' is especially recommended when
# booting from a floppy disk. It is disabled here by default
# because it doesn't always work.
# Installs the specified file as the new boot sector
# You have the choice between: bmp, compat, menu and text
# Look in /boot/ and in lilo.conf(5) manpage for details
# Specifies the location of the map file
# You can set a password here, and uncomment the `restricted' lines
# in the image definitions below to make it so that a password must
# be typed to boot anything but a default configuration. If a
# command line is given, other than one specified by an `append'
# statement in `lilo.conf', the password will be required, but a
# standard default boot will not require one.
# This will, for instance, prevent anyone with access to the
# console from booting with something like `Linux init=/bin/sh',
# and thus becoming `root' without proper authorization.
# Note that if you really need this type of security, you will
# likely also want to use `install-mbr' to reconfigure the MBR
# program, as well as set up your BIOS to disallow booting from
# removable disk or CD-ROM, then put a password on getting into the
# BIOS configuration as well. Please RTFM `install-mbr(8)'.
# Specifies the number of deciseconds (0.1 seconds) LILO should
# wait before booting the first image.
# You can put a customized boot message up if you like. If you use
# `prompt', and this computer may need to reboot unattended, you
# must specify a `timeout', or it will sit there forever waiting
# for a keypress. `single-key' goes with the `alias' lines in the
# `image' configurations below. eg: You can press `1' to boot
# `Linux', `2' to boot `LinuxOLD', if you uncomment the `alias'.
# Specifies the VGA text mode at boot time. (normal, extended, ask, <mode>)
# Kernel command line options that apply to all installed images go
# here. See: The `boot-prompt-HOWO' and `kernel-parameters.txt' in
# the Linux kernel `Documentation' directory.
You actually have 3 hard disks, and they all have a bootable partition. You only need to have /dev/hda1 marked as bootable, and then install LILO in the MBR.
So, the question still remains - where did you install LILO? I think you have LILO installed in /dev/sda rather than in the MBR, which is now on /dev/hda with Windoze. And am I correct that hdb us just a storage drive, and has no OS?
Originally posted by samxiao /dev/hdb is for storage
/dev/hda has Windows on it..
/dev/sda <-- i install MBR in there
how do i config lilo and install MBR in /dev/hda and overwrite the Windows one
i dun have a choice to install Windows XP at first, this is what i got
so how do i config my /etc/lilo.conf and install MBR in /dev/hda instead of /dev/sda
By the way, what do you mean by "but i tried to edit my /etc/lilo.conf to boot Windows XP it always can't how come?" Maybe we've missed something else.
Windows XP has a bootloader which was installed into the MBR when you installed Windows XP last. I believe you have the LILO bootloader installed in /dev/sda1, so that it never sees the Windows XP bootloader. The method I like is to install Windows first, and let it write it's bootloader to the MBR of the hard drive it's on - in my case it's /dev/hda. Then I will install the Linux distribution, and when I do, I install LILO in the MBR. Then LILO gets a choice to load the Windows OS, which of course, has the bootloader in the MBR.
What is the brand of your motherboard? I use Asus, and they have a unique feature, which I don't think any other mobo has. When you reboot the computer, just after the POST screen you can hit the ESC key for 1 second and get a screen which gives you a choice of boot devices. It's very tricky to hit the key at just the right time. If you do, you can choose the first hard drive, which will be your /dev/hda and that should boot your Windows XP - proving that the MBR is intact. If you get there and it doesn't boot XP, then you have another problem.
I used to run Debian, but I'm not at the moment. So therefore, the instructions I am going to give you would work for Slackware, but I can't say they will for Debian. That issue of the boot mapping in Debian is what may be different. You can learn all you need to know about this by reading your /etc/lilo.conf file and the link about LILO at TLDP that I gave you.
However, if you were running Slack, and assuming this will work in Debian, exit your X window system and get to the console. Then login as su. Next, run cfdisk /dev/sda and when it comes up, change that bootable partition. It will have /dev/sda marked as bootable, and you just enter on the choice that says [Bootable] and the word Bootable in that top line will disappear. Then you must choose [Write] and then type yes. After that, just choose [Quit]. Next, run cfdisk /dev/hdb and do the same procedure on it. This should make only /dev/hda as your bootable partition, which is where your Windoze MBR is located. Now run /sbin/lilo and if there are no errors, then reboot.
I'd search in the Debian forums, and read that article from The Linux Documentation Project before I did this, however. It might make your system unbootable.
What is /dev/sda anyway? Is that a USB drive? I say this because I mount things such as my USB Flash disk, and USB hard drive, by mount /dev/sda1 /mnt/<devicename>
You can find the answer, if mine is not correct, by searching and reading. I think you can change those bootable labels that I told you, and then probably run the cfdisk utility from your Debian CD, and then install LILO into the MBR with the CD.
Read some before you take those steps. As I say, in Slack the boot images are in the /boot directory, but I don't remember exactly what Debian does with that.