LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 10-07-2005, 05:32 AM   #1
JZL240I-U
Senior Member
 
Registered: Apr 2003
Location: Germany
Distribution: openSuSE Tumbleweed-KDE, Mint 18.3+19.0, MX-18
Posts: 4,258

Rep: Reputation: Disabled
GRUB-settings: are they permanent?


I recently tried a stanza in /boot/grub/menu.lst from the GRUB manual:
Code:
     unhide (hd0,0)
     hide (hd0,1)
     rootnoverify (hd0,0)
     chainloader +1
     makeactive
It's on a triple boot machine with DOS, WinNT and Linux and I tried to start DOS directly. Now Win-NT crashes and Linux gets a Kernel panic, even though I deleted this stanza promptly.

So, do I have to
Code:
     unhide (hd0,1)
     rootnoverify (hd1,2) /* /dev/hdb3 is mounted to / */
     makeactive
or is everything reverted to normal after switching off the machine -- the GRUB manual doesn't say.

Or is this rather hardware related ?
 
Old 10-07-2005, 06:12 AM   #2
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 18,282

Rep: Reputation: 2988Reputation: 2988Reputation: 2988Reputation: 2988Reputation: 2988Reputation: 2988Reputation: 2988Reputation: 2988Reputation: 2988Reputation: 2988Reputation: 2988
menu.lst gets read each time - did you have a problem, or just do this based on the grub manual ???.
How about you post your menu.lst, and any/all error messages - from all O/S's.
 
Old 10-07-2005, 06:24 AM   #3
JZL240I-U
Senior Member
 
Registered: Apr 2003
Location: Germany
Distribution: openSuSE Tumbleweed-KDE, Mint 18.3+19.0, MX-18
Posts: 4,258

Original Poster
Rep: Reputation: Disabled
Quote:
Originally posted by syg00
menu.lst gets read each time
Understood. Question is rather, do the commands I listed set permanent values (bits) on the hard disk?


Quote:
Originally posted by syg00
... did you have a problem, or just do this based on the grub manual ???.
I wanted to start DOS directly from GRUB, while I did this up to now from the NT-loader. In an other thread I got the hint to try it like shown above. Then everything started to disintegrate .

Quote:
Originally posted by syg00
... How about you post your menu.lst, and any/all error messages - from all O/S's.
menu.lst is a bit hard as I don't get the machine booted anymore. Error messages I would have to write down by hand -- haven't done that yet and I'm currently not in reach of the broken machine. I'll give it a shot over weekend...
 
Old 10-07-2005, 01:02 PM   #4
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 18,282

Rep: Reputation: 2988Reputation: 2988Reputation: 2988Reputation: 2988Reputation: 2988Reputation: 2988Reputation: 2988Reputation: 2988Reputation: 2988Reputation: 2988Reputation: 2988
Quote:
Originally posted by JZL240I-U
Understood. Question is rather, do the commands I listed set permanent values (bits) on the hard disk?
O.K. - hopefully we're now on the same wavelength ...
I would expect that "makeactive" to set the boot flag - in all likelihood giving you two active partitions (as NT would already have been "active"). I know the Microsoft loaders check for this and abort if more than one is active, but I've not checked the actual ntldr code to see if it does a second (re-)check. I have a niggle in the back of my mind I've heard of something like this with the "old" ntldr - prior to Win2000/XP. If the check *is* the same I'd expect you to get a "Invalid Partition Table" message from NT, and the machine then to loop.
I'm presuming your DOS boots o.k. - it's code probably is not smart enough to go check again ...

I don't understand Linux panic'ing - need your messsage for that. Was about to ask what distro - just noticed you have Suse listed.
Yuck - the only one (so far) I've tried and failed to successfully install, and subsequently swore never to try again (9.3 in my case).

Shouldn't be too hard to fix if it's simply multiple active bits - I'd use a Knoppix disk and run fdisk to reset the flag. Very handy tool that Knoppix - always keep one handy. Generally the boot CD for the distro would do as well - most have a recovery mode that should allow access to {c}fdisk.
As I said, I can't help you with how Suse might do it.

Later: just checked, and multiple boot flags don't seem to faze Linux. As would be expected - grub and Linux ignore the flag completely as far as I'm aware. Wasn't able to check how Windows reacts, as I don't have it on a machine I can test. Used to have it on my test box, but threw it away to use the disk space to have a play with Solaris ...
Because I play so much, for flexibility all my Linux installs are in logical partitions, so I don't have any other box with multiple primary partitions ...
 
Old 10-08-2005, 08:41 PM   #5
aus9
LQ Addict
 
Registered: Oct 2003
Location: Australia
Distribution: MX 19/ TC64
Posts: 5,326

Rep: Reputation: Disabled
if you have grub showing up and no booting menu try my troubleshooter to boot into linux or dos or nt.

2) as far as I know, it is better for dos to have the makeactive command b4 the chainloader command

we can offer exact commands if you tell us what each partition is plse if you have no joy with the trouble shooter
 
Old 10-10-2005, 03:18 AM   #6
JZL240I-U
Senior Member
 
Registered: Apr 2003
Location: Germany
Distribution: openSuSE Tumbleweed-KDE, Mint 18.3+19.0, MX-18
Posts: 4,258

Original Poster
Rep: Reputation: Disabled
Thanks for your answers, syg00 and aus9 .

There is nothing like mixed sources of errors to complicate ones life . Over the weekend I dismantled my box, vacuum-cleaned it, pulled the RAM (which sat alright) and put it back in and, lo and behold -- all errors are gone from NT and Linux . So I'm back to zero...

First, I'm glad any active bits don't harm Linux, I'm coming to rely more and more on it and I'm actually close to the point where I can ditch µsoft entirely . (Btw. I concur with your esteem of Knoppix ).

Still, for the point of learning, I'd still like to try to come to grips with this little project. So I'll go for the troubleshooter and see what I can learn there.

Anyhow I seem to remember that during the installation of NT after DOS the NT-loader acknowledged DOS and did something to the MBR. Maybe this was the entanglement which is now so hard to reverse.

System layout is:

/dev/hda1 = C: -> DOS
/dev/hda2 = D: -> NT
/dev/hdb3 = /boot -> GRUB
/dev/hdb5 = /
 
Old 10-10-2005, 06:52 AM   #7
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 18,282

Rep: Reputation: 2988Reputation: 2988Reputation: 2988Reputation: 2988Reputation: 2988Reputation: 2988Reputation: 2988Reputation: 2988Reputation: 2988Reputation: 2988Reputation: 2988
Quote:
Originally posted by JZL240I-U
Anyhow I seem to remember that during the installation of NT after DOS the NT-loader acknowledged DOS and did something to the MBR. Maybe this was the entanglement which is now so hard to reverse.
I have a feeling you'll find that a copy of ntldr was dropped into the DOS partition - this enforces consistent loader code.

If you *really* want this to work, I'd suggest that you'd have to install NT first, then DOS, then Linux/grub - with grub in the MBR of course.
Only way I can see you preserving the appropriate code in each system - should allow the chainloading to work properly for both DOS and NT.
 
Old 10-10-2005, 07:40 AM   #8
JZL240I-U
Senior Member
 
Registered: Apr 2003
Location: Germany
Distribution: openSuSE Tumbleweed-KDE, Mint 18.3+19.0, MX-18
Posts: 4,258

Original Poster
Rep: Reputation: Disabled
Quote:
Originally posted by syg00
I have a feeling you'll find that a copy of ntldr was dropped into the DOS partition - this enforces consistent loader code.
Yes that's exactly the case, since Microsoft products will start only from the first primary partitions. Thus I start DOS from the NT-loader, but the NT-loader is able to call on GRUB -- thus returning me to my original startup boot-menue. I wanted to reverse or rather extend this feature to GRUB, thus having a shortcut circumventing the NT-loader...

Quote:
Originally posted by syg00
If you *really* want this to work, I'd suggest that you'd have to install NT first, then DOS, then Linux/grub - with grub in the MBR of course. ...
GRUB is already in the MBR, it calls the NT-loader but can't reach DOS directly.
 
Old 10-10-2005, 07:57 AM   #9
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 18,282

Rep: Reputation: 2988Reputation: 2988Reputation: 2988Reputation: 2988Reputation: 2988Reputation: 2988Reputation: 2988Reputation: 2988Reputation: 2988Reputation: 2988Reputation: 2988
Quote:
Originally posted by JZL240I-U
.. since Microsoft products will start only from the first primary partitions.
Oft quoted but not true. At least not since ntldr appeared.
Quote:
I wanted to reverse or rather extend this feature to GRUB, thus having a shortcut circumventing the NT-loader...
GRUB is already in the MBR, it calls the NT-loader but can't reach DOS directly.
You mis-understood what I wrote.
You will have to re-install all 3 - in the order I suggested. And no, I haven't done this - merely best guess based on quite a bit of time dissecting (and disassembling) the various bootloaders.
 
Old 10-10-2005, 08:10 AM   #10
JZL240I-U
Senior Member
 
Registered: Apr 2003
Location: Germany
Distribution: openSuSE Tumbleweed-KDE, Mint 18.3+19.0, MX-18
Posts: 4,258

Original Poster
Rep: Reputation: Disabled
Quote:
Originally posted by syg00
Oft quoted but not true. At least not since ntldr appeared.
So why does it "drop into the DOS-partition" (C:\)? Only because DOS is there or has it technical reasons for this? Could the NT-loader be made to load DOS in this scheme of yours (I mean, the MBR is then pointing to the NT-loader e.g. in /dev/hda2 = D:\, would the NT-loader then call on C:\command.com?)

Quote:
Originally posted by syg00
You mis-understood what I wrote.
I'll try to do better in the future .

Quote:
Originally posted by syg00
You will have to re-install all 3 - in the order I suggested. ...
Ummm, that would be a tall order, all those "service-packs"... and my wife somehow always thinks that I did something untoward when there is some problem on the box, never mind whether I touched it at all ...

Not to mention that I hope to drop MS-products in a short time...

Last edited by JZL240I-U; 10-10-2005 at 08:13 AM.
 
Old 10-10-2005, 08:39 AM   #11
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 18,282

Rep: Reputation: 2988Reputation: 2988Reputation: 2988Reputation: 2988Reputation: 2988Reputation: 2988Reputation: 2988Reputation: 2988Reputation: 2988Reputation: 2988Reputation: 2988
Quote:
Originally posted by JZL240I-U
So why does it "drop into the DOS-partition" (C:\)? Only because DOS is there or has it technical reasons for this? Could the NT-loader be made to load DOS in this scheme of yours (I mean, the MBR is then pointing to the NT-loader e.g. in /dev/hda2 = D:\, would the NT-loader then call on C:\command.com?)
The NT (and later) loader code (i.e. the code in the MBR) looks for ntldr - not command.com. NT (and its derivatives) installers appear to recognise DOS, and update it with the approprate code.
Quote:
Not to mention that I hope to drop MS-products in a short time...
how is this to be reconciled with ...
Quote:
Still, for the point of learning, I'd still like to try to come to grips with this little project.
Your choice really ...
 
Old 10-10-2005, 08:48 AM   #12
JZL240I-U
Senior Member
 
Registered: Apr 2003
Location: Germany
Distribution: openSuSE Tumbleweed-KDE, Mint 18.3+19.0, MX-18
Posts: 4,258

Original Poster
Rep: Reputation: Disabled
Quote:
Originally posted by syg00
The NT (and later) loader code (i.e. the code in the MBR) looks for ntldr - not command.com. NT (and its derivatives) installers appear to recognise DOS, and update it with the approprate code.
You mis-understood what I wrote . What I meant was, how does the ntldr start DOS in your scheme where you'd suggested that I'd have to install NT first, then DOS, then Linux/grub - with grub in the MBR ... giving an option like C:\command.com in the boot.ini?

Quote:
Originally posted by syg00
how is this to be reconciled with ...Your choice really ...
Ummm, yes, but that does not really preclude learning? Having the knowledge does not necessarily entail or enforce everyday use and I like to know things for the sake of simply understanding .
 
Old 10-10-2005, 09:04 AM   #13
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 18,282

Rep: Reputation: 2988Reputation: 2988Reputation: 2988Reputation: 2988Reputation: 2988Reputation: 2988Reputation: 2988Reputation: 2988Reputation: 2988Reputation: 2988Reputation: 2988
Quote:
Originally posted by JZL240I-U
What I meant was, how does the ntldr start DOS in your scheme where you'd suggested that I'd have to install NT first, then DOS, then Linux/grub - with grub in the MBR ... giving an option like C:\command.com in the boot.ini?
ntldr wouldn't be invovled - grub would chainload command.com for DOS. As I intimated, order of install would be crucial.
Quote:
Ummm, yes, but that does not really preclude learning? Having the knowledge does not necessarily entail or enforce everyday use and I like to know things for the sake of simply understanding .
Sorry, I assumed you wanted to "play" - it's the way I learn best.
It's also why I have a box that is "testbox" - it is regularly destroyed, and it has its MBR and/or partition table trashed at least monthly.
That way I feel I know what happens ... if I don't like/understand what someone has posted, I try it and find out.
But that box is never used for anything that is not "throw-away". Currently it has Solaris plus 9 Linux distros/kernels on it. All of which are expendable. Next week - who knows what will be on it ????
 
Old 10-10-2005, 09:19 AM   #14
JZL240I-U
Senior Member
 
Registered: Apr 2003
Location: Germany
Distribution: openSuSE Tumbleweed-KDE, Mint 18.3+19.0, MX-18
Posts: 4,258

Original Poster
Rep: Reputation: Disabled
Quote:
Originally posted by syg00
ntldr wouldn't be invovled - grub would chainload command.com for DOS.
I wanted to give both GRUB and the ntldr "symmetrical" capabilities, i.e. both being able to start either the other loader or DOS.

Quote:
Originally posted by syg00
Sorry, I assumed you wanted to "play" - it's the way I learn best.
Agreed.

Quote:
Originally posted by syg00
It's also why I have a box that is "testbox" - it is regularly destroyed, and it has its MBR and/or partition table trashed at least monthly.
Well, I don't have the means: I own just one box (okay, I could buy another one ). But I am no professional IT-guy, I'm just a technically interested layman who wants to use Linux on the desktop in home computing. Furthermore, having two small children and a wife, doesn't leave me with too much spare time .

Quote:
Originally posted by syg00
That way I feel I know what happens ... if I don't like/understand what someone has posted, I try it and find out.
But that box is never used for anything that is not "throw-away". Currently it has Solaris plus 9 Linux distros/kernels on it. All of which are expendable. Next week - who knows what will be on it ????
That's the real way to do it. I can only --from time to time and oh so carefully-- play with my production box, or, rarely, when I give it a new install, try some new schemes.

Still, thank you for sharing your knowledge and experience.

Last edited by JZL240I-U; 10-10-2005 at 10:54 AM.
 
Old 10-10-2005, 08:46 PM   #15
aus9
LQ Addict
 
Registered: Oct 2003
Location: Australia
Distribution: MX 19/ TC64
Posts: 5,326

Rep: Reputation: Disabled
sorry to misunderstand you but I feel this remark needs comments
I wanted to give both GRUB and the ntldr "symmetrical" capabilities, i.e. both being able to start either the other loader or DOS.


a bootloader can be on any device .....floppy .....cd......dvd.....harddrive.....flash.....usb ok?
then if like most of us, you choose in your bios to allow the harddrive to be the boot device it makes sense to allow a bootloader to START to have powers in the mbr.

Once the mbr finds a bootloader be it grub or ntldr BOTH must then jump to the balance of the booting files as the mbr is only 512 bytes.

therefore in terms of what has been said above
either

grub in mbr jumps to its bootling files and if menu has MS grub chainloads or jumps to the booting files for MS be it ntldr.exe or something else

ntldr in mbr jumps to its bootting files and if boot.ini has a reference it chainloads to the grub booting files on the linux partition.

that is, you can only have one bootloader in the mbr at a time.

However, if I misunderstood, both can chainload but I have already covered that in my signature ok?
 
  


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
How do I make my hdparm settings permanent? zmaint Mandriva 2 11-17-2006 01:44 PM
making WiFi settings in /etc/network/interfaces permanent Lleb_KCir Linux - General 3 05-11-2005 12:22 AM
Mandrake 10.0 Gnome/KDE Taskbar icon settings...are there settings? LiquidRezin Linux - Newbie 2 03-22-2004 10:27 AM
Making permanent screen geometry settings bjb123 Linux - Hardware 2 12-21-2003 05:40 PM
GRUB settings greg108 Linux - Newbie 2 08-18-2003 01:20 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 06:29 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