LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   Problem booting slackware (https://www.linuxquestions.org/questions/slackware-14/problem-booting-slackware-480227/)

c)mcbrutal 09-04-2006 04:57 AM

Problem booting slackware
 
Hi all,

I have installed Slackware on my windows xp with no problems whatsoever up until a certain point. When I got to the part in setup where it asked me where to install LILO I chose MBR and a message came up saying LILO was not installed in MBR.

I couldn't make system diskettes (don't have a floppy disk drive) so now my problem is that when I boot my windows it goes straight into windows xp.

Does anyone have a suggestion as to how I can get LILO working? I am a complete linux newbie, so step by step would be fantastic.

Thanks in advance!

byte weaver 09-04-2006 05:44 AM

I wouldn't install LILO in the MBR if you want to keep using Windows. Normally, only one boot loader can reside there. Instead, install LILO in the Superblock of the Linux partition. Then you can use the Windows XP boot loader to boot into Linux. I can't tell you how right now, because I can't completely remember, but perhaps others can help you out. It's possible somehow to have the XP boot loader install into a visible area (perhaps if you started out with a DOS partition), and then edit the "boot.ini" file.

c)mcbrutal 09-04-2006 05:48 AM

Quote:

Originally Posted by byte weaver
I wouldn't install LILO in the MBR if you want to keep using Windows. Normally, only one boot loader can reside there. Instead, install LILO in the Superblock of the Linux partition. Then you can use the Windows XP boot loader to boot into Linux. I can't tell you how right now, because I can't completely remember, but perhaps others can help you out. It's possible somehow to have the XP boot loader install into a visible area (perhaps if you started out with a DOS partition), and then edit the "boot.ini" file.

can you tell me how to get back into linux to do that? and does that mean I should reinstall lilo in /root folder?

byte weaver 09-04-2006 05:59 AM

Boot from the Slackware CD and go right into the menu item that lets you install the boot loader. (Perhaps you might have to select the installation target first, but don't format it, since you already have) Select "Install LILO to Superblock" or similar, don't install it to the "/root" folder.

p.s.: Note that after you have accomplished that, you'll still not be able to boot into Linux; you'll have to find and edit the "boot.ini" first; use Microsoft's website to find information about "boot.ini" and how to activate the XP boot loader. You'll also have to know the partition identifier used by the boot loader. But you'll see how it's done when you get to editing the boot.ini. Normally, you just have to make another entry with a different partition number.

c)mcbrutal 09-04-2006 06:04 AM

Quote:

Originally Posted by byte weaver
Boot from the Slackware CD and go right into the menu item that lets you install the boot loader. (Perhaps you might have to select the installation target first, but don't format it, since you already have) Select "Install LILO to Superblock" or similar, don't install it to the "/root" folder.

Will give it a try and post back - thanks!

byte weaver 09-04-2006 06:16 AM

You're welcome! :)

If you manage to get it all running, you might be tempted afterwards to use the NTFS file system driver to access your Windows partitions. Be sure that this access is only read-only, because the NTFS Linux drivers are still experimental. You might destroy your Windows installation if you aren't careful. If you have your Linux using ReiserFS, you might go to the ReiserFS website and get the Windows drivers for it instead (which AFAIK aren't free, b/c the IFS kit for developers is so expensive). Or set up a common partition in a simple format like FAT for data exchange.

c)mcbrutal 09-04-2006 07:12 AM

Jst had a thought. How can I transfer the boot.lnx file to windows to edit boot.ini if I don't have a floppy? I have a dvd rewriter or a flash pen.

byte weaver 09-04-2006 08:51 AM

You don't have to. In "boot.ini", you just tell Windows where to look for the Linux partition.

regis_n_bits 09-04-2006 04:09 PM

Here is a quick guide to getting a dual-boot system with WindowsXP and Linux. Your system will have XP loaded on the first partition on the hard disk, which is the boot partition. The Linux system can be installed on any other partition of your hard drive.

1. Use the Slackware CD to boot to your Linux OS. The command to do this will be something like:
Code:

test26.s root=/dev/sda3 noinitrd ro
This loads the test26 kernel with serial ATA, with the / driectory being on the third partition of your hard drive.

2. If LILO is already installed, edit the /etc/lilo.conf file with an entry for your Linux OS. Note that you can run the LILO setup script to help create this entry for you. Use the 'pkgtool' utility to access the LILO setup script (among others). The root parameter will be set to the partition containing your / driectory.

3. As root user run LILO:
Code:

lilo
If there are no problems LILO will simply print out the name of the entry to the screen.

4. Grab a copy of the boot sector from your root partition. This involves the 'dd' command to read the first sector of a partition. If your root drive is in /dev/sda3 then you would enter:
Code:

dd if=/dev/sda3 of=tmp/linux.ldr bs=512 count=1
This copies the first sector to a file called 'linux.ldr' in your /tmp directory. This is the file you will transfer to the Windows drive. Note: be very careful with the dd command, because incorrectly using it can be very bad. View its documentation using 'man dd'.

5. Copy the file 'linux.ldr' to your C:\ drive. You can transfer it using a USB drive, or to a partition writeaable by both Windows and Linux.

6. In Windows copy the 'linux.ldr' to the c:\ drive, and make it read-only. Then edit the C:\boot.ini file by adding the line:
Code:

C:\linux.ldr="Slackware"
to the end of the file. Also, make sure you add a timeout entry to the file (e.g. timeout=30).

After this, you should be able to select the entry "Slackware" at bootup, and actually load your Slackware.

Note that if you ever install a new kernel, you will have to run LILO again, and repeat most of the steps again to recreate the linux.ldr file.

byte weaver 09-04-2006 06:32 PM

AFAIK you can also just tell Windows in the boot.ini file where the partition is (the format uses lots of parenthesis (0) etc.) and it can load LILO right off the Superblock. I used it a couple of times some years ago, but I forgot how exactly to do it. Perhaps someone else knows?

Woodsman 09-04-2006 08:04 PM

Not to throw too much at you because you are a self-confessed "complete linux newbie," ;) but I find that GRUB works quite well as an independent boot loader for mixed OSs on the same system.

Follow the previous instructions for booting your system with your CD. Once back into your system, from the third CD, from the Extras directory, install GRUB. If you do not have CD-3, then visit any Slackware mirror web site, find the Extras directory in the source tree, and download the GRUB files.

Install GRUB to the MBR. Then edit the GRUB menu.lst as necessary. GRUB will boot both Windows and Slackware without a hitch. Windows will not have a clue that it was booted from GRUB because GRUB will merely use the Windows boot loader to boot Windows.

Perhaps the following will help:

Installing GRUB

regis_n_bits 09-05-2006 05:26 PM

Quote:

AFAIK you can also just tell Windows in the boot.ini file where the partition is (the format uses lots of parenthesis (0) etc.) and it can load LILO right off the Superblock. I used it a couple of times some years ago, but I forgot how exactly to do it. Perhaps someone else knows?
I've never heard of doing it this way before. This method may be limited to systems with the Linux / in primary partition only.

GRUB can work too. But if his Windows partition is formatted as NTFS, then neither LILO or GRUB can be installed in the MBR.

Alien Bob 09-05-2006 05:50 PM

Quote:

Originally Posted by regis_n_bits
I've never heard of doing it this way before. This method may be limited to systems with the Linux / in primary partition only.

GRUB can work too. But if his Windows partition is formatted as NTFS, then neither LILO or GRUB can be installed in the MBR.

The HOWTO is right under your nose: /usr/doc/Linux-HOWTOs/Linux+NT-Loader

Eric

regis_n_bits 09-05-2006 07:02 PM

Just finished reading the Linux+NT-Loader from www.tldp.org. It describes the method of copying the linux root partition's boot sector to the Windows drive. And then adding the line "C:\BOOTSECT.LNX="Linux". That's what I do now for my system.

The way I interpreted the last message byte_weaver sent, it sounded like there was another way to add an entry to the boot.ini. Another way that does not require copying the root partition boot sector to a file located on the C:\ drive. Something like this:
Code:

#Example boot.ini - will not work
multi(0)disk(0)rdisk(0)partition(1)\WINNT="Windows NT Workstation ...
multi(0)disk(0)rdisk(0)partition(3)\Linux=Slackware

Anything that saves me from having to boot into Windows would be great.

Woodsman 09-05-2006 09:05 PM

Quote:

But if his Windows partition is formatted as NTFS, then neither LILO or GRUB can be installed in the MBR.
Hmm. Then how I boot my box is a mystery! ;) I've been booting with GRUB and NTFS partitions for several years. I installed GRUB on the MBR.

The MBR is a 512 byte (yes, byte!) pointer to another disk sector location. At that disk sector location is the beginning of whatever file is used to boot an OS. In the case of the old DOS, the MBR pointed to the first sector containing the file io.sys. In the case of NT4/W2K/XP, the MBR points to ntldr. In the case of GRUB, the MBR points to the GRUB stage loaders, which eventually loads the GRUB menu.lst file. When a user selects a DOS or NTFS option in the menu.lst, GRUB merely passes the boot sequence to the first sector in that option (chain loading), which contains the boot loader program for that OS. The other OS never knows the difference.

I am NOT starting a flame or fan-boy war, only stating that GRUB is quite flexible. :)

Using the NT boot loader to boot GNU/Linux is something I tried once just to see the effect. But GRUB proved more flexible and I abandoned that former idea. One nice thing about an independent boot loader is truly keeping all OSs separate from one another.


All times are GMT -5. The time now is 06:09 PM.