Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
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.
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.
I am dual-booting WinXP and trying different Linux distros. Since I still consider myself a newbie (and probably always will!) I do my partitioning in Windows. I have Partition Magic (but not using it anymore) and Paragon's Partition Manager.
My question is this: according to things I've read, I think I can't have more than one Active/bootable partition? But in both of the above programs, my XP partition is active, and my Debian partition which is in an extended partition is also. I can't seem to change it, in either program.
Is it possible to have more than one active partition on the same physical drive? The drive is a 250 GB sata, if that matters...
i presume that u have to resize your extended partition, which takes all place and allows just creating of logical partitons. you need one more primary partition (if u want one more OS to be bootable, or more primary partitions if u want more OS). you can use fdisk (comes with Slackware) to do all that. in slackware installing tutorials u can find descriptuion how to use fdisk. i recommend this one:
I have two ide drives with one primary active bootable partition on each drive, and one extended partition on each drive. Each extended drive is subdivided into 5 partitions, with one of the 5 flagged as bootable. So, hda1 and hdb1 each hold a bootable OS, and hda6 and hdb6 also have bootable OSs.
I googled up this information, which you may find useful.
Primary Partitions
The primary DOS partition is the partition containing the files (IO.SYS, MSDOS.SYS and COMMAND.COM) needed to boot DOS. This is C:. Primary partitions cannot be divided into logical drives.
Any hard disk in a PC can have a primary partition, not just the first hard disk.
Because of the fixed size of the partition table (64 bytes), there can be at most 4 primary partitions on any given drive. If there were 4, they would be called C:, D:, E: and F:, assuming they are on the first hard disk.
If you want more that 4 partitions on 1 hard disk, some need to be extended partitions. Remember, you don't have to have 4 primary partitions, but you can have up to 4.
This limit of 4 explains why, under Linux, primary partition names - for the first hard disk - range from /dev/hda1 to /dev/hda4, and why logical partition names must start from /dev/hda5.
Active And Bootable Partitions
If a partition is marked as active, it can be booted from. Only primary partitions can be marked active.
Use DOS's or Linux's fdisk program to display partition tables, wherein you will see some partitions marked as active.
Extended Partitions
An extended partition is a non-primary partition. There can only be 1 extended partition per drive. The major difference is that extended partitions can be sub-divided.
Thus an extended partition could be (contain) D:, or it could be D: and E:, or ...
Logical Drives
Logical drives are the names, C:, D:, E:, etc, used to refer uniformly to primary partitions and the parts of extended partitions.
If, under Linux, the first SCSI drive (/dev/sda) contained a primary partition and an extended partition, and the latter contained 2 logical drives, then:
1. The primary partition would be /dev/sda1
2. The logical partitions would be /dev/sda5 and /dev/sda6
"Active And Bootable Partitions
If a partition is marked as active, it can be booted from. Only primary partitions can be marked active."
Yes, this is why I am asking. I just created a screenshot of both Paragon's Partition Manager and PowerQuest's Partition Magic. I have a bmp of both, but nowhere to put it here..
I have a primary parttion for WinXP that is active, and a Debian extended partition that is on the same Sata drive that is also marked as Active. I can't change it from within those programs: the option is grayed out.
What is the easiest way to run fdisk to look at how that program reports my partitions?
Bootable partition is only used by DOS and Windows (Also BSD & Solaris) because they cannot survive in a logical partition.
The bootable flag in a logical partition is "unused"! Linux can be booted from either a primary or logical partition and does not give a damn if the booting flag is switched on or not. In other word Linux is immune to the system used by DOS/Windows.
A good partitioning program, that has been designed to be PC compatible, would switch permit only one primary partition booting flag to be switched on by switching off the previous one whenever a new one is selected. This is visible in Linux's cfdisk & fdisk. The DOS's fdisk and XP's disk management program do the same thing. Even 3rd party Partition Magic would toes the line, otherwise all hell will break loose for DOS & Winodws.
Ok, saikee, your post made sense to me. In other words, the flag on my Debian partition is useless, and not read by Linux anyway.
But I worry about my DOS, winXP stuff. I don't want it to get confused, as you say, all hell will break loose. This problem with having 2 active partitions showed up after installing Debian. I guess the Debian install set a flag that said it was active/bootable, and turned off the flag for my XP partition. I had to turn it back on to boot XP. I used Paragon to do that, and it didn't turn off the Debian's flag. And is not able to ...
I guess ulitmately my question is, should I be concerned? I can delete my Debian install to set things right... so should I?
I wouldn't worry about the booting flag in logical partitions. If a distro needs it as a guide it will flag it up on being booted to it every time.
Both Lilo and Grub need the user to define the root partition for every booting choice and that is all it take to boot a Linux or a Windows
Lilo uses image=/dev/hda? or other=/dev/hda?
Grub uses root (hd0,?) etc
A user only needs to touch the booting flag if he/she has several DOS/Windows partition within the same disk. In such case the partitions ahead of the booting partition can be made hidden and the target partition can be "makeactive" to satisfy the DOS/Windows' fantasy of being booted to a "C" drive.
One can boot up a Grub floppy (unattached to an operating system) and manually switch the booting flag around with the command "makeactive".
Saikee, I have been reading other posts about the Grub bootloader, and I am going to try your process of creating a Grub floppy (unattached). It sounds like a perfect tool for someone who likes to dabble in trying different distros.
You wrote somehwere that you don't understand why people don't stop using the ntloader, and just use Grub. One big reason (the biggest reason for me anyway) is that everytime WinXP updates, it overwrites the MBR. So I always leave the MBR untouched by Linux. Doesn't that problem affect you in your system? Or have you found an easy work-around?
Never experience such a thing that M$ would update the boot loader and I ran 5 licenses of XP at home.
Think you mix up with M$ always "reboots" after a major update. You can still boot up the XP as usual (like before the update) with a non-M$ boot loader.
I am pretty relax about that M$ would not touch the boot loader because of the following reasons
(1) Boot loader resides in sector 0 or a partition reserved exclusively for such a purpose. It is not part of the filing system. That is why people can format a partition 100 times but can't get rid of the boot loader which can only be overwritten by anther boot loader.
(2) Boot loader has no security risk as it buggers off before you can say thank you to it. You never see the bugger again until next time you boot the PC. The partition table is inside the stage 1 of a boot loader and that has a security risk. No boot loader can exists without the ability of steering away from the partition table in all conditions.
(3) M$ uses a common MBR for DOS, old and new Windows. I have always managed to restore the XP's MBR with a dead DOS floppy. I have also used a XP installation CD to restore Win2k's MBR and vice versa.
(4) The MBR is only 512 byte large with only the first 446 bytes being the executable code, followed by the 64 bytes describing the 4 primary partition and 2 spare bytes. There is no scope to make the MBR any more complicated. The MBR's duty is to pull the main 2rd stage boot loader into memory. A boot loader always chainload another at the position after the first sector or the +1 position.
So there is not much that can be changed in the stage1 of a boot loader (the bit that actually in the MBR) or any purpose served. M$ can make other systems more difficult to boot its own systems but it is already boxed itself in a tight corner as a result.
These are some cosequences M$ suffered from its "clever or selfish" moves with the boot loader in the past
(a) XP can only boot one DOS-based system but Grub can boot all MS systems put together in a box
(b) A M$ system cannot survive outside a primary partition but Linux can reside anywhere in a disk.
(c) Same version of M$ systems cannot co-exist as working operating systems in the same box. Linux can do that and also is able to change root to another Linux to operate it without leaving the original system.
So on your system, where do you install Grub? On the MBR (of the first partition)? And Windows updates don't corrupt it? That was the only reason I always put Grub on a seperate partition, installed on the PBR, of the second partition.
What happens if I re-install WinXP? I do that about once a year. I guess it would be easy to reinstall Grub to the MBR after a re-install overwrites it... Especially if I keep one of those Grub floppies you wrote about. :-) I sure do wish I knew as much as you do about booting processes... But the next best thing is, you are here and so willing to share your knowledge!!!
There is nothing to corrupt. Both XP and Linux or any system compete for the MBR or the first 512 bytes of the bootable disk, only because that is what the BIOS reads every time the machine is switched on.
If you put XP in the MBR it takes a fair bit of effort to multi-boot, relative to the work needed with Grub or Lilo.
Basically XP need the first 512 bytes of a Linux boot loader copied, stored into "C" and amend its hidden boot.ini to include entry of the Linux. If the user choses Linux to boot then XP's NTLDR just puts Linux's stage1 (or first 512 byes) of it boot loader in memory and disappears for holiday.
Grub in MBR does nearly the same but a lot neater. It has a command interpretor for accept instructions, line by line from a user, to execute a booting process manually. It can hunt down every partition withouttouching the other' system's boot loader. What an average user normally does is to put the commands in a batch file or a script called /boot/grub/menu.lst so that Grub just goes ahead to obey it. Grub also pull XP into memorry at the +1 position.
There isn't much difference in the booting operation of all of them. You just need to know how to restore their MBR
XP's MBR can be restored by a DOS floppy (by fdisk /mbr)or an NT version of Windows installation CD (by fixmbr).
Linux's Lilo or Grub can be restored by any Linux Live CD or the installation CD. You boot up the CD's version of Linux, change root to the one that lost the MBR (command chroot) and replicate the boot loader in the MBR.
For Lilo you type lilo -b /dev/hda
For Grun you type grub-install /dev/hda
Therefore a user can afford to lose the MBR for any system without fear.
XP cannot be booted by M$'s own floppy. Lilo floppy only boots the version attached to a Linux. Grub is the only one that can be attached or deteched from a system. When detached from a system it can boot all systems in a PC. I am still search a system that can beat this Grub floppy.
Booting in Linux is actually very simple. Only Windows makes it complicated.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.