Re: [Freedos-user] FreeDOS silently writes to partition table?
Hi, actually I would recommend to tell GRUB to not manipulate the partition table at all. Why should it hide FAT from Linux or XP? Why should it hide XP and Linux from DOS? All three operating systems are smart enough to know the drive letter from which they are booting, although I am not 100% sure about XP ;-). So while the grub manual on www.gnu.org/software/grub/manual/grub.html#DOS_002fWindows does mention things like hide, unhide and makeactive, I do not think you need ANY of them for FreeDOS or Linux... You should probably mark your NTFS partition as active to make XP happy, but for the other systems, you can probably keep the partition table untouched :-). If your heavy hide stuff is in some automatically created menu.lst then you should probably contact the people who wrote the software which made your menu.lst and tell them that they overdid it :-). Eric gut.bin1 0+249 250- 2008093+ 16 Hidden FAT16 gut.bin2250 499 2502008125 82 Linux swap / Solaris gut.bin3 *500+ 4677- 4178- 335544327 HPFS/NTFS gut.bin4 4677+ 19456 14780- 118716768+ 5 Extended schl.bin1 * 0+249 250- 2008093+ 6 FAT16 schl.bin2250 499 2502008125 92 Unknown schl.bin3500+ 4677- 4178- 33554432 17 Hidden HPFS/NTFS schl.bin4 4677+ 19456 14780- 118716768+ 15 Unknown -- ___ Freedos-user mailing list Freedos-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/freedos-user
Re: [Freedos-user] FreeDOS silently writes to partition table?
Hi, actually I would recommend to tell GRUB to not manipulate the partition table at all. Why should it hide FAT from Linux or XP? Why should it hide XP and Linux from DOS? All three operating systems are smart enough to know the drive letter from which they are booting, although I am not 100% sure about XP ;-). So while the grub manual on www.gnu.org/software/grub/manual/grub.html#DOS_002fWindows does mention things like hide, unhide and makeactive, I do not think you need ANY of them for FreeDOS or Linux... You should probably mark your NTFS partition as active to make XP happy, but for the other systems, you can probably keep the partition table untouched :-). Hmm, yes, nice thinking :-) I have on this machine 5 OSes, Debian Linux (x86), SuSE Linux (x86_64), Windows XP (i386), Windows Server 2008 (x64) and now FreeDOS (8086? :-). It's quite some time ago, but IIRC I started installing DOS 6.22 and then the Windows things. They somehow modified the partition table so that DOS 6.22 couldn't boot anymore and also installed their boot loader into the DOS partition. Then I tried with FreeDOS instead of DOS 6.22, but not much difference. So after some struggling I decided to reserve an empty partition at the start of the drive for DOS and installed the Windows and Linux systems. I deferred the installation of DOS to a later time since I needed the other systems for daily work. So now I have 2 Windows installations which aren't aware of a potential FAT partition as the first partition of the drive. In order not to fight against Wind(ows)mills I'm using this hide/unhide feature of grub to boot FreeDOS. Probably I even don't need the hiding of the extended partition, I haven't tried this yet. I just wanted to be on the safe side since the very last partition at the end of the disk is a FAT32. Don't know how FreeDOS reacts on this, but I will try :-) regards, chris -- ___ Freedos-user mailing list Freedos-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/freedos-user
Re: [Freedos-user] FreeDOS silently writes to partition table?
Hi Christian, I have a machine with a 160GB drive, and many partitions with different Linux and Windows versions. I'm using grub as main boot loader. After booting FreeDOS (which resides on the first partition) the extended partition is marked as Unknown. Partition table before: Device Boot Start End #cyls#blocks Id System gut.bin1 0+249 250- 2008093+ 16 Hidden FAT16 gut.bin2250 499 2502008125 82 Linux swap / Solaris gut.bin3 *500+ 4677- 4178- 335544327 HPFS/NTFS gut.bin4 4677+ 19456 14780- 118716768+ 5 Extended The Extended partition contains another 4 partitions, 2 Linux ext3fs, 1 NTFS, and one FAT32 (the very last one). Table after booting FreeDOS: Device Boot Start End #cyls#blocks Id System schl.bin1 * 0+249 250- 2008093+ 6 FAT16 schl.bin2250 499 2502008125 92 Unknown schl.bin3500+ 4677- 4178- 33554432 17 Hidden HPFS/NTFS schl.bin4 4677+ 19456 14780- 118716768+ 15 Unknown Note how the first partition changed from HIDDEN FAT16 to NORMAL FAT16 and the active partition changed from NTFS to FAT16. The change from 5 to 15 is from CHS extended to LBA extended, you just used a very old software to display your partition table. I also think that this hiding / un- hiding and change of the active partition is actually some thing that your GRUB configuration caused ;-). Eric -- ___ Freedos-user mailing list Freedos-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/freedos-user
Re: [Freedos-user] FreeDOS silently writes to partition table?
Hi Eric, Note how the first partition changed from HIDDEN FAT16 to NORMAL FAT16 and the active partition changed from NTFS to FAT16. The change from 5 to 15 is from CHS extended to LBA extended, you just used a very old software to display your partition table. I also think that this hiding / un- hiding and change of the active partition is actually some thing that your GRUB configuration caused ;-). Yes, sorry. The hiding/unhiding and change of the active partition was (intentionally) done by grub. But I didn't tell it to change the type of the extended partition. IIRC I used cfdisk from Debian/unstable to display the partition sector (I didn't find another tool to display a 512 byte bin file as partition sector). But I still think that FreeDOS is the one which changes the type from 5 to 15. The problem is that the linux partition is in the extended partition and when it's set to 15 grub doesn't find its later load stages. Any ideas? regards, chris -- ___ Freedos-user mailing list Freedos-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/freedos-user
Re: [Freedos-user] FreeDOS silently writes to partition table?
After booting FreeDOS (which resides on the first partition) the extended partition is marked as Unknown. Partition table before: Device Boot Start End #cyls#blocks Id System gut.bin1 0+249 250- 2008093+ 16 Hidden FAT16 gut.bin2250 499 2502008125 82 Linux swap / Solaris gut.bin3 *500+ 4677- 4178- 335544327 HPFS/NTFS gut.bin4 4677+ 19456 14780- 118716768+ 5 Extended The Extended partition contains another 4 partitions, 2 Linux ext3fs, 1 NTFS, and one FAT32 (the very last one). Table after booting FreeDOS: Device Boot Start End #cyls#blocks Id System schl.bin1 * 0+249 250- 2008093+ 6 FAT16 schl.bin2250 499 2502008125 92 Unknown schl.bin3500+ 4677- 4178- 33554432 17 Hidden HPFS/NTFS schl.bin4 4677+ 19456 14780- 118716768+ 15 Unknown Note how the first partition changed from HIDDEN FAT16 to NORMAL FAT16 and the active partition changed from NTFS to FAT16. The change from 5 to 15 is from CHS extended to LBA extended, you just used a very old software to display your partition table. No it didn't. The Id values are apparently hexadecimal (notice 17/7 for hidden NTFS/NTFS, 16/6 for hidden FAT16/FAT16). The (CHS) extended partition changed to the type 15h, or hidden extended, which doesn't exist for most software. I also think that this hiding / un- hiding and change of the active partition is actually some thing that your GRUB configuration caused ;-). Although it sounds strange if GRUB itself can't use the hidden extended partition, I would also suspect this is done by GRUB, not FreeDOS. I think there's actually no code in FreeDOS (kernel) to write to the partition table, and if it was written by accident, it would have changed more than just this one byte (actually, this one bit). Possibly a bug in GRUB? Because, well, GRUB does write to the partition table anyway. Regards, Christian (M.) -- ___ Freedos-user mailing list Freedos-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/freedos-user
Re: [Freedos-user] FreeDOS silently writes to partition table?
Hello Christian, Although it sounds strange if GRUB itself can't use the hidden extended partition, I would also suspect this is done by GRUB, not FreeDOS. I think there's actually no code in FreeDOS (kernel) to write to the partition table, and if it was written by accident, it would have changed more than just this one byte (actually, this one bit). Possibly a bug in GRUB? Because, well, GRUB does write to the partition table anyway. thanks :-) Of course, it was GRUB's fault. I had a line hide(hd0,3) in my GRUB config for booting the the DOS partition. hd0,3 is the extended partition. GRUB -- as told in the config file -- hides the partition, but does not recognize a hidden extended partition on the next reboot. I've changed GRUB to also recognize hidden extended partitions and now all is well. I'll check with the GRUB people if my change is acceptable for them. Now, please welcome me as a new FreeDOS user :-) regards, chris -- ___ Freedos-user mailing list Freedos-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/freedos-user