Jump to content











Photo
- - - - -

Easy2boot with UDF Flash Drive with imgPTN support?

easy2boot

  • Please log in to reply
30 replies to this topic

#1 wean_irdeh

wean_irdeh

    Newbie

  • Members
  • 29 posts
  •  
    Vietnam

Posted 06 January 2017 - 02:50 AM

Is it possible to have it all at once? Current Easy2boot version only support NTFS which has no write support out-of-the -box on macOS and Linux distro, and FAT32 which works out-of-the-box but has 4GB filesize limitation. UDF 2.01 is very attractive because it works out-of-the-box on all major OSs with write support and no 4GB filesize limitation. And imgPTN support? What is the requirement to be able to support that feature?

#2 Guest_AnonVendetta_*

Guest_AnonVendetta_*
  • Guests

Posted 06 January 2017 - 04:41 AM

I would definitely like to see this. But can you boot from UDF? I've read that UDF doesn't utilize a boot sector (or whatever), however, whether a boot sector *can* be used is another issue.

 

I'm also trying to figure out a way to get Android to read and mount a UDF-formatted partition on a MicroSD card. But I think it requires kernel patches and ROM/firmware support. UDF would mitigate a lot of the issues that FAT32 and exACT have, like assigning permissions and ownership, or none at all, so that files/directories can be either with permissions/owner(s), or without them.

 

F2FS is also a good filesystem for flash/SSD-based mediums, although it is relatively new and not well supported by OSes like Windows (none so far). I think it's also still proprietary, like exACT (the rights are owned by Samsung if I'm not mistaken).



#3 wean_irdeh

wean_irdeh

    Newbie

  • Members
  • 29 posts
  •  
    Vietnam

Posted 06 January 2017 - 10:06 AM

 

I'm also trying to figure out a way to get Android to read and mount a UDF-formatted partition on a MicroSD card. But I think it requires kernel patches and ROM/firmware support. UDF would mitigate a lot of the issues that FAT32 and exACT have, like assigning permissions and ownership, or none at all, so that files/directories can be either with permissions/owner(s), or without them.
 


This is new to me. Searching more on google reveals it's still an open issue dated from two years ago https://code.google....etail?id=152827
The kernel itself support UDF, not sure why it has to be "activated" in android

F2FS is also a good filesystem for flash/SSD-based mediums, although it is relatively new and not well supported by OSes like Windows (none so far). I think it's also still proprietary, like exACT (the rights are owned by Samsung if I'm not mistaken).

 

What is exACT actually (searching on google gives irrelevant result)? I know one filesystem with similar name (exFAT), which has patent owned by Microsoft, the Linux kernel doesn't support it, but some known Android phone support it, notably the one which has SD support >32GB . The SD Association mandates exFAT to be supported out-of-the-box for any device to support it and using SD Association trademark like "support SD Card" written on the box, which causes almost every device manufacturer to pay royalty to Microsoft (Isn't that crazy?)

#4 Wonko the Sane

Wonko the Sane

    The Finder

  • Advanced user
  • 16066 posts
  • Location:The Outside of the Asylum (gate is closed)
  •  
    Italy

Posted 06 January 2017 - 10:46 AM

Just in case:
http://reboot.pro/to...-mbrs/?hl=cited

 

:duff:

Wonko



#5 Guest_AnonVendetta_*

Guest_AnonVendetta_*
  • Guests

Posted 06 January 2017 - 03:36 PM

Yes, to my knowledge the Android kernel itself does support UDF. But support in the ROM (what most people think of as "stock Android") when it's running in interactive unprivileged user mode) is generally up to the individual OEMs/manufacturers. Aside from that, support can still be manually added by the community at large via patches to the kernel/ROM.
 
The way Android generally works:
 
Google runs a project called AOSP (Android Open Source Project). From this the stock firmware of devices like Google Nexus are derived. This is known as "stock Android", meaning Android as delivered to the public by Google on their own devices. From there you can see community-based projects like CyanogenMod, which is basically an aftermarket firmware based on AOSP, but modded. Many other custom firmwares are AOSP-based too. The OEMs themselves just take stock Android derived from AOSP source, make their custom changes, add their skins, and whatever other changes are neccessary to make Android run on their devices. This is then distributed to the public, like when you buy a phone or tablet in a store. Cellular service providers can also make changes. Like, for example, Samsung made the Note 4 in a few different variants. These are then distributed to carriers which will then sell them as Verizon Note 4, AT&T Note 4, etc, but with their carrier apps (bloatware) bundled. The hardware is mostly the same regardless of which carrier you buy from, which is how most people get phones anyway. A good exception is Nexus, which are unbranded and can be sold by carriers, but are supposed to remain software-unmodified and SIM/network unlocked.So basically, it's a bit more complex than that, but that's the gist of it.
 
I did mean exFAT. The Linux kernel actually does support it to a limited extent, it's well supported on Android too, but mostly on newer devices. There are also open source exFAT implementations.
 
F2FS is mostly supported only on Samsung Android devices, but it is gradually being adopted at large as well. Community support can be added too, F2FS works on CM13 on my current phone, but not the stock LG firmware.


#6 wean_irdeh

wean_irdeh

    Newbie

  • Members
  • 29 posts
  •  
    Vietnam

Posted 06 January 2017 - 07:11 PM

 


Yes, to my knowledge the Android kernel itself does support UDF. But support in the ROM (what most people think of as "stock Android") when it's running in interactive unprivileged user mode) is generally up to the individual OEMs/manufacturers. Aside from that, support can still be manually added by the community at large via patches to the kernel/ROM.
 
The way Android generally works:
 
Google runs a project called AOSP (Android Open Source Project). From this the stock firmware of devices like Google Nexus are derived. This is known as "stock Android", meaning Android as delivered to the public by Google on their own devices. From there you can see community-based projects like CyanogenMod, which is basically an aftermarket firmware based on AOSP, but modded. Many other custom firmwares are AOSP-based too. The OEMs themselves just take stock Android derived from AOSP source, make their custom changes, add their skins, and whatever other changes are neccessary to make Android run on their devices. This is then distributed to the public, like when you buy a phone or tablet in a store. Cellular service providers can also make changes. Like, for example, Samsung made the Note 4 in a few different variants. These are then distributed to carriers which will then sell them as Verizon Note 4, AT&T Note 4, etc, but with their carrier apps (bloatware) bundled. The hardware is mostly the same regardless of which carrier you buy from, which is how most people get phones anyway. A good exception is Nexus, which are unbranded and can be sold by carriers, but are supposed to remain software-unmodified and SIM/network unlocked.So basically, it's a bit more complex than that, but that's the gist of it.
 
I did mean exFAT. The Linux kernel actually does support it to a limited extent, it's well supported on Android too, but mostly on newer devices. There are also open source exFAT implementations.
 
F2FS is mostly supported only on Samsung Android devices, but it is gradually being adopted at large as well. Community support can be added too, F2FS works on CM13 on my current phone, but not the stock LG firmware.

 

There's no exFAT support on linux kernel, and AFAIK nobody makes any patches to make it work in linux kernel (aside from FUSE-based, I don't think android uses FUSE), yet some Android devices managed to support it. I don't know how Android works, but it seems a different beast compared to mainstream linux distro.

#7 steve6375

steve6375

    Platinum Member

  • Developer
  • 7566 posts
  • Location:UK
  • Interests:computers, programming (masm,vb6,C,vbs), photography,TV,films
  •  
    United Kingdom

Posted 06 January 2017 - 08:54 PM

Is it possible to have it all at once? Current Easy2boot version only support NTFS which has no write support out-of-the -box on macOS and Linux distro, and FAT32 which works out-of-the-box but has 4GB filesize limitation.

 

I don't quite understand this statement?

E2B can be used on a FAT32, NTFS or exFAT USB drive.

I recommend NTFS if you are using .imgPTN files because the SWITCH_E2B.exe app only works on NTFS E2B drives, but you can still boot to the E2B menu and select the .imgPTN file on FAT32 and exFAT drives.

E2B even works on ext2/3/4 drives, but unfortunately it seems very difficult to make files contiguous (which is essential for .i


#8 nguyentu

nguyentu

    Frequent Member

  • Advanced user
  • 102 posts
  •  
    Vietnam

Posted 07 January 2017 - 07:08 AM

Interesting, why SWITCH_E2B.exe does not work on FAT32 partition? I did test and was successful, 4th partition was pointing to the file .imgPTN on the first partition (FAT32).



#9 steve6375

steve6375

    Platinum Member

  • Developer
  • 7566 posts
  • Location:UK
  • Interests:computers, programming (masm,vb6,C,vbs), photography,TV,films
  •  
    United Kingdom

Posted 07 January 2017 - 08:38 AM

Switch_e2B will switch back to E2B using the Restore E2B partition(s) button, but you cannot select a .imgPTN file using SWITCH_E2B.



#10 nguyentu

nguyentu

    Frequent Member

  • Advanced user
  • 102 posts
  •  
    Vietnam

Posted 07 January 2017 - 04:04 PM

I've made a small application that will help the partitions can point to any file on the first partition. It supports FAT32 and use up to 3 partitions.

 

PartIMGPointer.exe (54,5 KB)


Edited by nguyentu, 07 January 2017 - 04:06 PM.


#11 steve6375

steve6375

    Platinum Member

  • Developer
  • 7566 posts
  • Location:UK
  • Interests:computers, programming (masm,vb6,C,vbs), photography,TV,films
  •  
    United Kingdom

Posted 07 January 2017 - 04:14 PM

Can you explain syntax and how it works please? Is it FAT32 only?

Is it a 32-bit app?

 

When I try it just says missing filename for me...



#12 nguyentu

nguyentu

    Frequent Member

  • Advanced user
  • 102 posts
  •  
    Vietnam

Posted 07 January 2017 - 04:16 PM

Sorry, my English is very bad, I can not explain clearly.

 

It supports FAT32 & NTFS. Yes, its 32-bit version!

 

PartIMGPointer.exe -f G:\Bitdefender.img

 

 

PartIMGPointer.exe -f FileName [-p PartitionNumber] [-fs Filesystem] [-y] [-h]

 
FileName:
        Full path to the file on your drive.
PartitionNumber:
        The number of the partition (1-based).
        Default is 4.
        Existing information of this partition will be lost.
Filesystem:
        Filesystem of FileName.
        2 characters.
-y:
        Yes to all.
-h:
        Display this help.
[]:
        Optional.

Edited by nguyentu, 07 January 2017 - 04:20 PM.


#13 steve6375

steve6375

    Platinum Member

  • Developer
  • 7566 posts
  • Location:UK
  • Interests:computers, programming (masm,vb6,C,vbs), photography,TV,films
  •  
    United Kingdom

Posted 07 January 2017 - 04:21 PM

Switch_E2B calls  GetFileExtents.exe which only works on NTFS files.

Ideally I would like an app that works on exFAT, FAT32 and NTFS - it should report sector at which file starts on disk and the number of sectors occupied by the file on the disk (rather than the size of the file) -_-



#14 steve6375

steve6375

    Platinum Member

  • Developer
  • 7566 posts
  • Location:UK
  • Interests:computers, programming (masm,vb6,C,vbs), photography,TV,films
  •  
    United Kingdom

Posted 07 January 2017 - 04:26 PM

what is valid 2 characters for filesystem NT  FA?? 

Why do we need to specify partition number and filesystem? This is difficult to determine from Windows??

 

PartImagePtn "c:\_ISO\long folder\file.imgptn"



#15 nguyentu

nguyentu

    Frequent Member

  • Advanced user
  • 102 posts
  •  
    Vietnam

Posted 07 January 2017 - 04:26 PM

Yes, it works on NTFS and FAT32, I don't know how it works on exFAT. 

 

number of sectors = the size of the file / byte per sector

 

Right?



#16 Wonko the Sane

Wonko the Sane

    The Finder

  • Advanced user
  • 16066 posts
  • Location:The Outside of the Asylum (gate is closed)
  •  
    Italy

Posted 07 January 2017 - 04:29 PM

This:

Filesystem:
Filesystem of FileName.
2 characters.

Possibly should be (protective) Partition Table ID.

I.e. 07 means indifferently NTFS, HPFS or exFAT (and possibly UDF too)

 

 

:duff:

Wonko



#17 steve6375

steve6375

    Platinum Member

  • Developer
  • 7566 posts
  • Location:UK
  • Interests:computers, programming (masm,vb6,C,vbs), photography,TV,films
  •  
    United Kingdom

Posted 07 January 2017 - 04:31 PM

What does it do?

It seems to be trying to update the partition table???



#18 nguyentu

nguyentu

    Frequent Member

  • Advanced user
  • 102 posts
  •  
    Vietnam

Posted 07 January 2017 - 04:39 PM

The parameters in square brackets are optional.

 

As @Wonko mentioned, its Partition Types, I can only identify the format FAT, NTFS and exFAT, everything else you need to specify

 

In 4 primary partitions, we'll use the partition 2, 3 and 4 to point to the file .imgPTN. That is why it has the option of partition numbers.

 

Yes, it will update the partition table.

 

Sorry, don't use it on your hdd, link has been removed


Edited by nguyentu, 07 January 2017 - 04:46 PM.


#19 steve6375

steve6375

    Platinum Member

  • Developer
  • 7566 posts
  • Location:UK
  • Interests:computers, programming (masm,vb6,C,vbs), photography,TV,films
  •  
    United Kingdom

Posted 07 January 2017 - 04:49 PM

PartImgPointer -f d:\dddd.iso

 

returns unknown filesystem on NTFS USB drive

 

I Still do not understand what it is supposed to do? Does it write a new partition entry to the disk (d: in this case)?

Does it update the Reserved Sectors in the BPB?

Does it use CHS or max LBA parameters in the partition table entry?

What partition size does it use (file length or file size on disk)?

Please explain action of code.

 

What I would like is a better version of GetFileExtents.exe...

Switch_E2B.exe does other things like look at the file extension (.imgPTNLBAa23, .imgPTNLBA, etc.), make partition active, it also looks for files with no extension of the same name and puts that in ptn 3. It also does checks on the drive, etc.



#20 nguyentu

nguyentu

    Frequent Member

  • Advanced user
  • 102 posts
  •  
    Vietnam

Posted 07 January 2017 - 05:16 PM

Why not imgPTN instead of ISO?

It will update the MBR partition table, partition that you choose (default 4) will be replaced, everything else will stay the same

It use file length & update the Reserved Sectors

I use WinAPI to perform the job, so it would be appropriate in all cases.
 
I think I need to update


#21 steve6375

steve6375

    Platinum Member

  • Developer
  • 7566 posts
  • Location:UK
  • Interests:computers, programming (masm,vb6,C,vbs), photography,TV,films
  •  
    United Kingdom

Posted 07 January 2017 - 05:33 PM

To use .imgPTN and Switch_E2B.exe

 

Action of SWITCH_E2B.exe...

 

gets sector start and file length of specified file (getFileExtents)

Save USB MBR to sector LBA30 and LBA60 (if they are unused or contain MBR already)

write new ptn 1 (first entry) with .imgPTN file

Update PBR with reserved sectors

Make active if 'A' is in extension - e.g. .imgPTNa, .imgPTNLBAa, .imgPTNLBAa23, .imgPTN23a, etc.

Use max CHS if 'LBA' is in extension for CHS part of ptn entry

Use type 07 or 0C depending on FS type or 0 if unknown

Look for 2nd file without extension

Add this into ptn #3 in same way (use 0 for type)

 

If extension does not contain '23' then clear ptns #2,#3.#4

but, if ptn #2 is type 21h and .imgPTN is extension, then keep ptn#2 entry

 

There is more logic in Switch_e2B too which I cannot remember at this moment...



#22 nguyentu

nguyentu

    Frequent Member

  • Advanced user
  • 102 posts
  •  
    Vietnam

Posted 07 January 2017 - 10:08 PM

Why not backup the MBR and stores it on disk?

 

I have tried and successfully boot into Bitdefender, Parted Magic...
List partitions are identified correctly on the Windows Disk Management and Grub2.


#23 Guest_AnonVendetta_*

Guest_AnonVendetta_*
  • Guests

Posted 08 January 2017 - 01:52 AM

OP only cares about UDF support as it relates to E2B. Not exFAT, etc. This is something I would like to see as well. The last few posts have gotten entirely off course. So if this is turning into a discussion with a different focus, why not branch off and start your own thread? If @steve6375 has no intention or considerations for supporting UDF within E2B, then this topic is effectively dead.



#24 nguyentu

nguyentu

    Frequent Member

  • Advanced user
  • 102 posts
  •  
    Vietnam

Posted 08 January 2017 - 02:13 AM

You are right, sorry about that.



#25 Qual

Qual
  • Members
  • 1 posts
  •  
    Netherlands

Posted 08 January 2017 - 09:06 AM

The internal format of a .imgPTN file can be either FAT32 or NTFS.

If there was a good case for it, I think I could also support exFAT (??).

Steve, yes there is a very good reason to support exFAT.
All users formatting there E2B USB flash drive as a NTFS volume have trouble ejecting their flash drive.
Due to Transactional NTFS (TxF) the drive is "currently in use" and cannot be ejected. (just google "in use rmmetadata") 

exFAT solves both the 4GB limit and the TxF eject problem.

So exFAT support is very appreciated.







Also tagged with one or more of these keywords: easy2boot

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users