LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This 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


Reply
  Search this Thread
Old 04-25-2011, 04:09 PM   #46
Engineeringtech
Member
 
Registered: Apr 2011
Posts: 32

Original Poster
Rep: Reputation: 0

Quote:
Originally Posted by markush View Post
Hello,

Linux has no problems with logical partitions, but they have to be Linux partitions. As I wrote, this will never work with a Win98-logical parition.

Markus
The logical partition I installed Linux on is formatted XT4. Doesn't that make it a Linux partition? I created the partitions with Partition Commmander. Booted from the CD, divided up the drive and formatted for DOS, Windows, Windows swap, Linux (XT4), Linux Swap, an NTFS partition for my data, and an HFS partition to play around with if I ever get this system working. (I have a Mac emulator.)

Sunnydrake has said the partition I install the Grub Bootsector to, must be a primary partition.
 
Old 04-25-2011, 04:19 PM   #47
markush
Senior Member
 
Registered: Apr 2007
Location: Germany
Distribution: Slackware
Posts: 3,979

Rep: Reputation: Disabled
Grub can handle extended partitions without a problem, grub has as well no problems with a 500GB Harddisk. But you cannot create Linux-partitions with Windows-programs. In my opinion your partitiontable is completely messed up.

You cannot mix Operatingsystems which are about 13 years and older (Win 98 and dos) on the same harddisk with modern Software like a recent Linux-system.

You can have one extended partition on your disk. This can be a Win98 parition, but then you cannot use Linux on it. That is the reason for all your problems.

Note that Win98 cannot deal with such big disks like yours (several hundred GB).

Best you can do: use dd (you wrote you can use it) and copy your Win-XP system to another partition. And then install everything completely new. Windows XP on partition 1 (primary), the rest Linux (an extended partition but created with the Linux-install-CD). Then use Virtualbox and install the old Win98 and Dos machines as virtual machines.

This is what I would do.

Markus

Last edited by markush; 04-25-2011 at 04:41 PM.
 
Old 04-25-2011, 05:19 PM   #48
Erik_FL
Member
 
Registered: Sep 2005
Location: Boynton Beach, FL
Distribution: Slackware
Posts: 821

Rep: Reputation: 258Reputation: 258Reputation: 258
We have to be careful about using the term "booting" to refer to Linux, since Linux is not actually "booted". Linux is "loaded" by a boot loader such as GRUB or LILO. Linux can indeed be "loaded" from a Logical partition.

Booting is what actually reads in and starts the boot loader program (GRUB or LILO).

I said that boot loaders "should not" be installed to Logical partitions. Some boot loaders (GRUB & LILO) can be installed to a Logical partition. The standard for partitioning PC hard disks does not support "booting" from a logical partition. Boot loaders "should" only be installed to Primary partitions.

The MBR is intended to contain some standard default multiple partition booting software. If a boot loader is installed to a Logical partition, then the standard MBR software cannot "boot" it. The MBR has to be written with some non-standard software, or some other boot loader has to chain to the Logical partition.

My suggestion was that if there are problems booting, it is best to stick to the intended way of installing a boot loader. Install it to a Primary partition, and leave the MBR with the default software. Set the "active" Boot flag for a partition to make it the default "boot" partition. Among other things this makes it easy to test each boot loader separately by changing the "active" Boot flags.
 
Old 04-25-2011, 05:39 PM   #49
markush
Senior Member
 
Registered: Apr 2007
Location: Germany
Distribution: Slackware
Posts: 3,979

Rep: Reputation: Disabled
Hello Erik_FL,

I'll append the screenshot of the paritiontable which the OP provided in post #20.

On which primary partition do you want to install a bootloader?

This partitiontable cannot be correct. /dev/sda5 is shown as a 102GB FAT32 partition. FAT32-partitions have a maximumsize of 32GB.

I don't think that we can find a simple solution here.... especially since the OP works on this problem for a long time without finding a solution.

In my opinion it would be the best, we look what the OP wants to achieve (running Linux, Dos and Windows on one and the same machine) and consider how this can be done, independently of the current setup which (well, I say it is my opinion) is completey messed up.

Markus
Attached Thumbnails
Click image for larger version

Name:	partitiontable.png
Views:	26
Size:	77.3 KB
ID:	6829  

Last edited by markush; 04-26-2011 at 02:01 AM. Reason: typo
 
1 members found this post helpful.
Old 04-25-2011, 08:02 PM   #50
Erik_FL
Member
 
Registered: Sep 2005
Location: Boynton Beach, FL
Distribution: Slackware
Posts: 821

Rep: Reputation: 258Reputation: 258Reputation: 258
Quote:
Originally Posted by markush View Post
Hello Erik_FL,

I'll append the screenshot of the paritiontable which the OP provided in post #20.

On which primary partition do you want to install a bootloader?

This partitiontable cannot be correct. /dev/sda5 is shown as a 102GB FAT32 partition. FAT32-partitions have a maximumsize of 32GB.

I don't think that we can find a simple solution here.... especially since the OP works on this problem for a long time without finding a solution.

In my opinion it would be the best, we look what the OP wants to achieve (running Linux, Dos and Windows on one and the same machine) and consider how this can be done, independently of the current setup which (well, I say it is my opinion) is completey messed up.

Markus

Markus
I agree with you. There is no simple solution, especially if this will be booting Linux from a fake RAID controller.

I would recommend creating a third Primary partition (sda3) for installing the Linux boot loader. To do that existing partitions have to be re-sized or re-created. That still doesn't solve the problems relating to fake RAID.

My other suggestion would be to avoid trying to boot Linux from a fake RAID controller. It adds a lot of complications.

I wonder what fake RAID controller or chip this computer uses? I've only been able to make fake RAID work well with GRUB Legacy and manually installing the boot loader. Until recently I've also had to create a custom "initrd" image and use "dmraid" to boot Linux from fake RAID.

The FAT32 partition size limit is actually 127 GB. Windows XP and later won't create FAT32 partitions over 32 GB but that is not the maximum size supported by FAT32. Windows 98 and earlier can create 100 GB FAT32 partitions. I also think that the partition size in the screen capture is around 50 GB. The block count has to be divided by 2 to get kilobytes. Each block is 512 bytes (1/2 kilobyte).

It seems that GRUB does not boot far enough to display a menu. Either the installer for GRUB is confused about where to write the boot sector, or the boot sector software has the wrong BIOS drive ID. I've had both of those problems trying to boot from fake RAID controllers. To get around those problems I use a GRUB boot floppy or CD and manually install GRUB in "native" mode. I don't know how to do that with GRUB 2 if it is possible.

I suggest trying a simpler Linux installation to an empty hard disk. Back up the existing partitions and start with an empty disk. Try to install and boot Linux by itself. If that won't work then multi-booting has nothing to do with the problem.
 
Old 04-25-2011, 09:37 PM   #51
Engineeringtech
Member
 
Registered: Apr 2011
Posts: 32

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by yancek View Post
.................In post 29, you indicate that you don't know how to examine the file so that you don't actually know if the command is working. I have Ubuntu 10.10 installed on a partition on my computer. Ubuntu Grub is on the partition, not the mbr. When I run the dd command suggested in the link I provided, this is the output I get:

Code:
[root@localhost user]# dd if=/dev/sda7 of=bootsect.lnx count=1
1+0 records in
1+0 records out
512 bytes (512 B) copied, 3.724e-05 s, 13.7 MB/s
Yancek,

There is no question that the DD command is working for me same as you showed above. I get the same "records in" and "records out" report that you did. However, the created file (bootsect.lnx) is always EMPTY. I know this because I have examined it with DOS's text editor. When I said earlier that I didn't know how to examine the bootsector, I meant I'd like to be able to VIEW the contents of the blocks BEFORE I "DD" them to an output file. Is that possible?

What are is "root@localhost user]# cat bootsect.lnx" ?
 
Old 04-25-2011, 10:30 PM   #52
Engineeringtech
Member
 
Registered: Apr 2011
Posts: 32

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by Erik_FL View Post
I agree with you. There is no simple solution, especially if this will be booting Linux from a fake RAID controller. I would recommend creating a third Primary partition (sda3) for installing the Linux boot loader. To do that existing partitions have to be re-sized or re-created. That still doesn't solve the problems relating to fake RAID................................................I've had both of those problems trying to boot from fake RAID controllers. To get around those problems I use a GRUB boot floppy or CD and manually install GRUB in "native" mode. I don't know how to do that with GRUB 2 if it is possible. I suggest trying a simpler Linux installation to an empty hard disk. Back up the existing partitions and start with an empty disk. Try to install and boot Linux by itself. If that won't work then multi-booting has nothing to do with the problem.

Erik,

Whoa!! I think I have confused people here. My bad... I'm NOT using Fake RAID (at least not currently). I guess I have to recap where I have been with this system....

I started out with a SCSI RAID 0 Array with a SUCCESSFUL triple boot installation (DOS, XP, and Ubuntu 9.04) using NTLoader to boot DOS, XP, and chainload Grub Legacy into Ubuntu.. My SCSI RAID hardware failed before I had more than a weeks time with Ubuntu. I ditched the SCSI hardware, bought two SATA drives, and tried to setup a RAID 1 with the motherboard's built in Intel ICH10R SATA Fake RAID ports. I got the array partitioned and formatted, DOS and Windows installed, but Ubuntu wouldn't boot.. I got a new motherboard, and tried again with FakeRAID. Still unsuccessful. A computer tech then suggested I get another hardware RAID card, so I bought a Highpoint SATA RAID card, and setup a RAID 1. The Highpoint RAID array wouldn't partition, so I returned the card.. At this point, I was sick of trying to get the triple boot on a RAID array, and I decided to simplify by just using a SINGLE drive, connected to one of the ICH10R ports. I disabled the RAID feature in the BIOS. The drive was not recognized by the Ubuntu installer, until someone at the Ubuntu forum suggested I delete the old RAID "metadata". I did this and was able to partition, format and install DOS, Windows and Ubuntu (also tried Fedora). But the Linux installation won't boot whether I install Grub to the MBR, or to the Linux partition and chainload Grub from NTlDR.

Since I switched from RAID to a single drive, I have made at least 10 reformats and reinstalls of three different versions of Linux. I have tried installing Grub Legacy, or Grub 2 to the MBR, to the root of the Linux partition, and to a floppy. The Grub bootsector is NOT being written. So the questions is, what is causing this failure of the Grub installer. The fdisk -l output I posted earlier represents the way my disk is currently partitioned. As you can tell, I have been to hell and back with this system, trying to get the triple boot working. I have a working dual boot (DOS and Windows, booting with NTLDR. So I don't really want to start over from scratch, if I can avoid it.

Does anyone here know FOR CERTAIN why the Grub install fails to write the bootsector? Is it my use of a logical drive? Or the size of my partitions? Or how far the Linux partition is from the MBR?

If I buy another drive, install Linux there, and get a successful boot, can I transfer the Linux partition and bootsector to my current drive?
 
Old 04-25-2011, 11:00 PM   #53
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: Slackware, Ubuntu, PCLinux,
Posts: 10,501

Rep: Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489
Quote:
I know this because I have examined it with DOS's text editor
Maybe your DOS text editor is not able to do this, I don't really know.

Quote:
What are is "root@localhost user]# cat bootsect.lnx" ?
The root part is just a fake prompt on my machine, cat is a Linux command to view files and other things.

Quote:
I meant I'd like to be able to VIEW the contents of the blocks BEFORE I "DD" them to an output file.
The command below will output the boot sector on sda7 to the terminal. It's not in human readable form and is pretty meaningless, to me anyway. If you don't see anything from the command that's a problem. You would obviously need to run this from the Ubuntu Live CD.

Quote:
sudo dd if=/dev/sda7 count=1 | hexdump -C | head
 
Old 04-26-2011, 02:42 AM   #54
markush
Senior Member
 
Registered: Apr 2007
Location: Germany
Distribution: Slackware
Posts: 3,979

Rep: Reputation: Disabled
Quote:
Originally Posted by Erik_FL View Post
...
The FAT32 partition size limit is actually 127 GB. Windows XP and later won't create FAT32 partitions over 32 GB but that is not the maximum size supported by FAT32. Windows 98 and earlier can create 100 GB FAT32 partitions...
I think you are right, I only knew that Windwos doesn't create bigger FAT32-paritions than 32GB.
Quote:
Originally Posted by Erik_FL
... I also think that the partition size in the screen capture is around 50 GB. The block count has to be divided by 2 to get kilobytes. Each block is 512 bytes (1/2 kilobyte)...
this seems not to be the case (I compared with my own system), since the whole drive has a size of 500GB and the extended partition is almost as big as the whole disk we can assume that the /dev/sda5 partition has about (roughly) 100GB.
Quote:
Originally Posted by Erik_FL
I suggest trying a simpler Linux installation to an empty hard disk. Back up the existing partitions and start with an empty disk. Try to install and boot Linux by itself. If that won't work then multi-booting has nothing to do with the problem.
I agree, this is a good Idea, hopefully this would bring the issue to an end.

Markus
 
Old 04-26-2011, 08:03 AM   #55
sunnydrake
Member
 
Registered: Jul 2009
Location: Kiev,Ukraine
Distribution: Ubuntu,Slax,RedHat
Posts: 289
Blog Entries: 1

Rep: Reputation: 61
Whoa i not suggested grub can't be booted from logical partition i only suggested it fails to load stage 2 part from partition.

Second you can mix different partitions on modern OS (it would be troublesome for older like DOS and their disktools)

2Engineeringtech i noted that you switched to non-raid hdd so my advices apply (but system like mine(NVIDIA FakeRAID via dmraid reqire some additional steps to install (i described it in first posts).
You can write to forum from linuxlivecd if you have LAN connected internet setup(phone-like utp cable). To view dd output without texteditors just omit of= option and it will print sector content in console(check posts). Install grub on flash as i described and install qemu (you can do it all from linuxlivecd ( sudo apt-get install qemu grub ). Then as i writed add own hdd to qemu and try to boot grub without system restart.

About text editors last time i saw good dos text/hex editor it was VolkovCommander or hiew(hackers view) all other treat special characters as garbage or direct commands which is bad and you should use text console. I neet to note that in DOS/Win new line is CR/LF in linux it just CR which could cause dos text editors to print all in one line out of visible bounds. In any way use linux toolz and direct DD not to partition like /dev/sdc1, only to drive /dev/sdc !.

Last edited by sunnydrake; 04-26-2011 at 11:53 AM.
 
Old 04-26-2011, 10:33 AM   #56
Erik_FL
Member
 
Registered: Sep 2005
Location: Boynton Beach, FL
Distribution: Slackware
Posts: 821

Rep: Reputation: 258Reputation: 258Reputation: 258
Engineeringtech, thanks for clarifying the current disk configuration.

If you are able to boot DOS and Windows, then the BIOS settings for the ICH10 SATA controller must be correct. I have the same ICH10 SATA controller in my computer.

I have a suggestion that will require some changes to the partitioning. Re-size the last Logical partition and the Extended partition to make room at the end of the drive. Create a new Primary partition at the end of the disk, after the extended partition.

Install the entire Linux system and GRUB to the new Primary partition that you create. You will probably need to select advanced boot configuration. Install GRUB to the partition boot sector and NOT the MBR. Then you can test Linux booting without the boot sector file. Use a Linux boot CD, run "fdisk" or "cfdisk", clear the "Boot" flag for the Windows partition and set the "Boot" flag for the Linux partition. Linux should boot if GRUB installed successfully. If you cannot get Linux to boot then you can set the boot flags back to make Windows the active boot partition.

You should be able to boot from the ICH10 with no problem. I boot Slackware Linux using GRUB Legacy. I am booting from a RAID array, and I have also booted Linux from a non-RAID AHCI SATA drive.

GRUB uses the BIOS to boot itself and load Linux. It's important that you don't change the default boot disk or drive ordering in the BIOS after you install GRUB. The GRUB boot sector loads files from the BIOS default boot drive.

After you know that Linux will boot directly, then you can create the boot sector file using "dd". Copy the boot sector from the partition, not the hard disk. For example, use "sda3" and not "sda". Clear the "Boot" flag for the Linux partition and set the "Boot" flag for the Windows partition using "fdisk" or "cfdisk". If you have problems booting Linux then it is related to the boot sector copying, since you have already tested direct booting of Linux.

Last edited by Erik_FL; 04-26-2011 at 10:39 AM.
 
Old 04-27-2011, 01:30 PM   #57
sunnydrake
Member
 
Registered: Jul 2009
Location: Kiev,Ukraine
Distribution: Ubuntu,Slax,RedHat
Posts: 289
Blog Entries: 1

Rep: Reputation: 61
2Erik_FL usually "active partitions" is booted via windows BOOTMGR which reside in MBR.
http://en.wikipedia.org/wiki/Int_13h (heh my signature it shold be 10h but ...) ..
Do you see any Partition table related functions?.. still it's a guess. And it possible to chainload grub code from NTLDR/whatever M$ bootloader.

2Engineeringtech stupid note hit my mind some bios have MBR write protection option.

Last edited by sunnydrake; 04-27-2011 at 01:32 PM.
 
Old 04-27-2011, 09:38 PM   #58
Engineeringtech
Member
 
Registered: Apr 2011
Posts: 32

Original Poster
Rep: Reputation: 0
Wow! and thanks to all. Lot of stuff here to digest. Good ideas.

Sorry I haven't been responsive about trying this stuff. But I've been dealing with a bunch of difficulties. Health problems the past two weeks. Car's been on the fritz, and the mechanics can't diagnose it. Meanwhile, my boss is throwing a lot of overtime at me. When I get home I've been dealing with a flooded basement, and electrical storms. So I really haven't had much sit down time at the target machine. There is no hardwired internet access to it, and it's out of the range of my wireless router. I'm communicating on a very old laptop that overheats quickly, and has no printer port. So you see what I'm up against.

I realize you've spent a lot of time analyzing my machine, and want to see some fruits for your effort. Would you mind if we shelved this for about a week and a half while I get my life back in order?

JC

Last edited by Engineeringtech; 04-27-2011 at 09:43 PM.
 
Old 04-28-2011, 09:20 PM   #59
Erik_FL
Member
 
Registered: Sep 2005
Location: Boynton Beach, FL
Distribution: Slackware
Posts: 821

Rep: Reputation: 258Reputation: 258Reputation: 258
Quote:
Originally Posted by sunnydrake View Post
2Erik_FL usually "active partitions" is booted via windows BOOTMGR which reside in MBR.
http://en.wikipedia.org/wiki/Int_13h (heh my signature it shold be 10h but ...) ..
Do you see any Partition table related functions?.. still it's a guess. And it possible to chainload grub code from NTLDR/whatever M$ bootloader.

2Engineeringtech stupid note hit my mind some bios have MBR write protection option.
Actually, "bootmgr" does not install to the MBR. Windows Setup writes the standard MBR software into the MBR. The standard MBR software chains directly to the active partition. The MBR software will bypass "bootmgr" completely when the Windows partition is not active. The Windows "bootmgr" is installed to the first Primary partition that has a Windows recognizable file-system.

The standard MBR software works like this.
  1. BIOS reads MBR and verifies signature
  2. If MBR signature is correct then BIOS executes MBR software
  3. MBR software finds the first Primary partition in the table marked as "active"
  4. MBR software reads the first sector of the first active partition
  5. MBR software checks the signature of the partition boot sector
  6. If the signature is correct, MBR software executes the software read from the partition's boot sector

Instead of installing GRUB or LILO to the MBR one can accomplish the same result (starting GRUB/LILO first) by installing to the partition and then setting the partition as active. Boot-loaders can chain to non-active partitions to start other boot-loaders. The "active" partition just indicates which partition's boot-loader starts first.

An advantage to NOT installing a boot-loader directly in the MBR is that one can easily change the default boot-loader by changing the "active" flags for the partitions. That means no boot-loader has to depend on some other boot-loader. Because the software in the MBR is much simpler than a boot-loader it is easier to repair/restore when there is a problem. Also, many different partitioning programs are able to write the same standard MBR software into the MBR.
 
1 members found this post helpful.
Old 04-28-2011, 09:24 PM   #60
Erik_FL
Member
 
Registered: Sep 2005
Location: Boynton Beach, FL
Distribution: Slackware
Posts: 821

Rep: Reputation: 258Reputation: 258Reputation: 258
I can't speak for anyone else, but I don't mind helping with this later.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: How to Triple-Boot Your Mac with Windows and Linux, No Boot Camp Required LXer Syndicated Linux News 0 05-05-2010 09:30 AM
Installing goblinX in triple boot laptop... no boot in the other linux OS amalgam Linux - Newbie 2 02-14-2008 01:08 PM
Trying to triple boot 3 Linux OSes gnumantsc Linux - Newbie 2 09-27-2004 06:22 PM
Linux with triple boot hsani Linux - General 4 04-15-2004 08:34 AM
How to triple-boot...two linux and one XP cbjhawks Linux - General 4 01-20-2004 06:31 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 08:05 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration