l_l_r
08-29-2010, 12:36 PM
Hi:
Old GRUB
The following two entries are from "A grub menu booting 100+ systems of DOS Windows, Linux, BSD and Solaris" (http"//justlinux.com/forum/showtread.php?t=143973).
title DOS 7.10 @ hdc1
hide (hd0,0)
unhide (hd1,0)
map (hd1) (hd0)
map (hd0) (hd1)
root (hd1,0)
makeactive
chainloader +1
title Win98 @ hdc2
hide (hd0,0)
hide (hd1,0)
unhide (hd1,1)
root (hd1,1)
makeactive
map (hd1) (hd0)
map (hd0) (hd1)
chainloader +1
Without too much thinking, I created a DOS entry analog to DOS 7.10 above as follows:
title NWDOS (DR-DOS) 7
unhide (hd1,0)
map (hd1) (hd0)
map (hd0) (hd1)
root (hd1,0)
makeactive
chainloader +1
The result: disaster--Win XP on (hd0,0) was wiped out!
Well, I really could not find any information whether was it possible to install a classic MS-DOS, PC-DOS, or DR-DOS system on a modern PC with large SATA hard drives. I just tried it. But, even if the answer was no, it most likely was not the reason for the disaster. The likely suspicion falls on the grub entry. I did not find critical to hide the Win XP directory, (hd0,0), since DOS could not recognize an NTFS. Actually, after the manipulation, the DOS directory should have appeared to be (hd0,0). (DOS always looks for the first visible directory on the first hard drive.) But that could not, and similarly it could not be so in the DOS 7.10 entry in the quoted article.
Unless I basically misinterpret something, the basic difference between the DOS 7.10 and the Win98 entries is in the location of the root statement. In the case in the DOS 7.10 entry it is after the map statements whereas in the Win98 entry before the map statements. In both cases the original location designations are used. Unless the two map statements do something more than just swapping the appearance of the two hard drives, the DOS 7.10 entry is incorrect.
But, what really does a map statement is also questionable. The swapping the values of two ordinary variables always requires a third temporary variable to store one of the values before overwriting it as it is being semantically outlined below:
x swap y; z
z <- x
x <- y
y <- z
So, how on earth can the two map statements achieve the same thing that in ordinary programming requires three assignment statements? How can one use those values in the second map statement that were overwritten just before by the first map statement?
It seems that to solve the puzzle one needs a complete definition of one single map statement first, and then just after that an explanation how the subsequent two map statements constitute a swap. All meaningful explanations, and helpful suggestions are welcome.
New GRUB
The installation of many Linux distros proceeds without asking whether a bootloader should be installed, and if so then where. Most likely one ends up with a rewritten MBR. If you got more operating systems on your system, number of errors can occur, the correction of which need various skills. In the case of the new grub, one has to deal with the holistic grub.conf file that should not be touched. But, if some of the systems are missing, only a miracle could correct the situation without touching it.
In my experience, neither the old nor the new grub can recognize a freeBSD partition. In the case of the old grub, the information is available to correct the situation. In the case of the new grub, however, I have not been able to locate the pattern for a freeBSD entry. In the old grub menu.lst the root of my freeBSD entry is (hd0,2,a). Can someone provide with the lines for the new grub entry? Thanx l_l_r.
Old GRUB
The following two entries are from "A grub menu booting 100+ systems of DOS Windows, Linux, BSD and Solaris" (http"//justlinux.com/forum/showtread.php?t=143973).
title DOS 7.10 @ hdc1
hide (hd0,0)
unhide (hd1,0)
map (hd1) (hd0)
map (hd0) (hd1)
root (hd1,0)
makeactive
chainloader +1
title Win98 @ hdc2
hide (hd0,0)
hide (hd1,0)
unhide (hd1,1)
root (hd1,1)
makeactive
map (hd1) (hd0)
map (hd0) (hd1)
chainloader +1
Without too much thinking, I created a DOS entry analog to DOS 7.10 above as follows:
title NWDOS (DR-DOS) 7
unhide (hd1,0)
map (hd1) (hd0)
map (hd0) (hd1)
root (hd1,0)
makeactive
chainloader +1
The result: disaster--Win XP on (hd0,0) was wiped out!
Well, I really could not find any information whether was it possible to install a classic MS-DOS, PC-DOS, or DR-DOS system on a modern PC with large SATA hard drives. I just tried it. But, even if the answer was no, it most likely was not the reason for the disaster. The likely suspicion falls on the grub entry. I did not find critical to hide the Win XP directory, (hd0,0), since DOS could not recognize an NTFS. Actually, after the manipulation, the DOS directory should have appeared to be (hd0,0). (DOS always looks for the first visible directory on the first hard drive.) But that could not, and similarly it could not be so in the DOS 7.10 entry in the quoted article.
Unless I basically misinterpret something, the basic difference between the DOS 7.10 and the Win98 entries is in the location of the root statement. In the case in the DOS 7.10 entry it is after the map statements whereas in the Win98 entry before the map statements. In both cases the original location designations are used. Unless the two map statements do something more than just swapping the appearance of the two hard drives, the DOS 7.10 entry is incorrect.
But, what really does a map statement is also questionable. The swapping the values of two ordinary variables always requires a third temporary variable to store one of the values before overwriting it as it is being semantically outlined below:
x swap y; z
z <- x
x <- y
y <- z
So, how on earth can the two map statements achieve the same thing that in ordinary programming requires three assignment statements? How can one use those values in the second map statement that were overwritten just before by the first map statement?
It seems that to solve the puzzle one needs a complete definition of one single map statement first, and then just after that an explanation how the subsequent two map statements constitute a swap. All meaningful explanations, and helpful suggestions are welcome.
New GRUB
The installation of many Linux distros proceeds without asking whether a bootloader should be installed, and if so then where. Most likely one ends up with a rewritten MBR. If you got more operating systems on your system, number of errors can occur, the correction of which need various skills. In the case of the new grub, one has to deal with the holistic grub.conf file that should not be touched. But, if some of the systems are missing, only a miracle could correct the situation without touching it.
In my experience, neither the old nor the new grub can recognize a freeBSD partition. In the case of the old grub, the information is available to correct the situation. In the case of the new grub, however, I have not been able to locate the pattern for a freeBSD entry. In the old grub menu.lst the root of my freeBSD entry is (hd0,2,a). Can someone provide with the lines for the new grub entry? Thanx l_l_r.