topbanner_forum
  *

avatar image

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  • Thursday December 12, 2024, 2:24 pm
  • Proudly celebrating 15+ years online.
  • Donate now to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.
  • donate

Last post Author Topic: Multibooting and Partitioning Experiments  (Read 43302 times)

Armando

  • Charter Member
  • Joined in 2005
  • ***
  • Posts: 2,727
    • View Profile
    • Donate to Member
Re: Multibooting and Partitioning Experiments
« Reply #25 on: October 27, 2007, 07:14 PM »
Nice. Now, be careful with GRUB...  ;)

wolf.b

  • Member
  • Joined in 2007
  • **
  • Posts: 70
    • View Profile
    • Donate to Member
Re: Multibooting and Partitioning Experiments
« Reply #26 on: October 27, 2007, 07:53 PM »
Right now the installation of Ubuntu 7.10 to hard disk is running in the background. Real easy if you read the messages on the screen, and have a clear idea what you want. I have opted out where it says "Install Boot Loader to sda0" or something. I will try to add an entry to GRUB4DOS, or to boot.ini. Have you got any suggestions?

Installation complete, my experiments continue ...

Wolf
Schön wär's, wenn's schön wär!

Armando

  • Charter Member
  • Joined in 2005
  • ***
  • Posts: 2,727
    • View Profile
    • Donate to Member
Re: Multibooting and Partitioning Experiments
« Reply #27 on: October 27, 2007, 08:27 PM »
Well, i usually like to have the boot loader on my Linux partition's boot sector (instead of the mbr), and I use another boot loader to lead me to GRUB.... But that's just a matter of preference. (let me also confess that I don,t like GRUB -- i find it fragile and archaic and hope something else will replace it  soon as the standrad Linux boot loader ; I don,t like LILO either -- I don't know if others share my aversions...)

(sda0) ? Hummm, I'd think it's more something like (hd0), which will put GRUB on the mbr. But what do I know?

Hard drive partition terminology is, IMO, a bit confusing in Linux : on one hand you have the GRUB terminology for hard drive partitions ((hd0) (hd0,1), and so on), and on the other hand, the terminology used in the Linux file system for hard drive devices (sda1, sda2... or hda1, hda2, etc. depending if its SATA or IDE).

If you installed GRUB to your your mbr, it should recognize your windows installations etc. and you'll be able to boot anything from there. Anyway : if, for some reason, you decide to move GRUB to your partition's boot sector, it's very feasible with the Ubuntu Live CD.


I don't consider myself an expert, so if anybody else wants to add some comments here...
« Last Edit: October 27, 2007, 08:29 PM by Armando »

wolf.b

  • Member
  • Joined in 2007
  • **
  • Posts: 70
    • View Profile
    • Donate to Member
Re: Multibooting and Partitioning Experiments
« Reply #28 on: October 27, 2007, 09:10 PM »
Hi Armando, :)

I'm back in WinXP now. I have mounted my new Ubuntu and can read the filesystem. It is mounted as hda6, but I'm sure there was something with sdxxx to be seen inside Ubuntu, I will post exact info, as soon as I can.

Clipboard06.png

Where do you think can I get the boot sector of that partition. The first 512 byte of the file vmlinuz look OK to me. I just put it in my boot.ini and test it. See you later, I hope ...

Wolf
Schön wär's, wenn's schön wär!

Armando

  • Charter Member
  • Joined in 2005
  • ***
  • Posts: 2,727
    • View Profile
    • Donate to Member
Re: Multibooting and Partitioning Experiments
« Reply #29 on: October 28, 2007, 12:35 AM »
I'm sure there was something with sdxxx to be seen inside Ubuntu

Yes, if believe that if your hard drive is sata or scsi, then it will be identified as "sda" (sda1, sda2, sda3... sdb1, sdb2, etc. depending on the partition/disk). If it was IDE, then it would've been "hda" (hda1, hda2... hdb1, hdb2...). But it might also depend on other factor I'm unaware  off.

Where do you think can I get the boot sector of that partition.

What do you mean ? You want to be able to read it? or change where GRUB resides...?

[edit : corrected some stupid mistakes]
« Last Edit: October 28, 2007, 12:55 AM by Armando »

wolf.b

  • Member
  • Joined in 2007
  • **
  • Posts: 70
    • View Profile
    • Donate to Member
Re: Multibooting and Partitioning Experiments
« Reply #30 on: October 28, 2007, 03:01 PM »
Hello Armando,

Yes, if believe that if your hard drive is sata or scsi, then it will be identified as "sda" ...
-Armando

Yes, I have S-ATA drive.

Where do you think can I get the boot sector of that partition.
-wolf.b
What do you mean ? You want to be able to read it? or change where GRUB resides...?
-Armando

Yes, I would like to read the boot sector of my Ubuntu partition, I don't want to change GRUB's location. I believe GRUB is installed in the boot sector of the ext3 partition. I can see a folder hda6/boot/grub and inside is a file menu.lst.

My understanding of the boot sequence is this (and might be wrong):
BIOS checks which medium (floppy, HDD, CDROM, USB, network) is set up to be primary boot device. In case of HDD, it loads the first sector (MBR = IPL + 4x16 bytes partition table + 2 bytes signature) of the first HDD into RAM at location 0000:7C00h. It then passes control to IPL.

IPL (initial program loader = first 446 bytes of MBR) checks for errors, relocates itself, loads one sector from disk (boot sector of active primary partition) into RAM at location 0000:7C00h and passes control to it.

Boot sector (or boot record) checks for errors, loads kernel file (IO.SYS for DOS, NTLDR for XP, ...) and passes control to it.

Now this the point where I think that different OS implement different strategies to continue. But I think that NTLDR might be able to boot Ubuntu, If I only manage to save the boot record of the EXT3 partition to a file on C: (eg C:\SECTOR\ubuntu.bin) and add a line to boot.ini saying "C:\SECTOR\ubuntu.bin = "Ubuntu 7.10"

PTedit.png


I have just remembered that a disk editor is the tool to do that (cylinder 521, head 1, sector 1 in my case, screenshot inside spoiler). More by chance than design that sector is accessible by old DOS tools who can only read the first 1024 cylinders. But I am not sure weather that will be the best/correct way to go.

Reading this makes me think to give up for now on NTLDR, but insert an entry in C:\BOOT\GRUB\menu.lst which is used by GRUB4DOS. GRUB4DOS shows a menu initially and offers editing and a command line. The entry which I have added goes like this (copied from mounted ext3 disk, /boot/grub/menu.list):

title Ubuntu 7.10
root (hd0,5)
kernel /boot/vmlinuz-2.6.22-14-generic root=UUID=06031e16-7deb-44ad-b2b1-74736c0c3e5f ro quiet splash
initrd /boot/initrd.img-2.6.22-14-generic
quiet

I cannot thank you enough for your replies to my posts, as they are always giving me directions. My biggest problem at the moment is that I can't even ask questions, because I don't know what to ask. Especially when answering "what do you mean?" I realize how profund my ignorance is on Linux related topics. Your questions keep directing my lines of thought and when I finally send my next post (I often need more than an hour just to write a post), I feel as if I have taken the next step on my journey to Linux. :)

Armando for president!


Greetings
Wolf
Schön wär's, wenn's schön wär!

wolf.b

  • Member
  • Joined in 2007
  • **
  • Posts: 70
    • View Profile
    • Donate to Member
Re: Multibooting and Partitioning Experiments
« Reply #31 on: October 28, 2007, 03:19 PM »
Just for the record:This page How To Multi-Boot Operating Systems is full of useful infos and illustrating pictures.
Schön wär's, wenn's schön wär!

wolf.b

  • Member
  • Joined in 2007
  • **
  • Posts: 70
    • View Profile
    • Donate to Member
Re: Multibooting and Partitioning Experiments
« Reply #32 on: October 28, 2007, 03:49 PM »
Another one for the record:

I was able to start my new Ubuntu 7.10 using GRUB4DOS. That code from post #30 did the trick on my first attempt. I guess that makes me now a Linux user. What is the quickest way to mess it all up?
Schön wär's, wenn's schön wär!

jgpaiva

  • Global Moderator
  • Joined in 2006
  • *****
  • Posts: 4,727
    • View Profile
    • Donate to Member
Re: Multibooting and Partitioning Experiments
« Reply #33 on: October 28, 2007, 04:49 PM »
What is the quickest way to mess it all up?

simple!
cd /
sudo rm -rf *.*
:D :D

wolf.b

  • Member
  • Joined in 2007
  • **
  • Posts: 70
    • View Profile
    • Donate to Member
Re: Multibooting and Partitioning Experiments
« Reply #34 on: October 28, 2007, 06:21 PM »
would that do the same as
4dos /c del /s/y/z \*.*
does for DOS/Windows?

I guess yes. I have found that trying to get my 2nd monitor involved (which is attached to PCI graphics card, 1st monitor is on onboard graphics card) takes so much longer, but messes up things thoroughly as well. :) I am getting better at doing a fresh reinstall.
Schön wär's, wenn's schön wär!

saikee

  • Participant
  • Joined in 2007
  • *
  • default avatar
  • Posts: 5
    • View Profile
    • Donate to Member
Re: Multibooting and Partitioning Experiments
« Reply #35 on: November 06, 2007, 02:27 AM »
Someone has drawn my attention to this thread,

Wonder what you guys make out of this?

I am in a hurry now but would make a comparison later on.

Recently I have to show someone in another forum about booting up 3 Dos and 5 Windows and explained in Post #70 of this thread.

I have not put MS systems into logical partitions though.
« Last Edit: November 06, 2007, 02:31 AM by saikee »

wolf.b

  • Member
  • Joined in 2007
  • **
  • Posts: 70
    • View Profile
    • Donate to Member
Re: Multibooting and Partitioning Experiments
« Reply #36 on: November 07, 2007, 08:23 AM »
Hi saikee,

thank you for your links! :Thmbsup:

As it will take me a while to read those threads, I wonder if you could answer a basic question:

Is there a limit on the max number of logical partitions on a single HDD (S-ATA)? I mean, if I have an extended partition with 30,000 cylinders, does that allow 30,000 different logical drives inside? Surely not, but you wrote that the limit of 63 logical drives is not true anymore. I could not find yet the answer, still reading ...

Thanks in advance
Wolf


Edit(1): I guess it is 11?

Edit(2): Would you be kind enough to have a look at Reply#16 of this thread and maybe point me in the right direction to create a GRUB boot floppy. At present I use GRUB4DOS on my active primary partition, but I would appreciate any help.
Schön wär's, wenn's schön wär!
« Last Edit: November 07, 2007, 08:45 AM by wolf.b »

saikee

  • Participant
  • Joined in 2007
  • *
  • default avatar
  • Posts: 5
    • View Profile
    • Donate to Member
Re: Multibooting and Partitioning Experiments
« Reply #37 on: November 09, 2007, 03:09 PM »
To make a Grub floppy

This is fully described in the Chapter 3.1 of the Grub Manual.  It requires you to copy two files; stage1 and stage2 into a floppy.  The copying command is "dd" which operates at a hardware level. 

Basically you find stage1, specify it as the input, nominate the floppy (fd0) as the output and write out a block of 512 bytes only once.
Then you write stage2, block size 512 byte (exact sector size) starting from the 2nd sector until the file stage2 is exhausted.

You can "source" the two Grub files from most of the Linux Live CD.  Any one form the Ubuntu, PCLinux, Knoppix, Fedora, Mepis, etc .  The only ones that do not have Grub is the Slax and Slackware families as they use the alternative Linux boot loader Lilo.

You boot up a Linux Live CD, click terminal and and obtain the root privilege by the "sudo su" command (works in most distro like Ubuntu and Knoppix).  You then ask Linux to tell you where stage1 is being stored.  You then change directory to it, drop a floppy into the drive and copy the two files into the floppy.  I am repeating the instruction with an installed Ubuntu below

sudo su
find / -name stage1
cd /usr/lib/grub/i386-pc
dd if=stage1 of=/dev/fd0 bs=512 count=1
dd if=stage2 of=/dev/fd0 bs=512 seek=1

The full response in the terminal looks like this

saikee@saikee-desktop:~$ sudo su
Password:
root@saikee-desktop:/home/saikee# find / -name stage1
/boot/grub/stage1
/home/saikee/big_iso/boot/grub/stage1
/home/saikee/big_iso/boot-berry/Setup/stage1
/usr/lib/grub/i386-pc/stage1
root@saikee-desktop:/home/saikee# cd /usr/lib/grub/i386-pc
root@saikee-desktop:/usr/lib/grub/i386-pc# ls
e2fs_stage1_5  jfs_stage1_5    reiserfs_stage1_5  stage2           xfs_stage1_5
fat_stage1_5   minix_stage1_5  stage1             stage2_eltorito
root@saikee-desktop:/usr/lib/grub/i386-pc# dd if=stage1 of=/dev/fd0 bs=512 count=1
1+0 records in
1+0 records out
512 bytes (512 B) copied, 0.278956 seconds, 1.8 kB/s
root@saikee-desktop:/usr/lib/grub/i386-pc# dd if=stage2 of=/dev/fd0 bs=512 seek=1
215+1 records in
215+1 records out
110132 bytes (110 kB) copied, 8.42257 seconds, 13.1 kB/s

In the above there were two sources for stage1.  Either one will do.

I also did a "ls" command which is identical to "dir" in Windows command prompt to show all the Grub files.

This Grub floppy can boot any installed operating system that has ever been invented on a PC.  I classify it as the most lethal booting weapon in the business.

This thread may be useful if you ever get lost in booting a PC system.

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

Linux uses a major and minor numbering system to define block devices and a hard disk of SCSI, Pata, Sata or USB type can have 16 device names.   Since one device name must be reserved for the whole of the disk, say sda, and there are 4 primaries that leaves 11 logical partitions possible.  In order to use logical partitions, even one, a primary partition must be given up to accommodate all the logical partitions inside.

sda1 to sda4 are reserved for primaries and every logical partition starts at sda5.  Linux names disks sda, sdb, sdc, sdd, sde, sdf, ......etc.  Before the 2.6.20 kernel changes both Pata and Sata can have a total of 256 devices.  Pata achieved it through 4 disks each 64 devices names whereas Sata did the same with 16 disks each has 16 device names.  I have reason to believe the 16 hard disks are still supported when the Pata disk has been grouped into the same SCSI/Sata/USB family.

The nice thing about Linux is you are free to do whatever you want as long as you go with the established convention.  Thus one can use trick to get 44 logical partitions out of a hard disk.  My second hard disk has 44 OSes inside working merrily.
« Last Edit: November 09, 2007, 03:16 PM by saikee »

wolf.b

  • Member
  • Joined in 2007
  • **
  • Posts: 70
    • View Profile
    • Donate to Member
Re: Multibooting and Partitioning Experiments
« Reply #38 on: November 09, 2007, 10:39 PM »
Hi saikee!

Thanks for your reply. I have found that my initial problems with a GRUB floppy were probably related to buggy BIOS, bad floppy disk, old hardware or some such. The floppy I have created following your walkthrough in the reply#37 works perfectly :) on only one of my laptops, but not on my desktop or inside a VM on that desktop. :( I have found another way here to create a GRUB floppy on a FAT formatted floppy (uses mkfs -t msdos /dev/fd0). That one, funny enough, is the other way round, works on my desktop and inside VM, but not on my laptop. Anyway, I now think that my first attempts were not all that bad, I might have tested that first floppy on the wrong machine. So thanks again for encouraging me to give it another go.

Have you ever tested GRUB4DOS?
What do you think of the possibilities to load disk images into RAM?
Is there a reward for beating your record of getting 44 different bootable Linux distros (or 44 logical drives) onto a single S-ATA disk? Just kidding. Would I be allowed to use workarounds (non-grub methods) to achieve that?


Greetings
Wolf
Schön wär's, wenn's schön wär!

saikee

  • Participant
  • Joined in 2007
  • *
  • default avatar
  • Posts: 5
    • View Profile
    • Donate to Member
Re: Multibooting and Partitioning Experiments
« Reply #39 on: November 10, 2007, 02:49 AM »
I have Grub4Dos inside some Dos partitions.  Since I can load Grub virtually from anywhere the use of Grub4Dos is diminishing.  It does have other bits and pieces but I haven't put all of them to use yet.

Many applications are just loading a disk images into ram.  Just about every Linux Live CD has to do exactly that.

I don't own the PC standard but just use it like everybody else.  If there is a way to get more partitions out in the normal way then I would love to know.  One can purchase a partitioning management layer software to get 256 primaries apparently but it is not recognised by established systems.  LVM is not universally supported otherwise one can place an OS in every logical volume.

44 paritions suit users with large hard disks like 500Gb as every operating system can be comfortably fitted into a 25Gb space.

I never format a Grub floppy and rarely have a problem with anyone I made.  The dd command should destroy the floppy's partition table and so the end product should be identical.  This means the floppy should be reported as unformatted and there is no file inside because dd write the code directly onto the floppy sectors.

If you know dd you should know it can be used to clone any XP and Vista.

wolf.b

  • Member
  • Joined in 2007
  • **
  • Posts: 70
    • View Profile
    • Donate to Member
Re: Multibooting and Partitioning Experiments
« Reply #40 on: November 10, 2007, 10:41 AM »
I don't own the PC standard but just use it like everybody else.
Yeah, right. Reading your publications I would say: you use it like nobody else.  :up:
But seriously, I am full of admiration for your work. "Der Bootmeister" for president.

Still seriously, if there is such a thing as "the PC standard", where can I read it? I always assumed that the way how CHS values and LBA values are written to the partition table entries are more like a loose convention. I have noticed on many occasions that the partition table (inside the master boot record (MBR)) and more often the extended partition tables (inside the extended partition boot record (EPBR)) written by Ranish Partition Manager (RPM) were declared as errors (partition table error 116, if I remember correctly) by PowerQuest Partition Magic, and PQmagic offered very kindly to correct those errors. Neither with nor without consequent PQmagic correction, have I ever experienced a problem with getting any MS OS to run from logical drive that has an incorrect CHS address in EPBR. Any thoughts on that? My thoughts are these:
  • All tested MS OS don't seem to care about CHS address, but use LBA address instead. Not to care here is meant to say: maybe the OS loader does read CHS address values, but it does not put out a message about them being off the mark.
  • As long as the crucial values are correct, the rest can be ignored or (ab)used otherwise, with no negative consequences. If I regard the boot sequence as a means to the end of having a OS at my command (GUI or CLI), the only negative consequence would be to not have that OS to boss around. Mind you, getting error messages from particular tools that don't like the way other tools or I manage the hard disk is nothing I would call positive consequence, it is merely a nuisance.

If there is a way to get more partitions out in the normal way then I would love to know.
Sorry for this stupid question: is your understanding of "normal way" the same as: only grub build in commands allowed?
Without that limitation I can think of at least one way to get more than 44 logical partitions. I don't want to bore you or the rest of the forum readers (in case there are any left) with lengthy details.
Just for the record: Ranish Partition Manager (shareware) supports a maximum of 32 primary partitions. Trombettworks' system supports as many primary partitions, until I run out of ink or paper (or disk space more likely). I have written for myself a batch that takes over the role of the ink and paper. Currently I juggle with about 50 primary partitions, but I guess the limit is way beyond 256 partitions.

LVM is not universally supported ...
What is LVM, please? Linux Virtual Machine :-* , no, but maybe Linux Volume Manager.
Actually a search came up with What is LVM? Answer: LVM is a Logical Volume Manager for the Linux operating system.


Greetings
Wolf
Schön wär's, wenn's schön wär!

saikee

  • Participant
  • Joined in 2007
  • *
  • default avatar
  • Posts: 5
    • View Profile
    • Donate to Member
Re: Multibooting and Partitioning Experiments
« Reply #41 on: November 11, 2007, 05:46 AM »
The PC standard as it exists today is just an overserved standard.  By that I mean every mobo you purchase has a Bios that will read off the first sector of the first hard disk it is asked to boot.  The Bios goes into the 446th to 51oth byte position to read off the 4 primaries.  Thereafter is up to the OS how to make use of the information.  This observed standard means if an OS like a Solaris or Linux can boot off a PC without inflicting damage to other OS in the same hard disk. 

If a partition happens to be fat32 which is supported by virtually all OSes then every OS can read/write its content. 

If someone comes along to make a MBR bigger than 512 byes then other OSes cannot co-exist with it and many just die eventually due to a lack of popularity.

The LBA is only way to address a big hard disk nowaday.  fat16 filing system has a maximum address of 2Gb and putting it beyond the first 4Gb area in the hard disk means no OS can access it.

Traditionally a MS system can only operate from a logical partition if a MS boot loader is available in a primary partition to boot it, unless the system is hacked so that it can boot directly from a logical partition as a stand alone system.

On the maximum number of partitions I have stayed away from the proprietary software because my interest is to have the systems that can co-exist with each other.  I am aware 256 primaries is no object by putting in a hard disk management layer.  One can use virtual machine too.  LVM is anther way but they all suffer limitation of needing a driver which cannot be put into every  operating system or boot loader.  What is good about LVM if a PC user cannot install a Vista inside it?  What is good about installing a Linux as a virtual machine inside a Windows host if that Linux cannot communicate with other Linux partition and read/write information?

LVM is used by Linux but not universally supported.  Some families of Linux use it and so the kernel and ram disk files are pre-packaged with its driver so that the distros can be installed inside a LVM.  Others recognise it only after the distro has been loaded but not before.  This make it impossible to install these distros into a LVM.  There are Linux that pride themself as small as possible and all unnecessary drivers are thrown away.

To me a large number of partitions are only useful if a pC user can install operating systems inside, otherwise they may just as well as subdirectories, as Linux and new MS Windows can play tunes with their ownerships.
« Last Edit: November 13, 2007, 01:52 PM by saikee »

wolf.b

  • Member
  • Joined in 2007
  • **
  • Posts: 70
    • View Profile
    • Donate to Member
Re: Multibooting and Partitioning Experiments
« Reply #42 on: November 11, 2007, 08:32 PM »
Hi saikee,

I don't know how to put this, so it is probably best to apologize beforehand in case I annoy you: Sorry for my bad attitude, no offense intended. :-[ I just try to get things straight in my mind. And also I like to discuss rather than argue.


... a Bios that will read off the first sector of the first hard disk it is asked to boot.  The Bios goes into the 446th to 51oth byte position to read off the 4 primaries.
I think, the BIOS will read the first sector of the hard disk, if it is asked to boot from it. Agreed. It seems to be ?standard? behavior to put it into RAM at location 0000:7C00. But the BIOS does not show any interest in the partition table (447th to 510th byte of the MBR). It is the Initial Program Loader (IPL = the first 446 bytes of the MBR) that copies the entire MBR (512 bytes =446 bytes IPL + 4*16 bytes partition table + 2 bytes signature) to a ?standard? location in memory (from 0000:7C00 to 0000:0600).


If a partition happens to be fat32 which is supported by virtually all OSes then every OS can read/write its content.
Maybe I have a lot of old hardware with old OS, but I think FAT16 is supported by a lot more OS's than FAT32. Not even Windows 95 or Windows NT 4.0 supported FAT32, not to mention MS DOS previous to version 7.1.


fat16 filing system has a maximum address of 4Gb and putting it beyond the first 4Gb area in the hard disk means no OS can access it.
I would like to repeat my statement of reply#6 of this thread:
I have tested my Windows 98 SE again, just to be sure. It is installed on a logical drive. That logical drive is located 12 GB past the start of the drive.
First physical sector = 25,430,958   (Cyl 1,583, Hd 1  , Sect 1)
Last  physical sector = 29,623,859   (Cyl 1,843, Hd 254, Sect 63)
It boots OK.
And I want to add that it is a FAT16 formatted partition. It starts 12 GB past the start of the disk and ends 14 GB past the start of the disk. In case of interest, I can try to copy it to the very end of the hard disk (size is 250 GB or 240 GiB) and see if it is bootable. Actually I am interested myself now, so I will check it out and post the result.


I am aware 256 primaries is no object by putting in a hard disk management layer.
Would you mind very much if I took that technical phrase "hard disk management layer" and use it to describe my batch files? It makes it sound as if I knew what I am talking about.


What is good about installing a Linux as a virtual machine inside a Windows host if that Linux cannot communicate with other Linux partition and read/write information?
I have VMware running on Windows XP. In there I can boot Linux from a CDROM (have not yet installed it to a virtual disk) and I get read/write access to my Ubuntu partition which is installed on a logical drive of my physical hard disk. After finishing this post, I reboot into that Ubuntu installation and post what damage I have done. (I have created an empty file: "/WolfWasHere"). Have I misunderstood that question?


I hope that I don't come across as a smartassed Know-it-all, because I feel that I know much too little about multibooting to be able to give advice or even write tutorials like you have done. I appreciate the way you are sharing your knowledge and I am honored that you read this thread and answer my questions. :)



Greetings
Wolf
Schön wär's, wenn's schön wär!

wolf.b

  • Member
  • Joined in 2007
  • **
  • Posts: 70
    • View Profile
    • Donate to Member
Re: Multibooting and Partitioning Experiments
« Reply #43 on: November 11, 2007, 10:13 PM »
Quick note from inside Ubuntu: the file "/WolfWasHere" exists and its creation does not seem to have caused much damage to the filesystem.
Schön wär's, wenn's schön wär!

wolf.b

  • Member
  • Joined in 2007
  • **
  • Posts: 70
    • View Profile
    • Donate to Member
Re: Multibooting and Partitioning Experiments
« Reply #44 on: November 12, 2007, 04:43 PM »
Another quick note: Windows 98 SE works when installed in the last 2 GB of a 250 GB HDD. :)
That is a logical drive with FAT16 filesystem.
But it only runs in 16 bit save mode secondary to my motherboard not being old enough. :(
Schön wär's, wenn's schön wär!

saikee

  • Participant
  • Joined in 2007
  • *
  • default avatar
  • Posts: 5
    • View Profile
    • Donate to Member
Re: Multibooting and Partitioning Experiments
« Reply #45 on: November 13, 2007, 03:15 AM »
Sorry I could only log onto this site at the home computer because the site is banned by my office network.

It is nice to talk to someone involved in the inner working of MS systems as I am not IT-related.  I don't mind the discussion at all as I don't think I know that much really.  That is why I always qualify myself by various statements and assumptions so that others in the know can step in if something not factual.  Like you I am interested in the technical side and just able to do it isn't good enough for me.

On the MBR part I think your description is correct as the Bios program only loads the MBR and it is really the code in the MBR that utilises the 64-byte partition table between the 447 and 510th byte.  I used the language loosely as though the Bios would hand over the information to the boot loader.  I suppose in a way it can be correct as once the MBR has been loaded the Bios activities ceases.

On the fat16 partition it is interesting because there are Type 6 for the normal one and type e for the one that use LBA.  I know the type 6 is supported in every MS system and I believe the Type e isn't but I could be wrong on this one.  Can you verify by booting the last official Dos (6.22?) floppy to see if your fat16 partition, created by Win98E, can be seen by it?

You may have a better explanation as you are close to these filing systems that pen drive suppliers adopt fat16 Type 6 for all products below 4Gb and switch to fat32 if the capacity is higher.  Must admit I always stick with the fat16 type 6 because that is what the Dos floppies are capable of handling.

On the VMware side my free version of an installed Linux inside a MS Windows is just a file.  I can't even from one Linux see another guest Linux under the same Host.  If you have done it from an boot up CD that may be something different or you have extra bits and pieces over and above the free VMware server software that I have.

In a real Linux as against a vitual machine one can access any other installed real Linux by mounting their partitions.  What is more one can "change root" into another Linux thereby able to work on another Linux internally.  I believe for someone like you I should describe it as using the kernel of Linux B in combination with a Bash terminal of Linux B.

The partition type is just the 5th byte in the 16-byte partition table but I don't think MS system use it publicly in the partition creation programs even though it is widely utilitised in the Unix-like systems.

Lastly I may as well learn something from you.  It is concerning install a "stand alone" MS system in a logical partition.

The way I understand the MS systems is they seem to share a common MBR up to and including XP and only get changed with Vista.  This is because I always restore a Win2k or xp MBR with a Dos 6.22 floppy and when it come to restore a Dos 6.22 MBR I use a XP installation CD.

I am sure there are difference but the main functionality is the same.

I read that MS MBR's function is primarily to search the 4 primaries and boots the one with the bootable flag switched on.  MS MBR doesn't care what the system inside and I have used this feature to make a XP's MBR to boot up Grub (host in a dta-only primary partition as I can use XP disk management to toggle the active partition).

Now only a primary partition uses the booting flag.  Although booting flag is availabe in the logical partitions but I am not aware any OS uses it.  The booting flag is also pretty loose in the logical partitions because unlike in the primaries where one partition toggled on will automatically toggling the existing one off.  For logical partitions we can set several of them active.  Linux of course never use the booting flag.

The other aspect of logical partition is one can create 63 partitions in a Pata disk and XP and Vista has no objection of mounting them (not 100% sure with Vista but XP has no problem).  Would a MS system installer be able to select any of these partitions for installation?

My puzzle is if a MS system can survive as a "stand alone" OS in a logical partition how does it boot itself?  Everything about its MBR say it cannot be done.

Here is the Microsoft own web page stating the limit of fat16.  I suppose if one can break this limit one can explain it too.
« Last Edit: November 13, 2007, 02:02 PM by saikee »

mikiem

  • Participant
  • Joined in 2006
  • *
  • default avatar
  • Posts: 99
    • View Profile
    • Donate to Member
Re: Multibooting and Partitioning Experiments
« Reply #46 on: November 13, 2007, 05:34 PM »
Don't know if it's of any use or even curiosity, Wolf, but since Xp came out in Beta I've been running both 98 SE & XP on the same drive partition... Most of the supporting files work well together, and I've only had a relative few cases where I had to fool with the registry &/or install the same software to 2 folders. Even shared the same folders for Outlook Express so mail was in sync between the 2, which was handy for the 1st year or so.

Since Beta I've been running Vista as well, though that one on a separate partition. Most of the time though I'm still able to use the same program folders for software across all 3 -- if/when an install is required, I just have to be careful to rename the uninstall files accordingly. Much of the time I've also been able to get away without several separate installs... Exporting a program's reg keys under the 2 software sections, then merging with the reg in a different version of windows has worked surprisingly often, and proven invaluable for some older software I still use, where either the install may not run in Vista, or it's been so long I'm not sure where the original discs are.

Again, don't know if any of that is of interest or not -- mostly wanted to point out my experience sharing program folders and partitions, and that it can work well over time (I still use software I installed in '98 in it's original folder etc. in Vista today). Not bragging or whatever, but according to whatever I've read you shouldn't be able to do either, and that's obviously wrong.

wolf.b

  • Member
  • Joined in 2007
  • **
  • Posts: 70
    • View Profile
    • Donate to Member
Re: Multibooting and Partitioning Experiments
« Reply #47 on: November 13, 2007, 10:27 PM »
Hi saikee,

I probably should start by explaining what I think might have lead to misunderstandings. I was not careful enough to give enough details on what exactly I have done. This is the hopefully better version:

I have installed Windows 98 SE to E:\WINDOWS when asked by the installer where to intall (default C:\WINDOWS). That will put everything that otherwise lands in C:\WINDOWS now on a different partition. The same goes for files and folders in C:\Programme (German version) which will land in E:\Programme. But the files that the installer puts into the root end up in the root of C:. Theses are things like a lot of *.log, setup.1st, bootlog.txt, backups of files that were there origionally like msdos.sys (now called msdos.dos), command.com (now called command.dos) and so on. Most important are the new files io.sys and msdos.sys. These are necessary to launch E:\WINDOWS\win.com. So strictly speaking, the BIOS reads the MBR, the MBR looks for a single primary bootable partition and if successful, it reads the boot sector of that primary partition. That boot sector looks for files called winboot.sys or io.sys in the root of the same primary partition where it (boot sector) came from. In case of certain (default may be OK) configurations of msdos.sys I think there is need for config.sys, command.com or autoexec.bat to be able to continue. Io.sys will find the path to win.com from msdos.sys and Windows will start.

Short: I have been able to start Windows 98 SE (installed on a logical drive that sits in the last 2 GB of a 250 GB hard drive) in an attempt to check if it is possible. But I have used a primary bootable partition with two files C:\io.sys and C:\msdos.sys to achieve that goal.

Shorter: I boot from C: to start Windows on E:.

I don't know if any of my previous posts were misleading in a way that makes it look as I have "booted" from logical drive E: without using any startup files on primary C:.

In my defense I quote my initial post#1 from the start of the thread:
Most (maybe all) OS for PC run well when they are installed on a logical drive and I boot from a matching DOS floppy. So I thought maybe they also run well when booting from a small primary DOS partition

Actually there were a lot more files on C: when I did it. Next experiment was to use a spare primary partition to exclude side effects caused by ntldr loading bootsect.dos (512 bytes) to see if it is still possible. In my case ntldr actually is instructed to load a file called C:\SECTOR\msdos710.bin. I didn't think ntldr would influence the basic possibilities, but I checked anyway. Also I have checked that a floppy with only two files can start this installation on E:. In both cases only two files were able to do it. For completeness let me mention that io.sys is unpatched and original, and this is the content of msdos.sys:
; MSDOS.SYS
; edited by Wolfgang Bernady
; This version is for MS-DOS 7.10 (Windows 98 SE)

[Paths]
WinDir=E:\WINDOWS
WinBootDir=E:\WINDOWS
HostWinBootDrv=E

[Options]
Logo=0
BootSafe=1
DisableLog=1
DoubleBuffer=2
WinVer=4.10.2222

The only DOS version that in my experiments was able to go straight from MBR code to a logical partition was PTS-DOS 32. I think it uses a special IPL inside the MBR to boot DOS from a logical drive, in my case that was E: again. Unfortunately the demo version of PTS-DOS has got a nasty delay of 60 seconds when it boots and I have not felt overly keen on doing much with it. But it surely boots from a logical drive.

Can you verify by booting the last official Dos (6.22?) floppy to see if your fat16 partition, created by Win98E, can be seen by it?
MS DOS 6.22 can not see that particular partition, nor can it see the other partition which was between 12 and 14 GB. Furthermore DOS 6.22 was only able to see my DATA partition (physically first logical drive, sits between 2 and 4 GB, FAT16) after I have changed the 5th byte (partition ID) of the extended partition from 0F hex (Extended LBA) to 05 hex (Extended). Even then it could still not see the 12-14 GB partition nor the 248-250 GB partition (BTW both are type 06 hex FAT16, not type 0E hex). That would have been something. Maybe I could try and use NTFS4DOS to find out what happens then.
 
As for USB pen drives, SD cards, CF cards (I have no other media), I really don't know. But I think you are right that the manufacturers choose FAT16 for compatibility with DOS. This makes me think of a USB format tool, that I have seen recently. It offers FAT, FAT32 and NTFS filesystems for pen drives.

My puzzle is if a MS system can survive as a "stand alone" OS in a logical partition how does it boot itself?  Everything about its MBR say it cannot be done.
Sorry, my mistake. It needs a floppy, CDROM, USB boot stick, bootable SD card, network or a small primary hard disk partition to boot first, as far as I know only PTS-DOS 32 boots itself on a logical drive.

Untested: if all partitions located in front of our logical drive are hidden, and Windows was installed to C: then you can probably do without msdos.sys. I think that the paths will default to C:\WINDOWS. So if I install Windows 98 to C:\WINDOWS (primary partition), and copy all the files to the first visible logical drive, and hide the primary partition, (or just convert the primary partition to a logical drive) then I could have a way to lock the computer by taking the boot floppy out. Actually I can think of ways to do that with Win2000, WinXP as well, maybe even Vista, but I don't have Vista. I'm getting carried away here.

The Microsoft Knowledge Base page is currently not available, I will have to look it up later.



Hi mikiem,

I find it very interesting what you write about multiple Windows installations on the same drive. I have a collection of tools that I keep on D:\Tools32 and with some of them I have *.reg files to quickly reinstall/repair their configuration. One of my reasons to keep OS separate was that I was unable to install Win95 to eg E:\WIN95 with programs in E:\Progs95 and parallel to that install Win98 to E:\WIN98 with programs in E:\Progs98. The installation was possible, but I could not figure out how to separate the according %ProgramFiles% folders. That's why I chickened out and ended up with installing unproblematic tools to D: drive and Office or other stuff installed twice on separate E: partitions. Have you got any hints to offer on how one could force Win98 to create and use a folder named Progs98 instead of Programs? It should be possible, because on my installation it is called Programme (long file name with PROGRA~1 as DOS name).
The tools in D:\Tools32 actually work very well even on BartPE and the reg files offer quick and dirty installation. I guess in your case that would be the same with BartPE. I have only a small number of tools that I use like that: file manager, text and hex editors, and a few tiny apps that require no installation. I find it most interesting to hear that it has worked for you over a long period of time. Years back when I tried multiple OS one the same drive I noticed that some programs, when you install them inside one OS, and execute them inside the other, they seem to "repair their installation" (ie create the missing registry entries) and work well afterwards. Other times, I installed the same program for both OS into the same folder. But eventually I gave up, because I was not comfortable any more. Nowadays where hard disks are large, it matters little, but back then it did hurt to waste so much space.

... according to whatever I've read you shouldn't be able to do either, and that's obviously wrong.
I'm glad to see that I am not alone. I regard my computer as a toy, I take it apart and put it back together again as I please. And when somebody says "You are not supposed to do ..." I find myself quite often in the process of checking what happens, if I don't listen.

I have to add that the ever present threat of "data corruption" or "data loss" is no problem, as I can not loose anything valuable (I backup my files, then backup my backups, then check if all the backups are ok, then I start experimenting). Also I found that the frequent "data losses" that are happening here are no losses at all. I only loose access to files, partitions and so on, because that is what partition hiding is all about. I know what bytes I change in the partition table to hide or delete partitions, and when I change the bytes back these partitions are unhidden or undeleted. The data itself remains untouched.


Greetings
Wolf
Schön wär's, wenn's schön wär!

wolf.b

  • Member
  • Joined in 2007
  • **
  • Posts: 70
    • View Profile
    • Donate to Member
Re: Multibooting and Partitioning Experiments
« Reply #48 on: November 14, 2007, 09:24 AM »
Hi saikee,

On the VMware side my free version of an installed Linux inside a MS Windows is just a file.  I can't even from one Linux see another guest Linux under the same Host.  If you have done it from an boot up CD that may be something different or you have extra bits and pieces over and above the free VMware server software that I have.
I am not sure if I understand everything here. I have got several VMware versions: Player 1.1, 1.4, 2.0. Also workstation version 5.5 from a German magazine with a special trial period of 6 months. I can tell you that somewhere was an option to mount a physical disk. Here I could choose to mount the entire disk or to select one or several partitions. So with the physical disk mounted and the ubuntu iso mounted, this VM booted from CD and gave me access to my physical ubuntu installation.
I know that this is a mere repeat of my previous post. But given this layout, I wonder what you want to add. Would you like me to try starting a second VM with ubuntu and network them. Or would you be interested to see if I can do two separate installations with lets say xubuntu and kubuntu on the same VM but on different partitions of the virtual hard disk. Or maybe two virtual hard disks. And wheather those virtual installations and the physical installation can all see each other with read/write access. At that point I am lost as I don't know what to do at the bash prompt apart from launching midnight commander to look at the file system.
I can not offer support for anything, but I have time to play around. In case you or anybody feels like asking questions similar to this: Has anybody tried using VMware player version 1.4 to install Puppy Linux on a Virtual disk and get access to something. Or has anybody tried InnoTek VirtualBox 1.5.0_OSE to do something else, ...

I invite everybody to just ask questions like that if you want. This is one of the friendly forums on the net where people meet, who like other people as well, not only computers. I am sure that there are a lot of forum members who have looked into multibooting and/or did experiment with partitioning schemes.

A word on how I regard myself: I'm not an IT professional, Computers are a hobby since the days of Sinclair ZX Spectrum. The only area inside my computer that I know well are the bytes number 447 to 510 of cylinder 0, head 0, sector 1, found on the first physical hard disk.


Greetings
Wolf
Schön wär's, wenn's schön wär!