Page 1 of 1

Eric's Reverted USETUP Changes

Posted: Mon Jun 15, 2015 9:01 pm
by eersoy93
According to me, Eric's these changes are very nice. In my opinion, Eric should be recommit these commits be from r65855 until r65692 on this page.

See for reverting commit:

Thanks for replies.

Re: Eric's Reverted USETUP Changes

Posted: Wed Jun 17, 2015 12:23 am
by Pi_User5
I agree.

Re: Eric's Reverted USETUP Changes

Posted: Wed Jun 17, 2015 1:36 am
by EmuandCo
The write this as email into the dev-ml. Eric does not show up here and not even on IRC. This will be your only chance to get a explaination from him.

Re: Eric's Reverted USETUP Changes

Posted: Wed Jun 17, 2015 3:19 pm
by Pi_User5
I think he reverted it because people kept complaining about how it broke thing as he fixed other things.

Re: Eric's Reverted USETUP Changes

Posted: Wed Jun 17, 2015 9:21 pm
by ekohl

I am reading the forum and most of the MLs but I do not like to use IRC because it is distracting me too much. Very much like a flickering TV in the corner of your eye.

Pi_User5 is right. The main reason why I reverted the commits is because I was angry. But later I realized that the concept behind these commits was not that good at all. I wanted to combine the creation of a partition, the selection of the file system, formatting and checking the partiton into one 'atomic' sequence. The idea behind this was the fact that a newly created partition does not have a valid type until the user selects a file system for the partition. So writing a new partition entry to the disk too early will result in a partition entry with a type set to 0, which means the partition is unused. If you reboot the computer immediately after creating such a partition, is will magically disappear. That's because of type 0.

Fast forward...

I spent some time thinking about the issue again and came up with a much cleaner approach. Actually it is the same idea the programmers at Microsoft used: Keep the 'create / delete partition' and 'select file system /format / check' loops separate. This way, the loops get smaller, the shortcut code path for unattended setup is a piece of cake and there won't be any phantom partition entries. The price to pay is one additional write access to the partition tables per new or reformatted partition. ;-)

Right now Usetup is able to create multiple primary partitions and you can install ReactOS on any primary partition. First Usetup will format, check and optionally activate the first partition (aka boot or system partititon). The install partition will be formatted and checked next. Then the remaining new partitions will be formatted and checked. After that ReactOS will be installed on the selected install partition. Finally Freeldr will be installed on the active boot partition. The second step will be skipped if ReactOS is installed on the boot partition.

I will pubish a few more patches in the upcoming weeks that will fix a few minor issues and add support for logical drives. After the hackfest I might port the partiton code to a separate library for use in the GUI setup application and a disk management application (or snap-in). Or I might dig into GPT support first.

PS: If you want to play with the reverted patches as an exercise, they are still available from SVN or the patches ML. But IMO they are dead and gone for good.