LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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 02-02-2007, 09:53 PM   #1
guguma
LQ Newbie
 
Registered: Feb 2007
Posts: 10

Rep: Reputation: 0
Bootng Linux Using NTloader??? (RESOLVED)


I have a small (!!!) booting problem with Kubuntu (Dapper Drake alternate for AMD 64).

Ok this is the situation I have a Seagate SATA 160GB HDD and the partitions are:

1 Primary NTFS XP installed
2 Primary NTFS storage
3 Primary NTFS XP installed (bootflag)
4 Extended
5 Logical NTFS Storage
6 Logical reiserfs Kubuntu dapperdrake installed
7 Logical linux swap

What I want to do is to boot Kubuntu from the NTloader.(Do not suggest me to use GRUB or LILO I share this computer with some people and they may freak out with something new i just can not use them) I have searched through some posts and the only reasonable thing I heard is to create a bootsec.lnx file and copy it to the winXP and then edit the boot.ini file (show the path of bootsect.lnx) that it gives me an option to boot from the bootsect.lnx so that it will lead me to a linux booter (GRUB or LILO).

But I see that I am totally unable to do it, probably from lack of knowledge.

What I really lack the knowledge about is and suspicious are that:

1. Any kind of booting configuration.

2. I greatly suspect that because Kubuntu is installed on a logical partition I may not be able to boot it.

What I tried:

1. I installed GRUB to a floppy disk using /dev/fd0 provided with the Grub Installer screen. It did some work to my floppy. Told me it was installed yet when I opened it. The old files in the floppy was remaining and no linux related thing.

2. I then used the installation cd again and installed GRUB to /dev/sda6 (this is the partition with reiserfs right?)

3. I then called the simple shell provided in the installation CD and wrote "dd if=/dev/sda6 of=bootsect.lnx bs=512 count=1"
which is suggested in this very forum to create the bootsect.lnx file.

4. Then I am stuck I mean I really am stuck.

5. What can I do next or where am I totally messed up and can fix it.

Please Help

Thank You

Last edited by guguma; 02-06-2007 at 07:12 PM. Reason: Problem Solved
 
Old 02-02-2007, 10:09 PM   #2
gilead
Senior Member
 
Registered: Dec 2005
Location: Brisbane, Australia
Distribution: Slackware64 14.0
Posts: 4,125

Rep: Reputation: 164Reputation: 164
Very briefly... In your Linux installation, install your boot loader to the first sector of the boot partition (instead of the MBR). Then you can use dd to save it as a file:
Code:
dd if=/dev/sda6 of=bootsect.lnx bs=512 count=1
Transfer this file from your LInux partition to C:\bootsect.lnx - ie copy it off to a USB stick, floppy disk, etc. Modify boot.ini (change the attributes first so you can edit it) to include the file. Save your changes (revert the attribute changes) and re-boot.

There's a good howto at http://www.tprthai.net/bootmgr.htm which details each step.
 
Old 02-03-2007, 09:11 AM   #3
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Arch/XFCE
Posts: 17,802

Rep: Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738
I would suggest shorter posts--makes it easier for people to follow.

I think gilead has given you the right info--here are some added notes:

Linux does not care if it is on a logical partition.

When you "install grub" (anywhere) you need to be sure that it is done such that the installed grub points to the right place. (GRUB stage1 gets "hard-coded" with this info) The preferred method in the grub manual is:
Code:
grub      starts the grub shell
root (hdx,y)     must point to the partition where /boot is
setup (hdw,z)     must point to the partition where grub will be installed   OR (hdw)  to install in the mbr
In the above, note the grub numbering scheme starts at zero and drive letters become numbers:
hda = hd0 (grub)
hda1 = hd0,0
hdb2 = hd1,1

etc.
 
Old 02-04-2007, 03:41 AM   #4
guguma
LQ Newbie
 
Registered: Feb 2007
Posts: 10

Original Poster
Rep: Reputation: 0
I get an error message

I followed the steps mentioned in:

http://www.tprthai.net/bootmgr.htm

But kubuntu gives an error message saying that I do not have enough permissions to access /dev/sda6.

Then I opened konsole and tried to become the superuser.

when i run the command su. Bash prompts me for the password. I type my password but I cannot type it. wha tI mean is I do not see any characters appearing on the console. When I press return. nothing happens so tried to write it several times again then i get something like this.

Say first three letters of my pass is "ghu"

ghusu is not recognized as a command or something like that.

What is going on. How am I going to become the superuser so that I can get access to /dev/sda6.
 
Old 02-04-2007, 05:41 AM   #5
gilead
Senior Member
 
Registered: Dec 2005
Location: Brisbane, Australia
Distribution: Slackware64 14.0
Posts: 4,125

Rep: Reputation: 164Reputation: 164
sudo can be used to run the commands. For example:
Code:
sudo dd if=/dev/hda5 of=bootsect.lnx bs=512 count=1
 
Old 02-04-2007, 07:41 AM   #6
saikee
Senior Member
 
Registered: Sep 2005
Location: Newcastle upon Tyne UK
Distribution: Any free distro.
Posts: 3,398
Blog Entries: 1

Rep: Reputation: 112Reputation: 112
I have summarised the key steps of using NTLDR to boot a Linux as Task E4 in the last link of the signature.

It is quite straight forward to let Windoze to boot a Linux.

After you have acquire the bootsect.lnx, which is the first 512 bytes of a Linux boot loader, you still need to do the following

(1) copy it into the "C" drive. You may need to write the bootsect.lnx first into a Dos floppy or a USB pen drive and then In Windoze copy it back as the Linux may not be able to write on a NTFS partition directly unless you have installed special programs like ntfs-3g.

(2) You need to go into Command promt of Windoze to unhide boot.ini first, edit it to include a booting entry for Linux, save the file and hide boot.ini again.

The theory is you make available the first 512 bytes of a Linux boot loader "inside" the "C" drive of Windoze. When you select Linux within NTloader it will load the bootsect.lnx onto the meomry. Thereafter it is up to the Linux first 512 bytes to make the connection with the Linux.

You have to do it this way because Windoze is too pround to be seen to support Linux and therefore does not recognise a Linux partition but regards it as foreign. Therefore it can't come out to fetch the boot loader and needs you to hand in on a plate the "bootsect.lnx" to be available inside the "C" drive. By which time your Linux must be fully operational.

----------------------

If you want Grub to boot from a floppy all you need is next time your are in Kubuntu make a Grub boot floppy by command
Code:
grub-install /dev/fd0
That floppy can fire up every system Kubuntu installer has assembled for you.

My last link has plenty tips to help you to boot up a Linux by various ways even without a boot loader installed.

Last edited by saikee; 02-04-2007 at 07:45 AM.
 
Old 02-04-2007, 08:21 AM   #7
Junior Hacker
Senior Member
 
Registered: Jan 2005
Location: North America
Distribution: Debian testing Mandriva Ubuntu
Posts: 2,687

Rep: Reputation: 61
Pretty damn complicated heh! guguma.

I have a simpler method of solving your dilemma.
Get rid of the traditional partition scheme, and adopt a more user friendly approach with up to 255 primary partitions available through a MPT (Master partition table) in the MBR using only primary partitions and none of that old fashion stuff (extended, logical nightmare stuff).

No lilo or grub handling stuff, they get pushed back where they belong, in the first sector of the root partition. A smart boot manager handles the logistics, you laugh.
 
Old 02-04-2007, 08:49 AM   #8
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 670Reputation: 670Reputation: 670Reputation: 670Reputation: 670Reputation: 670
Quote:
Originally Posted by guguma
...

What I tried:

1. I installed GRUB to a floppy disk using /dev/fd0 provided with the Grub Installer screen. It did some work to my floppy. Told me it was installed yet when I opened it. The old files in the floppy was remaining and no linux related thing.

2. I then used the installation cd again and installed GRUB to /dev/sda6 (this is the partition with reiserfs right?)

3. I then called the simple shell provided in the installation CD and wrote "dd if=/dev/sda6 of=bootsect.lnx bs=512 count=1"
which is suggested in this very forum to create the bootsect.lnx file.

4. Then I am stuck I mean I really am stuck.

5. What can I do next or where am I totally messed up and can fix it.

Please Help

Thank You
Your steps through 3 were correct. How were you stuck?

If you have a floppy drive, copy the "bootsect.lnx" file to the floppy. Then reboot into XP and copy the file from the the floppy to the C:\ drive.

As the previous post stated, you need to change the permissions of C:\BOOT.INI temporarily to be able to edit it. You can use the edit program to edit it. Then change the permissions back and try rebooting.
 
Old 02-04-2007, 09:00 AM   #9
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Arch/XFCE
Posts: 17,802

Rep: Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738
Quote:
Get rid of the traditional partition scheme, and adopt a more user friendly approach with up to 255 primary partitions available through a MPT (Master partition table) in the MBR using only primary partitions and none of that old fashion stuff (extended, logical nightmare stuff).
What on earth are you talking about???
The mbr is only 512 bytes total, with 446 typically used for the stage 1 loader, and a partition table entry is 16 bytes. Even if you somehow did not need the boot code, you could only get 32 entries using the standard format. To be sure, the standard is redundant--you dont need CHS--but you surely need more than 2 bytes per entry to cover the basic information.

More generally, you don't tell us what your magic solution is!!!!
 
Old 02-04-2007, 09:21 AM   #10
saikee
Senior Member
 
Registered: Sep 2005
Location: Newcastle upon Tyne UK
Distribution: Any free distro.
Posts: 3,398
Blog Entries: 1

Rep: Reputation: 112Reputation: 112
Junior Hacker,

Even if you are the very author of the proprietary software advocating a break-away from the PC standard of a maximum of 4 primary partitions used by all MS systems, Linux, BSD and Solaris systems and use your own devised 255 primary partitions you do realise it is no more than another booting/system manager layer introduced into a PC. Afterall you are only intended to serve operating systems already written to address a hard disk based on the convention partition table between the 447th and 510th bytes.

While there is nothing wrong to encourage Linux users to buy a proprietary software it would be inappropriate in my opinion if there are solutions exist and well established inside Linux and Windoze but there is no demonstrated technical advantage to switch to a system that contradicts the PC standard resulting future addition, migration, partition resizing and other enhancement impossible. For example if one loads gparted to resize a XP that program still operates on the normal PC standard.

I am not bothered that Linux users switching to whatever boot loader or boot manager they wish to but I haven't seen anything that is as simple and verstile than Grub which is booting 140+ system in my PC. Therefore I own to Grub to speak out if others misunderstand Grub's ability.

Linux is a set of tools invented by many volunteers and we are hardly stretching its potential. I feel sad that Linux's own basic ability is ignored at the expense of going with a non-PC standard hard disk management system that is certain to cause future problems in many other area. Linux as currently written does not support 255 primary partitions and if its major/minor numbers are not complied with a user will have difficulty in mount the partitions. Virtual machine managers for example can allow a Linux to operate and communicate with the host but has severely restriction to communicate with fellow guest systems.

As every Linux user I welcome an advancement in technology. M$ is working on combining the Bios with a kernel too. There are multi-boot standard pioneered by Grub and no doubt the proprietary software advocated by yourself encourages a breakaway from the current PC standard. It is only fair the users are informed of the advantages as well as the disadvantages in making a selection.

Pixellany,

Junior Hacker has found some proprietary software that can do multi boot and clone hard disk images. These software use a non-pc standard and can have more than 4 primary partitions. I have not used any of them but they appear to be another manager layer introduced into Linux and Windoze cheating the OS in believing they are still in the traditional hard disks with the same normal partition table. Since the standard is not widely used and technically can be in conflict with Linux basic block device structure I feel exposing Linux user to it is unwarranted when well established and proven solutions exist in Linux.

It is just like people outside Linux would pay a commercial software to clone a partition or a hard disk but we are not interested because can do it with dd.

Junior Hacker has alerted us that there may be better solutions but has not been able to show the real benefit yet. He may has a problem if he/she is not an experienced Linux user and has an in-depth knowledge of the system. We are also stubborn because there is no way we could be persuaded to spend money that doesn't do anything better than what Linux can do for us.

I am probably the worst one to pick and persuade that there is a boot loader better than Grub's ability to boot 140+ systems, requiring no more than 3 lines of commands universally applicable to every Dos, Windows, Linix, BSD and Solaris and can be implemented even before any of the operating system is installed. I am actually very interested to know any boot loader that can outperform than Grub.

Last edited by saikee; 02-04-2007 at 09:39 AM.
 
Old 02-04-2007, 11:35 AM   #11
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Arch/XFCE
Posts: 17,802

Rep: Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738
Saikee;
I am aware of Junior Hacker's promoting/proselytizing for said product. I was surprised he did not mention it in this recent post.

As an engineer in the space program, I long ago learned not to fix that which is not broken. As you say--GRUB works.....

Perhaps when Linux is the dominant desktop system, we will have a whole new set of standards that discard such fossils as CHS addressing, and primary and logical partitions (so-named to keep them distinct from the il-logical ones???) Virtual machine technology will allow multiple OSes with no speed penalty, and the bootup will all be in the BIOS. With no questions on how to dual-boot, the cost of running fora such as LQ will be cut in half......
 
Old 02-04-2007, 12:13 PM   #12
saikee
Senior Member
 
Registered: Sep 2005
Location: Newcastle upon Tyne UK
Distribution: Any free distro.
Posts: 3,398
Blog Entries: 1

Rep: Reputation: 112Reputation: 112
Pixellany,

The OP wants to boot it with NTloader and I think we have given that solution.

It is however an interesting point to talk about partition limit here.

Linux has a major and minor number for the block devices and I think the combination of the two numbers for both IDE and Sata are both 256 if my memory serves me right. We get 4 IDE devices hda, hdb, hdc and hdd each can potentially have 64 devices. The whole of say hda disk plus the 63 internal partitions are the current limit and make up the 64 devices for each hard disk.

The SCSI/Sata's 256 devices derive from 16 disks as SCSI can support daisy chain connection. This makes each Sata a maximum of 16 devives. Discounting the whole of disk say sda and we end up with the 15 partition limit.

The ineresting point about SCSI/Sata is that Linux is currently making use of the externel USB devices as parts of the SCSI/Sata series and everything fits in nicely with plenty scope for expansion, using a partition table no more than the 4 primary partitions inside. To me a skillful use can potentially claim from both IDE and Sata inferfaces 256+256=512 partitions to use in Linux and since Linux can be booted from any one of them then where it is a primary or a logical partition matters nothing. Thus only the earlier Windows users may have a need of 255 primary partitions as older MS systems must be booted from a primary partition. Later XP and Vista can reside in logical partitions and the need for primary partitions vanished.

The conclusion I could arrive at is that if the 255 primary partitions were a new technology then it is too late to be of any use to MS systems or Linux now.
 
Old 02-04-2007, 03:49 PM   #13
Junior Hacker
Senior Member
 
Registered: Jan 2005
Location: North America
Distribution: Debian testing Mandriva Ubuntu
Posts: 2,687

Rep: Reputation: 61
Sorry for not responding right away, I just woke up.

Yes, the product I use (am not affiliated with), to which you can download the documentation for free, download and use the product for free, you can use it for as long as you like for free but you are restricted to 4 primary partitions. If you install it, after 30 days, if you kind of like it's quick different style and want to keep it installed, send them $35.00 American for a licence, they also sell bundled licences for corporations etc. It is under the shareware licence agreement.
Now I only read the documentation a few times a couple years back but have it up on another desk top, so I will paste part of it here, first, this product, when installed to your HDD makes it's own primary partition 7MB in size, it is called an EMBR. Here is a pasted section of their documentation:
Sh....t, I can't copy and past from the .pdf reader I have, will have to write:

The EMBR contains a block code, called the EMBR loader, one for partition tables, one for partition information, one for information on drivers that may need to be loaded on your system. Each of these tables can contain up to 255 entries.

The table in the EMBR that contains partition information is called the Master Partition Table (MPT). This table is used in place of the partition table to contain all partition information.

When an operating system is loading, at some point it looks for partitions in the partition table, At the very least it must find itself and typically assigns access to any of the other partitions or volumes that it recognizes.



OK.
That was out of the manual, in brief, there is nothing in this documentation that suggests you are limited to 63 partitions as someone states in there 145 system blog here at LQ (that person should revise the blog to reflect the traditional partitioning scheme as to not mislead the public). With this product, it appears you can have over 200 bootable operating systems on one large HDD, or spread them over 8 HDD's. Every partition (as documentation suggests) is a primary partition, no chain loading and worries of corrupt MBR. An operating system can only be assigned to see 4 partitions per HDD (MBR limitation) on up to 8 HDD's for a total of 31 (inactive) partitions including itself. Of these other 31 partitions it is allowed to see, the partitions can be another OS, for transferring files (if that's your fancy) as long as it is inactive. I believe the 8 drives can belong to 8 computers on a network. One should read the documentation him/her self.

Yes saikee, I did read your blog from start to finish, based on what I know what this product can do, Boot manager, partition manager, wipe/secure wipe partitions/HDD's, slide partitions, non destructive resizing of NTFS and Fat file systems, resize Linux but Linux must be expanded from within using resize2fs and/or another such tool, create compressed images of data only and write it to pretty much wherever you want to store it (as fast but not as dangerous as dd), transfer it, or as I do, write them to my Fat32 data partition, then using the same image, I have multiple copies of the same system for testing purposes on the same drive, all bootable, all using same /home and swap and user, all derived from the same image. That includes Windows, both my Red Hat derivatives and who knows how many other Linux systems. Some distros like Debian 3.0rx has to have it's boot sector within the first 1024 cylinders if I'm not mistaken, as I once tried to move it towards the high end and it would not boot, but I could put it in different areas within the first 1024. You should go through your blog and make sure the public is not mislead by letting them know the limits you mention are for traditional partitioning methods. I find it is a blog that should be available for all to see, it is very educational and captivating.
I can write a possibly more impressive blog based on this product but I'm more into offering people the ease and freedom I have with it, not excessive promotions.

Last edited by Junior Hacker; 02-04-2007 at 04:03 PM.
 
Old 02-04-2007, 04:08 PM   #14
Junior Hacker
Senior Member
 
Registered: Jan 2005
Location: North America
Distribution: Debian testing Mandriva Ubuntu
Posts: 2,687

Rep: Reputation: 61
By all means, it would be nice if you both would read the documentation and correct me if I'm wrong.

Please
 
Old 02-04-2007, 05:00 PM   #15
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Arch/XFCE
Posts: 17,802

Rep: Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738
Quote:
Originally Posted by Junior Hacker
By all means, it would be nice if you both would read the documentation and correct me if I'm wrong. Please
I understood the post just before this, but what exactly is your point here? I haven't found anyone that thought you were wrong. I, for one, am happy with GRUB and will devote my energy to the fast-cooking of other water-dwelling creatures.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
NTLoader and dual boot issues papa0822 Linspire/Freespire 6 11-16-2006 07:37 AM
How will I use NTLOADER as bootloader... BEYAZITTOSUN Linux - General 1 02-23-2005 04:35 AM
NTLoader & Grub KSigBrothers Linux - Software 4 09-16-2004 10:53 PM
dual bootng with RedHat and Mandrake salparadise Linux - Newbie 2 01-03-2003 06:20 AM
My buddy runs 2k and RH and NTLoader is still there bkeating Linux - General 1 08-29-2002 06:08 AM


All times are GMT -5. The time now is 03:47 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration