Slackware This Forum is for the discussion of Slackware Linux.
|
Notices |
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.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
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.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
|
08-06-2006, 04:21 PM
|
#46
|
Amigo developer
Registered: Dec 2003
Location: Germany
Distribution: Slackware
Posts: 4,928
|
Same thing, remember the boot sector of the hard drive is not part of the partition -it only contains bootable code at first and the partition table at the last. This partition information then points to the starting sector of one or more partitions. When you create an extended partition not all the info will fit in the partition table. So another sector is set aside in which more info can be stored. The partition table in the first sector then points to this sector which details the rest of the extended partition info.
The BIOS just reads the first sector of whatever bootable device in question. Linux uses DOS-style partition tables located in the last 66 bytes of the first 512 byte sector. The first 446 bytes are the bootloader. Under DOS/WIN this is 16 bit code that just looks at the last 66 bytes(the partition table), figures out which partition is set 'active' or bootable and then reads the first sector of the *partition* into RAM and begins executing that code. Under Windows this would be IO.SYS or MSDOS.SYS as mentioned.
Under Linux, lilo or the GRUB Stage 1 are installed in the first 446 bytes. lilo installs completely in this space, but GRUB needs more space since it can do more, so the bootcode points to GRUB Stage2 which contains the GRUB shell/bootloader.
These are not the same thing:
dd if=/dev/hda of=MBR count=1 bs=512
dd if=/dev/hda1 of=MBR count=1 bs=512
Installing lilo only writes the first 446. using fdisk onls works with the bytes from 446-512 and any extended partition table. formatting tools work on the rest. (dd works anywhere)
If you put Linux as the first drive you'll lose that error. As said, it's not a problem -lilo is on hda and the bootmap is saved under /boot on hdb but lilo can deal with that. But I'd leave Windows on the primary drive, if possible.
|
|
|
08-06-2006, 04:57 PM
|
#47
|
Senior Member
Registered: Dec 2004
Location: In my house.
Distribution: Ubuntu 10.10 64bit, Slackware 13.1 64-bit
Posts: 2,649
Rep:
|
You could, and would, install lilo to the mbr. By gnashley's explanation, lilo only uses the first part of the bootable, just to tell where to go. Windows is happy, because it doesn't know lilo is there, so it thinks it's still king of the world. Linux knows it is king, so it doesn't care.
Think of the single drive w/2 os's as the same thing as your two harddrives. The same pricipal applies. Windows is on /dev/hda1, linux on /dev/hda2. Same thing as you have now, except differnt drive designations.
The rule of thumb is this: - Install Windows first, so it thinks it owns the world.
- Install Slackware next
- Install lilo on mbr of /dev/hda
Doing it in this order always keeps Windows happy, which is the difficult part. It doesn't matter where Slackware is, but it does matter where windows is. So always install Windows as /dev/hda1, Slackware where ever you want, and lilo to mbr of /dev/hda.
With this rule of thumb, you can have:
: /dev/hda1 XP
: /dev/hda2 Slackware
: /dev/hda3 swap (can be for both Slackware and XP. Look elsewhere for info on doing this. Search is your friend!!)
: /dev/hdaX for /usr, or whatever, even a fat32 partition to trade files between both os's.
The importtant bit is XP on /dev/hda1, and lilo on mbr of /dev/hda
|
|
|
08-07-2006, 02:23 AM
|
#48
|
Member
Registered: Jul 2006
Location: Köln, Germany
Distribution: Slackware64-14.2 & -current, DragonFly BSD, OpenBSD
Posts: 819
Original Poster
Rep:
|
Ok, and will I be at a success if on a system with an already installed Windows, and a single hard drive, I install Slackware and install lilo to the root partition of Slackware? Will lilo be started at all and will it be able to load both Windows and Slackware? Or I will have again have no other alternative, but install lilo to the MBR of the hard drive?
When lilo is not in the mbr, but in the root partition of Slackware, BIOS will load the boot sector and start Windows I think, because there the Windows loader is, isn't it like that? According to me lilo will not be started at all, the system will boot straight into Windows. How will BIOS know to look for lilo in the root partition of Slackware and start the lilo bootloader there?
|
|
|
08-07-2006, 02:53 AM
|
#49
|
Senior Member
Registered: Dec 2004
Location: In my house.
Distribution: Ubuntu 10.10 64bit, Slackware 13.1 64-bit
Posts: 2,649
Rep:
|
It won't. If you want a true dual boot, INSTALL TO THE MBR.
I know I said that three times.
Forget it. If you are TOO thick to follow instructions, you're on your own.
I give up.
|
|
|
08-07-2006, 03:07 AM
|
#50
|
Member
Registered: Jul 2006
Location: Köln, Germany
Distribution: Slackware64-14.2 & -current, DragonFly BSD, OpenBSD
Posts: 819
Original Poster
Rep:
|
Ok, I am just asking, because I want to know. I am not quarrelling. I am just asking what will happen if on a system with a single hard drive and Windows already installed, I install Slackware Linux and install lilo to the Linux root partition? Because there are systems where lilo is installed to the root partition, and they work, isn't it like that?
How does BIOS on such system know that there is lilo in the linux root partition? I am just asking because I am curious to know.
|
|
|
08-07-2006, 03:22 AM
|
#51
|
Senior Member
Registered: Dec 2003
Distribution: Debian
Posts: 3,178
Rep:
|
Quote:
Originally Posted by tramni1980
Ok, I am just asking, because I want to know. I am not quarrelling. I am just asking what will happen if on a system with a single hard drive and Windows already installed, I install Slackware Linux and install lilo to the Linux root partition? Because there are systems where lilo is installed to the root partition, and they work, isn't it like that?
How does BIOS on such system know that there is lilo in the linux root partition? I am just asking because I am curious to know.
|
If you keep LILO on the /boot partition of Slackware instead of the MBR, you need another boot loader in the MBR to point to Windows and the /boot partition to boot Slackware.
With the Windows default boot loader in the MBR, you cannot boot into Slackware or any other Linux without a boot floppy or boot CD.
|
|
|
08-07-2006, 03:36 AM
|
#52
|
Member
Registered: Jul 2006
Location: Köln, Germany
Distribution: Slackware64-14.2 & -current, DragonFly BSD, OpenBSD
Posts: 819
Original Poster
Rep:
|
Thank you. It is clear to me now I think. So in order to have a dual booting system I have to install the boot loader in the mbr. So the implementations where lilo is in the /root partition, assume that in the mbr of the hard drive there is another bootloader, which is not the defailt Windows bootloader. Im I right?
What is still a bit misty to me, is the following: what is the sense of installing the lilo bootloader to the /root partition, since the other bootloader, which is in the MBR of the hard drive and is different from the default Windows bootloader, can be tuned to load Linux? If you do not feel like explaining that to me, I would be thankful is you suggest me some free literature, accessible via the internet, which will clarify this topic to me . What sense does chaining the bootloaders make, since one can place a single bootloader in the MBR of the hard drive, which will be able to load all the operating systems installed on the machine?
|
|
|
08-07-2006, 03:52 AM
|
#53
|
Senior Member
Registered: Dec 2003
Distribution: Debian
Posts: 3,178
Rep:
|
Quote:
Originally Posted by tramni1980
Thank you. It is clear to me now I think. So in order to have a dual booting system I have to install the boot loader in the mbr. So the implementations where lilo is in the /root partition, assume that in the mbr of the hard drive there is another bootloader, which is not the defailt Windows bootloader. Im I right?
What is still a bit misty to me, is the following: what is the sense of installing the lilo bootloader to the /root partition, since the other bootloader, which is in the MBR of the hard drive and is different from the default Windows bootloader, can be tuned to load Linux? If you do not feel like explaining that to me, I would be thankful is you suggest me some free literature, accessible via the internet, which will clarify this topic to me . What sense does chaining the bootloaders make, since one can place a single bootloader in the MBR of the hard drive, which will be able to load all the operating systems installed on the machine?
|
Nothing prevents you from installing a third-party boot loader (say like XOSL) in the MBR and then installing LILO in its own boot partition). This is one form of chain loading you can use.
This might actually work to your advantage since that boot loader can exist separate from the OS. And something like XOSL can easily be configured without having to boot into one OS or the other.
The only downside of using a third party boot loader is that it mostly won't be able to boot Linux natively so you would still have to install LILO in its own boot partition. Cannot do without LILO or GRUB either way to boot Linux. Makes it also a bit more complicated, but that way you avoid LILO in the MBR.
In any case where you you want to dual boot, you *need* a custom boot loader in the MBR or you would require a boot floppy or CD every time.
|
|
|
08-07-2006, 04:00 AM
|
#54
|
Member
Registered: Jul 2006
Location: Köln, Germany
Distribution: Slackware64-14.2 & -current, DragonFly BSD, OpenBSD
Posts: 819
Original Poster
Rep:
|
Ok, thank you very much indeed. Things are clear to me now.
I apologize for any dull questions.
|
|
|
08-07-2006, 12:10 PM
|
#55
|
Member
Registered: Mar 2004
Location: Canada
Distribution: Slackware current
Posts: 728
Rep:
|
Quote:
Originally Posted by tramni1980
The only thing is that somewhat slowly starts the lilo prompt, there are about 10 seconds scratchy,rasping sounds and then the prompt appears. Probably the reason is that the boot sector and the map file are on different disks, what says the lilo warning. Have you got some idea how to adjust that?
|
Was this not when the computer was booting from the floppy drive? Your HDDs probably shouldn't be making noises like that (too much, anyway -- some generally older HDDs are pretty noisy).
Glad to hear things are working out for you now, but it was a rather strange issue - Windows boots fine when lilo is installed during Slackware installation, but not after rerunning lilo...
One more thing I wanted to mention, having mentioned it before but evidently becoming lost in the rest of it - you really shouldn't have to keep reinstalling slackware over and over again. For one thing, the setup program can skip the steps to actually install the software, you could just set up the partitions (which is actually just for configuring lilo... no changes are made to your system at that step), configure the network, font, etc. and you'd be done in about 5 minutes.
When you swapped HDDs and forgot to edit /etc/fstab you could have used a rescue disk to boot into your Slackware system and simply edit it then. Of course the steps to do this can be slightly complicated, but it's worth learning how to do this type of thing.
|
|
|
08-07-2006, 01:14 PM
|
#56
|
Amigo developer
Registered: Dec 2003
Location: Germany
Distribution: Slackware
Posts: 4,928
|
That floppy that you made first with lilo on it is your perfect custom boot floppy.
I actually prefer to use GRUB and have windows NTLDR load that since GRUB is a lot more flexible. You don't even write to the MBR at all, just make an entry in the boot.ini file which points to GRUB Stage1 and you are set.
I have several patched versions of GRUB with installer programs for use under Windows or DOS here:
http://distro.ibiblio.org/pub/linux/...ects/AFX-GRUB/
|
|
|
08-07-2006, 06:36 PM
|
#57
|
Member
Registered: Nov 2005
Distribution: Slackware 10.2 2.6.20
Posts: 68
Rep:
|
Quote:
Originally Posted by tramni1980
Ok, I am just asking, because I want to know. I am not quarrelling. I am just asking what will happen if on a system with a single hard drive and Windows already installed, I install Slackware Linux and install lilo to the Linux root partition? Because there are systems where lilo is installed to the root partition, and they work, isn't it like that?
How does BIOS on such system know that there is lilo in the linux root partition? I am just asking because I am curious to know.
|
This would be something neat to try out. Single hard drive system, setup a windows partition (less than the full drive) and install Windows. Then boot the Slackware CD and install Slackware to another partition, and install LILO to the ROOT (Superblock) and reboot.
The the DOS/Windows MBR should boot whichever partition is marked active, which should still be the windows partition, so Windows should load (NO LILO). In a command prompt, fire up Windows FDISK and set the Slackware partition bootable and reboot; LILO should be loaded from the root of the slackware partition.
This is probably the only configuration where a Linux partition needs to be marked bootable.
Then I think there is a way to edit the Windows BOOT.INI to present a boot selection to boot Linux. A quick google hasn't given me a clear answer on this yet (The results so far indicate that you need to put something on the C: drive.)
._.
*Edit: They are saying that you have to get a copy of the LILO boot sector as a file onto the windows partition, and add an entry to the boot.ini to that file.
Last edited by Slim Backwater; 08-07-2006 at 07:04 PM.
|
|
|
08-08-2006, 06:39 AM
|
#58
|
Amigo developer
Registered: Dec 2003
Location: Germany
Distribution: Slackware
Posts: 4,928
|
I had a distro that used a DOS/WIN (.bat) batch script to run a w32 binary called grubinstall.exe which installs GRUB Stage1 and Stage2 to the same drive as NTLDR and places an entry in the boot.ini file for you. Basically, running this script under windows would turn your machine into a dula-boot machine in about 3-4 seconds, the safest, easiest way ever. It soen't really make any difference if it's just one disk or more than one. (My distro didn't even need you to create a separate partition for linux).
Anyway, a lot of the stuff I have used or may in fiuture can be found here:
Have a look around here:
http://distro.ibiblio.org/pub/linux/...RUB/Resources/
|
|
|
08-09-2006, 11:23 PM
|
#59
|
Member
Registered: Nov 2005
Distribution: Slackware 10.2 2.6.20
Posts: 68
Rep:
|
Quote:
Originally Posted by Slim Backwater
This would be something neat to try out. Single hard drive system, setup a windows partition (less than the full drive) and install Windows. Then boot the Slackware CD and install Slackware to another partition, and install LILO to the ROOT (Superblock) and reboot.
The the DOS/Windows MBR should boot whichever partition is marked active, which should still be the windows partition, so Windows should load (NO LILO). In a command prompt, fire up Windows FDISK and set the Slackware partition bootable and reboot; LILO should be loaded from the root of the slackware partition.
This is probably the only configuration where a Linux partition needs to be marked bootable.
|
Following up with myself, I got a chance to try this out today. Installed Windows 2000 onto a 10 Gig partition (/dev/hda1) then installed Slackware 10.2 to a 10GB hda2 and installed LILO to the superblock of the root partition. Leaving hda1 marked bootable, windows loaded; and when I marked hda2 bootable, lilo started up with Windows/Linux boot options.
I chose the simple LILO install and got both Windows and Linux boot options. I didn't actually try the Windows Option, but Slack booted just fine.
I'll try the Windows option and report back if it works fine too.
._.
|
|
|
08-09-2006, 11:37 PM
|
#60
|
Senior Member
Registered: Dec 2003
Distribution: Debian
Posts: 3,178
Rep:
|
That's a really cool idea, Slim Backwater... I keep learning something new every day.
|
|
|
All times are GMT -5. The time now is 09:54 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|