Jump to content

Welcome to MSFN Forum
Register now to gain access to all of our features. Once registered and logged in, you will be able to create topics, post replies to existing threads, give reputation to your fellow members, get your own private messenger, post status updates, manage your profile and so much more. This message will be removed once you have signed in.
Login to Account Create an Account


Photo

Windows 7 Setup folder to USB method in 1.2?

windows 7 setup folder usb

  • Please log in to reply
26 replies to this topic

#1
naithkk

naithkk
  • Member
  • 3 posts
  • OS:Windows 7 x86
  • Country: Country Flag

I'd like to apologise if this has been asked before, but I searched and didn't find the answer I was looking for.

 

In 1.2, the Windows 7 "setup folder" method of creating a USB installer seems to be missing (a previous beta version had that feature where you can point to a directory containing Windows 7 setup files/directories). Is that no longer supported in favor of ISO to USB or are there steps I am not aware of in creating a Windows Setup using a source from a directory?

 

Please advise, thank you.




How to remove advertisement from MSFN

#2
ilko_t

ilko_t

    MSFN Addict

  • Super Moderator
  • 1,705 posts
  • OS:none specified
  • Country: Country Flag

You are correct, in all newer 1.x versions an ISO file is expected as NT6 (Vista and later) source. There is no way to provide directory as a source.


Install Windows from USB, boot Linux, multiboot and a lot more with WinSetupFromUSB


#3
jaclaz

jaclaz

    The Finder

  • Developer
  • 14,026 posts
  • OS:none specified
  • Country: Country Flag

You are correct, in all newer 1.x versions an ISO file is expected as NT6 (Vista and later) source. There is no way to provide directory as a source.

Question is, of course:

Is this by design? (or - say - temporarily and will be made available in a next release)?

 

jaclaz



#4
ilko_t

ilko_t

    MSFN Addict

  • Super Moderator
  • 1,705 posts
  • OS:none specified
  • Country: Country Flag

It's by design, and been like this in all recent versions. The other options will be expecting sources as ISO files in next versions too.

The plan is to have only one field to add sources and program to decide what the source is with help of user if its type cannot be determined automatically.


Install Windows from USB, boot Linux, multiboot and a lot more with WinSetupFromUSB


#5
Riyanto

Riyanto
  • Member
  • 1 posts
  • OS:Windows 8.1 x86
  • Country: Country Flag

how to add wapi in disc installer windows 8 and windows 8.1 outomatic run istall software in windows. thank U verymuch



#6
submix8c

submix8c

    Inconceivable!

  • Patrons
  • 4,190 posts
  • OS:none specified
  • Country: Country Flag

how to add wapi in disc installer windows 8 and windows 8.1 outomatic run istall software in windows. thank U verymuch

??? What does this have to do with WinSetupFromUSB?


Someday the tyrants will be unthroned... Jason "Jay" Chasteen; RIP, bro!

Posted Image


#7
Weed

Weed

    U got brainwashed from everyone since u can walk!!

  • Member
  • PipPipPip
  • 381 posts
  • OS:none specified
  • Country: Country Flag

Hello!

i have long time not working with such things and iam very rusted :/

currently i want to recreate my usb hdd and usb stick

this is the first i have seen that now just an ISO is supported, this brings me to a problem because i always used source folder because i can easy modify things and update source, like adding drivers/utilities/silent installers and auto activation, this all should go to the specified source folder or is there an other way to manage this and let the ISO untouched?

Hmmm? :)

 

regards


"No one knows our faces, no one knows our Names, we travel like a shadow across the Streets the City, with the target destroyin our Enemies, our Power to brace and in ones night to get the World domination"
"Humans doesnt search the truth, so we compare them like Animals."
"Anyone who dont use there brain and fight for his Freedom, they dont miss it anyway" The Illuminati

#8
ilko_t

ilko_t

    MSFN Addict

  • Super Moderator
  • 1,705 posts
  • OS:none specified
  • Country: Country Flag

Do you need to multiboot several NT6 sources? If not, you could always use the previous 1.0 beta versions, beta8 for example, they would copy source as it is, flat files structure.

 

If you need multiboot, you may try using autounattend.xml placed on the root of a USB removable disk, in case of a USB fixed disk, it has to be in root of the ISO for example, or in root of image 2 in boot.wim.

 

Or if autounattend.xml doesn't work for you, you could edit the ISO files directly on the USB disk, if boot.wim does not change, just an extra step when customizing.


Install Windows from USB, boot Linux, multiboot and a lot more with WinSetupFromUSB


#9
Weed

Weed

    U got brainwashed from everyone since u can walk!!

  • Member
  • PipPipPip
  • 381 posts
  • OS:none specified
  • Country: Country Flag

my goal is to have three partitions on my usb stick and should compatible with all computers

1st(priority) big ntfs for w7/8(i made an w7/8 aio iso) and maybe XP on the same then just two partitions, last one(fat32) for boot tools and linux

editing iso is not really inconvenient, for example if i need to add/update massstorage drivers it will take much time especially on usb 2.0 stick :/ and if somethings going wrong i need to do the whole process again.

but anyway, iam on very early stage, right now iam hangin how i should format the usb stick, there are many ways i have seen...also i dont know much about uefi and if i need this...?

i need to research about this, right now its all too much for me, i just need a push in the right direction :)


Edited by Weed, 30 May 2014 - 02:43 PM.

"No one knows our faces, no one knows our Names, we travel like a shadow across the Streets the City, with the target destroyin our Enemies, our Power to brace and in ones night to get the World domination"
"Humans doesnt search the truth, so we compare them like Animals."
"Anyone who dont use there brain and fight for his Freedom, they dont miss it anyway" The Illuminati

#10
ilko_t

ilko_t

    MSFN Addict

  • Super Moderator
  • 1,705 posts
  • OS:none specified
  • Country: Country Flag

UEFI is a new system firmware, replacing the ageing BIOS. Most, if not all modern PC/Laptops come with UEFI, at the same time most of them providing an option to boot in BIOS mode for backward compatibility.

UEFI can boot from FAT32 formatted partition, no matter active or not, partial support for NTFS, manufacture dependant and very rare. There is also an NTFS UEFI driver which might help. In general, if you are going to boot in UEFI, stick with FAT32.

XP setup from a FAT32 partition could be painfully slow, NTFS would be times faster.

 

Multipartition- if using USB stick seen as removable, versus fixed (hard disk) type, Windows by default recognizes only the first partition. There are workarounds, but in my opinion not worth the troubles, given the small benefits.

 

If USB stick is seen as a fixed disk, such as SanDisk Extreme for example, multiple partitions are not an issue with Windows. In this case you can have FAT32 partition for UEFI boot and Windows 7/8 sources and perhaps some Linux ISOs, and a NTFS one for the XP sources.

 

My general advice would be to get the mentioned SanDisk Extreme, which is recognised as a fixed disk, make 2 partitions, first FAT32 acrtive and second NTFS, and leave the remaining 2 partition entries unused, to be able to boot Linux ISOs with persistence space if needed. The mentioned UFD is also insanely fast, especially on USB 3.0 mode.


Install Windows from USB, boot Linux, multiboot and a lot more with WinSetupFromUSB


#11
jaclaz

jaclaz

    The Finder

  • Developer
  • 14,026 posts
  • OS:none specified
  • Country: Country Flag

Not necessarily a need specifically for a Sandisk Extreme.

 

*Any* USB 3.0 stick using a Sandforce will do, see:

http://reboot.pro/to...30-flash-drive/

 

Almost *any* "common" USB 2.0 or 3.0 stick by using its Manufacturer Tool (risky :ph34r:) can be set as "Fixed".

 

jaclaz



#12
Weed

Weed

    U got brainwashed from everyone since u can walk!!

  • Member
  • PipPipPip
  • 381 posts
  • OS:none specified
  • Country: Country Flag

Thanks for this useful answer!

you say fat32 is slow when installing XP, the same goes for W7/8 or not? because this is the reason why i choose NTFS, anyway another one is i have .wim which is more then >4GB big

i dont know the advantages about the uefi, i just need the usb stick for installing the OS's or doesnt it boot from this stick when the PC/Laptop have UEFI?

also do i choose to format with grub4dos or grub2 in my case?

thanks for the advice with the stick, i was anyway thinkin to buy a new one and what i have read its a good and fast one and also cheap the 64GB variant, i will buy this next week! its really standard recognised as a fixed disk or do i need to flip the bit?

 

i also tried researching how i make this for my current stick (lexar triniton jumpdrive 32gb) with the manufacturing tool Innostor IS902E, but i dont see any option for RMB


Edited by Weed, 31 May 2014 - 07:29 AM.

"No one knows our faces, no one knows our Names, we travel like a shadow across the Streets the City, with the target destroyin our Enemies, our Power to brace and in ones night to get the World domination"
"Humans doesnt search the truth, so we compare them like Animals."
"Anyone who dont use there brain and fight for his Freedom, they dont miss it anyway" The Illuminati

#13
ilko_t

ilko_t

    MSFN Addict

  • Super Moderator
  • 1,705 posts
  • OS:none specified
  • Country: Country Flag

Not necessarily a need specifically for a Sandisk Extreme.

 

*Any* USB 3.0 stick using a Sandforce will do, see:

http://reboot.pro/to...30-flash-drive/

 

Almost *any* "common" USB 2.0 or 3.0 stick by using its Manufacturer Tool (risky :ph34r:) can be set as "Fixed".

 

jaclaz

 

Recommending it specifically not because of the fixed disk type, but mostly because of the speed/price ratio, which seems to be one of the best in my research, in addition to the lifetime warranty. Kingston DateTraveler Workspace for example at similar speeds is twice the price.

What I usually do is to look at usbflashspeed.com and start researching prices/reviews/speed tests for the fastest drives.

 

 

Thanks for this useful answer!

you say fat32 is slow when installing XP, the same goes for W7/8 or not? because this is the reason why i choose NTFS, anyway another one is i have .wim which is more then >4GB big

i dont know the advantages about the uefi, i just need the usb stick for installing the OS's or doesnt it boot from this stick when the PC/Laptop have UEFI?

also do i choose to format with grub4dos or grub2 in my case?

thanks for the advice with the stick, i was anyway thinkin to buy a new one and what i have read its a good and fast one and also cheap the 64GB variant, i will buy this next week! its really standard recognised as a fixed disk or do i need to flip the bit?

 

i also tried researching how i make this for my current stick (lexar triniton jumpdrive 32gb) with the manufacturing tool Innostor IS902E, but i dont see any option for RMB

 

It's the XP, not tested 2003, FAT32 driver and reading lots of small files, details. Any later Windows version is fine.

 

i dont know the advantages about the uefi

 

Mostly GPT partition scheme support. Secure boot on the other hand, but in my opinion it's just Microsoft limiting users of using other OS.
 

 

also do i choose to format with grub4dos or grub2 in my case?

 

No idea where you are seeing those options, isn't it MBR type? Use grub4dos one if that's the case.

 

 

thanks for the advice with the stick, i was anyway thinkin to buy a new one and what i have read its a good and fast one and also cheap the 64GB variant, i will buy this next week! its really standard recognised as a fixed disk or do i need to flip the bit?

 

I got 2, both arrived as fixed disks.

 

i also tried researching how i make this for my current stick (lexar triniton jumpdrive 32gb) with the manufacturing tool Innostor IS902E, but i dont see any option for RMB

 

I've no idea about this particular tool. You may find another one with this option, if chipset supports it at all, at flashboot.ru.

 

In general, I'd avoid messing with the controller, unless it's last resort (read dead drive), or it's a really cheap one I don't mind losing. Most tools come with an interface, quite far from user-friendly, and of course they are not intended to be, besides, one can hardly find a guidance with the configuration or the options.


Install Windows from USB, boot Linux, multiboot and a lot more with WinSetupFromUSB


#14
jaclaz

jaclaz

    The Finder

  • Developer
  • 14,026 posts
  • OS:none specified
  • Country: Country Flag

Recommending it specifically not because of the fixed disk type, but mostly because of the speed/price ratio, which seems to be one of the best in my research, in addition to the lifetime warranty. Kingston DateTraveler Workspace for example at similar speeds is twice the price.
What I usually do is to look at usbflashspeed.com and start researching prices/reviews/speed tests for the fastest drives.


Good :), and I know how you are in perfect good faith :yes:, but still one thing is recommending among the available choices a given one, and another is making it sound like it is the only option.

If you re-read your post it sounds (at least to me) more like an ad for the specific make/model than a technical advice.

Carpenter's example ;):
Q. What kind of tool do I need to drive nails into wood?
A1. A hammer.
A2. A Stanley FATMAX Xtreme® AntiVibe® Curve Claw Nailing Hammer.
A3. Any hammer preferably with a a longish handle and head weight between 200 and 400 g, would do, personally I have had a very good experience with the tools manufactured by Stanley, I have a FATMAX Xtreme Hammer and I find it a very good tool.


@Weed
As explained in the given link *any* of the fastish USB 3.0 "new generation" sticks are using a Sandforce chip, and they are different from the "common" sticks we are used to because they are actually a USB to SATA bridge connected to a SATA SSD, so they are all set to "fixed".

jaclaz


Edited by jaclaz, 31 May 2014 - 08:45 AM.


#15
ilko_t

ilko_t

    MSFN Addict

  • Super Moderator
  • 1,705 posts
  • OS:none specified
  • Country: Country Flag

Ahh, you are ruining it Jaclaz, recently purchased lots of SanDisk shares ;)

 

Seriously, OP asked for a push in a direction, I am of course sharing my push in my direction. Other opinions and directions are always welcome, just as yours.


Install Windows from USB, boot Linux, multiboot and a lot more with WinSetupFromUSB


#16
Weed

Weed

    U got brainwashed from everyone since u can walk!!

  • Member
  • PipPipPip
  • 381 posts
  • OS:none specified
  • Country: Country Flag

Hehe yes for me sound was too like an ad for this model, this was the first thought i had :D anyway iam researching always when buyin things and after some research i found many good reviews, like he already said

but i will not buy this next week, i bought already today :D

thats cool, one big problem now has gone

thanks for answers, i will continue work tomorrow and will see how i go on

 

about my question about grub4dos or grub 2.00, bootice does have this option

 

PS. maybe you two remember, i had already messed up this usb stick 2yrs ago with the manufacturing tool :)

 

EDIT: i cant boot with vmware the usb stick, i have connected the usb stick in vmware and on the boot device menu i choose "removable device" to boot from but it boots only from hdd, with qemu it works

also Vmware BIOS dont display the stick... :/


Edited by Weed, 31 May 2014 - 01:32 PM.

"No one knows our faces, no one knows our Names, we travel like a shadow across the Streets the City, with the target destroyin our Enemies, our Power to brace and in ones night to get the World domination"
"Humans doesnt search the truth, so we compare them like Animals."
"Anyone who dont use there brain and fight for his Freedom, they dont miss it anyway" The Illuminati

#17
ilko_t

ilko_t

    MSFN Addict

  • Super Moderator
  • 1,705 posts
  • OS:none specified
  • Country: Country Flag
Here are some hints how to test in VMplayer:
http://reboot.pro/to...e-2#entry154729

Here is about Virtual Box, altough not an actual USB boot as the above:
http://reboot.pro/fi...chine-usb-boot/

Install Windows from USB, boot Linux, multiboot and a lot more with WinSetupFromUSB


#18
Weed

Weed

    U got brainwashed from everyone since u can walk!!

  • Member
  • PipPipPip
  • 381 posts
  • OS:none specified
  • Country: Country Flag

Aah right, i forgot the Plop Bootmanager which i need, Thanks!

i just made a small test and have just added acronis disk director.iso but with no luck

vmware does say when i choose acronis: "cannot continue if Plop is active, please start this entry without loading plop first"

and qemu says: WARNING: PARTITION TABLE 4 IN BIOS DEVICE 128 IS ALREADY IN USE!

To prevent possible data loss will not continue further

 

here the entry in menu.lst:

title addh from partition 0
map --unmap=0:0xff
map --unhook && map --rehook
cat --hex --locate=PoLPu@ (md)0x3D0+0x130 > nul && echo Cannot continue if PLoP is active, please start this entry without loading PLoP first && echo && pause Press any key to return to the main menu && configfile /menu.lst
set /a dev=*0x8280&0xff
root (%dev%,0)
set ISO=/ISO/addh.iso
ls %ISO% > nul || find --set-root --devices=hf /usbdrive.tag|| echo Error! Could not find usbdrive.tag && echo  && pause Press any key to return to the main menu && configfile /menu.lst
ls %ISO% > nul || find --set-root --devices=hf %ISO% || echo Error! Could not find %ISO% && echo  && pause Press any key to return to the main menu && configfile /menu.lst
map %ISO% (0xff) || map --heads=0 --sectors-per-track=0 %ISO% (0xff) || echo FATAL ERROR mapping %ISO%, please check if file is present and defragmented && pause Press any key to return to main menu && configfile /menu.lst
#http://reboot.pro/topic/9916-grub4dos-isohybrided/page-2#entry88531
#http://www.rmprepusb.com/tutorials/tails
set /a dev=*0x82a0&0xff
debug 1
parttype (%dev%,3) | set check=
debug off
set check=%check:~-5,4%
if "%check%"=="0x00" partnew (%dev%,3) 0 0 0 && partnew (%dev%,3) 0x00 %ISO%
if not "%check%"=="0x00" echo WARNING: PARTITION TABLE 4 IN BIOS DEVICE %dev% IS ALREADY IN USE! && echo  && echo To prevent possible data loss will not continue further && pause && configfile /menu.lst
map --rehook
root (0xff)
chainloader (0xff)

whats wrong?


"No one knows our faces, no one knows our Names, we travel like a shadow across the Streets the City, with the target destroyin our Enemies, our Power to brace and in ones night to get the World domination"
"Humans doesnt search the truth, so we compare them like Animals."
"Anyone who dont use there brain and fight for his Freedom, they dont miss it anyway" The Illuminati

#19
ilko_t

ilko_t

    MSFN Addict

  • Super Moderator
  • 1,705 posts
  • OS:none specified
  • Country: Country Flag

To boot all Linux and similar non Windows ISO files program uses a trick hinted by cdob and extended by Steve, check the comments in this menu entry:

http://reboot.pro/to...ge-2#entry88531

 

In short, ISOHYBRID ISO images are mapped as a partition, thus requiring an available partition entry in the partition table. This is written by grub4dos when the selected menu is launched.

PLoP has read-only USB driver, meaning this modification cannot be made, hence the message you are seeing.

 

Simple images like Acronis, which have only kernel and initrd files and nothing outside to be needed by OS later on, do not actually need to be mapped as partitions, but programatically it's hard to find out if that's the case.

For such images you could manually create a menu like:

title Boot XXXXX.ISO
map /ISO/my.iso (0xff) || map --mem /ISO/my.iso (0xff)
map --hook
chainloader (0xff)

Or simply use QEMU (slower) as the included option in WinSetupFromUSB or VirtualBox (faster) from above to test, both allow write operations and there will be no need of PLoP. In addition, make sure 4th partition entry is unused, and the 3rd if using persistent space:

 

...

My general advice would be to get the mentioned SanDisk Extreme, which is recognised as a fixed disk, make 2 partitions, first FAT32 acrtive and second NTFS, and leave the remaining 2 partition entries unused, to be able to boot Linux ISOs with persistence space if needed...


Install Windows from USB, boot Linux, multiboot and a lot more with WinSetupFromUSB


#20
jaclaz

jaclaz

    The Finder

  • Developer
  • 14,026 posts
  • OS:none specified
  • Country: Country Flag

In short, ISOHYBRID ISO images are mapped as a partition, thus requiring an available partition entry in the partition table. This is written by grub4dos when the selected menu is launched.

I hate to be picky :unsure:, but actually I am picky.

 

ISOHYBRID is not involved at all in this.

An isohybrid .iso is a particular form of (non-standard) .iso that CONTAINS a  MBR, in practice the fact that the ISO9660 standard has the provision for it's bootrecord on sector 16 leaves the first 16 sectors (of 2048 bytes) empty and unused, and one can take advantage of this to do queer things with this space.

 

As a shameless plug :w00t: see here what can be done with it (different from isohybrid) COSMIAS:

http://reboot.pro/to...-to-g4d-images/

 

The nice trick by cdob works along a different principle.

 

Any "normal" CONTIGUOUS .iso extents can be mapped to a partition entry in the MBR.

 

If you think a bit about it, a partition entry is nothing (abstracting for one moment from the differences between CHS and LBA, let us assume that CHS is not used anymore, or that the whole extents are above the 8 Gb CHS limit) but an address table.

 

In a MBR entry for a "normal" volume/partition there are just three pieces of information:

  1. a partition ID
  2. the start address of the partition
  3. the length (or extents) of the partition

So, nothing prevents from writing to an otherwise unused partition entry some values to the effect of mapping a contiguous area of the disk as if it was a partition.

 

Windows will ignore an entry in partition table with ID 0 (0x00).

Linux will check anyway the actual addresses in the entry and, if it detects that the addresses correspond to a valid volume/filesystem (CDFS in this case) it will mount/access the .iso fine, for all it matters to Linux, it is a partition like any other one.

 

If you prefer, the partition ID is - contrary to what has been for years the beliefs of many (I would say most) people - not really a partition ID, but rather a "protective ID":

http://homepage.ntlw...ystem-type.html

 

jaclaz


Edited by jaclaz, 01 June 2014 - 07:43 AM.


#21
ilko_t

ilko_t

    MSFN Addict

  • Super Moderator
  • 1,705 posts
  • OS:none specified
  • Country: Country Flag

It's helpful you to be around and be picky, nothing bad.

 

Please correct me if I am wrong- I got the impression that if the ISO image is not isohybrid-ed, its contents, mapped as a partition, won't be used by Linux. Have you confirmed that for example, the same distro ISO image, on first case isohybrid image, and the seconds case non-isohybrid work the same way?

My conclusions were also based on attempts to boot this way *BSD ISO images, none of them worked unless no other files were required outside initrd/kernel, and all images were non-isohybrid. It could have been just the kernel/init scripts ignoring such partitions, no matter as contents of isohybrid-ed image or not.


Install Windows from USB, boot Linux, multiboot and a lot more with WinSetupFromUSB


#22
jaclaz

jaclaz

    The Finder

  • Developer
  • 14,026 posts
  • OS:none specified
  • Country: Country Flag

Sure I can confirm that a "normal", plain, Linux .iso image NOT isohybrided usually works through partition mapping (I seem to remember that there are a few that do not anyway).

 

The whole point is a specific feature of the Linux kernel/way of working (that not necessarily is common with BSD).

 

None of the several Linux .iso images that Easy2boot supports (but that you can of course map directly without using Easy2boot at all) through ISO partition mapping are modified in any way (and this is actually the big advantage of the method in general and of Easy2boot speciifcally), and AFAIK none of them are isohybrided (but I could be wrong about this latter).

 

Now that you make me think about it, I cannot confirm that an actually isohybrided image works this way, never tested that.

 

As a side note, gparted does NOT recognize an actual partition CDFS formatted as a valid one, though the method (though not with a partition ID of 0x00, but rather with a "normal" 0x83 partition ID) is used by a few particular Linux distro's, see as an example, Zeroshell:

http://www.zeroshell.org/

and:

http://gparted-forum...ic.php?id=16632

 

The (nice) idea of that distro (which is a specialized "firewall/router" distro) is that the actual OS should be UNmodifiable and capable of working when booted from a CD/DVD, using *any* available media to save settings and logs, the hard disk or USB stick image in it is nothing but the actual CD/DVD version with a "loading" partition before and a "settings partition" after.

 

jaclaz



#23
ilko_t

ilko_t

    MSFN Addict

  • Super Moderator
  • 1,705 posts
  • OS:none specified
  • Country: Country Flag

My impression was that the isohybrid part actually tricks Linux to mount contents exposed such way, so they are accessible.

Just completed some tests with regular and isohybrid-ed variants of the same Linux images and they both worked the same way, thanks for the clarification, in this case compatibility is even better.

 

None of the several Linux .iso images that Easy2boot supports (but that you can of course map directly without using Easy2boot at all) through ISO partition mapping are modified in any way (and this is actually the big advantage of the method in general and of Easy2boot speciifcally), and AFAIK none of them are isohybrided (but I could be wrong about this latter).

 

Actually the most of the recent Linux distros come with isohybrid-ed ISOs, at least all of the 30-40 various popular distros checked some time ago when I was playing with this stuff. Never suspected or hinted that Easy2boot modifies them, since they already come isohybrid-ed, and I am also using this method in WinSetupFromUSB in all recent versions.

 

Anyway, thanks for the heads up.

Now since you brought me back to this subject, I am curios which part/script of the boot process actually is responsible and eventually are we all just lucky using a design flaw/bug/coincidence/just happens to work, or it's intended behaviour.


Install Windows from USB, boot Linux, multiboot and a lot more with WinSetupFromUSB


#24
jaclaz

jaclaz

    The Finder

  • Developer
  • 14,026 posts
  • OS:none specified
  • Country: Country Flag

 

Now since you brought me back to this subject, I am curios which part/script of the boot process actually is responsible and eventually are we all just lucky using a design flaw/bug/coincidence/just happens to work, or it's intended behaviour.

I think it is "intended" or "by design".

If you think a bit about it, there is some logic in the behaviour (both in the "Windows" and in the "Linux" one, though "different" logic).

Let's see what Windows does (more or less :unsure:):

  1. let's check the partition ID in each partition entry in the MBR
  2. if it is 0 ignore the entry
  3. if it is non-zero compare it against a list of known partition ID's
  4. if it is NOT among the known ID's AND the partition addresses are OK, show the partition in disk manager as "unknown"
  5. if it is among the known ID's AND the partition addresses are OK, probe the volume for the actual filesystem used AND IF this probing results in a known, valid filesystem, show the partition in disk manager with the proper volume filesystem type AND mount it (assign to it a drive letter in explorer)
  6. if it is among the known ID's AND the partition addresses are OK, probe the volume for the actual filesystem used AND IF this probing results in an unknown, OR invalid filesystem, show the partition in disk manager AND mount it (assign to it a drive letter in explorer BUT as soon as you try opening the volume you are prompted for formatting it)

Remember that if the partition type is 0x07 not necessarily it is a NTFS filesystem, as exFAT (and I believe also UDF filesystem in Vista :ph34r: and later) use also 0x07, remember also how - unlike on Linux - partitioning and formatting are "linked together", i.e. it doesn't really exists a mkfatfs (or similar) under windows, as when you format a volume, the volume resides on the device, and the format command also updates the partition ID, as better explained in the given link:

http://homepage.ntlw...ystem-type.html

there is the need for "volume bootsector probing".

Now, we are used to a bunch of filesystems (FAT, NTFS, etc.) that do have the BPB in the bootsector and the bootsector is the first sector, but as an example UDF, has not (like CDFS) this, the good Linux guys are used in Ext2/3/4 to have it at a fixed offset from the beginning of the volume.

 

As a side note, try opening a isohybrid .iso with Winimage or with 7-zip, last time I tried Winimage "opted" for it being a (hard disk) volume, whilst 7-zip "opted" for it being a CD/.iso: 

http://reboot.pro/to...cddvd/?p=172168

http://reboot.pro/to...-fat-partition/

http://reboot.pro/to...brided/?p=86292

 

Let's see what Linux does (probably, please understand how while the previous ones are educated guesses about how a windows NT works, the following are more wild than educated guesses and I may well have some terms or concepts "wrong" or worse):

 

  1. let's check the partition ID in each partition entry in the MBR
  2. No matter if it is 0 or any value, link the addresses in the entry to a valid device, like /dev/sda3
  3. check the addresses in the partition entry are valid, AND IF they are valid, probe the volume for the actual filesystem used AND IF this probing results in a known, valid filesystem, proceed to mount it (if automount is enabled) and create a mount point for the extents described in the partition entry 
  4. more or less the Linux fdisk will "see" (just like device manager) *any* partition whose addresses are defined in the MBR, no matter if the eatents contain a valid (recognized) filesystem or not.

 

In the case of a "normal" .iso, most probably the Linux *whatever* checks sector 16 (which will be sector 48 because the device will have a 512 bytes sector size) and finds the CD001 and in the case of a isohybrid .iso checks first sector, understands that it is a MBR and not a volume bootsector and proceeds to check for the EXT2/3/4 superblock, doesn't find it, then goes on and checks sector 16 (please read as 48), and decides it represents a valid CDFS filesystem/volume.

 

What would be very interesting at this point would be IMHO to experiment on Windows with the UDF filesystem (on Vista :ph34r: or later) as the UDF can be used both as a hard disk volume and as a CD/DVD filesystem.

It is possible that "directly" or with a trick or two, we could manage to have under Windows a working entry in a partition table for a UDF volume which is actually a UDF .iso ....

 

jaclaz



#25
ilko_t

ilko_t

    MSFN Addict

  • Super Moderator
  • 1,705 posts
  • OS:none specified
  • Country: Country Flag

I was more interested about the init scripts which mount the fake partition, because that's where booting in such way may fail, and because Linux is way more flexible and doesn't really care much if mounting block device, a file or contiguous space as marked in the partition table. Mount utility seems to do fine its job as long as it recognises valid FS and kernel/udev scripts list the fake partition as a valid device in /proc/partitions for example to be in the list.

From what I found so far, the various Linux distros handle searching for and mounting the needed CD-ROM in different ways in their init scripts.
Debian netinst for example makes use of two binaries cdrom-detect, cdrom-checker, and a shell script list-devices to handle all that. Once candidate devices are discovered according to certain criteria, they are passed to mount to be checked for the tag files, and mount does not care if the device is a whole disk, partition or a file, just attempts to mount it using all known file systems, or cdfs if explicitly passed as argument.
ISO mounted as a fake partition is not found and used for example if using USB hard disk. In case of USB flash drive, no matter removable or fixed type everything is fine. Apparently somewhere along the lines devices which are (on) USB hard disks are excluded.
 

devices="$(list-devices cd; list-devices maybe-usb-floppy)"
    for device in $devices; do
        if try_mount $device $CDFS; then
            break 2
        fi
    done
    
    devices="$(list-devices usb-partition)"
    for device in $devices; do
        if try_mount $device $CDFS; then
            db_set cdrom-detect/hybrid true
            break 2
        fi
        if try_mount $device $FATFS; then
            db_set cdrom-detect/usb-hdd true
            break 2
        fi
    done
	....
	try_mount() {
		# TO REMOVE, there is a bug somewhere in the kernel, the first
		# mount command fail when changing floppy disk
		# so we have to launch mount twice
		mount $1 -tauto $MNT || true
		umount $MNT || true
		mount $1 -tauto $MNT
		media_mounted && checkcontents $MNT
		}
	...	

Puppi Linux Slacko 5.6, uses probepart_init in the init script, which when listing all partitions uses /proc/partitions to make the list. The regex returns our /dev/sda4 too, which later on will be passed to mount and mounted eventually as CDFS.

 

Slackware (14.0) uses hardcoded device list - /dev/srN, /dev/hdX, /dev/pcdN etc, mounting the fake partition fails, it does not expect CDFS on a partition.

 

Trinity Rescue Kit searches in /proc/partitions for the given volume label using mlabel, which fails since it seem to expect partition with vfat file system.

 

Luckily, most other distros search in partitions for their files and when passing each possible partition to mount it succeeds mounting it as CDFS.


Install Windows from USB, boot Linux, multiboot and a lot more with WinSetupFromUSB






Also tagged with one or more of these keywords: windows 7, setup, folder, usb

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users



How to remove advertisement from MSFN