Page 1 of 1

Flash Drive with Ext4 and Windows-compatible filesystem

Posted: 09 Jun 2014, 15:14
by tin
Hey guys!

So, i have just recently gotten into porteus and love the idea of this portable os, so i decided to install it on my 16gb usb3.0 flash drive.
i didn't want to use the .dat file option that you need when using fat32 (or ntfs) so i decided to partition my flash drive to a ext4 formatted filesystem, and a fat32 one, so i can access my files over windows and not have to boot from the flash drive everytime.
unfortunately, as most of you may know, windows can only register the first partition of a flash drive, alas, the fat32 partition has to be the first one.
so after playing around and having a lot of trouble trying to to do partition the flash drive using linux mint (windows wouldn't recognize the fat32 partition at all) i tried doing it in windows 7, but i couldn't create a readable partition that isn't taking up the whole drive! so i downloaded minitool partitioning wizard and used that, but now i coulnd install porteus via linux mint!!!

Please help guys! Long story short, what i want is to have porteus installed on ext4, but also have a partition readable by windows!
i'm actually a noob regarding all of this basically, but i still tried my best (and failed terribly)

Thanks (and sorry for the messy post i never use forums xD)

tin

Re: Flash Drive with Ext4 and Windows-compatible filesystem

Posted: 09 Jun 2014, 16:26
by Blaze
Hi, tin.
Try this app Paragon ExtFS for Windows
Image
Regards,
Blaze

Re: Flash Drive with Ext4 and Windows-compatible filesystem

Posted: 09 Jun 2014, 17:09
by Ed_P
Blaze wrote:Hi, tin.
Try this app Paragon ExtFS for Windows
Regards,
Blaze
An interesting app Blaze. Image Thanks for posting it.

tin, being a Windows user also, I understand your situation. You will have to use a Linux system to initialize your flash drive and allocate it's partitions. You could allocate them as 50/50, 8GB for the first partition and 8GB for the second, format the 1st as FAT32 and the 2nd as ext4. Then copy the Porteus files from your ISO to the 2nd partition and then if you run the Porteus-installater-for-Linux.com in the boot directory I believe that will work. I have not personally tried this but I think it will.

Re: Flash Drive with Ext4 and Windows-compatible filesystem

Posted: 09 Jun 2014, 21:36
by tin
Thanks for the fast responses! :)

Blaze, that's a great solution for my own pc, the problem is that this is the flash drive i always take with me and use on other pcs, for example my school and the computers of other people i know, so i can't install this app on every single pc i want to use the flash drive with.. :/

Ed, that's exactly what i did, i formatted the first partition as fat32 and the second one as ext4, both occupying 50% of the drive, but when i did this in linux, windows couldn't recognize the drive and asked me to format it (the whole thing) and when i did it in windows with MiniTool Partition Wizard, it wouldn't work with linux, because it for some reason thought it is a gpt drive, which it is not. :s

any other suggestions? :/

tin

Re: Flash Drive with Ext4 and Windows-compatible filesystem

Posted: 09 Jun 2014, 23:20
by donald
@tin
--> did this in linux, windows couldn't recognize <--
Open windows "Disk Management", if you can see the Partition (fat32) you may need
to manually assign a Drive-Letter.

--> thought it is a gpt drive <--
Are you sure that you created a ms-dos partition table?

The easiest way to do the Partitioning,
is within a running Porteus (kde) Live-CD/usb environment.

Re: Flash Drive with Ext4 and Windows-compatible filesystem

Posted: 09 Jun 2014, 23:30
by tin
thanks donald, i'll try that next, will let you know if it worked ;)
and yes i am pretty sure minitool partition wizard told me it is, but thank you anyway haha

tin

Flash Drive with Ext4 and Windows-compatible filesystem

Posted: 09 Jun 2014, 23:47
by Ed_P
tin if manually assigning a drive letter under Windows doesn't resolve the problem it might be good to nuke the drive and start over. See this posting for how to: Uefi and porteus 3.0

Once cleared I use Porteus's GParted app to allocated partitions and format them.

hth

Re: Flash Drive with Ext4 and Windows-compatible filesystem

Posted: 10 Jun 2014, 02:08
by brokenman
Here is what I would do. Boot porteus (or any other live distro) and open a terminal.

Unmount all USB partitions then open the partition creation utility.
cfdisk /dev/sdb

From there you can use the CLI to create your partitions. Create the first partition as FAT32, second as ext2. Set the first partition as bootable. Write the changes.
mkdosfs /dev/sdb1
mkfs.ext2 /dev/sdb2
partprobe /dev/sdb


Copy the boot folder from the Porteus ISO onto the first partition. Copy the porteus folder from the porteus ISO onto the second partition. Change into the boot folder and run the installer_for_linux option.
Find the UUID of the second partition: blkid
Open the file boot/syslinux/porteus.cfg and add to the APPEND line from=UUID:XXXXXXXXXXXXX (where XXXXXX is your UUID for the second partition)
Reboot.

Re: Flash Drive with Ext4 and Windows-compatible filesystem

Posted: 10 Jun 2014, 15:31
by Ed_P
A very clever approach brokenman. :good:

Re: Flash Drive with Ext4 and Windows-compatible filesystem

Posted: 10 Jun 2014, 18:52
by brokenman
Thanks. In theory only though.

I havn't actually tested it in Porteus v3.0 but this is the way we used to do it back when the bootloader did not support extX partitions and would only run from FAT32. I didn't want to run porteus with a save.dat file hence the second ext2 partition.

Re: Flash Drive with Ext4 and Windows-compatible filesystem

Posted: 10 Jun 2014, 22:46
by tin
Ok so first of all big thanks to all of you for ypur great help! :))

Thanks Ed for the nuke, did that! :)

Brokenman, thanks for the instructions, since CLI does not use the command line directly but instead lets you choose the options with the arrow keys for the options, i used gparted for the partitioning. I formatted the first partition as fat32 and the second one as ext2 and then added the boot label to the fat32 one. I copied the boot and porteus folders as you told me and then installed porteus using the terminal. Well that was easy, but then when i opened the cfg file i had no idea what to do since i really dont understand the code... So i did what common sense told me to and added APPEND initrd=UUID:XXX by copying the UUID i found in the information window in gparted. And wow who would have guessed, it worked, even though my approach was not really the one you told me! :D

Great thanks to all of you that helped me, this is really a great community, i mean getting help from the from the forum admin says a lot about it!

Thanks again,
tin

Re: Flash Drive with Ext4 and Windows-compatible filesystem

Posted: 10 Jun 2014, 22:48
by tin
I still do have one question, why should i use ext2 and ext4? I would think that ext4 is a newer version... Or is it just different?

Re: Flash Drive with Ext4 and Windows-compatible filesystem

Posted: 10 Jun 2014, 23:11
by brokenman
Glad you got it sorted and kudos for actually trying something new and experimenting (and sharing). You will do well with linux.

ext2 is a non journaling file system which means less read/writes to the device which means a longer life span. ext4 is safer in terms of data corruption due to journaling. There is no best or worst really, just a preference. You sacrifice life span for security or vice versa. The price of pendirves is rather good these days so it makes an ext4 file system worth while. I have never suffered data corruption and only ever used ext2, so I typed it out of habit more than anything.